All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v5 09/11] viridian: add implementation of synthetic interrupt MSRs
Date: Thu, 14 Mar 2019 08:46:24 +0000	[thread overview]
Message-ID: <d1df9f4d27d342a0b37159ae3f2a25de@AMSPEX02CL02.citrite.net> (raw)
In-Reply-To: <5C8A072D020000780021E636@prv1-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 14 March 2019 07:48
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper <Andrew.Cooper3@citrix.com>; George Dunlap
> <George.Dunlap@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>; Roger Pau Monne
> <roger.pau@citrix.com>; Wei Liu <wei.liu2@citrix.com>; Stefano Stabellini <sstabellini@kernel.org>;
> xen-devel <xen-devel@lists.xenproject.org>; Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>; Tim
> (Xen.org) <tim@xen.org>
> Subject: RE: [Xen-devel] [PATCH v5 09/11] viridian: add implementation of synthetic interrupt MSRs
> 
> >>> On 13.03.19 at 17:13, <Paul.Durrant@citrix.com> wrote:
> >>  -----Original Message-----
> >> From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf Of
> > Jan Beulich
> >> Sent: 13 March 2019 13:15
> >> To: Paul Durrant <Paul.Durrant@citrix.com>
> >> Cc: Stefano Stabellini <sstabellini@kernel.org>; Wei Liu <wei.liu2@citrix.com>;
> > Konrad Rzeszutek Wilk
> >> <konrad.wilk@oracle.com>; George Dunlap <George.Dunlap@citrix.com>; Andrew
> > Cooper
> >> <Andrew.Cooper3@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>; Tim (Xen.org)
> > <tim@xen.org>; Julien
> >> Grall <julien.grall@arm.com>; xen-devel <xen-devel@lists.xenproject.org>; Roger
> > Pau Monne
> >> <roger.pau@citrix.com>
> >> Subject: Re: [Xen-devel] [PATCH v5 09/11] viridian: add implementation of
> > synthetic interrupt MSRs
> >>
> >> >>> On 11.03.19 at 14:41, <paul.durrant@citrix.com> wrote:
> >> > @@ -28,6 +29,32 @@ typedef union _HV_VP_ASSIST_PAGE
> >> >      uint8_t ReservedZBytePadding[PAGE_SIZE];
> >> >  } HV_VP_ASSIST_PAGE;
> >> >
> >> > +typedef enum HV_MESSAGE_TYPE {
> >> > +    HvMessageTypeNone,
> >> > +    HvMessageTimerExpired = 0x80000010,
> >> > +} HV_MESSAGE_TYPE;
> >> > +
> >> > +typedef struct HV_MESSAGE_FLAGS {
> >> > +    uint8_t MessagePending:1;
> >> > +    uint8_t Reserved:7;
> >> > +} HV_MESSAGE_FLAGS;
> >> > +
> >> > +typedef struct HV_MESSAGE_HEADER {
> >> > +    HV_MESSAGE_TYPE MessageType;
> >> > +    uint16_t Reserved1;
> >> > +    HV_MESSAGE_FLAGS MessageFlags;
> >> > +    uint8_t PayloadSize;
> >> > +    uint64_t Reserved2;
> >> > +} HV_MESSAGE_HEADER;
> >> > +
> >> > +#define HV_MESSAGE_SIZE 256
> >> > +#define HV_MESSAGE_MAX_PAYLOAD_QWORD_COUNT 30
> >>
> >
> > Missed this one before...
> >
> >> Is this defined this way, or (given ...
> >>
> >> > +typedef struct HV_MESSAGE {
> >> > +    HV_MESSAGE_HEADER Header;
> >> > +    uint64_t Payload[HV_MESSAGE_MAX_PAYLOAD_QWORD_COUNT];
> >> > +} HV_MESSAGE;
> >>
> >> ... this) isn't it rather
> >>
> >> #define HV_MESSAGE_MAX_PAYLOAD_QWORD_COUNT \
> >>     ((HV_MESSAGE_SIZE - sizeof(HV_MESSAGE_HEADER) / 8)
> >>
> >
> > I need the definition for the array in the struct so that sizeof(HV_MESSAGE)
> > == HV_MESSAGE_SIZE (for which there is a BUILD_BUG_ON()) later.
> 
> I don't understand this part - I'm not asking to ditch the #define.
> As to the BUILD_BUG_ON() - I see now, but that's only in patch
> 10, and in a specific message handler. I think this would belong
> here, and in the main viridian.c file.

Ok, I can see that it is more logical to co-locate the BUILD_BUG_ON() with the definitions.

  Paul

> 
> > It's also written that way in the spec. so I'd rather leave it as-is.
> 
> Well, okay then - I was sort of expecting this to be spelled out
> there in such a way. That doesn't change my overall opinion,
> but I can see your point of wanting to match the spec, and you
> being the maintainer I have no basis to insist anyway.
> 
> Jan
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-03-14  8:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 13:41 [PATCH v5 00/11] viridian: implement more enlightenments Paul Durrant
2019-03-11 13:41 ` [PATCH v5 01/11] viridian: add init hooks Paul Durrant
2019-03-13 12:23   ` Jan Beulich
2019-03-11 13:41 ` [PATCH v5 02/11] viridian: separately allocate domain and vcpu structures Paul Durrant
2019-03-13 12:25   ` Jan Beulich
2019-03-11 13:41 ` [PATCH v5 03/11] viridian: use stack variables for viridian_vcpu and viridian_domain Paul Durrant
2019-03-13 12:33   ` Jan Beulich
2019-03-11 13:41 ` [PATCH v5 04/11] viridian: make 'fields' struct anonymous Paul Durrant
2019-03-13 12:34   ` Jan Beulich
2019-03-11 13:41 ` [PATCH v5 05/11] viridian: extend init/deinit hooks into synic and time modules Paul Durrant
2019-03-11 13:41 ` [PATCH v5 06/11] viridian: add missing context save helpers " Paul Durrant
2019-03-11 13:41 ` [PATCH v5 07/11] viridian: use viridian_map/unmap_guest_page() for reference tsc page Paul Durrant
2019-03-11 13:41 ` [PATCH v5 08/11] viridian: stop directly calling viridian_time_ref_count_freeze/thaw() Paul Durrant
2019-03-13 12:36   ` Jan Beulich
2019-03-11 13:41 ` [PATCH v5 09/11] viridian: add implementation of synthetic interrupt MSRs Paul Durrant
2019-03-13 13:14   ` Jan Beulich
2019-03-13 13:25     ` Paul Durrant
2019-03-13 14:23       ` Jan Beulich
2019-03-13 14:51         ` Paul Durrant
2019-03-13 16:13     ` Paul Durrant
2019-03-14  7:47       ` Jan Beulich
2019-03-14  8:46         ` Paul Durrant [this message]
2019-03-11 13:41 ` [PATCH v5 10/11] viridian: add implementation of synthetic timers Paul Durrant
2019-03-13 13:06   ` Paul Durrant
2019-03-13 14:10     ` Jan Beulich
2019-03-13 14:05   ` Jan Beulich
2019-03-13 14:37     ` Paul Durrant
2019-03-13 15:36       ` Jan Beulich
2019-03-13 15:43         ` Paul Durrant
2019-03-14  9:58       ` Paul Durrant
2019-03-11 13:41 ` [PATCH v5 11/11] viridian: add implementation of the HvSendSyntheticClusterIpi hypercall Paul Durrant
2019-03-13 14:08   ` Jan Beulich

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=d1df9f4d27d342a0b37159ae3f2a25de@AMSPEX02CL02.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --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 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.