KVM: Allow arch code to track number of memslot address spaces per VM
authorSean Christopherson <seanjc@google.com>
Fri, 27 Oct 2023 18:22:04 +0000 (11:22 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Nov 2023 13:01:05 +0000 (08:01 -0500)
commiteed52e434bc33603ddb0af62b6c4ef818948489d
tree0bf93687335ea9b38814f16182ca9a6f55a919a3
parent2333afa17af0f4b6651214ee17cfd5ae5f47787a
KVM: Allow arch code to track number of memslot address spaces per VM

Let x86 track the number of address spaces on a per-VM basis so that KVM
can disallow SMM memslots for confidential VMs.  Confidentials VMs are
fundamentally incompatible with emulating SMM, which as the name suggests
requires being able to read and write guest memory and register state.

Disallowing SMM will simplify support for guest private memory, as KVM
will not need to worry about tracking memory attributes for multiple
address spaces (SMM is the only "non-default" address space across all
architectures).

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Message-Id: <20231027182217.3615211-23-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/powerpc/kvm/book3s_hv.c
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/debugfs.c
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/dirty_ring.c
virt/kvm/kvm_main.c