[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default |
Date: |
Wed, 29 Oct 2014 18:40:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
Am 03.10.2014 um 21:39 schrieb Eduardo Habkost:
> TCG doesn't support VMX, and nested VMX is not enabled by default on the
> KVM kernel module.
>
> So, there's no reason to have VMX enabled by default on the core2duo and
> coreduo CPU models, today. Even the newer Intel CPU model definitions
> don't have it enabled.
>
> In this case, we need machine-type compat code, as people may be running
> the older machine-types on hosts that had VMX nesting enabled.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> hw/i386/pc_piix.c | 2 ++
> hw/i386/pc_q35.c | 2 ++
> target-i386/cpu.c | 8 ++++----
> 3 files changed, 8 insertions(+), 4 deletions(-)
[...]
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 1e9fff9..c336003 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -720,10 +720,10 @@ static X86CPUDefinition builtin_x86_defs[] = {
> CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
> CPUID_PSE36 | CPUID_VME | CPUID_ACPI | CPUID_SS,
> /* Missing: CPUID_EXT_DTES64, CPUID_EXT_DSCPL, CPUID_EXT_EST,
> - * CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM */
> + * CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM, CPUID_EXT_VMX */
> .features[FEAT_1_ECX] =
> CPUID_EXT_SSE3 | CPUID_EXT_MONITOR | CPUID_EXT_SSSE3 |
> - CPUID_EXT_VMX | CPUID_EXT_CX16,
> + CPUID_EXT_CX16,
> .features[FEAT_8000_0001_EDX] =
> CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
> .features[FEAT_8000_0001_ECX] =
[snip]
Here I'm less certain what the best approach is. As you point out,
there's an inconsistency that I agree should be fixed. I wonder however
whether an approach similar to 3/6 for KVM only would be better? I.e.,
have VMX as a sometimes-KVM-supported feature be listed in the model and
filter it out for accel=kvm so that -cpu enforce works, but let
accel=tcg fail with features not implemented.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v3 0/6] target-i386: Make most CPU models work with "enforce" out of the box, Eduardo Habkost, 2014/10/03
- [Qemu-devel] [PATCH v3 4/6] target-i386: Remove unsupported bits from all CPU models, Eduardo Habkost, 2014/10/03
- [Qemu-devel] [PATCH v3 1/6] pc: Create pc_compat_2_1() functions, Eduardo Habkost, 2014/10/03
- [Qemu-devel] [PATCH v3 2/6] target-i386: Rename KVM auto-feature-enable compat function, Eduardo Habkost, 2014/10/03
- [Qemu-devel] [PATCH v3 3/6] target-i386: Disable CPUID_ACPI by default on KVM mode, Eduardo Habkost, 2014/10/03
- [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default, Eduardo Habkost, 2014/10/03
- Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default,
Andreas Färber <=
- [Qemu-devel] [PATCH v3 6/6] target-i386: Disable SVM by default in KVM mode, Eduardo Habkost, 2014/10/03
- Re: [Qemu-devel] [PATCH v3 0/6] target-i386: Make most CPU models work with "enforce" out of the box, Paolo Bonzini, 2014/10/03