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

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