RE: 'repz' instruction not supported.

2014-11-22 Thread Ashutosh Kumar
Thanks.  Will share the code sometime this week with you.

Regards
Ashutosh

> Date: Fri, 21 Nov 2014 11:22:06 -0800
> Subject: Re: 'repz' instruction not supported.
> From: neeln...@gmail.com
> To: mrashut...@hotmail.com
> CC: freebsd-virtualization@freebsd.org
> 
> Hi Ashutosh,
> 
> On Fri, Nov 21, 2014 at 2:07 AM, Ashutosh Kumar  
> wrote:
> > Yes you are right 'repz' prefixes is added to the ‘cmps’ and 'scas'
> > instructions.
> >
> > The actual opcode is “F3 A5” which is ‘rep movs’ (disassembly is showing
> > ‘repz’).
> >
> >
> >
> > Yes the guest is emitting these instructions to access MMIO (local apic)
> >
> 
> Bummer.
> 
> I was hoping that it was a prefix stuck by the compiler for
> optimization (that could be ignored):
> http://repzret.org/p/repzret/
> 
> In any case, the primitives you will need to emulate MOVS exist in
> vmm_instruction_emul.c. I don't have any plans to work on this but
> would be happy to review/submit the patch that does the emulation.
> 
> best
> Neel
> 
> >
> >
> > Regards
> > Ashutosh
> >
> >
> >> Date: Fri, 21 Nov 2014 00:08:15 -0800
> >> Subject: Re: 'repz' instruction not supported.
> >> From: neeln...@gmail.com
> >> To: mrashut...@hotmail.com
> >> CC: freebsd-virtualization@freebsd.org
> >
> >>
> >> Hi Ashutosh,
> >>
> >> On Wed, Nov 19, 2014 at 10:30 PM, Ashutosh Kumar 
> >> wrote:
> >> > Hi
> >> > We have found that emulation of 'repz' instruction is not supported in
> >> > bhyve. This is causing VM_EXIT for Guest OS. Do we have plans to add 
> >> > support
> >> > for instructions like 'repz'.
> >> >
> >>
> >> 'repz' is actually an instruction prefix. The two instructions with
> >> which 'repz' is allowed are 'cmps' and 'scas'. Both these instructions
> >> typically don't need to be emulated since they operate on strings in
> >> "regular" guest memory.
> >>
> >> Is your guest emitting these instructions to access MMIO? Can you
> >> share an objdump with the offending instructions?
> >>
> >> best
> >> Neel
> >>
> >> > RegardsAshutosh
> >> > ___
> >> > freebsd-virtualization@freebsd.org mailing list
> >> > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> >> > To unsubscribe, send any mail to
> >> > "freebsd-virtualization-unsubscr...@freebsd.org"
  
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: 'repz' instruction not supported.

2014-11-21 Thread Neel Natu
Hi Ashutosh,

On Fri, Nov 21, 2014 at 2:07 AM, Ashutosh Kumar  wrote:
> Yes you are right 'repz' prefixes is added to the ‘cmps’ and 'scas'
> instructions.
>
> The actual opcode is “F3 A5” which is ‘rep movs’ (disassembly is showing
> ‘repz’).
>
>
>
> Yes the guest is emitting these instructions to access MMIO (local apic)
>

Bummer.

I was hoping that it was a prefix stuck by the compiler for
optimization (that could be ignored):
http://repzret.org/p/repzret/

In any case, the primitives you will need to emulate MOVS exist in
vmm_instruction_emul.c. I don't have any plans to work on this but
would be happy to review/submit the patch that does the emulation.

best
Neel

>
>
> Regards
> Ashutosh
>
>
>> Date: Fri, 21 Nov 2014 00:08:15 -0800
>> Subject: Re: 'repz' instruction not supported.
>> From: neeln...@gmail.com
>> To: mrashut...@hotmail.com
>> CC: freebsd-virtualization@freebsd.org
>
>>
>> Hi Ashutosh,
>>
>> On Wed, Nov 19, 2014 at 10:30 PM, Ashutosh Kumar 
>> wrote:
>> > Hi
>> > We have found that emulation of 'repz' instruction is not supported in
>> > bhyve. This is causing VM_EXIT for Guest OS. Do we have plans to add 
>> > support
>> > for instructions like 'repz'.
>> >
>>
>> 'repz' is actually an instruction prefix. The two instructions with
>> which 'repz' is allowed are 'cmps' and 'scas'. Both these instructions
>> typically don't need to be emulated since they operate on strings in
>> "regular" guest memory.
>>
>> Is your guest emitting these instructions to access MMIO? Can you
>> share an objdump with the offending instructions?
>>
>> best
>> Neel
>>
>> > RegardsAshutosh
>> > ___
>> > freebsd-virtualization@freebsd.org mailing list
>> > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
>> > To unsubscribe, send any mail to
>> > "freebsd-virtualization-unsubscr...@freebsd.org"
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

RE: 'repz' instruction not supported.

2014-11-21 Thread Ashutosh Kumar
Yes you are right 'repz' prefixes is added to the ‘cmps’ and 'scas' 
instructions.

The actual opcode is “F3 A5” which is ‘rep movs’ (disassembly is showing
‘repz’).

 

Yes the guest is emitting these instructions to access MMIO
(local apic)

RegardsAshutosh

> Date: Fri, 21 Nov 2014 00:08:15 -0800
> Subject: Re: 'repz' instruction not supported.
> From: neeln...@gmail.com
> To: mrashut...@hotmail.com
> CC: freebsd-virtualization@freebsd.org
> 
> Hi Ashutosh,
> 
> On Wed, Nov 19, 2014 at 10:30 PM, Ashutosh Kumar  
> wrote:
> > Hi
> > We have found that emulation of 'repz' instruction is not supported in 
> > bhyve. This is causing VM_EXIT for Guest OS. Do we have plans to add 
> > support for instructions like 'repz'.
> >
> 
> 'repz' is actually an instruction prefix. The two instructions with
> which 'repz' is allowed are 'cmps' and 'scas'. Both these instructions
> typically don't need to be emulated since they operate on strings in
> "regular" guest memory.
> 
> Is your guest emitting these instructions to access MMIO? Can you
> share an objdump with the offending instructions?
> 
> best
> Neel
> 
> > RegardsAshutosh
> > ___
> > freebsd-virtualization@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> > To unsubscribe, send any mail to 
> > "freebsd-virtualization-unsubscr...@freebsd.org"
  
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: 'repz' instruction not supported.

2014-11-21 Thread Neel Natu
Hi Ashutosh,

On Wed, Nov 19, 2014 at 10:30 PM, Ashutosh Kumar  wrote:
> Hi
> We have found that emulation of 'repz' instruction is not supported in bhyve. 
> This is causing VM_EXIT for Guest OS. Do we have plans to add support for 
> instructions like 'repz'.
>

'repz' is actually an instruction prefix. The two instructions with
which 'repz' is allowed are 'cmps' and 'scas'. Both these instructions
typically don't need to be emulated since they operate on strings in
"regular" guest memory.

Is your guest emitting these instructions to access MMIO? Can you
share an objdump with the offending instructions?

best
Neel

> RegardsAshutosh
> ___
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to 
> "freebsd-virtualization-unsubscr...@freebsd.org"
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: 'repz' instruction not supported.

2014-11-20 Thread John Baldwin
On Thursday, November 20, 2014 1:30:41 am Ashutosh Kumar wrote:
> Hi
> We have found that emulation of 'repz' instruction is not supported in 
bhyve. This is causing VM_EXIT for Guest OS. Do we have plans to add support 
for instructions like 'repz'. 

What are you using repz for?  Is it memory access to some device?

-- 
John Baldwin
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


'repz' instruction not supported.

2014-11-19 Thread Ashutosh Kumar
Hi
We have found that emulation of 'repz' instruction is not supported in bhyve. 
This is causing VM_EXIT for Guest OS. Do we have plans to add support for 
instructions like 'repz'. 

RegardsAshutosh   
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"