Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Jason Wang
On 2018年01月26日 10:49, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 10:41:58AM +0800, Jason Wang wrote: On 2018年01月26日 01:11, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 09:49:22AM -0500, Paolo Bonzini wrote: Michael and Jason, any progress on implementing a fast virtio mechanism

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Michael S. Tsirkin
On Fri, Jan 26, 2018 at 10:41:58AM +0800, Jason Wang wrote: > > > On 2018年01月26日 01:11, Michael S. Tsirkin wrote: > > On Thu, Jan 25, 2018 at 09:49:22AM -0500, Paolo Bonzini wrote: > > > > > Michael and Jason, any progress on implementing a fast virtio > > > > > mechanism > > > > > that doesn't

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Jason Wang
On 2018年01月26日 01:11, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 09:49:22AM -0500, Paolo Bonzini wrote: Michael and Jason, any progress on implementing a fast virtio mechanism that doesn't rely on undefined behavior? (Encode writing instruction length into last 4 bits of MMIO address,

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Michael S. Tsirkin
On Thu, Jan 25, 2018 at 09:49:22AM -0500, Paolo Bonzini wrote: > > > Michael and Jason, any progress on implementing a fast virtio mechanism > > > that doesn't rely on undefined behavior? > > > > > > (Encode writing instruction length into last 4 bits of MMIO address, > > > side-channel say that

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > - Original Message - >> From: "Vitaly Kuznetsov" >> To: k...@vger.kernel.org >> Cc: x...@kernel.org, linux-kernel@vger.kernel.org, "Paolo Bonzini" >> , "Radim Krčmář" >> >> Sent: Wednesday,

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Paolo Bonzini
> > Michael and Jason, any progress on implementing a fast virtio mechanism > > that doesn't rely on undefined behavior? > > > > (Encode writing instruction length into last 4 bits of MMIO address, > > side-channel say that accesses to the MMIO area always use certain > > instruction length, us

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Jason Wang
On 2018年01月25日 22:16, Radim Krčmář wrote: 2018-01-25 01:55-0800, Liran Alon: - vkuzn...@redhat.com wrote: I was investigating an issue with seabios >= 1.10 which stopped working for nested KVM on Hyper-V. The problem appears to be in handle_ept_violation() function: when we do fast mmio w

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Radim Krčmář
2018-01-24 16:12+0100, Vitaly Kuznetsov: > I was investigating an issue with seabios >= 1.10 which stopped working > for nested KVM on Hyper-V. The problem appears to be in > handle_ept_violation() function: when we do fast mmio we need to skip > the instruction so we do kvm_skip_emulated_instructi

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Paolo Bonzini
- Original Message - > From: "Vitaly Kuznetsov" > To: k...@vger.kernel.org > Cc: x...@kernel.org, linux-kernel@vger.kernel.org, "Paolo Bonzini" > , "Radim Krčmář" > > Sent: Wednesday, January 24, 2018 4:12:34 PM > Subject: [PATCH] x8

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Radim Krčmář
2018-01-25 01:55-0800, Liran Alon: > - vkuzn...@redhat.com wrote: > > I was investigating an issue with seabios >= 1.10 which stopped > > working > > for nested KVM on Hyper-V. The problem appears to be in > > handle_ept_violation() function: when we do fast mmio we need to skip > > the instruc

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-25 Thread Liran Alon
- vkuzn...@redhat.com wrote: > I was investigating an issue with seabios >= 1.10 which stopped > working > for nested KVM on Hyper-V. The problem appears to be in > handle_ept_violation() function: when we do fast mmio we need to skip > the instruction so we do kvm_skip_emulated_instruction()

Re: [PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-24 Thread Wanpeng Li
2018-01-24 23:12 GMT+08:00 Vitaly Kuznetsov : > I was investigating an issue with seabios >= 1.10 which stopped working > for nested KVM on Hyper-V. The problem appears to be in > handle_ept_violation() function: when we do fast mmio we need to skip > the instruction so we do kvm_skip_emulated_inst

[PATCH] x86/kvm: disable fast MMIO when running nested

2018-01-24 Thread Vitaly Kuznetsov
I was investigating an issue with seabios >= 1.10 which stopped working for nested KVM on Hyper-V. The problem appears to be in handle_ept_violation() function: when we do fast mmio we need to skip the instruction so we do kvm_skip_emulated_instruction(). This, however, depends on VM_EXIT_INSTRUCTI