aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorIsaku Yamahata <[email protected]>2024-11-12 07:37:43 +0000
committerPaolo Bonzini <[email protected]>2025-03-14 18:20:52 +0000
commit7d10ffb1acac2c17c2c839e2db88565529e8c8ef (patch)
tree37ae7a9a34c60332211a1d0b2f25a65f6e3ff8c6 /rust/helpers/task.c
parentKVM: x86/mmu: Add setter for shadow_mmio_value (diff)
downloadkernel-7d10ffb1acac2c17c2c839e2db88565529e8c8ef.tar.gz
kernel-7d10ffb1acac2c17c2c839e2db88565529e8c8ef.zip
KVM: TDX: Set per-VM shadow_mmio_value to 0
Set per-VM shadow_mmio_value to 0 for TDX. With enable_mmio_caching on, KVM installs MMIO SPTEs for TDs. To correctly configure MMIO SPTEs, TDX requires the per-VM shadow_mmio_value to be set to 0. This is necessary to override the default value of the suppress VE bit in the SPTE, which is 1, and to ensure value 0 in RWX bits. For MMIO SPTE, the spte value changes as follows: 1. initial value (suppress VE bit is set) 2. Guest issues MMIO and triggers EPT violation 3. KVM updates SPTE value to MMIO value (suppress VE bit is cleared) 4. Guest MMIO resumes. It triggers VE exception in guest TD 5. Guest VE handler issues TDG.VP.VMCALL<MMIO> 6. KVM handles MMIO 7. Guest VE handler resumes its execution after MMIO instruction Signed-off-by: Isaku Yamahata <[email protected]> Co-developed-by: Rick Edgecombe <[email protected]> Signed-off-by: Rick Edgecombe <[email protected]> Co-developed-by: Yan Zhao <[email protected]> Signed-off-by: Yan Zhao <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions