From: Jan Beulich <jbeulich@suse.com>
To: chunjie.zhu@citrix.com, ross.lagerwall@citrix.com
Cc: andrew.cooper3@citrix.com, roger@xenproject.org,
jason.andryuk@amd.com, teddy.astie@vates.tech,
stephen.cheng@citrix.com, lin.liu01@citrix.com,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 02/13] nestedsvm: Adjust L2's DR intercept when adjusting L1
Date: Tue, 13 Oct 2026 12:15:15 +0200 [thread overview]
Message-ID: <d873b3ec-a0fc-4acf-bd25-8cd9dd27dee6@suse.com> (raw)
In-Reply-To: <9b6e4ec9a5fd34db2071adcf8e73b0c50a1528aa.1791625578.git.chunjie.zhu@citrix.com>
On 10.10.2026 12:13, chunjie.zhu@citrix.com wrote:
> From: Ross Lagerwall <ross.lagerwall@citrix.com>
>
> If L2 accesses a debug register (like reading DR7) without L1 intercepting
> it, it locks up the vCPU. L0 intercepts VMEXIT_DR7_READ, which disables
> the intercept for L1 and then restarts L2 which re-executes the
> instruction and then this repeats indefinitely.
>
> Disable the intercept for the current VMCB if in guest mode to reflect
> what would happen if the VMCB were recreated via
> nsvm_vmcb_prepare4vmrun().
>
> Fixes: a59a7be91b61 ("nestedsvm: fix DRn handling")
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Andrew's comment [1] was left unaddressed. Comments on earlier versions
should be dealt with, one way or another, before re-submitting.
Jan
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1657,6 +1657,8 @@ static void svm_dr_access(struct vcpu *v, struct cpu_user_regs *regs)
>
> TRACE(TRC_HVM_DR_WRITE);
> __restore_debug_registers(vmcb, v);
> + if ( nestedhvm_enabled(v->domain) && nestedhvm_vcpu_in_guestmode(v) )
> + vmcb_set_dr_intercepts(v->arch.hvm.svm.vmcb, 0);
> }
>
> static int cf_check svm_msr_read_intercept(
next prev parent reply other threads:[~2026-10-13 10:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 9:20 [PATCH v1 0/5] x86/nestedsvm: rework nested VMRUN/VMEXIT handling chunjie.zhu
2026-09-23 9:20 ` [PATCH v1 1/5] x86/nestedsvm: update vmrun without pending or deferred flag chunjie.zhu
2026-09-23 9:20 ` [PATCH v1 2/5] x86/nestedsvm: remove nv_vmentry_pending chunjie.zhu
2026-09-23 9:20 ` [PATCH v1 3/5] x86/nestedsvm: update vmexit without pending or deferred flag chunjie.zhu
2026-09-23 9:20 ` [PATCH v1 4/5] x86/nestedsvm: update vmcb correctly chunjie.zhu
2026-09-23 9:20 ` [PATCH v1 5/5] x86/nestedsvm: fix up chunjie.zhu
2026-09-23 9:42 ` Ross Lagerwall
2026-09-23 9:55 ` Ross Lagerwall
2026-09-24 9:16 ` chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 00/13] x86/nestedsvm: rework nested VMRUN/VMEXIT handling chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 01/13] nestedsvm: Fix CR3 MBZ check chunjie.zhu
2026-10-13 10:12 ` Jan Beulich
2026-10-10 10:13 ` [PATCH v2 02/13] nestedsvm: Adjust L2's DR intercept when adjusting L1 chunjie.zhu
2026-10-13 10:15 ` Jan Beulich [this message]
2026-10-10 10:13 ` [PATCH v2 03/13] nestedsvm: Use the correct VMCB for vGIF chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 04/13] nestedsvm: Set GIF during VMRUN if vGIF is enabled chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 05/13] tools/libxl: Add support for Viridian stimer direct mode chunjie.zhu
2026-10-12 15:56 ` Jan Beulich
2026-10-10 10:13 ` [PATCH v2 06/13] x86/hvm: Clamp Viridian features to known set chunjie.zhu
2026-10-13 9:51 ` Jan Beulich
2026-10-10 10:13 ` [PATCH v2 07/13] x86/svm: require VMSAVEvirt for nested virt chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 08/13] nestedsvm: Don't set VMCB(1-2)'s NP_ENABLE and N_CR3 during VMEXIT to L1 chunjie.zhu
2026-10-13 10:01 ` Jan Beulich
2026-10-10 10:13 ` [PATCH v2 09/13] x86/svm: Fix VMLOAD/VMSAVE state handling when using nested virt chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 10/13] x86/nSVM: Don't clear TLB_CONTROL on #VMEXIT chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 11/13] x86/nestedsvm: update vmrun without pending or deferred chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 12/13] x86/nestedsvm: remove nv_vmentry_pending chunjie.zhu
2026-10-10 10:13 ` [PATCH v2 13/13] x86/nestedsvm: update vmexit without pending or deferred flag chunjie.zhu
2026-10-13 10:02 ` [PATCH v2 00/13] x86/nestedsvm: rework nested VMRUN/VMEXIT handling Jan Beulich
2026-09-23 9:36 ` [PATCH v1 0/5] " Jan Beulich
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=d873b3ec-a0fc-4acf-bd25-8cd9dd27dee6@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=chunjie.zhu@citrix.com \
--cc=jason.andryuk@amd.com \
--cc=lin.liu01@citrix.com \
--cc=roger@xenproject.org \
--cc=ross.lagerwall@citrix.com \
--cc=stephen.cheng@citrix.com \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.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.