From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
boris.ostrovsky@oracle.com, Keir Fraser <keir@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86: Update HVM_PARAM_CALLBACK_IRQ
Date: Tue, 1 Mar 2016 09:32:55 -0500 [thread overview]
Message-ID: <20160301143255.GC21829@char.us.oracle.com> (raw)
In-Reply-To: <56D57C4302000078000D7BC0@prv-mh.provo.novell.com>
On Tue, Mar 01, 2016 at 03:25:55AM -0700, Jan Beulich wrote:
> >>> On 29.02.16 at 21:39, <konrad.wilk@oracle.com> wrote:
> > @@ -50,11 +52,13 @@ struct hvm_irq {
> > /* Virtual interrupt and via-link for paravirtual platform driver. */
> > uint32_t callback_via_asserted;
> > union {
> > + /* These MUST match with HVM_PARAM_CALLBACK_IRQ types. */
> > enum {
> > - HVMIRQ_callback_none,
> > - HVMIRQ_callback_gsi,
> > - HVMIRQ_callback_pci_intx,
> > - HVMIRQ_callback_vector
> > + HVMIRQ_callback_gsi = HVM_PARAM_CALLBACK_TYPE_GSI,
> > + HVMIRQ_callback_pci_intx = HVM_PARAM_CALLBACK_TYPE_PCI_INTX,
> > + HVMIRQ_callback_vector = HVM_PARAM_CALLBACK_TYPE_VECTOR,
> > + /* Will change if we add more types. */
> > + HVMIRQ_callback_none = HVM_PARAM_CALLBACK_TYPE_NUM,
> > } callback_via_type;
> > };
>
> I.e. a domain will now start in HVMIRQ_callback_gsi mode (due to
> HVM_PARAM_CALLBACK_TYPE_GSI = 0) instead of
> HVMIRQ_callback_none? That can't be right.
Argh. I was looking for all the cases for callback_via_type being set but
of course missed the most obvious one!
>
> > --- a/xen/include/public/hvm/params.h
> > +++ b/xen/include/public/hvm/params.h
> > @@ -56,6 +56,21 @@
> > */
> >
> > /*
> > + * In the future this may change.
> > + */
> > +#define HVM_PARAM_CALLBACK_TYPE_NUM HVM_PARAM_CALLBACK_TYPE_VECTOR + 1
>
> Missing parentheses.
>
> > +/*
> > + * The val[63:56] convenience shift.
> > + */
> > +#define HVM_PARAM_CALLBACK_TYPE_SHIFT 56
> > +
> > +/*
> > + * Wrapper around for HVM_PARAM_CALLBACK_TYPE_VECTOR.
>
> Looks like either "around" or "for" wants to be dropped. I also
> think this would better live right next to that constant's definition.
OK.
>
> Also note that all comments you add are single line ones, and
> hence don't conform to our coding style (yes, there are other
> [bad] examples of such in this file).
/me nods. Will make it conform to the single line one type comment.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-03-01 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 20:39 [PATCH] x86: Update HVM_PARAM_CALLBACK_IRQ Konrad Rzeszutek Wilk
2016-02-29 20:42 ` Konrad Rzeszutek Wilk
2016-03-01 10:25 ` Jan Beulich
2016-03-01 14:32 ` Konrad Rzeszutek Wilk [this message]
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=20160301143255.GC21829@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=keir@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).