Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Nadav Amit
On 6/19/14, 3:17 PM, Michael S. Tsirkin wrote: On Thu, Jun 19, 2014 at 03:10:21PM +0300, Nadav Amit wrote: On 6/19/14, 3:07 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300,

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Michael S. Tsirkin
On Thu, Jun 19, 2014 at 03:10:21PM +0300, Nadav Amit wrote: > On 6/19/14, 3:07 PM, Gleb Natapov wrote: > >On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: > >>On 6/19/14, 2:23 PM, Gleb Natapov wrote: > >>>On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: > > On Jun

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 03:10:21PM +0300, Nadav Amit wrote: > On 6/19/14, 3:07 PM, Gleb Natapov wrote: > >On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: > >>On 6/19/14, 2:23 PM, Gleb Natapov wrote: > >>>On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: > > On Jun

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Nadav Amit
On 6/19/14, 3:07 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin wrote: On Wed, Jun 18, 2014 at

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: > On 6/19/14, 2:23 PM, Gleb Natapov wrote: > >On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: > >> > >>On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin wrote: > >> > >>>On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L.

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Michael S. Tsirkin
On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: > On 6/19/14, 2:23 PM, Gleb Natapov wrote: > >On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: > >> > >>On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin wrote: > >> > >>>On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L.

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Nadav Amit
On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin wrote: On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: On

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Paolo Bonzini
Il 18/06/2014 19:59, Eric Northup ha scritto: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: > > On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin wrote: > > > On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: > >> On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: > >>> On Wed, Jun 18, 2014 at 7:19

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Michael S. Tsirkin
On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: > On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: > > On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: > > > mwait and monitor are currently handled as nop. Considering this > > > behavior, they > > > should still

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Michael S. Tsirkin
On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit na...@cs.technion.ac.il wrote: mwait and monitor are currently handled as nop. Considering this behavior, they

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: On Wed, Jun 18, 2014 at 7:19

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Paolo Bonzini
Il 18/06/2014 19:59, Eric Northup ha scritto: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit na...@cs.technion.ac.il wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Nadav Amit
On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo wrote: On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Michael S. Tsirkin
On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 18, 2014 at 02:46:01PM -0400, Gabriel L. Somlo

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Nadav Amit
On 6/19/14, 3:07 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 18,

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 03:10:21PM +0300, Nadav Amit wrote: On 6/19/14, 3:07 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM,

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Michael S. Tsirkin
On Thu, Jun 19, 2014 at 03:10:21PM +0300, Nadav Amit wrote: On 6/19/14, 3:07 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300, Nadav Amit wrote: On Jun 19, 2014, at 1:18 PM,

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-19 Thread Nadav Amit
On 6/19/14, 3:17 PM, Michael S. Tsirkin wrote: On Thu, Jun 19, 2014 at 03:10:21PM +0300, Nadav Amit wrote: On 6/19/14, 3:07 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 02:52:20PM +0300, Nadav Amit wrote: On 6/19/14, 2:23 PM, Gleb Natapov wrote: On Thu, Jun 19, 2014 at 01:53:36PM +0300,

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Bandan Das
"Gabriel L. Somlo" writes: > On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: >> On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: >> > mwait and monitor are currently handled as nop. Considering this behavior, >> > they >> > should still be handled correctly, i.e., check

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Gabriel L. Somlo
On Wed, Jun 18, 2014 at 11:30:07AM -0700, Eric Northup wrote: > Quoting Gabriel's post http://www.spinics.net/lists/kvm/msg103792.html : > > [...] > > > E.g., OS X 10.5 *does* check CPUID, and panics if it doesn't find it. > > It needs the MONITOR cpuid flag to be on, *and* the actual > >

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Gabriel L. Somlo
On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: > On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: > > mwait and monitor are currently handled as nop. Considering this behavior, > > they > > should still be handled correctly, i.e., check execution conditions and > > generate > >

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Eric Northup
Quoting Gabriel's post http://www.spinics.net/lists/kvm/msg103792.html : [...] > E.g., OS X 10.5 *does* check CPUID, and panics if it doesn't find it. > It needs the MONITOR cpuid flag to be on, *and* the actual > instructions to work. On Wed, Jun 18, 2014 at 11:23 AM, Nadav Amit wrote: >

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Nadav Amit
On 6/18/14, 8:59 PM, Eric Northup wrote: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Eric Northup
On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit wrote: > mwait and monitor are currently handled as nop. Considering this behavior, > they > should still be handled correctly, i.e., check execution conditions and > generate > exceptions when required. mwait and monitor may also be executed in

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Bandan Das
Paolo Bonzini writes: > Il 18/06/2014 18:43, Bandan Das ha scritto: >>> > mwait and monitor are currently handled as nop. Considering this >>> > behavior, they >>> > should still be handled correctly, i.e., check execution conditions and >>> > generate >>> > exceptions when required. mwait and

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Paolo Bonzini
Il 18/06/2014 18:43, Bandan Das ha scritto: > mwait and monitor are currently handled as nop. Considering this behavior, they > should still be handled correctly, i.e., check execution conditions and generate > exceptions when required. mwait and monitor may also be executed in real-mode Is

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Bandan Das
Nadav Amit writes: > mwait and monitor are currently handled as nop. Considering this behavior, > they > should still be handled correctly, i.e., check execution conditions and > generate > exceptions when required. mwait and monitor may also be executed in real-mode Is this necessary ? They

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Paolo Bonzini
Il 18/06/2014 16:19, Nadav Amit ha scritto: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be executed in real-mode and are not

[PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Nadav Amit
mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be executed in real-mode and are not handled in that case. This patch performs the

[PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Nadav Amit
mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be executed in real-mode and are not handled in that case. This patch performs the

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Paolo Bonzini
Il 18/06/2014 16:19, Nadav Amit ha scritto: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be executed in real-mode and are not

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Bandan Das
Nadav Amit na...@cs.technion.ac.il writes: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be executed in real-mode Is this

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Paolo Bonzini
Il 18/06/2014 18:43, Bandan Das ha scritto: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be executed in real-mode Is this

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Bandan Das
Paolo Bonzini pbonz...@redhat.com writes: Il 18/06/2014 18:43, Bandan Das ha scritto: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Eric Northup
On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit na...@cs.technion.ac.il wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when required. mwait and monitor may also be

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Nadav Amit
On 6/18/14, 8:59 PM, Eric Northup wrote: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit na...@cs.technion.ac.il wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and generate exceptions when

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Eric Northup
Quoting Gabriel's post http://www.spinics.net/lists/kvm/msg103792.html : [...] E.g., OS X 10.5 *does* check CPUID, and panics if it doesn't find it. It needs the MONITOR cpuid flag to be on, *and* the actual instructions to work. On Wed, Jun 18, 2014 at 11:23 AM, Nadav Amit

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Gabriel L. Somlo
On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit na...@cs.technion.ac.il wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled correctly, i.e., check execution conditions and

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Gabriel L. Somlo
On Wed, Jun 18, 2014 at 11:30:07AM -0700, Eric Northup wrote: Quoting Gabriel's post http://www.spinics.net/lists/kvm/msg103792.html : [...] E.g., OS X 10.5 *does* check CPUID, and panics if it doesn't find it. It needs the MONITOR cpuid flag to be on, *and* the actual instructions to

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Bandan Das
Gabriel L. Somlo gso...@gmail.com writes: On Wed, Jun 18, 2014 at 10:59:14AM -0700, Eric Northup wrote: On Wed, Jun 18, 2014 at 7:19 AM, Nadav Amit na...@cs.technion.ac.il wrote: mwait and monitor are currently handled as nop. Considering this behavior, they should still be handled