[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86: Add missing forward declaration and include to hvm/svm/vmcb.h


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Mon, 6 Oct 2025 13:29:49 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l8SPXQIfqorhJ4I3lcB3mQLCmYorHd5RZYtwTE4aoEE=; b=QlTTu0jW03yA5XRQ12LvhmpS5xW2Hq8BEfI8htNL1mVhKKoDsc5jzc8NR9tmmvvtdG4cI76DbnHT1Yaxs/pOkrG4x1iFmQqRBd6eLrt03yfJqdFjcBT2Q3KgTur+eGKeFzPyyjCovssnhLwgQT4Z9abuO7i/kdjtaRTPV+z54LTVirrs+O90c9NPWFAZErDAwKgOY/3+pCMDwyX6XqKhTFW4p9XzIkGEk1ECPMFUB54dA4ZeYOUR1yvzHt+gAhebC4UhDoGo6OOK0H9vqM+nca/vLU/8c4fxyCxVnRNQd5Rlb/MXF88CQuXl49Ydu1PpPzlJP/Y2tc8fQKBRwP/HQQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x54I1ZAhRTO0GFHXL6N4QXvOXeq+OoJ9PgXA8i5OfswsLnp5sRnfHNRer0QODB6NiXfCC+gd7HyRpIEGj7R3CJZgnDJ6nBWbpFXTO3m5PrH0bMuuuFlgMIN50NbwIPlboqGQuq20QgSniYUWDZGrv6LrIrJJNSIwArYzmLLgGoxLkiu84mGf51U0AP3u3bt6Qt46pVat0uDhLfpey5zCWuOeFcEOJv+hlYnx95SFpzrIug7F4oj7MBdZpSjqMyTdgNw8w4740a6RhBB3MBR0lBt6UJ38wpqFoJhVm/TeToguElBzIViBehDPGN5x+XcgApw6/2ioj75ScbOdkshutA==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 06 Oct 2025 11:30:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon Oct 6, 2025 at 1:04 PM CEST, Andrew Cooper wrote:
> 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 <alejandro.garciavallejo@xxxxxxx>
>
> 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?

By chance. I happened to include it in a file at a position where the
x86_emulate.h header hadn't been included.

>
>> ---
>> 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/

I thought it didn't, if so I'm at a loss at to why segment_register is where
it is.

Be that as it may, your series conflicts with this patch and it makes no sense
to keep both around (when none of them are going in for until 4.22).

Will you be including a fix for the segment register in your series also? If so,
I'll just drop this one.

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.