[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 1/9] xen: move do_vcpu_op() to arch specific code
- To: Juergen Gross <jgross@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Mon, 27 Jun 2022 13:35:58 +0200
- 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=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=5j/HxpLkNcop0QKCe8dQZoWa0FXAWdea4btaSz7mTzQ=; b=J4vygAGUTlqfGoYj25Y7O69b6jijbkGMU9NzqZo6004kCKQ46CJwn1ApEf0KZ14bFJVTe1j45pq78h9mCF/dRSTQ0Pypz3AUa5LH6AKKYxGBpDT0lw3pCeAPJglJpV9gvTjkW7b1XLMzpvzMxhG9Q8ql6CXMmkMg39KozTgiMSo+gl587dCT8718dTGm//1jwWdOm+9a6KUM4zb36UU/fgXSQHDLo3GRO6tHs/1PeIGGPO1qdXUVJS7bsZBr1xeFjaUt8ZKyAlHoCenrlcc0jHPa9GOw0Mj8aKDAVLF+IeH2ZWO0/o4r7CDx5U0XZ+NndfQ9uNpehnHfd+ToowsVIw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gCv09sCFd8/5jgLpNBQ8O4XfExKn3R+6e8vSvf1C4G67eEidnw32iEG0F6BV4yLwNPFk9a5zdoPm/WKPnEH6PYznJiJ4X8EgrtevsbyCR7dNpnm7N1FDBLjcNFoOIJ1ex+y7FFcBJzCSPpEIqs5R48yBGzOfSGp/tIe44Yiz75gjxqp4AjpLBlQ78cj7nKxV/OL7OCIRIUgh3lnv47s5OSf9XTfXQxLDcIWdnKhVjzTr5t6FmfHZrelSfUkWQcCLvwZHeVkpdLbsOJgX3nSSzxUfM4yM26YAJcgxAlTC0eehfnvYhvukq07hOrhI5u86cMd9QDCpjF1ycPbSOnzEuw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
- Delivery-date: Mon, 27 Jun 2022 11:36:23 +0000
- Ironport-data: A9a23:Qsnmi64QHcIRwEIFoZjrgwxRtM7GchMFZxGqfqrLsTDasY5as4F+v jMaWj2DMvuKMGD9fot3PY/j9kwC6pfczNBiSVdprXsyHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw03qPp8Zj2tQy2YbjXFvU0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurSKDisnM42UoN1HeB9YFnwkba5cxOfYdC3XXcy7lyUqclPK6tA3VgQcG91d/ex6R2ZT6 fYfNTYBKAiZgP67y666Te8qgdk/KM7sP8UUvXQIITPxVK56B8ycBfiXo4YHgl/chegXdRraT 9AeZjd1KgzJfjVEO0sNCYJ4l+Ct7pX6W2IH8A/O9fBti4TV5BBP7oHKAsLVQ/mlT+hngUOZ4 Tzf2V2sV3n2M/Tak1Jp6EmEhODVmjjgcJkPD7D+/flv6HWDy2pWBBAIWF+TpfiillX4S99ZM 1YT+Cclse417kPDZsLmQxSyrXqAvxgdc9ldCes37EeK0KW8ywSEAmkJSBZRZdpgs9U5LRQg2 0WVhdrvCXpquaeMVHOG3r6OqHW5Pi19BVEFYSgIXA4U+e7JqYs4jg/MZtt7GavzhdrwcRnyy T2XqCk1h50IkNUGka68+DjvnDaEtpXPCAkv6W3/XG2/5wd9TIegbp6v7x7Q6vMoEWqCZlyIv XxBkc7O6ukLVMuJjHbUH7tLG6y17fGYNjGamURoA5Qq6zWq/TikYJxU5zZ9YkxuN67oZAPUX aMagisJjLc7AZdgRfYfj16ZYyjy8ZXdKA==
- Ironport-hdrordr: A9a23:gVa79q98LqcqFwBpagduk+FDdb1zdoMgy1knxilNoENuH/Bwxv rFoB1E73TJYVYqN03IV+rwXZVoZUmsjaKdhrNhRotKPTOWwVdASbsP0WKM+V3d8kHFh41gPO JbAtJD4b7LfCdHZKTBkW6F+r8bqbHokZxAx92uqUuFJTsaF52IhD0JbjpzfHcGJjWvUvECZe ehD4d81kydUEVSSv7+KmgOXuDFqdGOvJX6YSQeDxpizAWVlzun5JPzDhDdh34lInty6IZn1V KAvx3y562lvf3+4hjA11XL55ATvNf60NNMCOGFl8BQADTxjQSDYphnRtS5zXkIidDqzGxvvM jHoh8mMcg2w3TNflutqR+o4AXk2CZG0Q6W9XaoxV/Y5eDpTjMzDMRMwahDdAHC1kYmtNZglI pWwmOwrfNsfF/9tRW4w+KNewBhl0Kyr3Znu/UUlWZjXYwXb6IUhZAD/XlSDIwLEEvBmc0a+d FVfY/hDcttABKnhyizhBgu/DXsZAV4Iv6+eDlMhiTPuAIm30yQzCMjtb4idzk7hdAAoqJ/lp X525RT5c9zp/AtHNJA7cc6ML+K4z/2MGXxGVPXB2jbP4c6HF+Ig6LLwdwOlZKXkdozvdAPpK g=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Jun 27, 2022 at 01:08:11PM +0200, Juergen Gross wrote:
> On 27.06.22 13:02, Roger Pau Monné wrote:
> > On Mon, Jun 27, 2022 at 12:40:41PM +0200, Juergen Gross wrote:
> > > On 27.06.22 12:28, Roger Pau Monné wrote:
> > > > On Thu, Mar 24, 2022 at 03:01:31PM +0100, Juergen Gross wrote:
> > > > > The entry point used for the vcpu_op hypercall on Arm is different
> > > > > from the one on x86 today, as some of the common sub-ops are not
> > > > > supported on Arm. The Arm specific handler filters out the not
> > > > > supported sub-ops and then calls the common handler. This leads to the
> > > > > weird call hierarchy:
> > > > >
> > > > > do_arm_vcpu_op()
> > > > > do_vcpu_op()
> > > > > arch_do_vcpu_op()
> > > > >
> > > > > Clean this up by renaming do_vcpu_op() to common_vcpu_op() and
> > > > > arch_do_vcpu_op() in each architecture to do_vcpu_op(). This way one
> > > > > of above calls can be avoided without restricting any potential
> > > > > future use of common sub-ops for Arm.
> > > >
> > > > Wouldn't it be more natural to have do_vcpu_op() contain the common
> > > > code (AFAICT handlers for
> > > > VCPUOP_register_{vcpu_info,runstate_memory_area}) and then everything
> > > > else handled by the x86 arch_do_vcpu_op() handler?
> > > >
> > > > I find the common prefix misleading, as not all the VCPUOP hypercalls
> > > > are available to all the architectures.
> > >
> > > This would end up in Arm suddenly supporting the sub-ops it doesn't
> > > (want to) support today. Otherwise it would make no sense that Arm has
> > > a dedicated entry for this hypercall.
> >
> > My preference would be for a common do_vcpu_op() that just contains
> > handlers for VCPUOP_register_{vcpu_info,runstate_memory_area} and then
> > an empty arch_ handler for Arm, and everything else moved to the x86
> > arch_ handler. That obviously implies some code churn, but results in
> > a cleaner implementation IMO.
>
> I'd be fine with that.
>
> I did it in V2 of the (then secret) series, and Jan replied:
>
> I'm afraid I don't agree with this movement. I could see things getting
> moved that are purely PV (on the assumption that no new PV ports will
> appear), but anything that's also usable by PVH / HVM ought to be usable
> in principle also by Arm or other PV-free ports.
I see. My opinion is that when other ports need those functions they
should be pulled out of arch code into common code, until then it just
adds confusion to have them in common code.
I will take a look at the current patch, as we need to make progress
on this.
Thanks, Roger.
|