diff mbox

[03/13] qemu-kvm: Drop -enable-nesting command line switch

Message ID ef4df3773e26d9985da713a1f0bd05cde1c0277c.1309198794.git.jan.kiszka@web.de (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka June 27, 2011, 6:19 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Link it is already handling in upstream, this feature can be controlled
via -cpu ...+/-svm.

CC: Joerg Roedel <Joerg.Roedel@amd.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 qemu-kvm.h          |    7 -------
 qemu-options.hx     |    2 --
 target-i386/cpuid.c |    3 ---
 vl.c                |    4 ----
 4 files changed, 0 insertions(+), 16 deletions(-)

Comments

Joerg Roedel June 28, 2011, 10:48 a.m. UTC | #1
On Mon, Jun 27, 2011 at 02:19:46PM -0400, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Link it is already handling in upstream, this feature can be controlled
> via -cpu ...+/-svm.
> 
> CC: Joerg Roedel <Joerg.Roedel@amd.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  qemu-kvm.h          |    7 -------
>  qemu-options.hx     |    2 --
>  target-i386/cpuid.c |    3 ---
>  vl.c                |    4 ----
>  4 files changed, 0 insertions(+), 16 deletions(-)
> 
> diff --git a/qemu-kvm.h b/qemu-kvm.h
> index f3f775c..845880e 100644
> --- a/qemu-kvm.h
> +++ b/qemu-kvm.h
> @@ -259,19 +259,12 @@ int kvm_update_ioport_access(CPUState *env);
>  int kvm_arch_set_ioport_access(unsigned long start, unsigned long size,
>                                 bool enable);
>  
> -#ifdef CONFIG_KVM
>  extern int kvm_irqchip;
>  extern int kvm_pit;
>  extern int kvm_pit_reinject;
> -extern int kvm_nested;
>  extern unsigned int kvm_shadow_memory;
>  
>  int kvm_handle_tpr_access(CPUState *env);
> -
> -#else
> -#define kvm_nested 0
> -#endif
> -
>  int kvm_tpr_enable_vapic(CPUState *env);
>  
>  #endif
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 9972dcf..6a6dc89 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -2420,8 +2420,6 @@ DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection,
>      "-no-kvm-pit-reinjection\n"
>      "                disable KVM kernel mode PIT interrupt reinjection\n",
>      QEMU_ARCH_I386)
> -DEF("enable-nesting", 0, QEMU_OPTION_enable_nesting,
> -    "-enable-nesting enable support for running a VM inside the VM (AMD only)\n", QEMU_ARCH_I386)
>  DEF("nvram", HAS_ARG, QEMU_OPTION_nvram,
>      "-nvram FILE     provide ia64 nvram contents\n", QEMU_ARCH_ALL)
>  DEF("tdf", 0, QEMU_OPTION_tdf,
> diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
> index b5b563c..d1f3b43 100644
> --- a/target-i386/cpuid.c
> +++ b/target-i386/cpuid.c
> @@ -1238,9 +1238,6 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
>  
>              /* disable CPU features that KVM cannot support */
>  
> -            /* svm */
> -            if (!kvm_nested)
> -                *ecx &= ~CPUID_EXT3_SVM;
>              /* 3dnow */
>              *edx &= ~0xc0000000;
>          }
> diff --git a/vl.c b/vl.c
> index 611dbd2..dd870e6 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2717,10 +2717,6 @@ int main(int argc, char **argv, char **envp)
>                  kvm_pit_reinject = 0;
>                  break;
>              }
> -	    case QEMU_OPTION_enable_nesting: {
> -		kvm_nested = 1;
> -		break;
> -	    }
>  #endif
>              case QEMU_OPTION_usb:
>                  usb_enabled = 1;

Looks good to me too.
Jan Kiszka June 28, 2011, 10:52 a.m. UTC | #2
On 2011-06-28 12:48, Roedel, Joerg wrote:
> On Mon, Jun 27, 2011 at 02:19:46PM -0400, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Link it is already handling in upstream, this feature can be controlled

Ugh, I must have been drunken.

"Like it is already handled in upstream, ..."

Avi, already merged? Otherwise, please fix up.

Thanks,
Jan
Avi Kivity June 28, 2011, 11:45 a.m. UTC | #3
On 06/28/2011 01:52 PM, Jan Kiszka wrote:
> On 2011-06-28 12:48, Roedel, Joerg wrote:
> >  On Mon, Jun 27, 2011 at 02:19:46PM -0400, Jan Kiszka wrote:
> >>  From: Jan Kiszka<jan.kiszka@siemens.com>
> >>
> >>  Link it is already handling in upstream, this feature can be controlled
>
> Ugh, I must have been drunken.
>
> "Like it is already handled in upstream, ..."
>
> Avi, already merged? Otherwise, please fix up.
>

Already merged, but also already fixed.
diff mbox

Patch

diff --git a/qemu-kvm.h b/qemu-kvm.h
index f3f775c..845880e 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -259,19 +259,12 @@  int kvm_update_ioport_access(CPUState *env);
 int kvm_arch_set_ioport_access(unsigned long start, unsigned long size,
                                bool enable);
 
-#ifdef CONFIG_KVM
 extern int kvm_irqchip;
 extern int kvm_pit;
 extern int kvm_pit_reinject;
-extern int kvm_nested;
 extern unsigned int kvm_shadow_memory;
 
 int kvm_handle_tpr_access(CPUState *env);
-
-#else
-#define kvm_nested 0
-#endif
-
 int kvm_tpr_enable_vapic(CPUState *env);
 
 #endif
diff --git a/qemu-options.hx b/qemu-options.hx
index 9972dcf..6a6dc89 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2420,8 +2420,6 @@  DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection,
     "-no-kvm-pit-reinjection\n"
     "                disable KVM kernel mode PIT interrupt reinjection\n",
     QEMU_ARCH_I386)
-DEF("enable-nesting", 0, QEMU_OPTION_enable_nesting,
-    "-enable-nesting enable support for running a VM inside the VM (AMD only)\n", QEMU_ARCH_I386)
 DEF("nvram", HAS_ARG, QEMU_OPTION_nvram,
     "-nvram FILE     provide ia64 nvram contents\n", QEMU_ARCH_ALL)
 DEF("tdf", 0, QEMU_OPTION_tdf,
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index b5b563c..d1f3b43 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -1238,9 +1238,6 @@  void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
 
             /* disable CPU features that KVM cannot support */
 
-            /* svm */
-            if (!kvm_nested)
-                *ecx &= ~CPUID_EXT3_SVM;
             /* 3dnow */
             *edx &= ~0xc0000000;
         }
diff --git a/vl.c b/vl.c
index 611dbd2..dd870e6 100644
--- a/vl.c
+++ b/vl.c
@@ -2717,10 +2717,6 @@  int main(int argc, char **argv, char **envp)
                 kvm_pit_reinject = 0;
                 break;
             }
-	    case QEMU_OPTION_enable_nesting: {
-		kvm_nested = 1;
-		break;
-	    }
 #endif
             case QEMU_OPTION_usb:
                 usb_enabled = 1;