From: Jan Kiszka <jan.kiszka@web.de>
To: BrillyWu <brillywu@gmail.com>
Cc: karyjin@viatech.com.cn, kvm@vger.kernel.org, mst@redhat.com,
mtosatti@redhat.com,
"BrillyWu@viatech.com.cn" <brillywu@viatech.com.cn>,
qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH uq/master V2] kvm: Add CPUID support for VIA CPU
Date: Sat, 28 May 2011 12:28:02 +0200 [thread overview]
Message-ID: <4DE0CE32.5030107@web.de> (raw)
In-Reply-To: <BANLkTimzTSU7A-b9yc9H35b1szfL4z7H-A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]
On 2011-05-10 10:02, BrillyWu wrote:
> From: BrillyWu <brillywu@viatech.com.cn>
>
> When KVM is running on VIA CPU with host cpu's model, the
> feautures of VIA CPU will be passed into kvm guest by calling
> the CPUID instruction for Centaur.
>
> Signed-off-by: BrillyWu<brillywu@viatech.com.cn>
> Signed-off-by: KaryJin<karyjin@viatech.com.cn>
> ---
> target-i386/cpu.h | 3 +++
> target-i386/cpuid.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
> target-i386/kvm.c | 15 +++++++++++++++
> 3 files changed, 63 insertions(+), 1 deletion(-)
>
> --- a/target-i386/cpu.h 2011-05-09 09:55:48.624885001 +0800
> +++ b/target-i386/cpu.h 2011-05-09 09:48:53.704885019 +0800
> @@ -721,6 +721,9 @@ typedef struct CPUX86State {
> uint32_t cpuid_ext3_features;
> uint32_t cpuid_apic_id;
> int cpuid_vendor_override;
> + /* Store the results of Centaur's CPUID instructions */
> + uint32_t cpuid_xlevel2;
> + uint32_t cpuid_ext4_features;
>
> /* MTRRs */
> uint64_t mtrr_fixed[11];
> --- a/target-i386/cpuid.c 2011-05-09 09:31:11.754884991 +0800
> +++ b/target-i386/cpuid.c 2011-05-09 10:18:46.204885008 +0800
> @@ -230,6 +230,9 @@ typedef struct x86_def_t {
> char model_id[48];
> int vendor_override;
> uint32_t flags;
> + /* Store the results of Centaur's CPUID instructions */
> + uint32_t ext4_features;
> + uint32_t xlevel2;
> } x86_def_t;
>
> #define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE)
> @@ -522,6 +525,18 @@ static int cpu_x86_fill_host(x86_def_t *
> cpu_x86_fill_model_id(x86_cpu_def->model_id);
> x86_cpu_def->vendor_override = 0;
>
> + /* Call Centaur's CPUID instruction. */
> + if (x86_cpu_def->vendor1 == CPUID_VENDOR_VIA_1 &&
> + x86_cpu_def->vendor2 == CPUID_VENDOR_VIA_2 &&
> + x86_cpu_def->vendor3 == CPUID_VENDOR_VIA_3) {
CPUID_VENDOR_VIA_* definitions in target-i386/cpu.h are missing so that
this patch breaks current uq/master build. Please fix.
Thanks,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2011-05-28 10:28 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 [this message]
2011-05-28 16:20 ` Jan Kiszka
2011-05-30 4:02 ` BrillyWu
2011-05-30 7:40 ` BrillyWu
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=4DE0CE32.5030107@web.de \
--to=jan.kiszka@web.de \
--cc=avi@redhat.com \
--cc=brillywu@gmail.com \
--cc=brillywu@viatech.com.cn \
--cc=karyjin@viatech.com.cn \
--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).