From: Andrew Cooper Date: Fri, 20 Jan 2017 13:41:47 +0000 (+0000) Subject: x86/cpuid: Handle leaf 0x80000009 in guest_cpuid() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2898 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1cc3ecf5050375781d08b0aa4b8e2eb99845bf4b;p=xen.git x86/cpuid: Handle leaf 0x80000009 in guest_cpuid() Leaf 0x80000009 is reserved. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index b806cc5f07..f4c7b8bb15 100644 --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -206,6 +206,8 @@ static void recalculate_misc(struct cpuid_policy *p) p->extd.raw[0x8].a &= 0x0000ffff; /* GuestMaxPhysAddr hidden. */ p->extd.raw[0x8].c &= 0x0003f0ff; + + p->extd.raw[0x9] = EMPTY_LEAF; break; } } @@ -712,7 +714,7 @@ static void pv_cpuid(uint32_t leaf, uint32_t subleaf, struct cpuid_leaf *res) case 0x2 ... 0x3: case 0x7 ... 0x9: case 0xc ... XSTATE_CPUID: - case 0x80000000 ... 0x80000008: + case 0x80000000 ... 0x80000009: ASSERT_UNREACHABLE(); /* Now handled in guest_cpuid(). */ } @@ -808,7 +810,7 @@ static void hvm_cpuid(uint32_t leaf, uint32_t subleaf, struct cpuid_leaf *res) case 0x2 ... 0x3: case 0x7 ... 0x9: case 0xc ... XSTATE_CPUID: - case 0x80000000 ... 0x80000008: + case 0x80000000 ... 0x80000009: ASSERT_UNREACHABLE(); /* Now handled in guest_cpuid(). */ } @@ -891,7 +893,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, default: goto legacy; - case 0x80000000 ... 0x80000008: + case 0x80000000 ... 0x80000009: *res = p->extd.raw[leaf & 0xffff]; break; }