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

Re: [Xen-devel] [PATCH v2] x86/HVM: restrict permitted instructions during special purpose emulation



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 06 January 2017 13:41
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>; Andrew
> Cooper <Andrew.Cooper3@xxxxxxxxxx>; Jun Nakajima
> <jun.nakajima@xxxxxxxxx>; Kevin Tian <kevin.tian@xxxxxxxxx>; xen-devel
> <xen-devel@xxxxxxxxxxxxxxxxxxxx>; Boris Ostrovsky
> <boris.ostrovsky@xxxxxxxxxx>
> Subject: RE: [PATCH v2] x86/HVM: restrict permitted instructions during
> special purpose emulation
> 
> >>> On 06.01.17 at 11:37, <Paul.Durrant@xxxxxxxxxx> wrote:
> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >> Sent: 05 January 2017 10:55
> >> @@ -68,6 +80,11 @@ struct segment_register *hvmemul_get_seg
> >>      struct hvm_emulate_ctxt *hvmemul_ctxt);
> >>  int hvm_emulate_one_mmio(unsigned long mfn, unsigned long gla);
> >>
> >> +static inline bool handle_mmio(void)
> >> +{
> >> +    return hvm_emulate_one_insn(x86_insn_is_mem_access);
> >> +}
> >> +
> >
> > There are not many call sites for handle_mmio(). Would it not be better
> just
> > to change them all rather than using this inline for the few left after your
> > changes to the SVM code?
> 
> Well, I am of the opinion that where we're really dealing with MMIO,
> the shorthand is more obvious than open coding it in all places, no
> matter that there are only a few left. So I'd prefer to keep it as is.
> 

Ok, if you think it is illustrative of that difference then fair enough.

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

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