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

Re: [PATCH v3 00/14] x86/hvm: {svm,vmx} {c,h} cleanup


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 27 Feb 2023 12:33:47 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=g+bNr4gg661ozvSa8Wp8fouuL/YidAmxpC494vqn6nI=; b=TvJ/GeEp14RlneJmeyDAyuaZhzUwIE187+Iz0MCRqLyiBQMD0lwnl/tDP1Mbe23y7+/mPafF1jQFEO4hUUC2xv24R2Sh0Vs4D6+5Oo2j8B9+SSyycUuCPbXDK3h+hjNUNzZ0/0q6qoT9k/7q0UYLXW7ls3vFgrrdtcoo6etyjgWFQ43TIFmnmUv12cIttZCXcwZ6VS0brZ9v+mwe5h4Bycs/dlnptw6R3AeTSYFUITzApNagQ8/9IRbyawpGwfePCr5kE+AzphVVRz1zooMtjGl9mWn7roo88Mz1fvFzzR2rvGlcIDJx24citNPC00VhAYoZ5N4ZarGVZ3B3AFSeIA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kFivdKEJZ5AFlxfR8F6almcCFbw91Zxhd3iDeyFVKUlDdfDlfDWalutR/GLAJZeqgFd7xMKl4FD8IdnrRrez5rwMnuvRufKmGGTr//W9UmaSsArkRyXUQzWxtkXhxESWEEyDoRtJd+ub3C4StGCFaZ57nQHc/5dce//li+F0BJytNH1JLduCc+vb2FaiqemCSZSzgWAQyOwYeC2GTynLByBSdyA9S7UWQy8j1gniXDOPAOZrH7NsaGfsuCeHcNV5N/CC77QbG4gEQYVn0M0adKvbYdIvfU47X7FfAYezg+23npZtCwOpo46hpN6T6+/O9FgiXjG6jhHtOXE9eRf5PQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 27 Feb 2023 11:34:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.02.2023 12:15, Andrew Cooper wrote:
> On 27/02/2023 10:46 am, Jan Beulich wrote:
>> On 24.02.2023 22:33, Andrew Cooper wrote:
>>> But I think we want to change tact slightly at this point, so I'm not
>>> going to do any further tweaking on commit.
>>>
>>> Next, I think we want to rename asm/hvm/svm/svm.h to asm/hvm/svm.h,
>>> updating the non-SVM include paths as we go.  Probably best to
>>> chain-include the other svm/hvm/svm/*.h headers temporarily, so we've
>>> only got one tree-wide cleanup of the external include paths.
>>>
>>> Quick tangent - I will be making all of that cpu_has_svm_*
>>> infrastructure disappear by moving it into the normal CPUID handling,
>>> but I've not had sufficient time to finish that yet.
>>>
>>> Next, hvm/svm/nestedsvm.h can merge straight into hvm/svm.h, and
>>> disappear (after my decoupling patch has gone in).
>> Why would you want to fold hvm/svm/nestedsvm.h into hvm/svm/svm.h?
>> The latter doesn't use anything from the former, does it?
> 
> It's about what else uses them.
> 
> hvm_vcpu needs both svm_vcpu and nestedsvm, so both headers are always
> included in tandem.

Well, yes, that's how things are today. But can you explain to me why
hvm_vcpu has to know nestedsvm's layout? If the field was a pointer,
a forward decl of that struct would suffice, and any entity in the
rest of Xen not caring about struct nestedsvm would no longer see it
(and hence also no longer be re-built if a change is made there).

> nestedsvm is literally just one struct now, and no subsystem ought to
> have multiple headers when one will do.

When one will do, yes. Removing build dependencies is a good reason
to have separate headers, though.

Jan



 


Rackspace

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