From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>, Jan Beulich <JBeulich@suse.com>
Cc: "Keir (Xen.org)" <keir@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>,
"Tim (Xen.org)" <tim@xen.org>,
Xen-devel <xen-devel@lists.xen.org>,
Stefano Stabellini <Stefano.Stabellini@citrix.com>,
Shannon Zhao <zhaoshenglong@huawei.com>,
Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH] public/hvm: Export the HVM_PARAM_CALLBACK_VIA ABI in the API
Date: Tue, 24 Nov 2015 10:28:37 +0000 [thread overview]
Message-ID: <56543BD5.6030000@citrix.com> (raw)
In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02F693162@AMSPEX01CL01.citrite.net>
On 24/11/15 09:56, Paul Durrant wrote:
>> -----Original Message-----
>> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
>> bounces@lists.xen.org] On Behalf Of Jan Beulich
>> Sent: 24 November 2015 07:33
>> To: Andrew Cooper
>> Cc: Keir (Xen.org); Ian Campbell; Tim (Xen.org); Ian Jackson; Xen-devel;
>> Stefano Stabellini; Shannon Zhao
>> Subject: Re: [Xen-devel] [PATCH] public/hvm: Export the
>> HVM_PARAM_CALLBACK_VIA ABI in the API
>>
>>>>> On 20.11.15 at 19:20, <andrew.cooper3@citrix.com> wrote:
>>> --- a/xen/include/public/hvm/params.h
>>> +++ b/xen/include/public/hvm/params.h
>>> @@ -29,18 +29,21 @@
>>> * Parameter space for HVMOP_{set,get}_param.
>>> */
>>>
>>> +#define HVM_PARAM_CALLBACK_IRQ 0
>>> +
>>> /*
>>> * How should CPU0 event-channel notifications be delivered?
>>> - * val[63:56] == 0: val[55:0] is a delivery GSI (Global System Interrupt).
>>> - * val[63:56] == 1: val[55:0] is a delivery PCI INTx line, as follows:
>>> - * Domain = val[47:32], Bus = val[31:16],
>>> - * DevFn = val[15: 8], IntX = val[ 1: 0]
>>> - * val[63:56] == 2: val[7:0] is a vector number, check for
>>> - * XENFEAT_hvm_callback_vector to know if this delivery
>>> - * method is available.
>>> + *
>>> * If val == 0 then CPU0 event-channel notifications are not delivered.
>>> + * If val != 0, val[63:56] encodes the type, as follows:
>>> */
>>> -#define HVM_PARAM_CALLBACK_IRQ 0
>>> +#define HVM_PARAM_CALLBACK_TYPE_GSI 0 /* val[55:0] is a delivery
>> GSI */
>>> +#define HVM_PARAM_CALLBACK_TYPE_PCI_INTX 1 /* val[55:0] is a
>> delivery PCI INTx line:
>>> + Domain = val[47:32], Bus = val[31:16],
>>> + DevFn = val[15: 8], IntX = val[ 1: 0] */
>>> +#define HVM_PARAM_CALLBACK_TYPE_VECTOR 2 /* val[7:0] is a vector
>> number, check for
>>> + XENFEAT_hvm_callback_vector to know if
>>> + this delivery method is available. */
>> Would you not think that while cleaning this up, doing some
>> re-formatting would also help? I.e. Putting the comments on lines of
>> their own instead of at the end (even more deeply indented than
>> they were before)? Also the first two of these last three comments
>> are missing full stops.
>>
>> Also considering
>>
>> * Attempting to use GSI 0 will actually disable callbacks
>>
>> in your patch comments, I'd suggest extending the GSI comment to
>> state that it has to be a non-zero one.
>>
> Could we also perhaps deprecate this whole mechanism at this point? I added HVMOP_set_evtchn_upcall_vector quite a while ago now.
January, so Xen 4.6 is the only release with this hvmop in.
The issue with deprecating HVM_PARAM_CALLBACK_IRQ is that DMLite has no
LAPIC, so can't use HVMOP_set_evtchn_upcall_vector.
Much as this ABI is horrible and nasty (and really should be
deprecated), there are not alternatives which cover the common uses.
~Andrew
next prev parent reply other threads:[~2015-11-24 10:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 18:20 [PATCH] public/hvm: Export the HVM_PARAM_CALLBACK_VIA ABI in the API Andrew Cooper
2015-11-24 7:33 ` Jan Beulich
2015-11-24 9:56 ` Paul Durrant
2015-11-24 10:28 ` Andrew Cooper [this message]
2015-11-24 10:36 ` George Dunlap
2015-11-24 11:14 ` Paul Durrant
-- strict thread matches above, loose matches on Subject: below --
2015-12-10 20:15 Andrew Cooper
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=56543BD5.6030000@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=Stefano.Stabellini@citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
--cc=zhaoshenglong@huawei.com \
/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.