Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-21 Thread Radim Krčmář
2017-08-18 16:46+0800, Jason Wang: > > > On 2017年08月16日 22:10, Michael S. Tsirkin wrote: > > On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > > Microsoft pointed out privately to me that KVM's handling of > > > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-21 Thread Radim Krčmář
2017-08-18 16:46+0800, Jason Wang: > > > On 2017年08月16日 22:10, Michael S. Tsirkin wrote: > > On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > > Microsoft pointed out privately to me that KVM's handling of > > > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread David Hildenbrand
On 18.08.2017 14:35, Paolo Bonzini wrote: > On 18/08/2017 13:57, David Hildenbrand wrote: >> What about a hack: >> >> 1. clear instruction length when entering >> 2. check if instruction length is set when trying to forward the RIP >> 2a. if set, use it >> 2b. if not set, compute it > > It's

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread David Hildenbrand
On 18.08.2017 14:35, Paolo Bonzini wrote: > On 18/08/2017 13:57, David Hildenbrand wrote: >> What about a hack: >> >> 1. clear instruction length when entering >> 2. check if instruction length is set when trying to forward the RIP >> 2a. if set, use it >> 2b. if not set, compute it > > It's

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread Paolo Bonzini
On 18/08/2017 13:57, David Hildenbrand wrote: > What about a hack: > > 1. clear instruction length when entering > 2. check if instruction length is set when trying to forward the RIP > 2a. if set, use it > 2b. if not set, compute it It's undefined, so we don't know that the instruction length

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread Paolo Bonzini
On 18/08/2017 13:57, David Hildenbrand wrote: > What about a hack: > > 1. clear instruction length when entering > 2. check if instruction length is set when trying to forward the RIP > 2a. if set, use it > 2b. if not set, compute it It's undefined, so we don't know that the instruction length

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread David Hildenbrand
On 16.08.2017 15:34, Paolo Bonzini wrote: > Microsoft pointed out privately to me that KVM's handling of > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid > in EPT misconfiguration vmexit handlers, because neither EPT violations > nor misconfigurations are listed in the

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread David Hildenbrand
On 16.08.2017 15:34, Paolo Bonzini wrote: > Microsoft pointed out privately to me that KVM's handling of > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid > in EPT misconfiguration vmexit handlers, because neither EPT violations > nor misconfigurations are listed in the

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread Jason Wang
On 2017年08月16日 22:10, Michael S. Tsirkin wrote: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid in EPT misconfiguration vmexit handlers,

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-18 Thread Jason Wang
On 2017年08月16日 22:10, Michael S. Tsirkin wrote: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid in EPT misconfiguration vmexit handlers,

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Yang Zhang
On 2017/8/17 16:51, Wanpeng Li wrote: 2017-08-17 16:48 GMT+08:00 Yang Zhang : On 2017/8/17 16:31, Wanpeng Li wrote: 2017-08-17 16:28 GMT+08:00 Wanpeng Li : 2017-08-17 16:07 GMT+08:00 Yang Zhang : On 2017/8/17 0:56,

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Yang Zhang
On 2017/8/17 16:51, Wanpeng Li wrote: 2017-08-17 16:48 GMT+08:00 Yang Zhang : On 2017/8/17 16:31, Wanpeng Li wrote: 2017-08-17 16:28 GMT+08:00 Wanpeng Li : 2017-08-17 16:07 GMT+08:00 Yang Zhang : On 2017/8/17 0:56, Radim Krčmář wrote: 2017-08-16 17:10+0300, Michael S. Tsirkin: On

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Wanpeng Li
2017-08-17 16:48 GMT+08:00 Yang Zhang : > On 2017/8/17 16:31, Wanpeng Li wrote: >> >> 2017-08-17 16:28 GMT+08:00 Wanpeng Li : >>> >>> 2017-08-17 16:07 GMT+08:00 Yang Zhang : On 2017/8/17 0:56, Radim Krčmář wrote:

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Wanpeng Li
2017-08-17 16:48 GMT+08:00 Yang Zhang : > On 2017/8/17 16:31, Wanpeng Li wrote: >> >> 2017-08-17 16:28 GMT+08:00 Wanpeng Li : >>> >>> 2017-08-17 16:07 GMT+08:00 Yang Zhang : On 2017/8/17 0:56, Radim Krčmář wrote: > > > 2017-08-16 17:10+0300, Michael S. Tsirkin: >> >>

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Yang Zhang
On 2017/8/17 16:31, Wanpeng Li wrote: 2017-08-17 16:28 GMT+08:00 Wanpeng Li : 2017-08-17 16:07 GMT+08:00 Yang Zhang : On 2017/8/17 0:56, Radim Krčmář wrote: 2017-08-16 17:10+0300, Michael S. Tsirkin: On Wed, Aug 16, 2017 at 03:34:54PM +0200,

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Yang Zhang
On 2017/8/17 16:31, Wanpeng Li wrote: 2017-08-17 16:28 GMT+08:00 Wanpeng Li : 2017-08-17 16:07 GMT+08:00 Yang Zhang : On 2017/8/17 0:56, Radim Krčmář wrote: 2017-08-16 17:10+0300, Michael S. Tsirkin: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Wanpeng Li
2017-08-17 16:28 GMT+08:00 Wanpeng Li : > 2017-08-17 16:07 GMT+08:00 Yang Zhang : >> On 2017/8/17 0:56, Radim Krčmář wrote: >>> >>> 2017-08-16 17:10+0300, Michael S. Tsirkin: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote:

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Wanpeng Li
2017-08-17 16:28 GMT+08:00 Wanpeng Li : > 2017-08-17 16:07 GMT+08:00 Yang Zhang : >> On 2017/8/17 0:56, Radim Krčmář wrote: >>> >>> 2017-08-16 17:10+0300, Michael S. Tsirkin: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > Microsoft pointed out privately to me

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Wanpeng Li
2017-08-17 16:07 GMT+08:00 Yang Zhang : > On 2017/8/17 0:56, Radim Krčmář wrote: >> >> 2017-08-16 17:10+0300, Michael S. Tsirkin: >>> >>> On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out privately to me that KVM's handling of

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Wanpeng Li
2017-08-17 16:07 GMT+08:00 Yang Zhang : > On 2017/8/17 0:56, Radim Krčmář wrote: >> >> 2017-08-16 17:10+0300, Michael S. Tsirkin: >>> >>> On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Yang Zhang
On 2017/8/17 0:56, Radim Krčmář wrote: 2017-08-16 17:10+0300, Michael S. Tsirkin: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid in EPT

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-17 Thread Yang Zhang
On 2017/8/17 0:56, Radim Krčmář wrote: 2017-08-16 17:10+0300, Michael S. Tsirkin: On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid in EPT

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 06:56:25PM +0200, Radim Krčmář wrote: > 2017-08-16 17:10+0300, Michael S. Tsirkin: > > On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > > Microsoft pointed out privately to me that KVM's handling of > > > KVM_FAST_MMIO_BUS is invalid. Using

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 06:56:25PM +0200, Radim Krčmář wrote: > 2017-08-16 17:10+0300, Michael S. Tsirkin: > > On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > > Microsoft pointed out privately to me that KVM's handling of > > > KVM_FAST_MMIO_BUS is invalid. Using

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Radim Krčmář
2017-08-16 17:10+0300, Michael S. Tsirkin: > On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > Microsoft pointed out privately to me that KVM's handling of > > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid > > in EPT misconfiguration vmexit handlers,

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Radim Krčmář
2017-08-16 17:10+0300, Michael S. Tsirkin: > On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > > Microsoft pointed out privately to me that KVM's handling of > > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid > > in EPT misconfiguration vmexit handlers,

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > Microsoft pointed out privately to me that KVM's handling of > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid > in EPT misconfiguration vmexit handlers, because neither EPT violations > nor

Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 03:34:54PM +0200, Paolo Bonzini wrote: > Microsoft pointed out privately to me that KVM's handling of > KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid > in EPT misconfiguration vmexit handlers, because neither EPT violations > nor

[PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Paolo Bonzini
Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid in EPT misconfiguration vmexit handlers, because neither EPT violations nor misconfigurations are listed in the manual among the VM exits that set the VM-exit

[PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO

2017-08-16 Thread Paolo Bonzini
Microsoft pointed out privately to me that KVM's handling of KVM_FAST_MMIO_BUS is invalid. Using skip_emulation_instruction is invalid in EPT misconfiguration vmexit handlers, because neither EPT violations nor misconfigurations are listed in the manual among the VM exits that set the VM-exit