diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2022-03-04 11:48:38 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-05-02 11:42:42 -0400 |
commit | f502cc568de95e5ed9cc9e6133fa454fbe0c5c01 (patch) | |
tree | 4fbed31352b8dd3ce27c1edb7d790bbe7c8bdb27 /arch/arm64/include/asm/kvm_host.h | |
parent | KVM: x86: avoid loading a vCPU after .vm_destroy was called (diff) | |
download | linux-dev-f502cc568de95e5ed9cc9e6133fa454fbe0c5c01.tar.xz linux-dev-f502cc568de95e5ed9cc9e6133fa454fbe0c5c01.zip |
KVM: Add max_vcpus field in common 'struct kvm'
For TDX guests, the maximum number of vcpus needs to be specified when the
TDX guest VM is initialized (creating the TDX data corresponding to TDX
guest) before creating vcpu. It needs to record the maximum number of
vcpus on VM creation (KVM_CREATE_VM) and return error if the number of
vcpus exceeds it
Because there is already max_vcpu member in arm64 struct kvm_arch, move it
to common struct kvm and initialize it to KVM_MAX_VCPUS before
kvm_arch_init_vm() instead of adding it to x86 struct kvm_arch.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-Id: <e53234cdee6a92357d06c80c03d77c19cdefb804.1646422845.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 94a27a7520f4..27ebb2929e0c 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -107,9 +107,6 @@ struct kvm_arch { /* VTCR_EL2 value for this VM */ u64 vtcr; - /* The maximum number of vCPUs depends on the used GIC model */ - int max_vcpus; - /* Interrupt controller */ struct vgic_dist vgic; |