[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] uq/master: Expose CPUID leaf 7 only for -cpu
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH v3] uq/master: Expose CPUID leaf 7 only for -cpu host |
Date: |
Fri, 25 May 2012 11:42:00 -0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-05-25 11:12, Eduardo Habkost wrote:
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 65d9af6..91a657a 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -238,6 +238,8 @@ typedef struct x86_def_t {
> /* Store the results of Centaur's CPUID instructions */
> uint32_t ext4_features;
> uint32_t xlevel2;
> + /* The feature bits on CPUID[EAX=7,ECX=0].EBX */
> + uint32_t cpuid_7_0_ebx_features;
> } x86_def_t;
>
> #define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE)
> @@ -521,6 +523,12 @@ static int cpu_x86_fill_host(x86_def_t *x86_cpu_def)
> x86_cpu_def->ext_features = ecx;
> x86_cpu_def->features = edx;
>
> + if (kvm_enabled() && x86_cpu_def->level >= 7) {
> + x86_cpu_def->cpuid_7_0_ebx_features =
> kvm_arch_get_supported_cpuid(kvm_state, 0x7, 0, R_EBX);
checkpatch.pl?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux