On 28.11.2025 21:19, 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

I was actually hoping for the file to be moved. I notice that a few things are
left in the original file, and I wonder if they couldn't be moved elsewhere up
front. Yet I wouldn't insist; we can certainly do it this way round, accepting
that the file name then is pretty much wrong considering what remains there.

> --- a/xen/arch/x86/hvm/svm/asid.c
> +++ b/xen/arch/x86/hvm/svm/asid.c
> @@ -9,6 +9,7 @@
>  #include <asm/hvm/svm/svm.h>
>  
>  #include "svm.h"
> +#include "vmcb.h"

Instead of repeating this in every .c file, couldn't svm.h include the new file?
Or are you foreseeing some of the .c files requiring svm.h to (later) not need
this include anymore?

Jan

Reply via email to