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

Re: [Xen-devel] [PATCH v4 04/27] x86: move PV invalid op emulation code



>>> On 20.06.17 at 18:25, <wei.liu2@xxxxxxxxxx> wrote:
> On Tue, Jun 20, 2017 at 10:21:27AM -0600, Jan Beulich wrote:
>> >>> On 08.06.17 at 19:11, <wei.liu2@xxxxxxxxxx> wrote:
>> > @@ -1053,8 +982,8 @@ void do_invalid_op(struct cpu_user_regs *regs)
>> >  
>> >      if ( likely(guest_mode(regs)) )
>> >      {
>> > -        if ( !emulate_invalid_rdtscp(regs) &&
>> > -             !emulate_forced_invalid_op(regs) )
>> > +        if ( !pv_emulate_invalid_rdtscp(regs) &&
>> > +             !pv_emulate_forced_invalid_op(regs) )
>> 
>> I wonder if the first couldn't be called by the second, making it
>> unnecessary to export both. Or maybe have a wrapper
>> pv_emulate_invalid_op() around both.
>> 
> 
> Do you want me to refactor and move code in the same patch? Wouldn't
> that make it hard for you to review?

Why - especially in the wrapper variant you'd move both functions
unchanged (perhaps even with the names left as they are), and
merely add the wrapper (and of course use it in the code fragment
above). That'll make review rather simple, as you'll still be able to
state that you left both existing functions unchanged.

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