From: Paul Durrant <Paul.Durrant@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
Daniel De Graaf <dgdegra@tycho.nsa.gov>,
Wei Liu <wei.liu2@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH-for-4.9 v1 2/8] dm_op: convert HVMOP_*ioreq_server*
Date: Fri, 25 Nov 2016 09:33:43 +0000 [thread overview]
Message-ID: <8d6dd2abe31b4715a6b99284731eff8d@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5838123C0200007800122228@prv-mh.provo.novell.com>
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 25 November 2016 09:28
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; Ian Jackson
> <Ian.Jackson@citrix.com>; Wei Liu <wei.liu2@citrix.com>; xen-
> devel@lists.xenproject.org; Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Subject: RE: [Xen-devel] [PATCH-for-4.9 v1 2/8] dm_op: convert
> HVMOP_*ioreq_server*
>
> >>> On 25.11.16 at 10:01, <Paul.Durrant@citrix.com> wrote:
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Sent: 24 November 2016 17:02
> >> >>> On 18.11.16 at 18:13, <paul.durrant@citrix.com> wrote:
> >> > --- a/xen/arch/x86/hvm/dm.c
> >> > +++ b/xen/arch/x86/hvm/dm.c
> >> > @@ -102,6 +102,61 @@ long do_dm_op(domid_t domid,
> >> >
> >> > switch ( op.op )
> >> > {
> >> > + case DMOP_create_ioreq_server:
> >> > + {
> >> > + struct domain *curr_d = current->domain;
> >> > + struct xen_dm_op_create_ioreq_server *data =
> >> > + &op.u.create_ioreq_server;
> >> > +
> >> > + rc = hvm_create_ioreq_server(d, curr_d->domain_id, 0,
> >> > + data->handle_bufioreq, &data->id);
> >> > + break;
> >> > + }
> >> > + case DMOP_get_ioreq_server_info:
> >>
> >> Blank lines between non-fall-through case statements please.
> >
> > Even where there are braces?
>
> Yes please, because the closing brace alone is no indication of
> whether there is fall-through involved here.
>
> >> > --- a/xen/include/public/hvm/hvm_op.h
> >> > +++ b/xen/include/public/hvm/hvm_op.h
> >> > @@ -26,6 +26,7 @@
> >> > #include "../xen.h"
> >> > #include "../trace.h"
> >> > #include "../event_channel.h"
> >> > +#include "dm_op.h"
> >>
> >> I'd really wish we could avoid that additional dependency, and I seem
> >> to have got away without in my hvmctl series.
> >
> > I can do that but it means I need to typedef ioservid_t in both headers,
> > which I thought was less preferable.
>
> Hmm, are there any uses of that type left in this header after you
> actually removed everything that doesn't need to be here anymore?
>
Ah true. I was still thinking that I needed to keep the old HVMOPs for compatibility but of course I don't so, yes, I can get rid of the inclusion.
Paul
> >> > +struct xen_dm_op_ioreq_server_range {
> >> > + /* IN - server id */
> >> > + ioservid_t id;
> >> > + uint16_t __pad;
> >> > + /* IN - type of range */
> >> > + uint32_t type;
> >>
> >> Any reason for making this 32 bits wide, instead of 16 (and leaving
> >> 32 for future use)?
> >
> > Not really. I could probably shrink it to 8.
>
> I wouldn't go that far, as then you'd need two padding fields.
>
> >> > +struct xen_dm_op_set_ioreq_server_state {
> >> > + /* IN - server id */
> >> > + ioservid_t id;
> >> > + uint16_t __pad;
> >> > + /* IN - enabled? */
> >> > + uint8_t enabled;
> >> > +};
> >>
> >> Why 16 bits of padding ahead of an 8-bit field, the more that
> >> ioservid_t is also just 16 bits?
> >>
> >
> > That's a mistake. I'll drop it.
>
> s/drop/change/ I suppose, as you'll need to add tail padding?
>
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-11-25 9:33 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 17:13 [PATCH-for-4.9 v1 0/8] New hypercall for device models Paul Durrant
2016-11-18 17:13 ` [PATCH-for-4.9 v1 1/8] public / x86: Introduce __HYPERCALL_dm_op Paul Durrant
2016-11-22 15:57 ` Jan Beulich
2016-11-22 16:32 ` Paul Durrant
2016-11-22 17:24 ` Jan Beulich
2016-11-22 17:29 ` Paul Durrant
2016-11-18 17:13 ` [PATCH-for-4.9 v1 2/8] dm_op: convert HVMOP_*ioreq_server* Paul Durrant
2016-11-24 17:02 ` Jan Beulich
2016-11-25 7:06 ` Jan Beulich
2016-11-25 8:47 ` Paul Durrant
2016-11-25 9:01 ` Paul Durrant
2016-11-25 9:28 ` Jan Beulich
2016-11-25 9:33 ` Paul Durrant [this message]
2016-11-18 17:13 ` [PATCH-for-4.9 v1 3/8] dm_op: convert HVMOP_track_dirty_vram Paul Durrant
2016-11-25 11:25 ` Jan Beulich
2016-11-25 11:32 ` Paul Durrant
2016-11-18 17:14 ` [PATCH-for-4.9 v1 4/8] dm_op: convert HVMOP_set_pci_intx_level, HVMOP_set_isa_irq_level, and Paul Durrant
2016-11-25 11:49 ` Jan Beulich
2016-11-25 11:55 ` Paul Durrant
2016-11-25 12:26 ` Jan Beulich
2016-11-25 13:07 ` Paul Durrant
2016-11-18 17:14 ` [PATCH-for-4.9 v1 5/8] dm_op: convert HVMOP_modified_memory Paul Durrant
2016-11-25 13:25 ` Jan Beulich
2016-11-25 13:31 ` Paul Durrant
2016-11-25 13:56 ` Jan Beulich
2016-11-18 17:14 ` [PATCH-for-4.9 v1 6/8] dm_op: convert HVMOP_set_mem_type Paul Durrant
2016-11-25 13:50 ` Jan Beulich
2016-11-25 14:00 ` Paul Durrant
2016-11-25 14:16 ` Jan Beulich
2016-11-25 14:20 ` Paul Durrant
2016-11-25 14:46 ` Jan Beulich
2016-11-25 14:56 ` Paul Durrant
2016-11-18 17:14 ` [PATCH-for-4.9 v1 7/8] dm_op: convert HVMOP_inject_trap and HVMOP_inject_msi Paul Durrant
2016-11-25 14:07 ` Jan Beulich
2016-11-25 14:13 ` Paul Durrant
2016-11-18 17:14 ` [PATCH-for-4.9 v1 8/8] x86/hvm: serialize trap injecting producer and consumer Paul Durrant
2016-11-18 17:52 ` Razvan Cojocaru
2016-11-21 7:53 ` Jan Beulich
2016-11-21 8:26 ` Paul Durrant
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=8d6dd2abe31b4715a6b99284731eff8d@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=JBeulich@suse.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=wei.liu2@citrix.com \
--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).