On 06/10/2025 11:46 am, Alejandro Vallejo wrote:
> "struct segment_register" requires a prior inclusion of x86_emulate.h,
> and it's missing a forward declaration of "struct vcpu" too.
>
> Sort these out so the header can be included by itself.
>
> Not a functional change.
>
> Signed-off-by: Alejandro Vallejo <[email protected]>

I have a pending series for 4.22 which does substantially more
rearranging of this file and others.  See
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/xen-svm-hdrs

I'd found the need for struct vcpu, but not for segment_register.  How
did you find it?

> ---
> This dependency already exists today. I'm just making it explicit.
>
> "segment_register" is weird. It naturally belongs in vmcb.h, but the
> emulator makes use of it and must be compilable outside of Xen.
>
> I don't like having vmcb.h depending on the emulator header, but I see
> no way of breaking that dependency without breaking the emulator unit
> tests.

Pulling it into a new header is fine.  The emulator can include anything
(free-enough standing) in arch/x86/include/asm/

~Andrew

Reply via email to