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

Re: [PATCH 1/3] x86/svm: Make vmcb_struct private to svm/


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 10 Dec 2025 14:25:39 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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=y8TNQVSPDwOmt6QrrQxc44Yx+ZH1JFmJCNBMh0/qR/w=; b=N0pglvEEYv5vV9EezMYGbk1GKT80/jII/bvxB+qRY4y/cfObb3TqFZGOlq7WWesJWP6CupSfSrH8Pvm4w5AYOSc6O+Zstymc/aeBU5II5dANSKxTwvD3AI7KAcuy2kafhe8xYd/UpZ/p75VEvnBBuEdP4UePdd4QMlC4DC/kmD5v11PwO7sq8wjOvmkZ5YKlBdsBT73WuMDkNObNo1TvzqKMzYy5mdSwwqfj15kaIvpOsxkgX04F600Vnw0+zItfjyCS2ZoVPkWDAoCGPzeFIFb7j0jC0cFTnA68kVs1W6sNLFBA8q6ZwpK3KXrra2g4YyzDf8tzMFxFC7s98oxj/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gtAMVmasVF0kYFV4PSXLlBHjHVcYHXfyJOi9UlqNPn2xTZbfQ36+8kUT6OtDt76YYEPCLaR9jUzia9HySkbvS1eYFWYC4C4PLJCs35kz2bjEPQgR+Jeze9TRbvmBh0Z6yTl4ZfphYSBK8eCUypYs3JnE+jV/3ODMXQgQ0UGNjvVNRTo6uQ0FcNvvnT9HYM5HmoK6ku0cvxgMWmBYw3Sj6ltB/ivdZ6cgrKnOae143+SRSGMoa6visbtUvWp9Fz/TElG6eIVer9HO/s5sPMQnGf9WhlqLGmAonx4A+YSwBPPhbTfSbVlk0OhsyhKGBZb6Laaw6U+0ZX28sTRBe/dMWw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 10 Dec 2025 14:25:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08/12/2025 9:05 am, Jan Beulich wrote:
> 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 <andrew.cooper3@xxxxxxxxxx>
>> ---
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> ---
>>  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.

No, they can't be moved yet.  There's other cleanup on the list, and
more header dis-entangling needed first.

But I do agree the name is wrong and wants to go.

I intend to end up with svm-structs.h and svm.h only, dropping the subdir.

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

The other option is to merge all the current header files into one
private.h first, before moving this.

~Andrew



 


Rackspace

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