On 23/4/24 17:09, Paolo Bonzini wrote:
From: Isaku Yamahata <isaku.yamah...@linux.intel.com>
Add a q35 property to check whether or not SMM ranges, e.g. SMRAM, TSEG,
etc... exist for the target platform. TDX doesn't support SMM and doesn't
play nice with QEMU modifying related guest memory ranges.
Signed-off-by: Isaku Yamahata <isaku.yamah...@linux.intel.com>
Co-developed-by: Sean Christopherson <sean.j.christopher...@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopher...@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao...@intel.com>
Signed-off-by: Michael Roth <michael.r...@amd.com>
Message-ID: <20240320083945.991426-19-michael.r...@amd.com>
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
include/hw/i386/pc.h | 1 +
include/hw/pci-host/q35.h | 1 +
hw/i386/pc_q35.c | 2 ++
hw/pci-host/q35.c | 42 +++++++++++++++++++++++++++------------
4 files changed, 33 insertions(+), 13 deletions(-)
@@ -578,6 +590,10 @@ static void mch_realize(PCIDevice *d, Error **errp)
PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE);
}
+ if (!mch->has_smm_ranges) {
+ return;
Are we sure we are not skipping something unrelated to SMM like the
"QEMU specific hack" with the tseg-blackhole region?
+ }
+
/* if *disabled* show SMRAM to all CPUs */
memory_region_init_alias(&mch->smram_region, OBJECT(mch), "smram-region",
mch->pci_address_space,
MCH_HOST_BRIDGE_SMRAM_C_BASE,