powerpc/kvm/book3s_hv: Rework the secondary inhibit code
As part of the support for split core on POWER8, we want to be able to block splitting of the core while KVM VMs are active. The logic to do that would be exactly the same as the code we currently have for inhibiting onlining of secondaries. Instead of adding an identical mechanism to block split core, rework the secondary inhibit code to be a "HV KVM is active" check. We can then use that in both the cpu hotplug code and the upcoming split core code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Michael Neuling <mikey@neuling.org> Acked-by: Alexander Graf <agraf@suse.de> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
64bb80d87f
commit
441c19c8a2
@@ -337,6 +337,10 @@ static inline void kvmppc_fast_vcpu_kick(struct kvm_vcpu *vcpu)
|
||||
vcpu->kvm->arch.kvm_ops->fast_vcpu_kick(vcpu);
|
||||
}
|
||||
|
||||
extern void kvm_hv_vm_activated(void);
|
||||
extern void kvm_hv_vm_deactivated(void);
|
||||
extern bool kvm_hv_mode_active(void);
|
||||
|
||||
#else
|
||||
static inline void __init kvm_cma_reserve(void)
|
||||
{}
|
||||
@@ -356,6 +360,9 @@ static inline void kvmppc_fast_vcpu_kick(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
kvm_vcpu_kick(vcpu);
|
||||
}
|
||||
|
||||
static inline bool kvm_hv_mode_active(void) { return false; }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KVM_XICS
|
||||
|
Reference in New Issue
Block a user