Re: Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code + if (inside_vm< 0) { + /* detect KVM and Parallels virtual environments */ +

Re: Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 8:31 PM, Avi Kivity wrote: On 11/06/2011 06:15 PM, Denis V. Lunev wrote: On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code

Re: Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 8:47 PM, Takashi Iwai wrote: At Sun, 06 Nov 2011 18:31:42 +0200, Avi Kivity wrote: On 11/06/2011 06:15 PM, Denis V. Lunev wrote: On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is

Re: [kvm-unit-tests PATCH] x86: hyperv_synic: Hyper-V SynIC test

2015-11-02 Thread Denis V. Lunev
setup SINT's routing * inject SINT's into destination vCPU by 'hyperv-synic-test-device' * wait for SINT's isr's completion * clear Hyper-V SynIC evt/msg pages and destroy SINT's routing Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V

Re: [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-12-01 Thread Denis V. Lunev
On 12/01/2015 01:12 PM, Wanpeng Li wrote: 2015-11-26 16:34 GMT+08:00 Andrey Smetanin : On 11/26/2015 08:28 AM, Wanpeng Li wrote: 2015-11-25 23:20 GMT+08:00 Andrey Smetanin : Per Hyper-V specification (and as required by Hyper-V-aware guests), SynIC provides 4 per-vCPU timers. Each timer is p

Re: [PATCH v2 1/9] drivers/hv: replace enum hv_message_type by u32

2015-12-04 Thread Denis V. Lunev
On 12/02/2015 03:22 PM, Paolo Bonzini wrote: On 30/11/2015 17:22, Andrey Smetanin wrote: enum hv_message_type inside struct hv_message, hv_post_message is not size portable. Replace enum by u32. It's only non-portable inside structs. Okay to apply just these: @@ -172,7 +174,7 @@ union hv_mes

Re: [PATCH v2 1/9] drivers/hv: replace enum hv_message_type by u32

2015-12-04 Thread Denis V. Lunev
On 12/04/2015 05:41 PM, Paolo Bonzini wrote: On 04/12/2015 15:33, Denis V. Lunev wrote: On 12/02/2015 03:22 PM, Paolo Bonzini wrote: On 30/11/2015 17:22, Andrey Smetanin wrote: enum hv_message_type inside struct hv_message, hv_post_message is not size portable. Replace enum by u32. It&#

Re: [PATCH v2 1/9] drivers/hv: replace enum hv_message_type by u32

2015-12-04 Thread Denis V. Lunev
On 12/04/2015 08:38 PM, Paolo Bonzini wrote: On 04/12/2015 17:55, Denis V. Lunev wrote: On 12/04/2015 05:41 PM, Paolo Bonzini wrote: On 04/12/2015 15:33, Denis V. Lunev wrote: On 12/02/2015 03:22 PM, Paolo Bonzini wrote: On 30/11/2015 17:22, Andrey Smetanin wrote: enum hv_message_type

Re: [PATCH v2 0/3] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-12-16 Thread Denis V. Lunev
Share generic Hyper-V tests code * Hyper-V SynIC timers test fixes to improve readability and output Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-de...@nongnu.org Andrey Smetanin (3): lib/x86:

Re: [PATCH v2 0/3] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-12-17 Thread Denis V. Lunev
On 12/17/2015 05:55 PM, Paolo Bonzini wrote: On 16/12/2015 19:51, Denis V. Lunev wrote: On 12/08/2015 07:36 PM, Andrey Smetanin wrote: The test checks Hyper-V SynIC timers functionality. The test runs on every vCPU and performs start/stop of periodic/one-shot timers (with period=1ms) and

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

2015-12-18 Thread Denis V. Lunev
On 12/18/2015 06:19 PM, Pavel Fedin wrote: Hello! I realize that it's perhaps too late, because patches are already on Linux-next, but i have one concern... May be it's not too late... I dislike implementing architecture-dependent exit code where we could implement an architecture-indep

[PATCH 2/2] qemu/kvm: kvm guest crash event handling

2015-06-11 Thread Denis V. Lunev
device without QEMU guest agent for Windows. The idea is borrowed from Linux HyperV bus driver and validated against Windows 2k12. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini --- include/sysemu/sysemu.h| 2 ++ kvm-all.c

[PATCH 0/2] HyperV equivalent of pvpanic driver

2015-06-11 Thread Denis V. Lunev
is to provide functionality equal to pvpanic device without QEMU guest agent for Windows. The idea is borrowed from Linux HyperV bus driver and validated against Windows 2k12. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini -- To unsubscribe from this

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

2015-06-11 Thread Denis V. Lunev
QEMU/LIBVIRT. The idea is to provide functionality equal to pvpanic device without QEMU guest agent for Windows. The idea is borrowed from Linux HyperV bus driver and validated against Windows 2k12. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini ---

[PATCH 10/11] qemu/kvm: kvm hyper-v based guest crash event handling

2015-06-22 Thread Denis V. Lunev
msrs. The idea is to provide functionality equal to pvpanic device without QEMU guest agent for Windows. The idea is borrowed from Linux HyperV bus driver and validated against Windows 2k12. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber

[PATCH 06/11] kvm/x86: mark hyper-v crash msrs as partition wide

2015-06-22 Thread Denis V. Lunev
From: Andrey Smetanin Hyper-V crash msr's a per VM, not per vcpu, so mark them as partition wide. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x8

[PATCH v2 0/11] HyperV equivalent of pvpanic driver

2015-06-22 Thread Denis V. Lunev
ntext structures * added saving crash msrs inside qemu cpu state * added qemu fetch and update of crash msrs * added qemu crash msrs store in cpu state and it's migration Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini -- To unsubscribe from

[PATCH 03/11] kvm: add hyper-v crash msrs constants

2015-06-22 Thread Denis V. Lunev
From: Andrey Smetanin Added Hyper-V crash msrs HV_X64_MSR_CRASH* constants. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/uapi/asm/hyperv.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/x86

[PATCH 02/11] kvm: introduce vcpu_debug = kvm_debug + vcpu context

2015-06-22 Thread Denis V. Lunev
From: Andrey Smetanin vcpu_debug is a useful macro like kvm_debug and additionally includes vcpu context into output. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH 05/11] kvm: added KVM_REQ_HV_CRASH value to notify qemu about Hyper-V crash

2015-06-22 Thread Denis V. Lunev
From: Andrey Smetanin Added KVM_REQ_HV_CRASH - vcpu request used for notify user space(QEMU) about Hyper-v crash. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 11/11] qemu/kvm: mark in cpu state that hyper-v crash occured

2015-06-22 Thread Denis V. Lunev
rash msr's. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- target-i386/cpu.h | 1 + target-i386/kvm.c | 1 + target-i386/machine.c | 1 + 3 files changed, 3 insertions(+) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 4

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

2015-06-22 Thread Denis V. Lunev
HV_X64_MSR_CRASH_CTL_NOTIFY value into crash ctl msr. Thus both user space and guest writes inside ctl msr the same value and this patch distingiush the moment of actual guest crash by checking host initiated value from msr info. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb

[PATCH 08/11] kvm/x86: add sending hyper-v crash notification to user space

2015-06-22 Thread Denis V. Lunev
based guest. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/x86.c | 8 include/uapi/linux/kvm.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2046b78..111fa83

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

2015-06-22 Thread Denis V. Lunev
s and authors information copied from x86.c to hyperv.c. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 20 ++- arch/x86/kvm/Makefile | 2 +- arch/x86/kvm/hyperv.c

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

2015-06-22 Thread Denis V. Lunev
From: Andrey Smetanin Added hyper-v crash msr's(HV_X64_MSR_CRASH*) data and control geters and setters. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 66 +++

[PATCH 04/11] kvm/x86: added hyper-v crash msrs into kvm hyperv context

2015-06-22 Thread Denis V. Lunev
From: Andrey Smetanin Added kvm hyperv context hv crash variables as storage of hyper-v crash msrs. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 4 1 file changed, 4 insertions(+) diff --git a

Re: [PATCH 11/11] qemu/kvm: mark in cpu state that hyper-v crash occured

2015-06-22 Thread Denis V. Lunev
On 22/06/15 19:33, Andreas Färber wrote: Am 22.06.2015 um 18:27 schrieb Paolo Bonzini: On the other hand, I wonder if current_cpu is available in qemu_system_guest_panicked. If so, you could add the field to the generic CPUState struct and migrate it as a subsection of vmstate_cpu_common. Hm,

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

2015-06-23 Thread Denis V. Lunev
On 23/06/15 02:52, Peter Hornyack wrote: On Mon, Jun 22, 2015 at 9:05 AM, Denis V. Lunev wrote: From: Andrey Smetanin Added hyper-v crash msr's(HV_X64_MSR_CRASH*) data and control geters and setters. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC:

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

2015-06-23 Thread Denis V. Lunev
On 23/06/15 12:51, Paolo Bonzini wrote: On 23/06/2015 11:47, Denis V. Lunev wrote: The current implementation is potentially more flexible but makes the MSR handling a little more awkward since the host_initiated bool needs to be passed around (patch 09). I guess either approach seems ok to me

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

2015-06-25 Thread Denis V. Lunev
On 22/06/15 19:04, Denis V. Lunev wrote: From: Andrey Smetanin This patch introduces Hyper-V related source code file - hyperv.c and per vm and per vcpu hyperv context structures. All Hyper-V MSR's and hypercall code moved into hyperv.c. All hyper-v kvm/vcpu fields moved into approp

[PATCH v3 0/9] HyperV equivalent of pvpanic driver

2015-06-30 Thread Denis V. Lunev
msrs * added per vm and per cpu hyperv context structures * added saving crash msrs inside qemu cpu state * added qemu fetch and update of crash msrs * added qemu crash msrs store in cpu state and it's migration Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov

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

2015-06-30 Thread Denis V. Lunev
From: Andrey Smetanin Added Hyper-V crash msrs values - HV_X64_MSR_CRASH*. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/uapi/asm/hyperv.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/x86

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

2015-06-30 Thread Denis V. Lunev
From: Andrey Smetanin Hyper-V crash msr's are per vm, aren't per vcpu, so mark them as partition wide. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

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

2015-06-30 Thread Denis V. Lunev
thors information copied from x86.c to hyperv.c. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 20 ++- arch/x86/kvm/Makefile | 4 +- arch/x86/kvm/hyperv.c

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

2015-06-30 Thread Denis V. Lunev
From: Andrey Smetanin vcpu_debug is useful macro like kvm_debug but additionally includes vcpu context inside output. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 3 +++ 1 file changed, 3 insertions(+) diff

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

2015-06-30 Thread Denis V. Lunev
From: Andrey Smetanin Added KVM_REQ_HV_CRASH - vcpu request used for notify user space(QEMU) about Hyper-V crash. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 1 + 1 file changed, 1 insertion(+) diff --git a

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

2015-06-30 Thread Denis V. Lunev
guest. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/x86.c | 8 include/uapi/linux/kvm.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 47b7507..55a4b92 100644

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

2015-06-30 Thread Denis V. Lunev
vents modification of crash ctl msr by guest. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 74 --- arch/x86/kvm/hyperv.h | 2 +- arch/x86/kvm/x86.c| 7 - 3 files change

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

2015-06-30 Thread Denis V. Lunev
From: Andrey Smetanin Added kvm Hyper-V context hv crash variables as storage of Hyper-V crash msrs. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH 9/9] qemu/kvm: kvm hyper-v based guest crash event handling

2015-06-30 Thread Denis V. Lunev
ecause ctl msr always contains the same value HV_X64_MSR_CRASH_CTL_NOTIFY. To solve it add a particular value - hv_crash_occurred inside CPU state and migrate this value with crash msr's. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färbe

Re: [Qemu-devel] [PATCH v3 0/9] HyperV equivalent of pvpanic driver

2015-06-30 Thread Denis V. Lunev
On 30/06/15 15:26, Daniel P. Berrange wrote: On Tue, Jun 30, 2015 at 02:33:18PM +0300, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and se

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

2015-07-01 Thread Denis V. Lunev
On 01/07/15 18:00, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: +#define HV_X64_MSR_CRASH_CTL_NOTIFY(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

Re: [PATCH v3 0/9] HyperV equivalent of pvpanic driver

2015-07-01 Thread Denis V. Lunev
On 01/07/15 17:09, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to

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

2015-07-02 Thread Denis V. Lunev
moment of actual guest crash by checking host initiated value from msr info. Also patch prevents modification of crash ctl msr by guest. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv

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

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Added Hyper-V crash msrs values - HV_X64_MSR_CRASH*. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/uapi/asm/hyperv.h | 11 +++ 1 file changed, 11 insertions

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

2015-07-02 Thread Denis V. Lunev
thors information copied from x86.c to hyperv.c. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 20 ++- arch/x86/kvm/Makefile | 4 +- arch/x86/kvm/hyp

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

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Added KVM_REQ_HV_CRASH - vcpu request used for notify user space(QEMU) about Hyper-V crash. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 1 + 1 file changed

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

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin vcpu_debug is useful macro like kvm_debug but additionally includes vcpu context inside output. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 3 +++ 1 file

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

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Hyper-V crash msr's are per vm, aren't per vcpu, so mark them as partition wide. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2

[PATCH v4 0/12] HyperV equivalent of pvpanic driver

2015-07-02 Thread Denis V. Lunev
added per vm and per cpu hyperv context structures * added saving crash msrs inside qemu cpu state * added qemu fetch and update of crash msrs * added qemu crash msrs store in cpu state and it's migration Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Pao

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

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Added kvm Hyper-V context hv crash variables as storage of Hyper-V crash msrs. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 4 1 file changed, 4

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

2015-07-02 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- Documentation/virtual/kvm/api.txt | 5 + arch/x86/kvm/x86.c| 6 ++ include/uapi/linux/kvm.h | 1 + 3 files changed, 12 insertions(+) diff --git a/Documentation

[PATCH v5 0/12] HyperV equivalent of pvpanic driver

2015-07-02 Thread Denis V. Lunev
state and it's migration Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

[PATCH 02/12] kvm: introduce vcpu_debug = kvm_debug + vcpu context

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin vcpu_debug is useful macro like kvm_debug but additionally includes vcpu context inside output. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 3 +++ 1 file

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

2015-07-02 Thread Denis V. Lunev
thors information copied from x86.c to hyperv.c. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 20 ++- arch/x86/kvm/Makefile | 4 +- arch/x86/kvm/hyp

[PATCH 08/12] kvm/x86: add sending hyper-v crash notification to user space

2015-07-02 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- Documentation/virtual/kvm/api.txt | 5 + arch/x86/kvm/x86.c| 6 ++ include/uapi/linux/kvm.h | 1 + 3 files changed, 12 insertions(+) diff --git a/Documentation

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

2015-07-02 Thread Denis V. Lunev
moment of actual guest crash by checking host initiated value from msr info. Also patch prevents modification of crash ctl msr by guest. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv

[PATCH 12/12] qemu/kvm/x86: hyper-v crash msrs set/get'ers and migration

2015-07-02 Thread Denis V. Lunev
tion. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- linux-headers/asm-x86/hyperv.h | 13 + linux-headers/linux/kvm.h | 1 + target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 1 + target-i386/cpu

[PATCH 04/12] kvm/x86: added hyper-v crash msrs into kvm hyperv context

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Added kvm Hyper-V context hv crash variables as storage of Hyper-V crash msrs. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 4 1 file changed, 4

[PATCH 05/12] kvm: added KVM_REQ_HV_CRASH value to notify qemu about hyper-v crash

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Added KVM_REQ_HV_CRASH - vcpu request used for notify user space(QEMU) about Hyper-V crash. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 1 + 1 file changed

[PATCH 03/12] kvm: add hyper-v crash msrs values

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Added Hyper-V crash msrs values - HV_X64_MSR_CRASH*. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/uapi/asm/hyperv.h | 11 +++ 1 file changed, 11 insertions

[PATCH 06/12] kvm/x86: mark hyper-v crash msrs as partition wide

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin Hyper-V crash msr's are per vm, aren't per vcpu, so mark them as partition wide. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2

[PATCH 09/12] qemu: added qemu_system_guest_panicked() - generic guest panic handler

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin There are pieces of guest panic handling code that can be shared in one generic function. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- hw/misc/pvpanic.c | 3 +-- include/sysemu/sysemu.h | 1 + target

[PATCH 11/12] qemu: add crash_occurred flag into CPUState

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin CPUState->crash_occurred value inside CPUState marks that guest crash occurred. This value added into cpu common migration subsection. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- exec.c|

[PATCH 10/12] qemu/kvm: added kvm system event crash handler

2015-07-02 Thread Denis V. Lunev
From: Andrey Smetanin KVM kernel can receive guest crash events. Patch code calls appropriate handler for kernel guest crash event. Guest crash event recognized by KVM_SYSTEM_EVENT_CRASH type of system event. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC

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

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin Added KVM_REQ_HV_CRASH - vcpu request used for notify user space(QEMU) about Hyper-V crash. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 1 + 1 file changed

[PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-07-03 Thread Denis V. Lunev
read handlers of crash data msrs * added per vm and per cpu hyperv context structures * added saving crash msrs inside qemu cpu state * added qemu fetch and update of crash msrs * added qemu crash msrs store in cpu state and it's migration Signed-off-by: Andrey Smetanin Signed-off-by: Deni

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

2015-07-03 Thread Denis V. Lunev
thors information copied from x86.c to hyperv.c. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 20 ++- arch/x86/kvm/Makefile | 4 +- arch/x86/kvm/hyp

[PATCH 10/12] kvm: Add kvm system event crash handler

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin KVM kernel can send guest crash events into userspace. Appropriate guest crash handler is called when kernel guest crash event received. Guest crash event recognized by a KVM_SYSTEM_EVENT_CRASH type of system event. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V

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

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin Added Hyper-V crash msrs values - HV_X64_MSR_CRASH*. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/uapi/asm/hyperv.h | 11 +++ 1 file changed, 11 insertions

[PATCH 09/12] Added generic panic handler qemu_system_guest_panicked()

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin There are pieces of guest panic handling code that can be shared in one generic function. These code replaced by call qemu_system_guest_panicked(). Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- hw/misc/pvpanic.c

[PATCH 12/12] i386/kvm: Hyper-v crash msrs set/get'ers and migration

2015-07-03 Thread Denis V. Lunev
tion. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- linux-headers/asm-x86/hyperv.h | 13 + target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 1 + target-i386/cpu.h | 2 ++ target-i386/kvm

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

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin Added kvm Hyper-V context hv crash variables as storage of Hyper-V crash msrs. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host.h | 4 1 file changed, 4

[PATCH 11/12] cpu: Add crash_occurred flag into CPUState

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin CPUState::crash_occurred field inside CPUState marks that guest crash occurred. This value is added into cpu common migration subsection. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Andreas Färber --- exec.c| 19

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

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin Hyper-V crash msr's are per vm, aren't per vcpu, so mark them as partition wide. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyperv.c | 2 ++ 1 file changed, 2

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

2015-07-03 Thread Denis V. Lunev
From: Andrey Smetanin vcpu_debug is useful macro like kvm_debug but additionally includes vcpu context inside output. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- include/linux/kvm_host.h | 3 +++ 1 file

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

2015-07-03 Thread Denis V. Lunev
moment of actual guest crash by checking host initiated value from msr info. Also patch prevents modification of crash ctl msr by guest. Signed-off-by: Andrey Smetanin Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/hyp

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

2015-07-03 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Reviewed-by: Peter Hornyack CC: Paolo Bonzini CC: Gleb Natapov --- Documentation/virtual/kvm/api.txt | 5 + arch/x86/kvm/x86.c| 6 ++ include/uapi/linux/kvm.h | 1 + 3 files changed, 12 insertions(+) diff --git a/Documentation

Re: [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Denis V. Lunev
On 08/12/2015 03:47 PM, Paolo Bonzini wrote: On 12/08/2015 13:54, Denis V. Lunev wrote: guys? we are going to move forward with other HyperV bits. Wait a second, 2.4 was released only a few hours ago... Paolo sure :) -- To unsubscribe from this list: send the line "unsubscribe kvm&qu

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

2015-08-18 Thread Denis V. Lunev
On 08/18/2015 05:41 PM, Wanpeng Li wrote: On 7/3/15 8:01 PM, Denis V. Lunev wrote: From: Andrey Smetanin Added hyper-v crash msr's(HV_X64_MSR_CRASH*) data and control geters and setters. Userspace should check that such msr's available by check of KVM_CAP_HYPERV_MSR_CRASH capab

[PATCH 3/3] kvm/x86: Hyper-V HV_X64_MSR_VP_RUNTIME support

2015-09-16 Thread Denis V. Lunev
e_adjusted() for vcpu task. Necessary to support loading of winhv.sys in guest, which in turn is required to support Windows VMBus. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/asm/kvm_host

[PATCH 0/3] KVM: ecessary simple pre-requisites for VMBus emulation

2015-09-16 Thread Denis V. Lunev
igned-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov Andrey Smetanin (3): kvm/x86: Hyper-V HV_X64_MSR_RESET msr kvm/x86: Hyper-V HV_X64_MSR_VP_INDEX export for QEMU. kvm/x86: Hyper-V HV_X64_MSR_VP_RUNTIME support arch/x86/include/asm/kvm_host.h| 1 + arch/x86/include/uap

[PATCH 1/3] kvm/x86: Hyper-V HV_X64_MSR_RESET msr

2015-09-16 Thread Denis V. Lunev
: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/include/uapi/asm/hyperv.h | 3 +++ arch/x86/kvm/hyperv.c | 10 ++ arch/x86/kvm/x86.c | 7 +++ include/linux/kvm_host.h | 1 + 4 files changed, 21 insertions(+) diff --git a/arch

[PATCH 2/3] kvm/x86: Hyper-V HV_X64_MSR_VP_INDEX export for QEMU.

2015-09-16 Thread Denis V. Lunev
pport Windows VMBus. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Gleb Natapov --- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5a14a66..c2028ac 100644 --- a

Re: [kvm:queue 27/38] arch/x86/kvm/hyperv.c:186:41: sparse: incorrect type in argument 2 (different modifiers)

2015-09-18 Thread Denis V. Lunev
On 09/18/2015 04:39 PM, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue head: ed393e4134de0dd02d8ba98ca8ce3ae65d1eb567 commit: 46f4c309534b10ca1026273abe38955d3cff4023 [27/38] kvm/x86: Hyper-V HV_X64_MSR_VP_RUNTIME support reproduce: # apt-get install

Re: [kvm:queue 27/38] arch/x86/kvm/hyperv.c:186:41: sparse: incorrect type in argument 2 (different modifiers)

2015-09-18 Thread Denis V. Lunev
On 09/18/2015 04:55 PM, Paolo Bonzini wrote: On 18/09/2015 15:51, Denis V. Lunev wrote: 185 > 186task_cputime_adjusted(current, &utime, &stime); 187return div_u64(cputime_to_nsecs(utime + stime), 100); 188} 189 190static int kvm

[PATCH 5/9] kvm/irqchip: kvm_arch_irq_routing_update renaming split

2015-10-16 Thread Denis V. Lunev
pdate mappings for arch-specific irq routing entries (in particular, the upcoming Hyper-V synthetic interrupts). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini --

[PATCH 6/9] drivers/hv: share Hyper-V SynIC constants with userspace

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Moved Hyper-V synic contants from guest Hyper-V drivers private header into x86 arch uapi Hyper-V header. Added Hyper-V synic msr's flags into x86 arch uapi Hyper-V header. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: V

[PATCH v2 0/9] Hyper-V synthetic interrupt controller

2015-10-16 Thread Denis V. Lunev
writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini Changes v2: * irqchip/eventfd preparation improvements to support arch specific r

[PATCH 4/9] kvm/irqchip: allow only multiple irqchip routes per GSI

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Any other irq routing types (MSI, S390_ADAPTER, upcoming Hyper-V SynIC) map one-to-one to GSI. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Pao

[PATCH 7/9] kvm/x86: split ioapic-handled and EOI exit bitmaps

2015-10-16 Thread Denis V. Lunev
y may need to cause vmexits too. To achieve that, introduce a new bitmap dedicated specifically for ioapic-handled vectors, and populate EOI exit bitmap from it for now. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y.

[PATCH 2/9] kvm/eventfd: factor out kvm_notify_acked_gsi()

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin Factor out kvm_notify_acked_gsi() helper to iterate over EOI listeners and notify those matching the given gsi. It will be reused in the upcoming Hyper-V SynIC implementation. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC

[PATCH 1/9] kvm/eventfd: avoid loop inside irqfd_update()

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin The loop(for) inside irqfd_update() is unnecessary because any other value for irq_entry.type will just trigger schedule_work(&irqfd->inject). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC

[PATCH 3/9] kvm/eventfd: add arch-specific set_irq

2015-10-16 Thread Denis V. Lunev
: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini --- include/linux/kvm_host.h | 4 virt/kvm/eventfd.c | 13 - 2 files changed, 16 insertions(+), 1 deletio

[PATCH 9/9] kvm/x86: Hyper-V kvm exit

2015-10-16 Thread Denis V. Lunev
From: Andrey Smetanin A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V SynIC configuration triggered by guest writing to the corresponding MSRs. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: &q

[PATCH 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-16 Thread Denis V. Lunev
gured SINT, and irq_routing api is extended to support GSI-SINT mapping. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini Changes v2: * do not use posted interrupts

Re: [Qemu-devel] [PATCH 3/7] linux-headers/kvm: add Hyper-V SynIC irq routing type and struct

2015-10-26 Thread Denis V. Lunev
On 10/26/2015 01:03 PM, Peter Maydell wrote: On 26 October 2015 at 09:50, Andrey Smetanin wrote: Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Vitaly Kuznetsov CC: "K. Y. Srinivasan" CC: Gleb Natapov CC: Paolo Bonzini CC: Roman

Re: [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-10-26 Thread Denis V. Lunev
On 10/22/2015 07:34 PM, Paolo Bonzini wrote: On 22/10/2015 18:10, Andrey Smetanin wrote: A new vcpu exit is introduced to notify the userspace of the changes in Hyper-V SynIC configuration triggered by guest writing to the corresponding MSRs. Changes v3: * added KVM_EXIT_HYPERV types and struc

Re: [Qemu-devel] [PATCH] kvm_irqchip_assign_irqfd: just set irqfd in case of kvm_irqfds_enabled()

2014-12-26 Thread Denis V. Lunev
On 26/12/14 13:00, Peter Maydell wrote: On 26 December 2014 at 08:05, Tiejun Chen wrote: We should avoid to set irqfd{} unconditionally. Signed-off-by: Tiejun Chen Is there a hot path that we use this on such that the difference in code order matters at all? thanks -- PMM IMHO the patch