qemu/accel/kvm
Isaku Yamahata 565f4768bb kvm/tdx: Ignore memory conversion to shared of unassigned region
TDX requires vMMIO region to be shared.  For KVM, MMIO region is the region
which kvm memslot isn't assigned to (except in-kernel emulation).
qemu has the memory region for vMMIO at each device level.

While OVMF issues MapGPA(to-shared) conservatively on 32bit PCI MMIO
region, qemu doesn't find corresponding vMMIO region because it's before
PCI device allocation and memory_region_find() finds the device region, not
PCI bus region.  It's safe to ignore MapGPA(to-shared) because when guest
accesses those region they use GPA with shared bit set for vMMIO.  Ignore
memory conversion request of non-assigned region to shared and return
success.  Otherwise OVMF is confused and panics there.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-ID: <20240229063726.610065-35-xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-04-23 17:35:26 +02:00
..
kvm-accel-ops.c KVM: remove kvm_arch_cpu_check_are_resettable 2024-04-23 17:35:25 +02:00
kvm-all.c kvm/tdx: Ignore memory conversion to shared of unassigned region 2024-04-23 17:35:26 +02:00
kvm-cpus.h gdbstub: Use vaddr type for generic insert/remove_breakpoint() API 2023-02-27 22:29:01 +01:00
meson.build target/i386/kvm: Restrict SEV stubs to x86 architecture 2021-10-13 10:47:49 +02:00
trace-events kvm: handle KVM_EXIT_MEMORY_FAULT 2024-04-23 17:35:26 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00