fix apic id reading in x2apic mode
PATCH 1/1 fix apic id reading in x2apic mode
Format of apic id register is different in x2apic mode. Return correct apic id when apic is in x2apic mode.
Signed-off-by Gleb Natapov <[email protected]>
arch/x86/kvm/lapic.c +6 -0
@@ -551,6 +551,12 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)return 0 ;switch (offset) { +case APIC_ID : +if (apic_x2apic_mode (apic)) + val =kvm_apic_id (apic); +else + val =kvm_apic_id (apic) <<24 ; +break ;case APIC_ARBPRI :printk (KERN_WARNING "Access APIC ARBPRI register " "which is for P6\n" );
--
Gleb.
Avi Kivity
AppliedQuoted 4 lines · Gleb Natapov
Format of apic id register is different in x2apic mode. Return correct apic id when apic is in x2apic mode.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function