From: Julien Grall <julien@xen.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
"Wei Liu" <wl@xen.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Tim Deegan" <tim@xen.org>,
"George Dunlap" <george.dunlap@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v2 4/4] x86: adjustments to guest handle treatment
Date: Wed, 29 Apr 2020 14:22:40 +0100 [thread overview]
Message-ID: <b7cf3ad4-2537-9df8-7a8a-743cd0fe45c0@xen.org> (raw)
In-Reply-To: <2025316a-de36-91d9-521c-547af668f919@suse.com>
Hi,
On 22/04/2020 10:32, Jan Beulich wrote:
> On 22.04.2020 10:17, Julien Grall wrote:
>> On 21/04/2020 10:13, Jan Beulich wrote:
>>> First of all avoid excessive conversions. copy_{from,to}_guest(), for
>>> example, work fine with all of XEN_GUEST_HANDLE{,_64,_PARAM}().
>>>
>>> Further
>>> - do_physdev_op_compat() didn't use the param form for its parameter,
>>> - {hap,shadow}_track_dirty_vram() wrongly used the param form,
>>> - compat processor Px logic failed to check compatibility of native and
>>> compat structures not further converted.
>>>
>>> As this eliminates all users of guest_handle_from_param() and as there's
>>> no real need to allow for conversions in both directions, drop the
>>> macros as well.
>>
>> I was kind of expecting both guest_handle_from_param() and
>> guest_handle_to_param() to be dropped together. May I ask why
>> you still need guest_handle_to_param()?
>
> There are three (iirc) uses left which I don't really see how
> to sensibly replace. Take a look at the different callers of
> x86's vcpumask_to_pcpumask(), for example.
Oh, const_guest_handle_from_ptr() is returning a GUEST_HANDLE_PARAM.
This is a bit odd but fair enough.
>
>>> --- a/xen/include/xen/acpi.h
>>> +++ b/xen/include/xen/acpi.h
>>> @@ -184,8 +184,8 @@ static inline unsigned int acpi_get_csub
>>> static inline void acpi_set_csubstate_limit(unsigned int new_limit) { return; }
>>> #endif
>>> -#ifdef XEN_GUEST_HANDLE_PARAM
>>> -int acpi_set_pdc_bits(u32 acpi_id, XEN_GUEST_HANDLE_PARAM(uint32));
>>> +#ifdef XEN_GUEST_HANDLE
>>> +int acpi_set_pdc_bits(u32 acpi_id, XEN_GUEST_HANDLE(uint32));
>>> #endif
>>
>> Do we really need to keep the #ifdef here?
>
> I think so, yes, or else the original one wouldn't have been
> needed either. (Consider the header getting included without
> any of the public headers having got included first.) Dropping
> (if it was possible) this would be an orthogonal change imo.
Fair point.
Cheers,
--
Julien Grall
next prev parent reply other threads:[~2020-04-29 13:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 9:08 [PATCH v2 0/4] x86: mm (mainly shadow) adjustments Jan Beulich
2020-04-21 9:11 ` [PATCH v2 1/4] x86/mm: no-one passes a NULL domain to init_xen_l4_slots() Jan Beulich
2020-04-21 16:40 ` Roger Pau Monné
2020-05-05 6:31 ` Jan Beulich
2020-05-07 17:26 ` Andrew Cooper
2020-05-08 7:45 ` Jan Beulich
2020-04-21 9:11 ` [PATCH v2 2/4] x86/shadow: sh_update_linear_entries() is a no-op for PV Jan Beulich
2020-04-22 6:47 ` Tim Deegan
2020-04-21 9:12 ` [PATCH v2 3/4] x86/mm: monitor table is HVM-only Jan Beulich
2020-04-21 9:13 ` [PATCH v2 4/4] x86: adjustments to guest handle treatment Jan Beulich
2020-04-21 17:30 ` Roger Pau Monné
2020-04-21 18:44 ` Julien Grall
2020-04-22 7:56 ` Roger Pau Monné
2020-04-22 8:06 ` Julien Grall
2020-04-22 8:17 ` Julien Grall
2020-04-22 9:32 ` Jan Beulich
2020-04-29 13:22 ` Julien Grall [this message]
2020-04-22 8:26 ` Roger Pau Monné
2020-04-22 9:27 ` Jan Beulich
2020-05-05 6:26 ` Jan Beulich
2020-05-06 9:45 ` Julien Grall
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=b7cf3ad4-2537-9df8-7a8a-743cd0fe45c0@xen.org \
--to=julien@xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wl@xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).