Re: [kvm-unit-tests PATCH] x86: Fix APIC version register test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/04/19 16:32, nadav.amit@xxxxxxxxx wrote:
> 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
> 

Queued, thanks.

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux