[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v13 1/2] vmx: VT-d posted-interrupt core logic handling




> -----Original Message-----
> From: Doug Goldstein [mailto:cardoe@xxxxxxxxxx]
> Sent: Wednesday, February 24, 2016 11:02 AM
> To: Jan Beulich <JBeulich@xxxxxxxx>; Wu, Feng <feng.wu@xxxxxxxxx>
> Cc: Tian, Kevin <kevin.tian@xxxxxxxxx>; Keir Fraser <keir@xxxxxxx>; George
> Dunlap <george.dunlap@xxxxxxxxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; Dario Faggioli <dario.faggioli@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH v13 1/2] vmx: VT-d posted-interrupt core logic
> handling
> 
> On 2/23/16 10:34 AM, Jan Beulich wrote:
> >>>> On 23.02.16 at 09:34, <feng.wu@xxxxxxxxx> wrote:
> >
> >> --- a/xen/include/asm-x86/hvm/hvm.h
> >> +++ b/xen/include/asm-x86/hvm/hvm.h
> >> @@ -565,6 +565,12 @@ const char *hvm_efer_valid(const struct vcpu *v,
> >> uint64_t value,
> >>                             signed int cr0_pg);
> >>  unsigned long hvm_cr4_guest_reserved_bits(const struct vcpu *v, bool_t
> >> restore);
> >>
> >> +#define arch_vcpu_block(v) ({                                             
> >>      \
> >> +    void (*func) (struct vcpu *) = (v)->domain-
> >arch.hvm_domain.vmx.vcpu_block;\
> >> +    if ( func )                                                           
> >>      \
> >> +        func(v);                                                          
> >>      \
> >> +})
> >
> > See my comment on v12. The code structure actually was better
> > there, and all you needed to do is introduce a local variable.
> 
> Wouldn't this be a bit cleaner (and type-safier (inventing a word here))
> to do with a static inline function?

As I mentioned in earlier version, after making it a inline function, I
encountered building failures, which is related to using
'(v)->domain->arch.hvm_domain.vmx.vcpu_block ' here since it refers to
some data structure, it is not so straightforward to address it, so I change
it to a macro, just like other micros in this file, which refers to
' (v)->arch.hvm_vcpu.....'.

Thanks,
Feng

> 
> --
> Doug Goldstein


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.