Re: [PATCH v1] kvm/x86: Hyper-V tsc page setup

2016-01-05 Thread Peter Hornyack
Paolo Bonzini <pbonz...@redhat.com> > CC: Gleb Natapov <g...@kernel.org> > CC: Roman Kagan <rka...@virtuozzo.com> > CC: Denis V. Lunev <d...@openvz.org> > CC: qemu-de...@nongnu.org Reviewed-by: Peter Hornyack <peterhorny...@google.com> > > --- > a

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-21 Thread Peter Hornyack
On Fri, Dec 18, 2015 at 1:25 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 18/08/2015 20:46, Peter Hornyack wrote: >> Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm >> does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide >&g

Re: [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit

2015-12-18 Thread Peter Hornyack
On Fri, Dec 18, 2015 at 8:01 AM, Paolo Bonzini wrote: > > > On 18/12/2015 16:19, Pavel Fedin wrote: >> As far as i understand this code, KVM_EXIT_HYPERV is called when one >> of three MSRs are accessed. But, shouldn't we have implemented >> instead something more generic,

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-18 Thread Peter Hornyack
On Fri, Dec 18, 2015 at 1:25 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 18/08/2015 20:46, Peter Hornyack wrote: >> Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm >> does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide >&g

Re: [PATCH] KVM: x86: expose MSR_TSC_AUX to userspace

2015-11-13 Thread Peter Hornyack
On Fri, Nov 13, 2015 at 1:42 AM, Paolo Bonzini wrote: > >> Paolo, under what circumstances (which versions of Windows? Anything >> special running in the guest?) has this failure happened? I'd like to repro >> this, I'm not sure if we've observed it before. > > We saw it with

Re: [RFC PATCH 0/5] KVM: x86: exit to user space on unhandled MSR accesses

2015-08-20 Thread Peter Hornyack
On Wed, Aug 19, 2015 at 2:43 PM, Bandan Das b...@redhat.com wrote: Peter Hornyack peterhorny...@google.com writes: There are numerous MSRs that kvm does not currently handle. On Intel platforms we have observed guest VMs accessing some of these MSRs (for example, MSR_PLATFORM_INFO

[RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-08-18 Thread Peter Hornyack
Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide capability that guards the new exit reason and which can be enabled via the KVM_ENABLE_CAP ioctl. Signed-off-by: Peter Hornyack peterhorny...@google.com

[RFC PATCH 3/5] KVM: x86: add msr_exits_supported to kvm_x86_ops

2015-08-18 Thread Peter Hornyack
msr_exits_supported will be checked when user space attempts to enable the KVM_CAP_UNHANDLED_MSR_EXITS capability for the vm. This is needed because MSR exit support will be implemented for vmx but not svm later in this patchset. Signed-off-by: Peter Hornyack peterhorny...@google.com --- arch

[RFC PATCH 5/5] KVM: x86: add trace events for unhandled MSR exits

2015-08-18 Thread Peter Hornyack
Add trace_kvm_userspace_msr and call it when user space reenters kvm after KVM_EXIT_MSR. Add KVM_EXIT_MSR to kvm_trace_exit_reason list. Signed-off-by: Peter Hornyack peterhorny...@google.com --- arch/x86/kvm/trace.h | 28 arch/x86/kvm/vmx.c | 4

[RFC PATCH 1/5] KVM: x86: refactor vmx rdmsr/wrmsr completion into new functions

2015-08-18 Thread Peter Hornyack
After handling a rdmsr or wrmsr, refactor the success and failure code paths into separate functions. This will allow us to also complete or fail MSR accesses on the entry path from userspace into kvm. Signed-off-by: Peter Hornyack peterhorny...@google.com --- arch/x86/kvm/vmx.c | 44

[RFC PATCH 0/5] KVM: x86: exit to user space on unhandled MSR accesses

2015-08-18 Thread Peter Hornyack
and allowing us to respond to bugs more quickly. This patchset has been tested with our non-qemu user space hypervisor on vmx platforms; svm support is not implemented. Peter Hornyack (5): KVM: x86: refactor vmx rdmsr/wrmsr completion into new functions KVM: add KVM_EXIT_MSR exit reason

[RFC PATCH 4/5] KVM: x86: enable unhandled MSR exits for vmx

2015-08-18 Thread Peter Hornyack
the complete_userspace_io callback path to call vmx_complete_userspace_msr. Complete the MSR access if user space was able to handle it successfully, or fail the MSR access and inject a GP fault if user space could not handle the access. Signed-off-by: Peter Hornyack peterhorny...@google.com

Re: [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Peter Hornyack
(1ULL 63) +#define HV_X64_MSR_CRASH_CTL_CONTENTS \ + (HV_X64_MSR_CRASH_CTL_NOTIFY) Why is HV_X64_MSR_CRASH_CTL_CONTENTS needed? Can I just remove it? Paolo this was a direct request from Peter Hornyack peterhorny...@google.com I suggest here: #define

Re: [PATCH 4/9] kvm/x86: added hyper-v crash msrs into kvm hyperv context

2015-06-30 Thread Peter Hornyack
...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Gleb Natapov g...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- arch/x86/include/asm/kvm_host.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h

Re: [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-06-30 Thread Peter Hornyack
pbonz...@redhat.com CC: Gleb Natapov g...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- arch/x86/include/uapi/asm/hyperv.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h index

Re: [PATCH 8/9] kvm/x86: add sending hyper-v crash notification to user space

2015-06-30 Thread Peter Hornyack
KVM_SYSTEM_EVENT_CRASH and flag KVM_SYSTEM_EVENT_FL_HV_CRASH to clarify that crash occures inside Hyper-V based guest. Signed-off-by: Andrey Smetanin asmeta...@virtuozzo.com Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Gleb Natapov g...@kernel.org Reviewed-by: Peter

Re: [PATCH 7/9] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers

2015-06-30 Thread Peter Hornyack
...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- arch/x86/kvm/hyperv.c | 74 --- arch/x86/kvm/hyperv.h | 2 +- arch/x86/kvm/x86.c| 7 - 3 files changed, 78 insertions(+), 5 deletions(-) diff --git a/arch/x86

Re: [PATCH 5/9] kvm: added KVM_REQ_HV_CRASH value to notify qemu about hyper-v crash

2015-06-30 Thread Peter Hornyack
. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Gleb Natapov g...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- include/linux/kvm_host.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 2b2edf1

Re: [PATCH 6/9] kvm/x86: mark hyper-v crash msrs as partition wide

2015-06-30 Thread Peter Hornyack
...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Gleb Natapov g...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 2b49f10..af83c96 100644

Re: [PATCH 1/9] kvm/x86: move Hyper-V MSR's/hypercall code into hyperv.c file

2015-06-30 Thread Peter Hornyack
Natapov g...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- arch/x86/include/asm/kvm_host.h | 20 ++- arch/x86/kvm/Makefile | 4 +- arch/x86/kvm/hyperv.c | 307 arch/x86/kvm/hyperv.h | 32

Re: [PATCH 2/9] kvm: introduce vcpu_debug = kvm_debug + vcpu context

2015-06-30 Thread Peter Hornyack
. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Gleb Natapov g...@kernel.org Reviewed-by: Peter Hornyack peterhorny...@google.com --- include/linux/kvm_host.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index

Re: [PATCH 09/11] kvm/x86: distingiush hyper-v guest crash notification

2015-06-22 Thread Peter Hornyack
On Mon, Jun 22, 2015 at 9:05 AM, Denis V. Lunev d...@openvz.org wrote: From: Andrey Smetanin asmeta...@virtuozzo.com Previous patches allowes userspace to setup Hyper-V crash ctl msr. This msr should expose HV_X64_MSR_CRASH_CTL_NOTIFY value to Hyper-V guest to allow to send crash data.

Re: [PATCH 07/11] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers

2015-06-22 Thread Peter Hornyack
On Mon, Jun 22, 2015 at 9:05 AM, Denis V. Lunev d...@openvz.org wrote: From: Andrey Smetanin asmeta...@virtuozzo.com Added hyper-v crash msr's(HV_X64_MSR_CRASH*) data and control geters and setters. Signed-off-by: Andrey Smetanin asmeta...@virtuozzo.com Signed-off-by: Denis V. Lunev

Re: [PATCH 1/2] kvm/x86: Hyper-V based guest crash data handling

2015-06-12 Thread Peter Hornyack
Hi Denis, Andrey, I have a few comments and questions. (re-sending in plain-text mode, apologies for sending twice.) On Thu, Jun 11, 2015 at 6:18 AM, Denis V. Lunev d...@openvz.org wrote: From: Andrey Smetanin asmeta...@virtuozzo.com Windows 2012 guests can notify hypervisor about occurred