Re: [PATCH 2/2] KVM: Create debugfs dir and stat files for each VM

2015-11-26 Thread Christian Borntraeger
On 11/26/2015 05:17 PM, Tyler Baker wrote: > Hi Christian, > > The kernelci.org bot recently has been reporting kvm guest boot > failures[1] on various arm64 platforms in next-20151126. The bot > bisected[2] the failures to the commit in -next titled "KVM: Create > deb

Re: [PATCH v6 3/3] target-i386: add support to migrate vcpu's TSC rate

2015-11-26 Thread Haozhong Zhang
On 11/26/15 12:19, Eduardo Habkost wrote: > On Tue, Nov 24, 2015 at 11:33:57AM +0800, Haozhong Zhang wrote: > > This patch enables migrating vcpu's TSC rate. If KVM on the destination > > machine supports TSC scaling, guest programs will observe a consistent > > TSC rate across the migration. > >

Re: Is KVM support single step execution

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 06:46, Wu, Feng wrote: > Hi Paolo, > > Do you know whether KVM supports single step execution? If it is, > could you please give me some information about it. Really appreciate > it! Yes, it does. See KVM_SET_GUEST_DEBUG documentation in Documentation/virtual/kvm/api.txt. Paolo

RE: Is KVM support single step execution

2015-11-26 Thread Wu, Feng
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Paolo Bonzini > Sent: Thursday, November 26, 2015 4:28 PM > To: Wu, Feng > Cc: kvm@vger.kernel.org; Dong, Eddie > Subject: Re: Is KVM

Re: [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

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

2015-11-26 Thread Wanpeng Li
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

Re: [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 get msg page, gpa

[PATCH V4 0/3] KVM: x86: MMU: Clean up x86's mmu code for future work - part2

2015-11-26 Thread Takuya Yoshikawa
Guests worked normally in shadow paging mode (ept=0) on my test machine. Please check if the first two patches reflect what you meant correctly. Takuya Yoshikawa (3): [1] KVM: x86: MMU: Move parent_pte handling from kvm_mmu_get_page() to link_shadow_page() [2] KVM: x86: MMU: Use

[PATCH 1/3] KVM: x86: MMU: Move parent_pte handling from kvm_mmu_get_page() to link_shadow_page()

2015-11-26 Thread Takuya Yoshikawa
Every time kvm_mmu_get_page() is called with a non-NULL parent_pte argument, link_shadow_page() follows that to set the parent entry so that the new mapping will point to the returned page table. Moving parent_pte handling there allows to clean up the code because parent_pte is passed to

[PATCH 2/3] KVM: x86: MMU: Use for_each_rmap_spte macro instead of pte_list_walk()

2015-11-26 Thread Takuya Yoshikawa
As kvm_mmu_get_page() was changed so that every parent pointer would not get into the sp->parent_ptes chain before the entry pointed to by it was set properly, we can use the for_each_rmap_spte macro instead of pte_list_walk(). Signed-off-by: Takuya Yoshikawa

[PATCH 3/3] KVM: x86: MMU: Remove unused parameter parent_pte from kvm_mmu_get_page()

2015-11-26 Thread Takuya Yoshikawa
Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/mmu.c | 20 +++- arch/x86/kvm/paging_tmpl.h | 4 ++-- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 204c7d4..a1a3d19 100644

Re: [PATCH v6 1/3] target-i386: fallback vcpu's TSC rate to value returned by KVM

2015-11-26 Thread Eduardo Habkost
On Tue, Nov 24, 2015 at 11:33:55AM +0800, Haozhong Zhang wrote: > If no user-specified TSC rate is present, we will try to set > env->tsc_khz to the value returned by KVM_GET_TSC_KHZ. This patch does > not change the current functionality of QEMU and just prepares for later > patches to enable

Re: [PATCH v6 2/3] target-i386: reorganize TSC rate setting code

2015-11-26 Thread Eduardo Habkost
On Tue, Nov 24, 2015 at 11:33:56AM +0800, Haozhong Zhang wrote: > Following changes are made to the TSC rate setting code in > kvm_arch_init_vcpu(): > * The code is moved to a new function kvm_arch_set_tsc_khz(). > * If kvm_arch_set_tsc_khz() fails, i.e. following two conditions are >both

Re: [PATCH] KVM: x86: Add lowest-priority support for vt-d posted-interrupts

2015-11-26 Thread Radim Krcmár
2015-11-26 06:24+, Wu, Feng: >> From: Radim Krčmář [mailto:rkrc...@redhat.com] >> 2015-11-25 15:38+0100, Paolo Bonzini: >>> On 25/11/2015 15:12, Radim Krcmár wrote: I think it's ok to pick any algorithm we like. It's unlikely that software would recognize and take advantage of the

Re: [PATCH v6 3/3] target-i386: add support to migrate vcpu's TSC rate

2015-11-26 Thread Eduardo Habkost
On Tue, Nov 24, 2015 at 11:33:57AM +0800, Haozhong Zhang wrote: > This patch enables migrating vcpu's TSC rate. If KVM on the destination > machine supports TSC scaling, guest programs will observe a consistent > TSC rate across the migration. > > If TSC scaling is not supported on the

Re: [PATCH V4 0/3] KVM: x86: MMU: Clean up x86's mmu code for future work - part2

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 13:13, Takuya Yoshikawa wrote: > Guests worked normally in shadow paging mode (ept=0) on my test machine. > > Please check if the first two patches reflect what you meant correctly. Yes, they do! Thanks, Paolo > Takuya Yoshikawa (3): > [1] KVM: x86: MMU: Move parent_pte

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

2015-11-26 Thread Paolo Bonzini
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_SHIFT); +if

[PATCH] kvmtool: virtio-net: fix VIRTIO_NET_F_MRG_RXBUF usage in rx thread

2015-11-26 Thread Will Deacon
When merging virtio-net buffers using the VIRTIO_NET_F_MRG_RXBUF feature, the first buffer added to the used ring should indicate the total number of buffers used to hold the packet. Unfortunately, kvmtool has a number of issues when constructing these merged buffers: - Commit 5131332e3f1a

Re: [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_SHIFT); +if

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

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 16:53, Andrey Smetanin wrote: >> Then the patches look good, I think. With a testcase I can try them out >> and hopefully merge them for Linux 4.5 / QEMU 2.6. > > Thank you! > > We already have a working Hyper-V SynIC timers kvm-unit-tests test case. > We are going to send

Re: [PATCH 2/2] KVM: Create debugfs dir and stat files for each VM

2015-11-26 Thread Tyler Baker
Hi Christian, The kernelci.org bot recently has been reporting kvm guest boot failures[1] on various arm64 platforms in next-20151126. The bot bisected[2] the failures to the commit in -next titled "KVM: Create debugfs dir and stat files for each VM". I confirmed by reverting this com

[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-de...@nongnu.org ---

[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-de...@nongnu.org ---

[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

[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:

[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-de...@nongnu.org ---

[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: