From: Juergen Gross <jgross@suse.com>
To: Julien Grall <julien@xen.org>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Michal Orzel <michal.orzel@arm.com>
Subject: Re: [PATCH v4 10/11] xen/arm: call hypercall handlers via generated macro
Date: Thu, 24 Mar 2022 07:58:06 +0100 [thread overview]
Message-ID: <2a289375-7dae-c829-dfb9-af39724e1e4c@suse.com> (raw)
In-Reply-To: <93bdb9e5-f054-704e-9302-3c2e17d92c60@xen.org>
[-- Attachment #1.1.1: Type: text/plain, Size: 1427 bytes --]
On 23.03.22 10:40, Julien Grall wrote:
> Hi,
>
> On 10/03/2022 07:34, Juergen Gross wrote:
>> @@ -1520,7 +1460,10 @@ static bool check_multicall_32bit_clean(struct
>> multicall_entry *multi)
>> {
>> int i;
>> - for ( i = 0; i < arm_hypercall_table[multi->op].nr_args; i++ )
>> + if ( multi->op >= ARRAY_SIZE(hypercall_args) )
>> + return true;
>
> NIT: This change reads odd to me. So I would prefer...
>
>> +
>> + for ( i = 0; i < hypercall_args[multi->op]; i++ )
>> {
>> if ( unlikely(multi->args[i] & 0xffffffff00000000ULL) )
>> {
>> @@ -1537,28 +1480,13 @@ static bool check_multicall_32bit_clean(struct
>> multicall_entry *multi)
>> enum mc_disposition arch_do_multicall_call(struct mc_state *state)
>> {
>> struct multicall_entry *multi = &state->call;
>> - arm_hypercall_fn_t call = NULL;
>> -
>> - if ( multi->op >= ARRAY_SIZE(arm_hypercall_table) )
>
> ... if we keep this checks. So we don't return true in
> check_multicall_32bit_clean() when the hypercall doesn't exist.
The idea was to spare the not necessary check in case of a 64-bit guest.
If you prefer to keep the check here, I'm fine to do it this way.
>
> The code still do the right thing, so either way:
>
> Reviewed-by: Julien Grall <jgrall@amazon.com>
Thanks,
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2022-03-24 6:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 7:34 [PATCH v4 00/11] xen: drop hypercall function tables Juergen Gross
2022-03-10 7:34 ` [PATCH v4 01/11] xen/arm: rename do_phydev_op() to do_arm_physdev_op() Juergen Gross
2022-03-22 20:09 ` Julien Grall
2022-03-10 7:34 ` [PATCH v4 02/11] xen: move do_vcpu_op() to arch specific code Juergen Gross
2022-03-22 20:13 ` Julien Grall
2022-03-10 7:34 ` [PATCH v4 03/11] xen: switch non style compliant hypercall handler parameter types Juergen Gross
2022-03-10 7:34 ` [PATCH v4 04/11] xen: harmonize return types of hypercall handlers Juergen Gross
2022-03-10 7:34 ` [PATCH v4 05/11] xen: don't include asm/hypercall.h from C sources Juergen Gross
2022-03-22 20:15 ` Julien Grall
2022-03-10 7:34 ` [PATCH v4 06/11] xen: include compat/platform.h from hypercall.h Juergen Gross
2022-03-10 7:34 ` [PATCH v4 07/11] xen: generate hypercall interface related code Juergen Gross
2022-03-22 15:31 ` Anthony PERARD
2022-03-22 15:51 ` Juergen Gross
2022-03-22 20:25 ` Julien Grall
2022-03-10 7:34 ` [PATCH v4 08/11] xen: use generated prototypes for hypercall handlers Juergen Gross
2022-03-22 20:26 ` Julien Grall
2022-03-10 7:34 ` [PATCH v4 09/11] xen/x86: call hypercall handlers via generated macro Juergen Gross
2022-03-10 7:34 ` [PATCH v4 10/11] xen/arm: " Juergen Gross
2022-03-23 9:40 ` Julien Grall
2022-03-24 6:58 ` Juergen Gross [this message]
2022-03-10 7:34 ` [PATCH v4 11/11] xen/x86: remove cf_check attribute from hypercall handlers Juergen Gross
2022-03-14 17:25 ` Daniel P. Smith
2022-03-17 16:47 ` Jan Beulich
2022-03-17 16:52 ` Juergen Gross
2022-03-17 16:53 ` Jan Beulich
2022-03-22 15:06 ` Teo Couprie Diaz
2022-03-21 7:15 ` [PATCH v4.1 02/11] xen: move do_vcpu_op() to arch specific code Juergen Gross
2022-03-21 7:15 ` [PATCH v4.1 11/11] xen/x86: remove cf_check attribute from hypercall handlers Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a289375-7dae-c829-dfb9-af39724e1e4c@suse.com \
--to=jgross@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.