yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-rhel-Set-host-phys-bits-limit-48-on-rhel-machine-typ.patch

26ba25
From 01a2ecb4c38fe4a35455ea706e76984ee8d5a769 Mon Sep 17 00:00:00 2001
26ba25
From: Eduardo Habkost <ehabkost@redhat.com>
26ba25
Date: Thu, 13 Dec 2018 15:52:00 +0000
26ba25
Subject: [PATCH 2/5] rhel: Set host-phys-bits-limit=48 on rhel machine-types
26ba25
26ba25
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
26ba25
Message-id: <20181213155200.20300-3-ehabkost@redhat.com>
26ba25
Patchwork-id: 83480
26ba25
O-Subject: [RHEL8/rhel qemu-kvm PATCH 2/2] rhel: Set host-phys-bits-limit=48 on rhel machine-types
26ba25
Bugzilla: 1598284
26ba25
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
26ba25
RH-Acked-by: Pankaj Gupta <pagupta@redhat.com>
26ba25
RH-Acked-by: Bandan Das <bsd@redhat.com>
26ba25
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
26ba25
26ba25
Upstream status: not applicable
26ba25
26ba25
Currently we use the host physical address size by default on
26ba25
VMs.  This was a good default on most cases, but this is not the
26ba25
case on host CPUs supporting 5-level EPT.  On those cases, we
26ba25
want VMs to use 4-level EPT by default.
26ba25
26ba25
Ensure VMs will use 4-level EPT by default, by limiting physical
26ba25
address bits to 48.
26ba25
26ba25
Not applicable upstream because upstream doesn't set
26ba25
host-phys-bits=on by default.
26ba25
26ba25
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
26ba25
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
26ba25
---
26ba25
 include/hw/i386/pc.h | 5 +++++
26ba25
 1 file changed, 5 insertions(+)
26ba25
26ba25
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
26ba25
index 285e8df..c29176d 100644
26ba25
--- a/include/hw/i386/pc.h
26ba25
+++ b/include/hw/i386/pc.h
26ba25
@@ -963,6 +963,11 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
26ba25
             .property = "host-phys-bits",\
26ba25
             .value = "on",\
26ba25
         },\
26ba25
+        { /* PC_RHEL_COMPAT */ \
26ba25
+            .driver = TYPE_X86_CPU,\
26ba25
+            .property = "host-phys-bits-limit",\
26ba25
+            .value = "48",\
26ba25
+        },\
26ba25
         { /* PC_RHEL_COMPAT bz 1508330 */ \
26ba25
             .driver = "vfio-pci",\
26ba25
             .property = "x-no-geforce-quirks",\
26ba25
-- 
26ba25
1.8.3.1
26ba25