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

383d26
From a402e015f9945358215e63b00d9efae44693ccd5 Mon Sep 17 00:00:00 2001
383d26
From: Eduardo Habkost <ehabkost@redhat.com>
383d26
Date: Thu, 11 Apr 2019 21:48:46 +0200
383d26
Subject: [PATCH 160/163] rhel: Set host-phys-bits-limit=48 on rhel
383d26
 machine-types
383d26
383d26
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
383d26
Message-id: <20190411214846.8816-3-ehabkost@redhat.com>
383d26
Patchwork-id: 85609
383d26
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 2/2] rhel: Set host-phys-bits-limit=48 on rhel machine-types
383d26
Bugzilla: 1691519
383d26
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
383d26
RH-Acked-by: Pankaj Gupta <pagupta@redhat.com>
383d26
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
383d26
383d26
Upstream status: not applicable
383d26
383d26
Currently we use the host physical address size by default on
383d26
VMs.  This was a good default on most cases, but this is not the
383d26
case on host CPUs supporting 5-level EPT.  On those cases, we
383d26
want VMs to use 4-level EPT by default.
383d26
383d26
Ensure VMs will use 4-level EPT by default, by limiting physical
383d26
address bits to 48.
383d26
383d26
Not applicable upstream because upstream doesn't set
383d26
host-phys-bits=on by default.
383d26
383d26
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
383d26
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
---
383d26
 include/hw/i386/pc.h | 5 +++++
383d26
 1 file changed, 5 insertions(+)
383d26
383d26
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
383d26
index 88e5a92..1e9f252 100644
383d26
--- a/include/hw/i386/pc.h
383d26
+++ b/include/hw/i386/pc.h
383d26
@@ -963,6 +963,11 @@ extern void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id);
383d26
             .property = "host-phys-bits",\
383d26
             .value = "on",\
383d26
         },\
383d26
+        { /* PC_RHEL_COMPAT */ \
383d26
+            .driver = TYPE_X86_CPU,\
383d26
+            .property = "host-phys-bits-limit",\
383d26
+            .value = "48",\
383d26
+        },\
383d26
         { /* PC_RHEL_COMPAT bz 1508330 */ \
383d26
             .driver = "vfio-pci",\
383d26
             .property = "x-no-geforce-quirks",\
383d26
-- 
383d26
1.8.3.1
383d26