From: Andrew Cooper Date: Wed, 18 Jan 2017 18:13:17 +0000 (+0000) Subject: x86/cpuid: Handle the long vendor string in guest_cpuid() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2901 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a75f6163cf838a2bdfe67f7bcbe26beccd37106d;p=xen.git x86/cpuid: Handle the long vendor string in guest_cpuid() Leaves 0x80000002 through 0x80000004 are plain ASCII text, and are left exactly as the toolstack chooses. Signed-off-by: Andrew Cooper Reviewed-by: Doug Goldstein Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index c06b5a6a8e..9cea13c11e 100644 --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -698,7 +698,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 ... 0x80000001: + case 0x80000000 ... 0x80000004: ASSERT_UNREACHABLE(); /* Now handled in guest_cpuid(). */ } @@ -815,7 +815,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 ... 0x80000001: + case 0x80000000 ... 0x80000004: ASSERT_UNREACHABLE(); /* Now handled in guest_cpuid(). */ } @@ -898,7 +898,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, default: goto legacy; - case 0x80000000 ... 0x80000001: + case 0x80000000 ... 0x80000004: *res = p->extd.raw[leaf & 0xffff]; break; }