Re: [Xen-devel] [PATCH 5/6] x86/cpuid: Handle the long vendor string in guest_cpuid()

2017-01-20 Thread Andrew Cooper
On 20/01/17 16:00, Jan Beulich wrote:
 On 18.01.17 at 20:40,  wrote:
>> Leaves 0x8002 through 0x8004 are plain ASCII text, and require no
>> specific recalculation.
> Do they not? We don't currently get them in line with a perhaps
> overridden vendor, but maybe we should?

There is no existing logic doing this.  My point here is we don't need
to make any adjustments to the values provided by the toolstack.

~Andrew

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 5/6] x86/cpuid: Handle the long vendor string in guest_cpuid()

2017-01-20 Thread Jan Beulich
>>> On 18.01.17 at 20:40,  wrote:
> Leaves 0x8002 through 0x8004 are plain ASCII text, and require no
> specific recalculation.

Do they not? We don't currently get them in line with a perhaps
overridden vendor, but maybe we should?

> @@ -936,6 +938,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
>  goto legacy;
>  
>  case 0x8000:
> +case 0x8002 ... 0x8004:
>  *res = p->extd.raw[leaf & 0x];
>  break;
>  }

Ah yes, here we go.

In any event
Reviewed-by: Jan Beulich 

Jan


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 5/6] x86/cpuid: Handle the long vendor string in guest_cpuid()

2017-01-18 Thread Doug Goldstein
On 1/18/17 2:40 PM, Andrew Cooper wrote:
> Leaves 0x8002 through 0x8004 are plain ASCII text, and require no
> specific recalculation.
> 
> Signed-off-by: Andrew Cooper 

Reviewed-by: Doug Goldstein 

-- 
Doug Goldstein



signature.asc
Description: OpenPGP digital signature
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 5/6] x86/cpuid: Handle the long vendor string in guest_cpuid()

2017-01-18 Thread Andrew Cooper
Leaves 0x8002 through 0x8004 are plain ASCII text, and require no
specific recalculation.

Signed-off-by: Andrew Cooper 
---
CC: Jan Beulich 
---
 xen/arch/x86/cpuid.c| 3 +++
 xen/include/asm-x86/cpuid.h | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index dc76cf4..7926d0b 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -706,6 +706,7 @@ static void pv_cpuid(uint32_t leaf, uint32_t subleaf, 
struct cpuid_leaf *res)
 case 0x7:
 case XSTATE_CPUID:
 case 0x8000:
+case 0x8002 ... 0x8004:
 ASSERT_UNREACHABLE();
 /* Now handled in guest_cpuid(). */
 }
@@ -856,6 +857,7 @@ static void hvm_cpuid(uint32_t leaf, uint32_t subleaf, 
struct cpuid_leaf *res)
 case 0x7:
 case XSTATE_CPUID:
 case 0x8000:
+case 0x8002 ... 0x8004:
 ASSERT_UNREACHABLE();
 /* Now handled in guest_cpuid(). */
 }
@@ -936,6 +938,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
 goto legacy;
 
 case 0x8000:
+case 0x8002 ... 0x8004:
 *res = p->extd.raw[leaf & 0x];
 break;
 }
diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h
index 4712b73..d181e9a 100644
--- a/xen/include/asm-x86/cpuid.h
+++ b/xen/include/asm-x86/cpuid.h
@@ -81,7 +81,7 @@ struct cpuid_policy
  *   - All of the feat and xstate unions
  *   - max_{,sub}leaf
  *   - All FEATURESET_* words
- *   - Short vendor infomation
+ *   - Short and long vendor infomation
  *
  * Per-domain objects:
  *
@@ -89,7 +89,7 @@ struct cpuid_policy
  *   - All of the feat and xstate unions
  *   - max_{,sub}leaf
  *   - All FEATURESET_* words
- *   - Short vendor infomation
+ *   - Short and long vendor infomation
  *
  * Everything else should be considered inaccurate, and not necesserily 0.
  */
-- 
2.1.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel