Hi,

Code motion is correct according to my scripts. A nit though...

On Fri Nov 28, 2025 at 9:19 PM CET, Andrew Cooper wrote:
> The rest of Xen has no buisness knowing this structure, and it is currently
> included via xen/sched.h into most code.  Create a new private svm/vmcb.h.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <[email protected]>
> ---
> CC: Jan Beulich <[email protected]>
> CC: Roger Pau MonnĂ© <[email protected]>
> ---
>  xen/arch/x86/hvm/svm/asid.c             |   1 +
>  xen/arch/x86/hvm/svm/emulate.c          |   1 +
>  xen/arch/x86/hvm/svm/intr.c             |   1 +
>  xen/arch/x86/hvm/svm/nestedsvm.c        |   1 +
>  xen/arch/x86/hvm/svm/svm.c              |   1 +
>  xen/arch/x86/hvm/svm/svmdebug.c         |   2 +
>  xen/arch/x86/hvm/svm/vmcb.c             |   2 +
>  xen/arch/x86/hvm/svm/vmcb.h             | 617 ++++++++++++++++++++++++
>  xen/arch/x86/include/asm/hvm/svm/vmcb.h | 606 -----------------------
>  9 files changed, 626 insertions(+), 606 deletions(-)
>  create mode 100644 xen/arch/x86/hvm/svm/vmcb.h
>

[snip]

> diff --git a/xen/arch/x86/hvm/svm/vmcb.h b/xen/arch/x86/hvm/svm/vmcb.h
> new file mode 100644
> index 000000000000..68012948a9e3
> --- /dev/null
> +++ b/xen/arch/x86/hvm/svm/vmcb.h
> @@ -0,0 +1,617 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef SVM_PRIVATE_VMCB_H
> +#define SVM_PRIVATE_VMCB_H
> +
> +#include <xen/types.h>
> +
> +#include <asm/x86_emulate.h>

Worth commenting here that this exists because the segment selector struct lives
as part of the x86 emulator even though it's part of the SVM ABI.

In an ideal world this wouldn't exist. Otherwise everything looks fine.

With or without the nit addressed

  Reviewed-by: Alejandro Vallejo <[email protected]>

Cheers,
Alejandro

Reply via email to