From: Nadav Amit <nadav.amit@xxxxxxxxx> The local APIC existance test considers reserved bits (bits [8:15]), which is not good. In addition, it is best to consider every integrated APIC version as valid. Cc: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx> --- x86/apic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x86/apic.c b/x86/apic.c index cfdbef2..21041ec 100644 --- a/x86/apic.c +++ b/x86/apic.c @@ -11,11 +11,11 @@ static void test_lapic_existence(void) { - u32 lvr; + u8 version; - lvr = apic_read(APIC_LVR); - printf("apic version: %x\n", lvr); - report("apic existence", (u16)lvr == 0x14); + version = (u8)apic_read(APIC_LVR); + printf("apic version: %x\n", version); + report("apic existence", version >= 0x10 && version <= 0x15); } #define TSC_DEADLINE_TIMER_VECTOR 0xef -- 2.17.1