[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 05/11] x86/hyperv: setup hypercall page
On Mon, Feb 03, 2020 at 11:41:57AM +0000, Durrant, Paul wrote: > > -----Original Message----- > > From: Jan Beulich <jbeulich@xxxxxxxx> > > Sent: 03 February 2020 11:39 > > To: Durrant, Paul <pdurrant@xxxxxxxxxxxx> > > Cc: Wei Liu <wl@xxxxxxx>; Xen Development List <xen- > > devel@xxxxxxxxxxxxxxxxxxxx>; Michael Kelley <mikelley@xxxxxxxxxxxxx>; Wei > > Liu <liuwe@xxxxxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; > > Roger Pau Monné <roger.pau@xxxxxxxxxx> > > Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page > > > > On 03.02.2020 12:37, Durrant, Paul wrote: > > >> -----Original Message----- > > >> From: Jan Beulich <jbeulich@xxxxxxxx> > > >> Sent: 03 February 2020 11:34 > > >> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx> > > >> Cc: Wei Liu <wl@xxxxxxx>; Xen Development List <xen- > > >> devel@xxxxxxxxxxxxxxxxxxxx>; Michael Kelley <mikelley@xxxxxxxxxxxxx>; > > Wei > > >> Liu <liuwe@xxxxxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; > > >> Roger Pau Monné <roger.pau@xxxxxxxxxx> > > >> Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page > > >> > > >> On 03.02.2020 12:21, Durrant, Paul wrote: > > >>>> -----Original Message----- > > >>>> From: Jan Beulich <jbeulich@xxxxxxxx> > > >>>> Sent: 03 February 2020 11:06 > > >>>> To: Durrant, Paul <pdurrant@xxxxxxxxxxxx> > > >>>> Cc: Wei Liu <wl@xxxxxxx>; Xen Development List <xen- > > >>>> devel@xxxxxxxxxxxxxxxxxxxx>; Michael Kelley <mikelley@xxxxxxxxxxxxx>; > > >> Wei > > >>>> Liu <liuwe@xxxxxxxxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; > > >>>> Roger Pau Monné <roger.pau@xxxxxxxxxx> > > >>>> Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page > > >>>> > > >>>> On 03.02.2020 11:39, Durrant, Paul wrote: > > >>>>>> -----Original Message----- > > >>>>>> From: Wei Liu <wl@xxxxxxx> > > >>>>>> Sent: 31 January 2020 17:57 > > >>>>>> To: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxx> > > >>>>>> Cc: Durrant, Paul <pdurrant@xxxxxxxxxxxx>; Michael Kelley > > >>>>>> <mikelley@xxxxxxxxxxxxx>; Wei Liu <liuwe@xxxxxxxxxxxxx>; Wei Liu > > >>>>>> <wl@xxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>; Andrew Cooper > > >>>>>> <andrew.cooper3@xxxxxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx> > > >>>>>> Subject: Re: [PATCH v6 05/11] x86/hyperv: setup hypercall page > > >>>>>> > > >>>>>> (Note to self) > > >>>>>> > > >>>>>> On Fri, Jan 31, 2020 at 05:49:24PM +0000, Wei Liu wrote: > > >>>>>> [...] > > >>>>>>> +static uint64_t generate_guest_id(void) > > >>>>>>> +{ > > >>>>>>> + union hv_guest_os_id id; > > >>>>>>> + > > >>>>>> > > >>>>>> id.raw = 0; > > >>>>> > > >>>>> Or just use a C99 initializer to set things up. A bit neater IMO. > > >>>> > > >>>> If you mean this for ... > > >>>> > > >>>>>>> + id.vendor = HV_XEN_VENDOR_ID; > > >>>>>>> + id.major = xen_major_version(); > > >>>>>>> + id.minor = xen_minor_version(); > > >>>> > > >>>> ... these three fields, then this won't work with rather old gcc > > >>>> we still permit to be used. Using { .raw = 0 } would work afaict. > > >>>> > > >>> > > >>> Not even { .vendor = HV_XEN_VENDOR_ID } ? > > >> > > >> No, because of it being part of an unnamed (struct) member of > > >> the union. > > > > > > Ok... shame. Presumably an empty initializer - {} - would be ok? > > > > I think so, yes. I understand you'd like this better than > > { .raw = 0 } ? > > > > Yes. In general, using a c99 initializer to explicitly set something > to 0 seems a bit redundant to me. Alright. I have changed it to union hv_guest_os_id id = {}; in my local branch. Wei. > > Paul > > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |