The following patch fixes a typo in vlapic_domain inside vlapic.h. I also found an related error in vlapic.c file, which is fixed by this patch too. Signed-off-by: Wei Huang <wei.huang2@amd.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Good catch. This line: #define vlapic_vcpu(vpic) (container_of((vpic), struct vcpu, \ arch.hvm_vcpu.vlapic)) should probably also be changed to this: #define vlapic_vcpu(vlapic) (container_of((vlapic), struct vcpu, \ arch.hvm_vcpu.vlapic)) Patrick Wei Huang wrote:> The following patch fixes a typo in vlapic_domain inside vlapic.h. I > also found an related error in vlapic.c file, which is fixed by this > patch too. > > Signed-off-by: Wei Huang <wei.huang2@amd.com> > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Patrick Colp wrote:> Good catch. This line: > > #define vlapic_vcpu(vpic) (container_of((vpic), struct vcpu, \ > arch.hvm_vcpu.vlapic)) > > should probably also be changed to this: > > #define vlapic_vcpu(vlapic) (container_of((vlapic), struct vcpu, \ > arch.hvm_vcpu.vlapic))I''m not sure. Do you intend to change the member name after hvm_vcpu based on the macro parameter? Cheers, Neil. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Neil Turton wrote:> Patrick Colp wrote: >> Good catch. This line: >> >> #define vlapic_vcpu(vpic) (container_of((vpic), struct vcpu, \ >> arch.hvm_vcpu.vlapic)) >> >> should probably also be changed to this: >> >> #define vlapic_vcpu(vlapic) (container_of((vlapic), struct vcpu, \ >> arch.hvm_vcpu.vlapic)) > > I''m not sure. Do you intend to change the member name after hvm_vcpu > based on the macro parameter?No. Why would I do that? The issue here is that the macro parameter is referring to a vlapic and not a vpic (which is something different). So for the sake of clarity, it should be changed to vlapic instead of vpic. Patrick _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
At 10:31 +0100 on 08 Jul (1247049063), Patrick Colp wrote:> Neil Turton wrote: > > Patrick Colp wrote: > >> Good catch. This line: > >> > >> #define vlapic_vcpu(vpic) (container_of((vpic), struct vcpu, \ > >> arch.hvm_vcpu.vlapic)) > >> > >> should probably also be changed to this: > >> > >> #define vlapic_vcpu(vlapic) (container_of((vlapic), struct vcpu, \ > >> arch.hvm_vcpu.vlapic)) > > > > I''m not sure. Do you intend to change the member name after hvm_vcpu > > based on the macro parameter? > > No. Why would I do that? > > The issue here is that the macro parameter is referring to a vlapic and not a > vpic (which is something different). So for the sake of clarity, it should be > changed to vlapic instead of vpic.but vlapic_vcpu(oops) would expand to (container_of((oops), struct vcpu, arch.hvm_vcpu.oops) ^^^^ Tim. -- Tim Deegan <Tim.Deegan@citrix.com> Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan wrote:> but vlapic_vcpu(oops) would expand to > (container_of((oops), struct vcpu, arch.hvm_vcpu.oops) > ^^^^Thanks, Tim. That''s what I was trying to say. Cheers, Neil. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Right, sorry. My bad. However, calling it vpic is still a bad idea :) _vlapic or _v or even v would be a better choice. Patrick Neil Turton wrote:> Tim Deegan wrote: >> but vlapic_vcpu(oops) would expand to >> (container_of((oops), struct vcpu, arch.hvm_vcpu.oops) >> ^^^^ > > Thanks, Tim. That''s what I was trying to say. > > Cheers, Neil._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 08/07/2009 10:35, "Neil Turton" <nturton@solarflare.com> wrote:> Tim Deegan wrote: >> but vlapic_vcpu(oops) would expand to >> (container_of((oops), struct vcpu, arch.hvm_vcpu.oops) >> ^^^^ > > Thanks, Tim. That''s what I was trying to say.I''m going to go through and change all the parameters for these macros to ''x''. You can''t go wrong with ''x''. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Patrick Colp wrote:> Right, sorry. My bad. However, calling it vpic is still a bad idea :) _vlapic or > _v or even v would be a better choice.Yes, any of those would work (or x as Keir said). I wasn''t objecting to it being changed. Just the clash of names. Cheers, Neil. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel