> -----Original Message----- > From: Jan Beulich <jbeul...@suse.com> > Sent: 03 February 2020 11:34 > To: Durrant, Paul <pdurr...@amazon.co.uk> > Cc: Wei Liu <w...@xen.org>; Xen Development List <xen- > de...@lists.xenproject.org>; Michael Kelley <mikel...@microsoft.com>; Wei > Liu <li...@microsoft.com>; Andrew Cooper <andrew.coop...@citrix.com>; > Roger Pau Monné <roger....@citrix.com> > 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 <jbeul...@suse.com> > >> Sent: 03 February 2020 11:06 > >> To: Durrant, Paul <pdurr...@amazon.co.uk> > >> Cc: Wei Liu <w...@xen.org>; Xen Development List <xen- > >> de...@lists.xenproject.org>; Michael Kelley <mikel...@microsoft.com>; > Wei > >> Liu <li...@microsoft.com>; Andrew Cooper <andrew.coop...@citrix.com>; > >> Roger Pau Monné <roger....@citrix.com> > >> 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 <w...@xen.org> > >>>> Sent: 31 January 2020 17:57 > >>>> To: Xen Development List <xen-devel@lists.xenproject.org> > >>>> Cc: Durrant, Paul <pdurr...@amazon.co.uk>; Michael Kelley > >>>> <mikel...@microsoft.com>; Wei Liu <li...@microsoft.com>; Wei Liu > >>>> <w...@xen.org>; Jan Beulich <jbeul...@suse.com>; Andrew Cooper > >>>> <andrew.coop...@citrix.com>; Roger Pau Monné <roger....@citrix.com> > >>>> 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? Paul > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel