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

Re: [Xen-devel] [PATCH v3 1/2] x86/hvm: Always do SMAP check when updating runstate_guest(v)




> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Tuesday, July 29, 2014 4:25 PM
> To: Wu, Feng
> Cc: linux@xxxxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxx; keir@xxxxxxx;
> tim@xxxxxxx
> Subject: RE: [PATCH v3 1/2] x86/hvm: Always do SMAP check when updating
> runstate_guest(v)
> 
> >>> On 29.07.14 at 10:13, <feng.wu@xxxxxxxxx> wrote:
> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >> >>> On 08.01.01 at 23:52, <feng.wu@xxxxxxxxx> wrote:
> >> > @@ -446,13 +452,22 @@ struct arch_vcpu
> >> >
> >> >      /* A secondary copy of the vcpu time info. */
> >> >      XEN_GUEST_HANDLE(vcpu_time_info_t) time_info_guest;
> >> > +
> >> > +    /*
> >> > +     * The SMAP check policy when updating runstate_guest(v) and the
> >> > +     * secondary system time.
> >> > +     */
> >> > +    smap_check_policy_t smap_check_policy;
> >> >  } __cacheline_aligned;
> >>
> >> ... and try to find a better place (current padding) in this structure?
> >
> > Seems I cannot find a padding place in struct arch_vcpu, neither in struct
> > hvm_vcpu.
> 
> Here's the tail of struct arch_vcpu:
> 
>     uint64_t xcr0_accum;
>     /* This variable determines whether nonlazy extended state has been
> used,
>      * and thus should be saved/restored. */
>     bool_t nonlazy_xstate_used;
> 
>     struct vmce vmce;
> 
>     struct paging_vcpu paging;
> 
>     uint32_t gdbsx_vcpu_event;
> 
>     /* A secondary copy of the vcpu time info. */
>     XEN_GUEST_HANDLE(vcpu_time_info_t) time_info_guest;
> } __cacheline_aligned;
> 
> Obviously there are gaps after both nonlazy_xstate_used and
> gdbsx_vcpu_event.
> 
> Jan

Okay, I got your point. Thanks a lot!

Thanks,
Feng



_______________________________________________
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®.