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

Re: [Xen-devel] [PATCH for-next 3/7] x86/traps: lift do_guest_trap to traps.h



On Fri, Apr 21, 2017 at 03:19:37AM -0600, Jan Beulich wrote:
> >>> On 06.04.17 at 19:14, <wei.liu2@xxxxxxxxxx> wrote:
> > --- a/xen/include/asm-x86/domain.h
> > +++ b/xen/include/asm-x86/domain.h
> > @@ -654,6 +654,18 @@ static inline void pv_inject_page_fault(int errcode, 
> > unsigned long cr2)
> >      pv_inject_event(&event);
> >  }
> >  
> > +static inline void pv_inject_guest_trap(unsigned int trapnr,
> > +                                        const struct cpu_user_regs *regs)
> > +{
> > +    const struct x86_event event = {
> > +        .vector = trapnr,
> > +        .error_code = (((trapnr < 32) && (TRAP_HAVE_EC & (1u << trapnr)))
> > +                       ? regs->error_code : X86_EVENT_NO_EC),
> > +    };
> > +
> > +    pv_inject_event(&event);
> 
> Considering this function's name, why do we need the "guest" infix
> in the renamed function? Also, when you move callers of this, why

No particular reason. I can delete the "guest" infix.

> would you not move all of them (eliminating the need for this to be
> put in a header)?
> 

Yes I can do that.

> Jan
> 

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

 


Rackspace

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