All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 216033] KVM VMX nested virtualization: VMXON does not check guest CR0 against IA32_VMX_CR0_FIXED0
Date: Fri, 02 Sep 2022 18:39:14 +0000	[thread overview]
Message-ID: <bug-216033-28872-5Jrf2lrP4A@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-216033-28872@https.bugzilla.kernel.org/>

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

--- Comment #2 from Eric Li (ercli@ucdavis.edu) ---
@Sean Christopherson Thanks for submitting the fix to this bug in
https://lore.kernel.org/lkml/20220607213604.3346000-4-seanjc@google.com/ .
However, I recently tested this fix and the behavior is not as expected.

According to Intel's SDM, VMXON may generate 2 types of exceptions:

    IF (register operand) or (CR0.PE = 0) or (CR4.VMXE = 0) or ...
        THEN #UD;
    ELSIF not in VMX operation
        THEN
            IF (CPL > 0) or (in A20M mode) or
            (the values of CR0 and CR4 are not supported in VMX operation ...
                THEN #GP(0);

For example, when CR4 value is incorrect, different exceptions may be generated
depending on which bit is incorrect. If CR4.VMXE = 0, #UD should be generated.
Otherwise, #GP(0) should be generated. However, after the fix, #UD is always
generated.

-- 
You may reply to this email to add a comment.

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

  parent reply	other threads:[~2022-09-02 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26  3:54 [Bug 216033] New: KVM VMX nested virtualization: VMXON does not check guest CR0 against IA32_VMX_CR0_FIXED0 bugzilla-daemon
2022-05-26 16:18 ` [Bug 216033] " bugzilla-daemon
2022-09-02 18:39 ` bugzilla-daemon [this message]
2022-09-02 19:00 ` bugzilla-daemon
2022-09-02 19:45 ` bugzilla-daemon
2022-09-02 20:57 ` 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-216033-28872-5Jrf2lrP4A@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@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.