All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 206877] New: Nested virt on AMD (and probably older Intel) doesn't work with ignore_msrs=Y on L0 (fails with UMWAIT error)
Date: Wed, 18 Mar 2020 10:22:28 +0000	[thread overview]
Message-ID: <bug-206877-28872@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=206877

            Bug ID: 206877
           Summary: Nested virt on AMD (and probably older Intel) doesn't
                    work with ignore_msrs=Y on L0 (fails with UMWAIT
                    error)
           Product: Virtualization
           Version: unspecified
    Kernel Version: 5.6.0-rc6
          Hardware: i386
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: kvm
          Assignee: virtualization_kvm@kernel-bugs.osdl.org
          Reporter: s.reiter@proxmox.com
        Regression: No

I'm not sure if this is a supported configuration, but since the commit
mentioned below nested virtualization on AMD when the host has 'ignore_msrs=Y'
is broken. QEMU fails with:

kvm: error: failed to set MSR 0xe1 to 0x0
kvm: /qemu/target/i386/kvm.c:2947: kvm_put_msrs: Assertion `ret ==
cpu->kvm_msr_buf->nmsrs' failed.

If this is supposed to work, it's a regression from 6e3ba4abcea5 ("KVM: vmx:
Emulate MSR IA32_UMWAIT_CONTROL"), I can confirm that reverting this commit for
the guest kernel makes everything work again. Ignoring UMWAIT in QEMU
(kvm_get_supported_msrs) does the trick too.

I *think* this happens since MSR_IA32_UMWAIT_CONTROL (in msrs_to_save_all) is
added to the guest CPUID with the only condition being that 'rdmsr_safe' in
'kvm_init_msr_list' succeeds - which it does, since the host ignores it.
However, since the CPU doesn't actually support UMWAIT (in my case since it's
an AMD chip, but I suppose the same happens on older Intel ones) the MSR set
for the L2 guest fails.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2020-03-18 10:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 10:22 bugzilla-daemon [this message]
2020-07-02 13:39 ` [Bug 206877] Nested virt on AMD (and probably older Intel) doesn't work with ignore_msrs=Y on L0 (fails with UMWAIT error) bugzilla-daemon

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=bug-206877-28872@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=kvm@vger.kernel.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 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.