]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: Add an is_mirror member for union kvm_mmu_page_role
authorIsaku Yamahata <isaku.yamahata@intel.com>
Thu, 18 Jul 2024 21:12:17 +0000 (14:12 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 23 Dec 2024 13:29:45 +0000 (08:29 -0500)
commit6961ab0bae5282de221fed5fc3e9db2b9180c4d6
treecd457c60b8e3ceb609de0413abe6879637d0e9e6
parent3a4eb364a46d00b7b9f643011b4652bd7f4eecf2
KVM: x86/mmu: Add an is_mirror member for union kvm_mmu_page_role

Introduce a "is_mirror" member to the kvm_mmu_page_role union to identify
SPTEs associated with the mirrored EPT.

The TDX module maintains the private half of the EPT mapped in the TD in
its protected memory. KVM keeps a copy of the private GPAs in a mirrored
EPT tree within host memory. This "is_mirror" attribute enables vCPUs to
find and get the root page of mirrored EPT from the MMU root list for a
guest TD. This also allows KVM MMU code to detect changes in mirrored EPT
according to the "is_mirror" mmu page role and propagate the changes to
the private EPT managed by TDX module.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Message-ID: <20240718211230.1492011-6-rick.p.edgecombe@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu_internal.h
arch/x86/kvm/mmu/spte.h