From: Sean Christopherson <seanjc@google.com>
To: "Carlos López" <clopez@suse.de>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com,
Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86: fix #GP check in em_dr_write()
Date: Wed, 3 Jun 2026 09:45:49 -0700 [thread overview]
Message-ID: <aiBaPdVL1R4z-xm_@google.com> (raw)
In-Reply-To: <ah7uzuAHyQh2GI7T@google.com>
On Tue, Jun 02, 2026, Sean Christopherson wrote:
> On Mon, Jun 01, 2026, Carlos López wrote:
> > The practical impact is limited, as check_dr_write() already checks DR6
> > and DR7 manually. However, it misses DR4/DR5, which alias DR6/DR7 when
> > CR4.DE=0.
>
> *sigh* (not at your patch, at the existing code)
>
> Which, after digging into *why* check_dr_write() checks DR6/DR7, highlights that
> this fix is incomplete. em_dr_write() can't rely on ->set_dr() for #GP checks,
> because unfortunately for us, the #GP check has priority over DR intercepts on
> SVM, and over DR7.GD (General Detect) #DBs.
And testing fail. The DR7.GD #DB has priority, I forgot that DR7.GD is cleared
by the CPU on delivery of the #DB.
prev parent reply other threads:[~2026-06-03 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 13:33 [PATCH] KVM: x86: fix #GP check in em_dr_write() Carlos López
2026-06-02 14:55 ` Sean Christopherson
2026-06-03 16:45 ` Sean Christopherson [this message]
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=aiBaPdVL1R4z-xm_@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=clopez@suse.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox