aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2024-05-30 06:16:39 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2024-06-05 11:01:06 +0200
commit413a67450750e0459efeffc3db3ba9759c3e381c (patch)
tree0e19144e59f5b06978b0e31c076897f0f9ebf5a8 /system
parenta0aa6db7ce72a08703774107185e639e73e7754c (diff)
downloadqemu-413a67450750e0459efeffc3db3ba9759c3e381c.zip
qemu-413a67450750e0459efeffc3db3ba9759c3e381c.tar.gz
qemu-413a67450750e0459efeffc3db3ba9759c3e381c.tar.bz2
hw/i386/sev: Use guest_memfd for legacy ROMs
Current SNP guest kernels will attempt to access these regions with with C-bit set, so guest_memfd is needed to handle that. Otherwise, kvm_convert_memory() will fail when the guest kernel tries to access it and QEMU attempts to call KVM_SET_MEMORY_ATTRIBUTES to set these ranges to private. Whether guests should actually try to access ROM regions in this way (or need to deal with legacy ROM regions at all), is a separate issue to be addressed on kernel side, but current SNP guest kernels will exhibit this behavior and so this handling is needed to allow QEMU to continue running existing SNP guest kernels. Signed-off-by: Michael Roth <michael.roth@amd.com> [pankaj: Added sev_snp_enabled() check] Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com> Message-ID: <20240530111643.1091816-28-pankaj.gupta@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system')
0 files changed, 0 insertions, 0 deletions