Re: [PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:02, Valentine Sinitsyn ha scritto:
>>
> I can confirm the initial bug I observed is fixed with these patches
> (applied to 3.16.1).
> 
> All tests in kvm-unit-test's master also pass, except for ioio which is
> (probably) affected by another (unrelated) bug fixed by Jan back in June
> but not in 3.16 [1,2].
> 
> 1. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124071/
> 2. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124067/

Indeed, ioio also hangs for me in 3.16 (not in 3.17).  Thanks, I'll add
your Tested-by.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Valentine Sinitsyn

Hi Paolo,

On 02.09.2014 21:13, Paolo Bonzini wrote:

Patches 3 and 4 fix the interaction between emulator and nested EPT/NPT,
which was reported by Valentine.
I can confirm the initial bug I observed is fixed with these patches 
(applied to 3.16.1).


All tests in kvm-unit-test's master also pass, except for ioio which is 
(probably) affected by another (unrelated) bug fixed by Jan back in June 
but not in 3.16 [1,2].


1. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124071/
2. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124067/

Thanks,
Valentine
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Paolo Bonzini
Patch 1 implements AMD semantics for non-leaf PDPEs and PML4Es, which
are a bit different from Intel.  The SVM test relies on this, so fix it.

Patch 2 lets nested SVM implement nested page fault correctly.  We were
not setting bits 32/33.

Patches 3 and 4 fix the interaction between emulator and nested EPT/NPT,
which was reported by Valentine.

Reviews are very welcome, I'm walking on thin ice here...

Paolo

Paolo Bonzini (4):
  KVM: x86: reserve bit 8 of non-leaf PDPEs and PML4Es in 64-bit mode on AMD
  KVM: nSVM: propagate the NPF EXITINFO to the guest
  KVM: x86: inject nested page faults on emulated instructions
  KVM: x86: propagate exception from permission checks on the nested page fault

 arch/x86/include/asm/kvm_host.h |  9 ++---
 arch/x86/kvm/cpuid.h|  8 
 arch/x86/kvm/mmu.c  | 15 ---
 arch/x86/kvm/paging_tmpl.h  | 13 ++---
 arch/x86/kvm/svm.c  | 26 ++
 arch/x86/kvm/x86.c  | 27 +++
 6 files changed, 77 insertions(+), 21 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Paolo Bonzini
Patch 1 implements AMD semantics for non-leaf PDPEs and PML4Es, which
are a bit different from Intel.  The SVM test relies on this, so fix it.

Patch 2 lets nested SVM implement nested page fault correctly.  We were
not setting bits 32/33.

Patches 3 and 4 fix the interaction between emulator and nested EPT/NPT,
which was reported by Valentine.

Reviews are very welcome, I'm walking on thin ice here...

Paolo

Paolo Bonzini (4):
  KVM: x86: reserve bit 8 of non-leaf PDPEs and PML4Es in 64-bit mode on AMD
  KVM: nSVM: propagate the NPF EXITINFO to the guest
  KVM: x86: inject nested page faults on emulated instructions
  KVM: x86: propagate exception from permission checks on the nested page fault

 arch/x86/include/asm/kvm_host.h |  9 ++---
 arch/x86/kvm/cpuid.h|  8 
 arch/x86/kvm/mmu.c  | 15 ---
 arch/x86/kvm/paging_tmpl.h  | 13 ++---
 arch/x86/kvm/svm.c  | 26 ++
 arch/x86/kvm/x86.c  | 27 +++
 6 files changed, 77 insertions(+), 21 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Valentine Sinitsyn

Hi Paolo,

On 02.09.2014 21:13, Paolo Bonzini wrote:

Patches 3 and 4 fix the interaction between emulator and nested EPT/NPT,
which was reported by Valentine.
I can confirm the initial bug I observed is fixed with these patches 
(applied to 3.16.1).


All tests in kvm-unit-test's master also pass, except for ioio which is 
(probably) affected by another (unrelated) bug fixed by Jan back in June 
but not in 3.16 [1,2].


1. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124071/
2. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124067/

Thanks,
Valentine
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/4] KVM: nested x86: nested page faults fixes

2014-09-02 Thread Paolo Bonzini
Il 02/09/2014 18:02, Valentine Sinitsyn ha scritto:

 I can confirm the initial bug I observed is fixed with these patches
 (applied to 3.16.1).
 
 All tests in kvm-unit-test's master also pass, except for ioio which is
 (probably) affected by another (unrelated) bug fixed by Jan back in June
 but not in 3.16 [1,2].
 
 1. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124071/
 2. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/124067/

Indeed, ioio also hangs for me in 3.16 (not in 3.17).  Thanks, I'll add
your Tested-by.

Paolo
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/