Re: [Qemu-devel] [PATCH v3 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-29 Thread Andrey Smetanin
-V SynIC unit test and some hand-made tests with Windows guest(with enabled SynIC) works fine without kvm_arch_set_irq. It will be nice to remove this function. Thanks Paolo On 22/10/2015 18:09, Andrey Smetanin wrote: SynIC (synthetic interrupt controller) is a lapic extension, which is

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

2015-11-03 Thread Andrey Smetanin
On 11/03/2015 04:28 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

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

2015-11-03 Thread Andrey Smetanin
On 11/03/2015 04:28 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

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

2015-11-03 Thread Andrey Smetanin
On 11/03/2015 05:51 PM, Paolo Bonzini wrote: On 03/11/2015 15:36, Andrey Smetanin wrote: if I run a patched QEMU but I *do not* enable the synthetic interrupt controller. I can fix it by wrapping the calls to synic_exit with "if (!host)", but I haven't checked yet the s

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

2015-11-10 Thread Andrey Smetanin
docs Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- Documentation/virtual/kvm/api.txt | 22 ++ arch/x86/include/asm/kvm_host.h

[Qemu-devel] [PATCH v2 3/5] kvm: Hyper-V SynIC irq routing support

2015-11-10 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: k...@vger.kernel.org --- include/sysemu/kvm.h |

[Qemu-devel] [PATCH v2 0/5] QEMU: Hyper-V SynIC support

2015-11-10 Thread Andrey Smetanin
Hyper-V SynIC (synthetic interrupt controller) support: * msr's support * irq routing setup * irq injection * irq ack's callbacks * event/message pages changes tracking at Hyper-V exit * Hyper-V test device to test SynIC by kvm-unit-tests Signed-off-by: Andrey Smetanin Reviewed-by: R

[Qemu-devel] [PATCH v4 0/5] KVM: Hyper-V synthetic interrupt controller

2015-11-10 Thread Andrey Smetanin
previosly sent 'hyperv_synic' test) with host CPU which supports APICv (Intel(R) Xeon(R) CPU E5-2407 v2 @ 2.40GHz) Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-dev

[Qemu-devel] [PATCH v4 1/5] kvm/irqchip: kvm_arch_irq_routing_update renaming split

2015-11-10 Thread Andrey Smetanin
cific 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: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/irq_c

[Qemu-devel] [PATCH v2 1/5] headers: Linux kernel Hyper-V SynIC defines

2015-11-10 Thread Andrey Smetanin
This patch brings in the necessary changes from the corresponding kernel patchset. It's included only for completeness; ideally these changes should arrive via the standard kernel header pull. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC:

[Qemu-devel] [PATCH v2 4/5] target-i386/hyperv: Hyper-V SynIC SINT routing and vcpu exit

2015-11-10 Thread Andrey Smetanin
Hyper-V SynIC(synthetic interrupt controller) helpers for Hyper-V SynIC irq routing setup, irq injection, irq ack notifications event/message pages changes tracking for future use. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC

[Qemu-devel] [PATCH v4 2/5] kvm/x86: split ioapic-handled and EOI exit bitmaps

2015-11-10 Thread Andrey Smetanin
s 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: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: De

[Qemu-devel] [PATCH v2 5/5] hw/misc: Hyper-V test device 'hyperv-testdev'

2015-11-10 Thread Andrey Smetanin
code and parameters for Hyper-V test device. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: k...

[Qemu-devel] [PATCH v4 3/5] kvm/x86: per-vcpu apicv deactivation support

2015-11-10 Thread Andrey Smetanin
ed based on the module parameter and CPU capability, and consulted whenever an APICv-specific action is performed. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org

[Qemu-devel] [PATCH v2 2/5] target-i386/kvm: Hyper-V SynIC MSR's support

2015-11-10 Thread Andrey Smetanin
IC. Changes v2: * activate Hyper-V SynIC by enabling corresponding vcpu cap * reject cpu initialization if user requested Hyper-V SynIC but kernel does not support Hyper-V SynIC Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Richard

[Qemu-devel] [PATCH v4 4/5] kvm/x86: Hyper-V synthetic interrupt controller

2015-11-10 Thread Andrey Smetanin
not use posted interrupts for Hyper-V SynIC AutoEOI vectors * add Hyper-V SynIC vectors into EOI exit bitmap * Hyper-V SyniIC SINT msr write logic simplified Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kag

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

2016-01-22 Thread Andrey Smetanin
On 01/22/2016 01:08 PM, Paolo Bonzini wrote: On 24/12/2015 10:33, Andrey Smetanin wrote: Lately tsc page was implemented but filled with empty values. This patch setup tsc page scale and offset based on vcpu tsc, tsc_khz and HV_X64_MSR_TIME_REF_COUNT value. The valid tsc page drops

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

2016-01-22 Thread Andrey Smetanin
On 01/22/2016 02:02 PM, Paolo Bonzini wrote: On 22/01/2016 11:15, Andrey Smetanin wrote: - unless KVM can use a master clock, it is incorrect to set up the TSC page this way; the sequence needs to be 0x in that case 0x is not an invalid value for tsc page, see https

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

2016-01-22 Thread Andrey Smetanin
On 01/22/2016 02:02 PM, Paolo Bonzini wrote: On 22/01/2016 11:15, Andrey Smetanin wrote: - unless KVM can use a master clock, it is incorrect to set up the TSC page this way; the sequence needs to be 0x in that case 0x is not an invalid value for tsc page, see https

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

2016-01-22 Thread Andrey Smetanin
On 01/22/2016 02:53 PM, Paolo Bonzini wrote: On 22/01/2016 12:31, Andrey Smetanin wrote: Sometimes the TSC is detected to be unstable and Linux switches to another clocksource. At least in that case you can get a write to the TSC page while the guest is running. Sorry, now I got it, you

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

2016-01-22 Thread Andrey Smetanin
On 01/22/2016 01:08 PM, Paolo Bonzini wrote: On 24/12/2015 10:33, Andrey Smetanin wrote: Lately tsc page was implemented but filled with empty values. This patch setup tsc page scale and offset based on vcpu tsc, tsc_khz and HV_X64_MSR_TIME_REF_COUNT value. The valid tsc page drops

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

2016-01-22 Thread Andrey Smetanin
On 01/22/2016 04:21 PM, Paolo Bonzini wrote: On 22/01/2016 14:13, Andrey Smetanin wrote: We(@virtuozzo.com) will be very thankful to you for the patch which integrates Hyper-V tsc page with kvm clock. We even may do work by yourself, but our priority now is Hyper-V VMBus initialization

Re: [Qemu-devel] [PATCH v2 0/5] KVM: Hyper-V VMBus hypercalls

2016-02-02 Thread Andrey Smetanin
ping On 01/21/2016 05:01 PM, Andrey Smetanin wrote: The patch implements userspace exit 'KVM_EXIT_HYPERV' for Hyper-V VMBus hypercalls(postmsg, signalevent) to handle these hypercalls by QEMU. Changes v2: * use KVM_EXIT_HYPERV for hypercalls Signed-off-by: Andrey Smetanin Reviewed

Re: [Qemu-devel] [PATCH v2 2/5] target-i386/kvm: Hyper-V SynIC MSR's support

2015-11-11 Thread Andrey Smetanin
On 11/11/2015 12:17 PM, Paolo Bonzini wrote: On 11/11/2015 10:09, Andrey Smetanin wrote: I would prefer to put this in kvm_arch_init_vcpu, if possible. Ok. I think the kvm_arch_init_vcpu() is called after migration restores cpu->env->msr_hv_synic_* values, so unconditional initiali

Re: [Qemu-devel] [PATCH v2 2/5] target-i386/kvm: Hyper-V SynIC MSR's support

2015-11-11 Thread Andrey Smetanin
On 11/10/2015 04:14 PM, Paolo Bonzini wrote: On 10/11/2015 13:52, Andrey Smetanin wrote: This patch does Hyper-V Synthetic interrupt controller(Hyper-V SynIC) MSR's support and migration. Hyper-V SynIC is enabled by cpu's 'hv-synic' option. This patch does not allow

[Qemu-devel] [PATCH v3 2/5] target-i386/kvm: Hyper-V SynIC MSR's support

2015-11-11 Thread Andrey Smetanin
per-V SynIC. Changes v3: * removed 'msr_hv_synic_version' migration because it's value always the same * moved SynIC msr's initialization into kvm_arch_init_vcpu Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Richard H

[Qemu-devel] [PATCH v1 4/7] kvm/x86: Added Hyper-V vcpu_to_hv_vcpu()/hv_vcpu_to_vcpu() helpers

2015-11-25 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.h | 20 ++-- 1 file c

[Qemu-devel] [PATCH v1 1/7] drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header

2015-11-25 Thread Andrey Smetanin
This constant is required for Hyper-V SynIC timers MSR's support by userspace(QEMU). Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev

[Qemu-devel] [PATCH v1 5/7] kvm/x86: Hyper-V internal helper to read MSR HV_X64_MSR_TIME_REF_COUNT

2015-11-25 Thread Andrey Smetanin
This helper will be used also in Hyper-V SynIC timers implementation. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@

[Qemu-devel] [PATCH v1 0/2] QEMU: Hyper-V SynIC timers MSR's support

2015-11-25 Thread Andrey Smetanin
ed in corresponding MSR's. This patch seria implements such MSR's support and migration. Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Denis V. Lunev CC: Roman Kagan CC: k...@vger.kerne

[Qemu-devel] [PATCH v1 2/7] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-25 Thread Andrey Smetanin
This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan

[Qemu-devel] [PATCH v1 7/7] kvm/x86: Hyper-V SynIC timers

2015-11-25 Thread Andrey Smetanin
od is shortened until the timer catches up) will be implemented later. Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/inclu

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

2015-11-25 Thread Andrey Smetanin
od is shortened until the timer catches up) will be implemented later. The Hyper-V SynIC timers support is required to load winhv.sys inside Windows guest on which guest VMBus devices depends on. This patches depends on Hyper-V SynIC patches previosly sent. Signed-off-by: Andrey Smetanin CC

[Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Andrey Smetanin
notified when the slot is released. To make sure the protocol works regardless of where the message sources are (kernel or userspace), clear the pending flag on SINT ACK notification, and let the message sources compete for the slot again. Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC

[Qemu-devel] [PATCH v1 1/2] include: update Hyper-V header to include SynIC timers defines

2015-11-25 Thread Andrey Smetanin
This patch brings in the necessary changes from the corresponding kernel patchset. It's included only for completeness; ideally these changes should arrive via the standard kernel header pull. Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkos

[Qemu-devel] [PATCH v1 3/7] kvm/x86: Rearrange func's declarations inside Hyper-V header

2015-11-25 Thread Andrey Smetanin
This rearrangement places functions declarations together according to their functionality, so future additions will be simplier. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuz

[Qemu-devel] [PATCH v1 2/2] target-i386/kvm: Hyper-V SynIC timers MSR's support

2015-11-25 Thread Andrey Smetanin
ed in corresponding MSR's. This patch seria implements such MSR's support and migration. Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Denis V. Lunev CC: Roman Kagan CC: k...@vger.kernel.

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-25 Thread Andrey Smetanin
On 11/25/2015 07:52 PM, Paolo Bonzini wrote: On 25/11/2015 16:20, Andrey Smetanin wrote: +static void synic_clear_sint_msg_pending(struct kvm_vcpu_hv_synic *synic, + u32 sint) +{ + struct kvm_vcpu *vcpu = synic_to_vcpu(synic); + struct page

[Qemu-devel] [PATCH v3 2/5] drivers/hv: Move VMBus hypercall codes into Hyper-V UAPI header

2016-02-11 Thread Andrey Smetanin
VMBus hypercall codes inside Hyper-V UAPI header will be used by QEMU to implement VMBus host devices support. Signed-off-by: Andrey Smetanin Acked-by: K. Y. Srinivasan Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang

[Qemu-devel] [PATCH v3 1/5] kvm/x86: Rename Hyper-V long spin wait hypercall

2016-02-11 Thread Andrey Smetanin
Rename HV_X64_HV_NOTIFY_LONG_SPIN_WAIT by HV_X64_HCALL_NOTIFY_LONG_SPIN_WAIT. So the name better reflects hypercall codes accessory. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang

[Qemu-devel] [PATCH v3 5/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-02-11 Thread Andrey Smetanin
-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- Documentation/virtual/kvm/api.txt | 6 ++ arch/x86/kvm/hyperv.c

[Qemu-devel] [PATCH v3 3/5] kvm/x86: Pass return code of kvm_emulate_hypercall

2016-02-11 Thread Andrey Smetanin
m_run appropriately. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 2 +- arch/x86/k

[Qemu-devel] [PATCH v3 0/5] KVM: Hyper-V VMBus hypercalls

2016-02-11 Thread Andrey Smetanin
T_HYPERV for hypercalls Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Andrey Smetanin (5): kvm/x86: Rename

[Qemu-devel] [PATCH v3 4/5] kvm/x86: Reject Hyper-V hypercall continuation

2016-02-11 Thread Andrey Smetanin
Currently we do not support Hyper-V hypercall continuation so reject it. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@

Re: [Qemu-devel] [PATCH v3 2/5] drivers/hv: Move VMBus hypercall codes into Hyper-V UAPI header

2016-02-12 Thread Andrey Smetanin
On 02/12/2016 12:46 AM, Paolo Bonzini wrote: On 11/02/2016 14:44, Andrey Smetanin wrote: VMBus hypercall codes inside Hyper-V UAPI header will be used by QEMU to implement VMBus host devices support. Signed-off-by: Andrey Smetanin Acked-by: K. Y. Srinivasan Reviewed-by: Roman Kagan CC

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

2015-11-26 Thread 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 programmed via a pair of MSRs, and signals expiration by delivering a special format

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-26 Thread Andrey Smetanin
On 11/25/2015 08:14 PM, Paolo Bonzini wrote: On 25/11/2015 17:55, Andrey Smetanin wrote: +gpa = synic->msg_page & PAGE_MASK; +page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); +if (is_error_page(page)) { +vcpu_err(vcpu, "Hyper-V SynIC can't g

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-26 Thread Andrey Smetanin
On 11/26/2015 05:43 PM, Paolo Bonzini wrote: On 26/11/2015 10:06, Andrey Smetanin wrote: On 11/25/2015 08:14 PM, Paolo Bonzini wrote: On 25/11/2015 17:55, Andrey Smetanin wrote: +gpa = synic->msg_page & PAGE_MASK; +page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SH

[Qemu-devel] [PATCH v1 1/5] lib/x86: Added Hyper-V MSR's availability bits into msr.h

2015-11-26 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- lib/x86/msr.h | 4 x86/hyperv_synic.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/x86/msr.h

[Qemu-devel] [PATCH v1 3/5] lib/x86: Added Hyper-V SynIC timers MSR's values

2015-11-26 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- lib/x86/msr.h | 13 + 1 file changed, 13 insertions(+) diff --git a/lib/x86/msr.h b/lib/x86/msr.h index 4ac9c71

[Qemu-devel] [PATCH v1 0/5] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-11-26 Thread Andrey Smetanin
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 checks validity of received expiration messages in appropriate ISR's. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC:

[Qemu-devel] [PATCH v1 2/5] lib/x86: Added HV_X64_MSR_TIME_REF_COUNT value into msr.h

2015-11-26 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- lib/x86/msr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/x86/msr.h b/lib/x86/msr.h index 89ed718..4ac9c71 100644

[Qemu-devel] [PATCH v1 5/5] x86: Hyper-V SynIC timers test

2015-11-26 Thread Andrey Smetanin
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 checks validity of received expiration messages in appropriate ISR's. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC:

[Qemu-devel] [PATCH v1 4/5] lib/x86: Make free_page() available to call

2015-11-26 Thread Andrey Smetanin
This will be used to release allocated pages by Hyper-V SynIC timers test. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- lib/x86/vm.h | 1 + 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH v1 2/7] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-27 Thread Andrey Smetanin
On 11/27/2015 12:34 PM, Paolo Bonzini wrote: On 25/11/2015 16:20, Andrey Smetanin wrote: This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey

Re: [Qemu-devel] [PATCH v1 7/7] kvm/x86: Hyper-V SynIC timers

2015-11-27 Thread Andrey Smetanin
On 11/27/2015 01:49 PM, Paolo Bonzini wrote: On 27/11/2015 09:12, Roman Kagan wrote: + n = div64_u64(time_now - stimer->exp_time, stimer->count) + 1; + stimer->exp_time += n * stimer->count; This is actually just a reminder calculation so I'd rather do it directly with div64_u64

Re: [Qemu-devel] [PATCH v1 5/5] x86: Hyper-V SynIC timers test

2015-11-27 Thread Andrey Smetanin
On 11/27/2015 02:17 PM, Paolo Bonzini wrote: The test logic is good, but the glue can be improved a bit so that the output is more useful if it breaks. Thanks for comments below. I'll redo this patch. On 26/11/2015 17:29, Andrey Smetanin wrote: The test checks Hyper-V SynIC t

Re: [Qemu-devel] [PATCH v1 0/5] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-11-27 Thread Andrey Smetanin
On 11/27/2015 02:17 PM, Paolo Bonzini wrote: On 26/11/2015 17:29, 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 checks validity of received expiration messages

[Qemu-devel] [PATCH v2 2/9] drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header

2015-11-30 Thread Andrey Smetanin
This constant is required for Hyper-V SynIC timers MSR's support by userspace(QEMU). Signed-off-by: Andrey Smetanin Acked-by: K. Y. Srinivasan Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC:

[Qemu-devel] [PATCH v2 6/9] kvm/x86: Added Hyper-V vcpu_to_hv_vcpu()/hv_vcpu_to_vcpu() helpers

2015-11-30 Thread Andrey Smetanin
Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.h | 20 ++-- 1 file c

[Qemu-devel] [PATCH v2 3/9] drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header

2015-11-30 Thread Andrey Smetanin
This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey Smetanin Acked-by: K. Y. Srinivasan Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC

[Qemu-devel] [PATCH v2 1/9] drivers/hv: replace enum hv_message_type by u32

2015-11-30 Thread Andrey Smetanin
enum hv_message_type inside struct hv_message, hv_post_message is not size portable. Replace enum by u32. Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC:

[Qemu-devel] [PATCH v2 0/9] KVM: Hyper-V SynIC timers

2015-11-30 Thread Andrey Smetanin
hes split and fixes * Use remainder to calculate peridic timer expiration time Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org Andrey Smeta

[Qemu-devel] [PATCH v2 5/9] kvm/x86: Rearrange func's declarations inside Hyper-V header

2015-11-30 Thread Andrey Smetanin
This rearrangement places functions declarations together according to their functionality, so future additions will be simplier. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuz

[Qemu-devel] [PATCH v2 4/9] drivers/hv: Move struct hv_timer_message_payload into UAPI Hyper-V x86 header

2015-11-30 Thread Andrey Smetanin
This struct is required for Hyper-V SynIC timers implementation inside KVM and for upcoming Hyper-V VMBus support by userspace(QEMU). So place it into Hyper-V UAPI header. Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang

[Qemu-devel] [PATCH v2 7/9] kvm/x86: Hyper-V internal helper to read MSR HV_X64_MSR_TIME_REF_COUNT

2015-11-30 Thread Andrey Smetanin
This helper will be used also in Hyper-V SynIC timers implementation. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vitaly Kuznetsov CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@

[Qemu-devel] [PATCH v2 8/9] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-30 Thread Andrey Smetanin
notified when the slot is released. To make sure the protocol works regardless of where the message sources are (kernel or userspace), clear the pending flag on SINT ACK notification, and let the message sources compete for the slot again. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan

[Qemu-devel] [PATCH v2 9/9] kvm/x86: Hyper-V SynIC timers

2015-11-30 Thread Andrey Smetanin
od is shortened until the timer catches up) will be implemented later. Changes v2: * Use remainder to calculate periodic timer expiration time Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Vi

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

2015-12-08 Thread Andrey Smetanin
imers 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-devel@nongnu.org Andrey Smetanin (3): lib/x86: Make free_page() available to call x86/hyperv: Move Hy

[Qemu-devel] [PATCH v2 1/3] lib/x86: Make free_page() available to call

2015-12-08 Thread Andrey Smetanin
This will be used to release allocated pages by Hyper-V SynIC timers test. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- lib/x86/vm.h | 1 + 1 file changed, 1 insertion(+) diff

[Qemu-devel] [PATCH v2 2/3] x86/hyperv: Move Hyper-V generic code into hyperv.h/hyperv.c

2015-12-08 Thread Andrey Smetanin
This code will be used as shared between hyperv_synic and hyperv_stimer tests. Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- config/config-x86-common.mak | 3 ++- lib/x86/msr.h| 23

[Qemu-devel] [PATCH v2 3/3] x86: Hyper-V SynIC timers test

2015-12-08 Thread Andrey Smetanin
into test cases with separate callbacks * removed unnecessary irq_enable() calls * moved sint's create/destoy into test prepare/cleanup callbacks * defined used sint's numbers and vectors Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Marcelo Tosatti

[Qemu-devel] [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping

2015-12-14 Thread Andrey Smetanin
on by not stopping Hyper-V SynIC timer at all, because it's safe to restart it without stop in vcpu context and timer callback always returns HRTIMER_NORESTART. Signed-off-by: Andrey Smetanin CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org

Re: [Qemu-devel] [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping

2015-12-14 Thread Andrey Smetanin
On 12/14/2015 07:09 PM, Paolo Bonzini wrote: On 14/12/2015 16:33, Andrey Smetanin wrote: It's possible that guest send us Hyper-V EOM at the middle of Hyper-V SynIC timer running, so we start processing of Hyper-V SynIC timers in vcpu context and stop the Hyper-V SynIC timer uncoditio

Re: [Qemu-devel] [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping

2015-12-14 Thread Andrey Smetanin
On 12/14/2015 07:09 PM, Paolo Bonzini wrote: On 14/12/2015 16:33, Andrey Smetanin wrote: It's possible that guest send us Hyper-V EOM at the middle of Hyper-V SynIC timer running, so we start processing of Hyper-V SynIC timers in vcpu context and stop the Hyper-V SynIC timer uncoditio

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

2016-01-11 Thread Andrey Smetanin
ping On 12/24/2015 12:33 PM, Andrey Smetanin wrote: Lately tsc page was implemented but filled with empty values. This patch setup tsc page scale and offset based on vcpu tsc, tsc_khz and HV_X64_MSR_TIME_REF_COUNT value. The valid tsc page drops HV_X64_MSR_TIME_REF_COUNT msr reads count to

[Qemu-devel] [PATCH v1 3/5] kvm/x86: Pass return code of kvm_emulate_hypercall

2016-01-12 Thread Andrey Smetanin
m_run appropriately. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 2 +- arch/x86/k

[Qemu-devel] [PATCH v1 1/5] kvm/x86: Rename Hyper-V long spin wait hypercall

2016-01-12 Thread Andrey Smetanin
Rename HV_X64_HV_NOTIFY_LONG_SPIN_WAIT by HV_X64_HCALL_NOTIFY_LONG_SPIN_WAIT. So the name better reflects hypercall codes accessory. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang

[Qemu-devel] [PATCH v1 5/5] kvm/x86: Reject Hyper-V hypercall continuation

2016-01-12 Thread Andrey Smetanin
Currently we do not support Hyper-V hypercall continuation so reject it. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@

[Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-12 Thread Andrey Smetanin
The patch implements KVM_EXIT_HV_HCALL functionality for Hyper-V VMBus hypercalls: HV_X64_HCALL_POST_MESSAGE, HV_X64_HCALL_SIGNAL_EVENT. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang

[Qemu-devel] [PATCH v1 0/5] KVM: Hyper-V VMBus hypercalls

2016-01-12 Thread Andrey Smetanin
The patch implements userspace exit 'KVM_EXIT_HYPERV_HCALL' for Hyper-V VMBus hypercalls(postmsg, signalevent) to handle these hypercalls by QEMU. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasa

[Qemu-devel] [PATCH v1 2/5] drivers/hv: Move VMBus hypercall codes into Hyper-V UAPI header

2016-01-12 Thread Andrey Smetanin
VMBus hypercall codes inside Hyper-V UAPI header will be used by QEMU to implement VMBus host devices support. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan C

[Qemu-devel] [PATCH v1] KVM-UNIT-TESTS:x86/hyperv: Hyper-V hypercalls test

2016-01-12 Thread Andrey Smetanin
This is a simple test which performs the following: * setup hypecall page * do some hypercalls and output their results Signed-off-by: Andrey Smetanin CC: Paolo Bonzini CC: Marcelo Tosatti CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- config/config-x86-common.mak | 4

[Qemu-devel] [PATCH v1 1/2] headers: Hyper-V VMBus hypercall codes and exit

2016-01-12 Thread Andrey Smetanin
This patch just for completeness, this changes should be received by scripts/update-linux-headers.sh Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Roman Kagan C

[Qemu-devel] [PATCH v1 0/2] QEMU: Hyper-V VMBus hypercalls blank handlers

2016-01-12 Thread Andrey Smetanin
The patches adds blank handlers for Hyper-V VMBus hypercalls routed by KVM_EXIT_HYPERV_HCALL KVM exit. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Roman Kagan C

[Qemu-devel] [PATCH v1 2/2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers

2016-01-12 Thread Andrey Smetanin
Add Hyper-V VMBus hypercalls blank handlers which just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" CC: Marcelo Tosatti CC: Roman

Re: [Qemu-devel] [PATCH v1 0/5] KVM: Hyper-V VMBus hypercalls

2016-01-12 Thread Andrey Smetanin
our latest changes in KVM code to support Hyper-V VMBus: https://src.openvz.org/projects/UP/repos/kvm_hyperv/commits?until=refs%2Fheads%2Fvmbus_hypercall Thanks, Andrey On 01/12/2016 01:50 PM, Andrey Smetanin wrote: The patch implements userspace exit 'KVM_EXIT_HYPERV_HCALL' for Hyp

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

2016-01-20 Thread Andrey Smetanin
On 01/20/2016 05:05 PM, Paolo Bonzini wrote: On 19/01/2016 08:48, Denis V. Lunev wrote: diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 6877b4d7e..93c9e25 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -145,6 +145,7 @@ static inline bool is_er

[Qemu-devel] [PATCH v2 3/5] kvm/x86: Pass return code of kvm_emulate_hypercall

2016-01-21 Thread Andrey Smetanin
m_run appropriately. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x86/kvm/hyperv.c | 2 +- arch/x86/k

[Qemu-devel] [PATCH v2 4/5] kvm/x86: Reject Hyper-V hypercall continuation

2016-01-21 Thread Andrey Smetanin
Currently we do not support Hyper-V hypercall continuation so reject it. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@

[Qemu-devel] [PATCH v2 2/5] drivers/hv: Move VMBus hypercall codes into Hyper-V UAPI header

2016-01-21 Thread Andrey Smetanin
VMBus hypercall codes inside Hyper-V UAPI header will be used by QEMU to implement VMBus host devices support. Signed-off-by: Andrey Smetanin Acked-by: K. Y. Srinivasan Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang

[Qemu-devel] [PATCH v2 1/5] kvm/x86: Rename Hyper-V long spin wait hypercall

2016-01-21 Thread Andrey Smetanin
Rename HV_X64_HV_NOTIFY_LONG_SPIN_WAIT by HV_X64_HCALL_NOTIFY_LONG_SPIN_WAIT. So the name better reflects hypercall codes accessory. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Joerg Roedel CC: "K. Y. Srinivasan" CC: Haiyang

[Qemu-devel] [PATCH v2 0/5] KVM: Hyper-V VMBus hypercalls

2016-01-21 Thread Andrey Smetanin
The patch implements userspace exit 'KVM_EXIT_HYPERV' for Hyper-V VMBus hypercalls(postmsg, signalevent) to handle these hypercalls by QEMU. Changes v2: * use KVM_EXIT_HYPERV for hypercalls Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini

[Qemu-devel] [PATCH v2 5/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-21 Thread Andrey Smetanin
The patch implements KVM_EXIT_HYPERV userspace exit functionality for Hyper-V VMBus hypercalls: HV_X64_HCALL_POST_MESSAGE, HV_X64_HCALL_SIGNAL_EVENT. Changes v2: * use KVM_EXIT_HYPERV for hypercalls Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC

[Qemu-devel] [PATCH v2] target-i386/kvm: Hyper-V VMBus hypercalls blank handlers

2016-01-21 Thread Andrey Smetanin
Add Hyper-V VMBus hypercalls blank handlers which just returns error code - HV_STATUS_INVALID_HYPERCALL_CODE. Changes v2: * use KVM_EXIT_HYPERV exit type Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas F

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

2015-12-21 Thread Andrey Smetanin
On 12/18/2015 09:39 PM, Roman Kagan wrote: On Fri, Dec 18, 2015 at 10:10:11AM -0800, Peter Hornyack wrote: 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 acc

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

2015-12-21 Thread Andrey Smetanin
On 12/21/2015 04:28 PM, Pavel Fedin wrote: Hello! Yes, we can use KVM_EXIT_REG_IO/MSR_IO for Hyper-V SynIC MSRS's changes and can even use only one MSR value . So union inside struct kvm_hyperv_exit is excessive. But we still need Vcpu exit to handle VMBus hypercalls by QEMU to emulate VM

[Qemu-devel] [PATCH v1 1/6] kvm/x86: Drop stimer_stop() function

2015-12-23 Thread Andrey Smetanin
The function stimer_stop() is called in one place so remove the function and replace it's call by function content. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan CC: Denis V. Lunev CC: qemu-devel@nongnu.org --- arch/x8

[Qemu-devel] [PATCH v1 4/6] kvm/x86: Hyper-V fix SynIC timer disabling condition

2015-12-23 Thread Andrey Smetanin
FS doc(15.3.1): "It is not permitted to set the SINTx field to zero for an enabled timer. If attempted, the timer will be marked disabled (that is, bit 0 cleared) immediately." Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan CC: Gleb Natapov CC: Paolo Bonzini CC: Roman Kagan

[Qemu-devel] [PATCH v1 3/6] kvm/x86: Reorg stimer_expiration() to better control timer restart

2015-12-23 Thread Andrey Smetanin
Split stimer_expiration() into two parts - timer expiration message sending and timer restart/cleanup based on timer state(config). This also fixes a bug where a one-shot timer message whose delivery failed once would get lost for good. Signed-off-by: Andrey Smetanin Reviewed-by: Roman Kagan

  1   2   >