From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 5/6] x86/cpuid: Handle the long vendor string in guest_cpuid()
Date: Wed, 18 Jan 2017 19:40:57 +0000 [thread overview]
Message-ID: <1484768458-13117-6-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1484768458-13117-1-git-send-email-andrew.cooper3@citrix.com>
Leaves 0x80000002 through 0x80000004 are plain ASCII text, and require no
specific recalculation.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
---
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 0x80000000:
+ case 0x80000002 ... 0x80000004:
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 0x80000000:
+ case 0x80000002 ... 0x80000004:
ASSERT_UNREACHABLE();
/* Now handled in guest_cpuid(). */
}
@@ -936,6 +938,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
goto legacy;
case 0x80000000:
+ case 0x80000002 ... 0x80000004:
*res = p->extd.raw[leaf & 0xffff];
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
next prev parent reply other threads:[~2017-01-18 19:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 19:40 [PATCH 0/6] x86/cpuid: Handling of simple leaves in guest_cpuid() Andrew Cooper
2017-01-18 19:40 ` [PATCH 1/6] x86/cpuid: Hide VT-x/SVM from HVM-based control domains Andrew Cooper
2017-01-19 3:56 ` Doug Goldstein
2017-01-19 14:13 ` Andrew Cooper
2017-01-20 15:44 ` Jan Beulich
2017-01-24 14:38 ` Roger Pau Monné
2017-01-24 15:10 ` Jan Beulich
2017-01-24 15:41 ` Roger Pau Monné
2017-01-24 16:17 ` Andrew Cooper
2017-01-18 19:40 ` [PATCH 2/6] x86/cpuid: Remove BUG_ON() condition from guest_cpuid() Andrew Cooper
2017-01-19 3:57 ` Doug Goldstein
2017-01-20 15:45 ` Jan Beulich
2017-01-18 19:40 ` [PATCH 3/6] x86/cpuid: Handle leaf 0 in guest_cpuid() Andrew Cooper
2017-01-19 4:02 ` Doug Goldstein
2017-01-20 15:48 ` Jan Beulich
2017-01-18 19:40 ` [PATCH 4/6] x86/cpuid: Handle leaf 0x80000000 " Andrew Cooper
2017-01-19 4:03 ` Doug Goldstein
2017-01-20 15:58 ` Jan Beulich
2017-01-20 16:02 ` Andrew Cooper
2017-01-18 19:40 ` Andrew Cooper [this message]
2017-01-19 4:03 ` [PATCH 5/6] x86/cpuid: Handle the long vendor string " Doug Goldstein
2017-01-20 16:00 ` Jan Beulich
2017-01-20 16:03 ` Andrew Cooper
2017-01-18 19:40 ` [PATCH 6/6] x86/cpuid: Only recalculate the shared feature bits once Andrew Cooper
2017-01-19 4:03 ` Doug Goldstein
2017-01-19 11:01 ` Wei Liu
2017-01-20 16:06 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484768458-13117-6-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).