KVM: x86: replace kvm_apic_id with kvm_{x,x2}apic_id
There were three calls sites: - recalculate_apic_map and kvm_apic_match_physical_addr, where it would only complicate implementation of x2APIC hotplug; - in apic_debug, where it was still somewhat preserved, but keeping the old function just for apic_debug was not worth it Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -202,17 +202,6 @@ static inline int kvm_lapic_latched_init(struct kvm_vcpu *vcpu)
|
||||
return lapic_in_kernel(vcpu) && test_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
|
||||
}
|
||||
|
||||
static inline u32 kvm_apic_id(struct kvm_lapic *apic)
|
||||
{
|
||||
/* To avoid a race between apic_base and following APIC_ID update when
|
||||
* switching to x2apic_mode, the x2apic mode returns initial x2apic id.
|
||||
*/
|
||||
if (apic_x2apic_mode(apic))
|
||||
return apic->vcpu->vcpu_id;
|
||||
|
||||
return kvm_lapic_get_reg(apic, APIC_ID) >> 24;
|
||||
}
|
||||
|
||||
bool kvm_apic_pending_eoi(struct kvm_vcpu *vcpu, int vector);
|
||||
|
||||
void wait_lapic_expire(struct kvm_vcpu *vcpu);
|
||||
|
Reference in New Issue
Block a user