From: BrillyWu <brillywu@gmail.com>
To: jan.kiszka@web.de, BrillyWu@viatech.com.cn
Cc: KaryJin@viatech.com.cn, kvm@vger.kernel.org, mst@redhat.com,
mtosatti@redhat.com, qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU
Date: Mon, 30 May 2011 15:40:17 +0800 [thread overview]
Message-ID: <BANLkTi=A_6-3fRcd+LYcznZuNKmKHEVB-Q@mail.gmail.com> (raw)
In-Reply-To: <C4F7CD9A92DBFF48AD8779355CD4D7891222DD@exchsg04.s3graphics.com>
From: BrillyWu <brillywu@viatech.com.cn>
Hi, Jan
I'm very sorry for these bugs in the patch. Now I have made a
new patch based on the
newest uq/master where the patch has been applied to fix these bugs,
is it feasible? If it is
not acceptable, should I re-generate a patch based on previous
uq/master, or what else?
Signed-off-by: BrillyWu<brillywu@viatech.com.cn>
Signed-off-by: KaryJin<karyjin@viatech.com.cn>
---
target-i386/cpu.h | 4 ++++
target-i386/cpuid.c | 18 +++++++++++-------
target-i386/2 files changed, 15 insertions(+), 7 deletions(-)
--- a/target-i386/cpu.h 2011-05-30 10:14:30.184533002 +0800
+++ b/target-i386/cpu.h 2011-05-30 10:41:45.704533001 +0800
@@ -441,6 +441,10 @@
#define CPUID_VENDOR_AMD_2 0x69746e65 /* "enti" */
#define CPUID_VENDOR_AMD_3 0x444d4163 /* "cAMD" */
+#define CPUID_VENDOR_VIA_1 0x746e6543 /* "Cent" */
+#define CPUID_VENDOR_VIA_2 0x48727561 /* "aurH" */
+#define CPUID_VENDOR_VIA_3 0x736c7561 /* "auls" */
+
#define CPUID_MWAIT_IBE (1 << 1) /* Interrupts can exit capability */
#define CPUID_MWAIT_EMX (1 << 0) /* enumeration supported */
--- a/target-i386/cpuid.c 2011-05-30 10:14:30.194533005 +0800
+++ b/target-i386/cpuid.c 2011-05-30 15:07:18.794532910 +0800
@@ -1051,14 +1051,18 @@ void cpu_x86_cpuid(CPUX86State *env, uin
uint32_t *ecx, uint32_t *edx)
{
/* test if maximum index reached */
- if ((index & 0xC000000f) == index) {
- /* Handle the Centaur's CPUID instruction. */
- if (index > env->cpuid_xlevel2) {
- index = env->cpuid_xlevel2;
+ if (index & 0x80000000) {
+ if (index > env->cpuid_xlevel) {
+ if (env->cpuid_xlevel2 > 0) {
+ /* Handle the Centaur's CPUID instruction. */
+ if (index > env->cpuid_xlevel2) {
+ index = env->cpuid_xlevel2;
+ } else if (index < 0xC0000000) {
+ index = env->cpuid_xlevel;
+ }
+ } else
+ index = env->cpuid_xlevel;
}
- } else if (index & 0x80000000) {
- if (index > env->cpuid_xlevel)
- index = env->cpuid_level;
} else {
if (index > env->cpuid_level)
index = env->cpuid_level;
next prev parent reply other threads:[~2011-05-30 7:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 8:02 [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU BrillyWu
2011-05-11 11:50 ` Avi Kivity
2011-05-28 10:28 ` Jan Kiszka
2011-05-28 16:20 ` Jan Kiszka
2011-05-30 4:02 ` BrillyWu
2011-05-30 7:40 ` BrillyWu [this message]
2011-05-30 7:47 ` Jan Kiszka
2011-05-30 8:59 ` BrillyWu
2011-05-30 10:45 ` Jan Kiszka
2011-05-31 1:25 ` BrillyWu
2011-05-31 6:11 ` Jan Kiszka
2011-05-31 7:39 ` BrillyWu
2011-05-31 7:50 ` Jan Kiszka
2011-05-31 8:22 ` BrillyWu
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='BANLkTi=A_6-3fRcd+LYcznZuNKmKHEVB-Q@mail.gmail.com' \
--to=brillywu@gmail.com \
--cc=BrillyWu@viatech.com.cn \
--cc=KaryJin@viatech.com.cn \
--cc=avi@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.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).