|
@@ -2022,7 +2022,11 @@ static void avic_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
|
|
if (!kvm_vcpu_apicv_active(vcpu))
|
|
if (!kvm_vcpu_apicv_active(vcpu))
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
- if (WARN_ON(h_physical_id >= AVIC_MAX_PHYSICAL_ID_COUNT))
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * Since the host physical APIC id is 8 bits,
|
|
|
|
|
+ * we can support host APIC ID upto 255.
|
|
|
|
|
+ */
|
|
|
|
|
+ if (WARN_ON(h_physical_id > AVIC_PHYSICAL_ID_ENTRY_HOST_PHYSICAL_ID_MASK))
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
entry = READ_ONCE(*(svm->avic_physical_id_cache));
|
|
entry = READ_ONCE(*(svm->avic_physical_id_cache));
|