All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 221841] KVM: nested VMX eVMCS VMPTRLD/VMPTRST causes infinite VM-Exit loop due to missing RIP advance
Date: Fri, 07 Aug 2026 09:17:39 +0000	[thread overview]
Message-ID: <bug-221841-28872-H4VjyfTP92@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-221841-28872@https.bugzilla.kernel.org/>

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

vkuznets@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vkuznets@redhat.com

--- Comment #2 from vkuznets@redhat.com ---
(In reply to Sean Christopherson from comment #1)

> > 
> > A malicious L1 guest can continuously trigger VM-Exit handling and consume
> > host CPU resources, resulting in denial of service.
> 
> No, it doesn't.  There are no "host CPU" vs. "guest CPU" resources, it's all
> just physical CPU resources.  Whether the CPU is running guest code or host
> code
> is irrelevant.  What matters is that KVM honors NEED_RESCHED (especially on
> non-preemptible kernels, i.e. before PREEMPT_LAZY came along), which it very
> much does in the slow path VM-Entry/VM-Exit loop.
> 
> > The issue affects availability only.
> 
> Only the availibility of the L1 hypervisor.

Yes, basically, misbehaving L1 hypervisor can shoot itself in the foot.

> 
> > Technical analysis:
> > 
> > The eVMCS path should behave similarly to other unsupported nested VMX
> > instructions.
> 
> Only if the TLFS allows it.  I assume it just says "unsupported" or
> "undefined behavior", i.e. KVM can probably do whatever it wants.  Vitaly?

VMREAD/VMWRITE with eVMCS are explicitly called 'unsupported' in the TLFS:

"Any VMREAD or VMWRITE instructions while an enlightened VMCS is active is
unsupported and can result in unexpected behavior.". 

As for VMPTRLD, we only have
"No VMPTRLD instruction must be executed to make an enlightened VMCS active or
current." but there's nothing about the expected result there. VMPTRST is not
mentioned. 

So I guess we can do whatever we want in KVM and skipping the instruction is
not a bad thing. Ideally, we can try and see what genuine Hyper-V gives us in
this situation (by e.g. running an instrumented version of KVM there). It does
not seem that we have an extreme urgency here so I can put it to my backlog and
try to get to it some time next week -- unless someone beats me to it of
course!

-- 
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:[~2026-08-07  9:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  7:11 [Bug 221841] New: KVM: nested VMX eVMCS VMPTRLD/VMPTRST causes infinite VM-Exit loop due to missing RIP advance bugzilla-daemon
2026-08-06 14:01 ` Sean Christopherson
2026-08-06 14:01 ` [Bug 221841] " bugzilla-daemon
2026-08-07  9:17 ` bugzilla-daemon [this message]
2026-08-07 13:56   ` Sean Christopherson
2026-08-07 13:56 ` 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-221841-28872-H4VjyfTP92@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.