All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/1] KVM fix for QEMU 4.2-rc
@ 2019-12-06 11:36 Paolo Bonzini
  2019-12-06 11:36 ` [PULL 1/1] target/i386: disable VMX features if nested=0 Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-12-06 11:36 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 1bdc319ab5d289ce6b822e06fb2b13666fd9278e:

  Update version for v4.2.0-rc4 release (2019-12-03 17:56:30 +0000)

are available in the Git repository at:

  git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 2605188240f939fa9ae9353f53a0985620b34769:

  target/i386: disable VMX features if nested=0 (2019-12-06 12:35:40 +0100)

----------------------------------------------------------------
* fix for x86 KVM on older kernels (Yang Zhong)

----------------------------------------------------------------
Yang Zhong (1):
      target/i386: disable VMX features if nested=0

 target/i386/kvm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
-- 
2.21.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PULL 1/1] target/i386: disable VMX features if nested=0
  2019-12-06 11:36 [PULL 0/1] KVM fix for QEMU 4.2-rc Paolo Bonzini
@ 2019-12-06 11:36 ` Paolo Bonzini
  2019-12-06 15:06 ` [PULL 0/1] KVM fix for QEMU 4.2-rc Peter Maydell
  2019-12-06 16:11 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-12-06 11:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Yang Zhong, Catherine Ho

From: Yang Zhong <yang.zhong@intel.com>

If kvm does not support VMX feature by nested=0, the kvm_vmx_basic
can't get the right value from MSR_IA32_VMX_BASIC register, which
make qemu coredump when qemu do KVM_SET_MSRS.

The coredump info:
error: failed to set MSR 0x480 to 0x0
kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20191206071111.12128-1-yang.zhong@intel.com>
Reported-by: Catherine Ho <catherine.hecx@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/kvm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index bf1655645b..1d10046a6c 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2572,6 +2572,14 @@ static void kvm_msr_entry_add_vmx(X86CPU *cpu, FeatureWordArray f)
     uint64_t kvm_vmx_basic =
         kvm_arch_get_supported_msr_feature(kvm_state,
                                            MSR_IA32_VMX_BASIC);
+
+    if (!kvm_vmx_basic) {
+        /* If the kernel doesn't support VMX feature (kvm_intel.nested=0),
+         * then kvm_vmx_basic will be 0 and KVM_SET_MSR will fail.
+         */
+        return;
+    }
+
     uint64_t kvm_vmx_misc =
         kvm_arch_get_supported_msr_feature(kvm_state,
                                            MSR_IA32_VMX_MISC);
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PULL 0/1] KVM fix for QEMU 4.2-rc
  2019-12-06 11:36 [PULL 0/1] KVM fix for QEMU 4.2-rc Paolo Bonzini
  2019-12-06 11:36 ` [PULL 1/1] target/i386: disable VMX features if nested=0 Paolo Bonzini
@ 2019-12-06 15:06 ` Peter Maydell
  2019-12-06 16:11 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-12-06 15:06 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Fri, 6 Dec 2019 at 15:04, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 1bdc319ab5d289ce6b822e06fb2b13666fd9278e:
>
>   Update version for v4.2.0-rc4 release (2019-12-03 17:56:30 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 2605188240f939fa9ae9353f53a0985620b34769:
>
>   target/i386: disable VMX features if nested=0 (2019-12-06 12:35:40 +0100)
>
> ----------------------------------------------------------------
> * fix for x86 KVM on older kernels (Yang Zhong)

I know you talked to me on irc about this, but pull request
cover letters at this stage in the release process really
need detailed discussion of what is being fixed, the
severity of the bug and why it needs to go into this
release rather than waiting for 5.0...

>
> ----------------------------------------------------------------
> Yang Zhong (1):
>       target/i386: disable VMX features if nested=0
>
>  target/i386/kvm.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> --
> 2.21.0

thanks
-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PULL 0/1] KVM fix for QEMU 4.2-rc
  2019-12-06 11:36 [PULL 0/1] KVM fix for QEMU 4.2-rc Paolo Bonzini
  2019-12-06 11:36 ` [PULL 1/1] target/i386: disable VMX features if nested=0 Paolo Bonzini
  2019-12-06 15:06 ` [PULL 0/1] KVM fix for QEMU 4.2-rc Peter Maydell
@ 2019-12-06 16:11 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-12-06 16:11 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Fri, 6 Dec 2019 at 15:04, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 1bdc319ab5d289ce6b822e06fb2b13666fd9278e:
>
>   Update version for v4.2.0-rc4 release (2019-12-03 17:56:30 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 2605188240f939fa9ae9353f53a0985620b34769:
>
>   target/i386: disable VMX features if nested=0 (2019-12-06 12:35:40 +0100)
>
> ----------------------------------------------------------------
> * fix for x86 KVM on older kernels (Yang Zhong)
>
> ----------------------------------------------------------------
> Yang Zhong (1):
>       target/i386: disable VMX features if nested=0


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-06 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 11:36 [PULL 0/1] KVM fix for QEMU 4.2-rc Paolo Bonzini
2019-12-06 11:36 ` [PULL 1/1] target/i386: disable VMX features if nested=0 Paolo Bonzini
2019-12-06 15:06 ` [PULL 0/1] KVM fix for QEMU 4.2-rc Peter Maydell
2019-12-06 16:11 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.