From: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Jan Beulich" <JBeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
Xen-devel <xen-devel-bounces@lists.xenproject.org>
Subject: Re: [PATCH 3/3] x86/svm: Drop svmdebug.h
Date: Mon, 1 Dec 2025 16:39:52 +0100 [thread overview]
Message-ID: <DEMZRNCQPXI1.2YAGC4KJQ67RM@amd.com> (raw)
In-Reply-To: <20251128201937.1294742-4-andrew.cooper3@citrix.com>
On Fri Nov 28, 2025 at 9:19 PM CET, Andrew Cooper wrote:
> svmdebug.h now only contains the declaration for svm_sync_vmcb(), despite the
> function being implemented in svm.c. Move the declaration into svm.h
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> ---
> xen/arch/x86/hvm/svm/svm.c | 1 -
> xen/arch/x86/hvm/svm/svm.h | 17 +++++++++++++++++
> xen/arch/x86/hvm/svm/vmcb.c | 2 +-
> xen/arch/x86/include/asm/hvm/svm/svmdebug.h | 16 ----------------
> xen/arch/x86/include/asm/hvm/svm/vmcb.h | 15 ---------------
> 5 files changed, 18 insertions(+), 33 deletions(-)
> delete mode 100644 xen/arch/x86/include/asm/hvm/svm/svmdebug.h
>
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> index 14b3a427e642..15d45cbb57c5 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -27,7 +27,6 @@
> #include <asm/hvm/nestedhvm.h>
> #include <asm/hvm/support.h>
> #include <asm/hvm/svm/svm.h>
> -#include <asm/hvm/svm/svmdebug.h>
> #include <asm/hvm/svm/vmcb.h>
> #include <asm/i387.h>
> #include <asm/idt.h>
> diff --git a/xen/arch/x86/hvm/svm/svm.h b/xen/arch/x86/hvm/svm/svm.h
> index f5b0312d2dcf..cfa411ad5ae1 100644
> --- a/xen/arch/x86/hvm/svm/svm.h
> +++ b/xen/arch/x86/hvm/svm/svm.h
> @@ -78,6 +78,23 @@ unsigned int svm_get_task_switch_insn_len(void);
> #define _NPT_PFEC_in_gpt 33
> #define NPT_PFEC_in_gpt (1UL<<_NPT_PFEC_in_gpt)
>
> +/*
> + * VMRUN doesn't switch fs/gs/tr/ldtr and SHADOWGS/SYSCALL/SYSENTER state.
> + * Therefore, guest state is in the hardware registers when servicing a
> + * VMExit.
> + *
> + * Immediately after a VMExit, the vmcb is stale, and needs to be brought
> + * into sync by VMSAVE. If state in the vmcb is modified, a VMLOAD is
> + * needed before the following VMRUN.
> + */
> +enum vmcb_sync_state {
> + vmcb_in_sync,
> + vmcb_needs_vmsave, /* VMCB out of sync (VMSAVE needed)? */
> + vmcb_needs_vmload, /* VMCB dirty (VMLOAD needed)? */
extra comma on move, but this is better, IMO.
Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
Cheers,
Alejandro
next prev parent reply other threads:[~2025-12-01 15:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 20:19 [PATCH 0/3] x86/svm: Make various details private Andrew Cooper
2025-11-28 20:19 ` [PATCH 1/3] x86/svm: Make vmcb_struct private to svm/ Andrew Cooper
2025-12-01 15:23 ` Alejandro Vallejo
2025-12-08 9:05 ` Jan Beulich
2025-12-10 14:25 ` Andrew Cooper
2025-12-11 7:10 ` Jan Beulich
2025-11-28 20:19 ` [PATCH 2/3] x86/svm: Drop svmdebug.c Andrew Cooper
2025-12-01 15:33 ` Alejandro Vallejo
2025-12-08 9:06 ` Jan Beulich
2025-11-28 20:19 ` [PATCH 3/3] x86/svm: Drop svmdebug.h Andrew Cooper
2025-12-01 15:39 ` Alejandro Vallejo [this message]
2025-12-08 9:10 ` 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=DEMZRNCQPXI1.2YAGC4KJQ67RM@amd.com \
--to=alejandro.garciavallejo@amd.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel-bounces@lists.xenproject.org \
--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.