On Wed, Jun 21, 2017 at 03:26:12AM -0600, Jan Beulich wrote:
> >>> On 21.06.17 at 11:14, wrote:
> > On Wed, Jun 21, 2017 at 03:09:41AM -0600, Jan Beulich wrote:
> >> >>> On 21.06.17 at 10:57, wrote:
> >> > +int pv_emulate_invalid_op(struct cpu_user_regs *regs)
> >> > +{
> >> > +return !emulat
>>> On 21.06.17 at 11:14, wrote:
> On Wed, Jun 21, 2017 at 03:09:41AM -0600, Jan Beulich wrote:
>> >>> On 21.06.17 at 10:57, wrote:
>> > +int pv_emulate_invalid_op(struct cpu_user_regs *regs)
>> > +{
>> > +return !emulate_invalid_rdtscp(regs) &&
>> > !emulate_forced_invalid_op(regs);
>> > +}
On Wed, Jun 21, 2017 at 03:09:41AM -0600, Jan Beulich wrote:
> >>> On 21.06.17 at 10:57, wrote:
> > +int pv_emulate_invalid_op(struct cpu_user_regs *regs)
> > +{
> > +return !emulate_invalid_rdtscp(regs) &&
> > !emulate_forced_invalid_op(regs);
> > +}
>
> This way you want to make the functi
>>> On 21.06.17 at 10:57, wrote:
> +int pv_emulate_invalid_op(struct cpu_user_regs *regs)
> +{
> +return !emulate_invalid_rdtscp(regs) && !emulate_forced_invalid_op(regs);
> +}
This way you want to make the function return bool. Alternatively
you would want to preserve the EXCRET_* return val
On Wed, Jun 21, 2017 at 12:15:46AM -0600, Jan Beulich wrote:
> >>> On 20.06.17 at 18:25, wrote:
> > On Tue, Jun 20, 2017 at 10:21:27AM -0600, Jan Beulich wrote:
> >> >>> On 08.06.17 at 19:11, wrote:
> >> > @@ -1053,8 +982,8 @@ void do_invalid_op(struct cpu_user_regs *regs)
> >> >
> >> > if
>>> On 20.06.17 at 18:25, wrote:
> On Tue, Jun 20, 2017 at 10:21:27AM -0600, Jan Beulich wrote:
>> >>> On 08.06.17 at 19:11, wrote:
>> > @@ -1053,8 +982,8 @@ void do_invalid_op(struct cpu_user_regs *regs)
>> >
>> > if ( likely(guest_mode(regs)) )
>> > {
>> > -if ( !emulate_inv
On Tue, Jun 20, 2017 at 10:21:27AM -0600, Jan Beulich wrote:
> >>> On 08.06.17 at 19:11, wrote:
> > @@ -1053,8 +982,8 @@ void do_invalid_op(struct cpu_user_regs *regs)
> >
> > if ( likely(guest_mode(regs)) )
> > {
> > -if ( !emulate_invalid_rdtscp(regs) &&
> > - !em
>>> On 08.06.17 at 19:11, 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(
Move the code to pv/emul-inv-op.c. Prefix emulate_* functions with pv_
and export them via pv/traps.h.
Pure code motion except for the rename.
Signed-off-by: Wei Liu
---
xen/arch/x86/pv/Makefile | 1 +
xen/arch/x86/pv/emul-inv-op.c | 123 +
xen/a