[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Juergen Gross <jgross@xxxxxxxx>
- Date: Mon, 27 Jun 2022 12:40:41 +0200
- 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 10:40:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
The "common" just wants to express that the code is common. I'm open
for a better suggestion, though. :-)
Juergen
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
|