Re: [PATCH v4 00/21] KVM: ARM64: Add guest PMU support

2015-11-30 Thread Shannon Zhao
Hi Marc, On 2015/12/1 2:34, Marc Zyngier wrote: > On Fri, 30 Oct 2015 14:21:42 +0800 > Shannon Zhao wrote: > > Hi Shannon, > >> > From: Shannon Zhao >> > >> > This patchset adds guest PMU support for KVM on ARM64. It takes >> >

Re: [PATCH v4 05/21] KVM: ARM64: Add reset and access handlers for PMSELR register

2015-11-30 Thread Shannon Zhao
Hi Marc, On 2015/12/1 1:56, Marc Zyngier wrote: > Same remark here as the one I made earlier. I'm pretty sure we don't > call any CP15 reset because they are all shared with their 64bit > counterparts. The same thing goes for the whole series. Ok, I see. But within the 64bit reset function, it

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-11-30 Thread Jason Wang
On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: >> > This patch tries to poll for new added tx buffer or socket receive >> > queue for a while at the end of tx/rx processing. The maximum time >> > spent on polling were specified

Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-11-30 Thread Lan, Tianyu
On 11/30/2015 4:01 PM, Michael S. Tsirkin wrote: It is still not very clear what it is you are trying to achieve, and whether your patchset achieves it. You merely say "adding live migration" but it seems pretty clear this isn't about being able to migrate a guest transparently, since you are

Re: [PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Jason Wang
On 11/30/2015 04:22 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 03:11:28PM +0800, Jason Wang wrote: >> Signed-off-by: Jason Wang >> --- >> drivers/vhost/vhost.c | 26 +- >> drivers/vhost/vhost.h | 1 + >> 2 files changed, 18

Re: [PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 03:11:28PM +0800, Jason Wang wrote: > Signed-off-by: Jason Wang > --- > drivers/vhost/vhost.c | 26 +- > drivers/vhost/vhost.h | 1 + > 2 files changed, 18 insertions(+), 9 deletions(-) > > diff --git a/drivers/vhost/vhost.c

Re: [PATCH net-next 0/3] basic busy polling support for vhost_net

2015-11-30 Thread Michael S. Tsirkin
On Sun, Nov 29, 2015 at 10:31:10PM -0500, David Miller wrote: > From: Jason Wang > Date: Wed, 25 Nov 2015 15:11:26 +0800 > > > This series tries to add basic busy polling for vhost net. The idea is > > simple: at the end of tx/rx processing, busy polling for new tx added > >

Re: [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC

2015-11-30 Thread Michael S. Tsirkin
On Tue, Nov 24, 2015 at 09:35:17PM +0800, Lan Tianyu wrote: > This patchset is to propose a solution of adding live migration > support for SRIOV NIC. > > During migration, Qemu needs to let VF driver in the VM to know > migration start and end. Qemu adds faked PCI migration capability > to help

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: > NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices Forgot to mention: Pls put spec info in code comments near relevant functions, not just the log. > > There is a root device under \_SB and specified NVDIMM devices are

Re: [for-2.6 PATCH 1/3] target-i386: Define structs for layout of xsave area

2015-11-30 Thread Paolo Bonzini
On 28/11/2015 20:56, Eduardo Habkost wrote: > +/* Ext. save area 2: AVX State */ > +typedef struct XSaveAVX { > +uint64_t ymmh[16][2]; > +} XSaveAVX; > + Because this is always little endian, I would write it as uint8_t[16][16]. > +/* Ext. save area 6: ZMM_Hi256 */ > +typedef struct

Re: [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes

2015-11-30 Thread Paolo Bonzini
On 28/11/2015 20:56, Eduardo Habkost wrote: > I still need to figure out a way to write unit tests for the new > code. Maybe I will just copy and paste the new and old functions, > and test them locally (checking if they give the same results > when translating blobs of random bytes). Aren't

Re: [PATCH v4 06/21] KVM: ARM64: Add reset and access handlers for PMCEID0 and PMCEID1 register

2015-11-30 Thread Marc Zyngier
On Fri, 30 Oct 2015 14:21:48 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Add reset handler which gets host value of PMCEID0 or PMCEID1. Since > write action to PMCEID0 or PMCEID1 is ignored, add a new case for this. > > Signed-off-by:

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-11-30 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: > This patch tries to poll for new added tx buffer or socket receive > queue for a while at the end of tx/rx processing. The maximum time > spent on polling were specified through a new kind of vring ioctl. > > Signed-off-by: Jason Wang

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Hello! > > case KVM_CAP_INTERNAL_ERROR_DATA: > > #ifdef CONFIG_HAVE_KVM_MSI > > case KVM_CAP_SIGNAL_MSI: > > + /* Fallthrough */ > > #endif > > + case KVM_CAP_CHECK_EXTENSION_VM: > > + return 1; > > #ifdef CONFIG_HAVE_KVM_IRQFD > > case KVM_CAP_IRQFD: > >

Re: [PATCH v4 06/21] KVM: ARM64: Add reset and access handlers for PMCEID0 and PMCEID1 register

2015-11-30 Thread Shannon Zhao
Hi Marc, On 2015/11/30 19:42, Marc Zyngier wrote: >> +static void reset_pmceid(struct kvm_vcpu *vcpu, const struct sys_reg_desc >> *r) >> > +{ >> > + u64 pmceid; >> > + >> > + if (r->reg == PMCEID0_EL0 || r->reg == c9_PMCEID0) > That feels wrong. We should only reset the 64bit view of the

Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2015 14:56:38 +0300 Pavel Fedin wrote: > Hello! > > > > case KVM_CAP_INTERNAL_ERROR_DATA: > > > #ifdef CONFIG_HAVE_KVM_MSI > > > case KVM_CAP_SIGNAL_MSI: > > > + /* Fallthrough */ > > > #endif > > > + case KVM_CAP_CHECK_EXTENSION_VM: > > > +

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

2015-11-30 Thread Roman Kagan
On Fri, Nov 27, 2015 at 11:49:40AM +0100, Paolo Bonzini wrote: [ sorry missed your message on Friday, replying now ] > 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; > >

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 06:50:58PM +0800, Xiao Guangrong wrote: > This patchset can be found at: > https://github.com/xiaogr/qemu.git nvdimm-v8 > > It is based on pci branch on Michael's tree and the top commit is: > commit e3a4e177d9 (migration/ram: fix build on 32 bit hosts). > >

Re: [PATCH v2 04/21] arm64: KVM: Implement vgic-v3 save/restore

2015-11-30 Thread Marc Zyngier
On Mon, 30 Nov 2015 09:59:32 + Alex Bennée wrote: > > Marc Zyngier writes: > > > Implement the vgic-v3 save restore as a direct translation of > > the assembly code version. > > > > Signed-off-by: Marc Zyngier > > --- >

Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2015 12:40:45 +0300 Pavel Fedin wrote: > Now at least ARM is able to determine whether the machine has > virtualization support for irqchip or not at runtime. Obviously, > irqfd requires irqchip. > > Signed-off-by: Pavel Fedin > --- >

Re: [PATCH v2 08/21] arm64: KVM: Implement debug save/restore

2015-11-30 Thread Alex Bennée
Marc Zyngier writes: > Implement the debug save restore as a direct translation of > the assembly code version. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/hyp/Makefile | 1 + > arch/arm64/kvm/hyp/debug-sr.c | 130 >

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

2015-11-30 Thread Christian Borntraeger
On 11/27/2015 09:42 PM, Tyler Baker wrote: > On 27 November 2015 at 10:53, Tyler Baker wrote: >> On 27 November 2015 at 09:08, Tyler Baker wrote: >>> On 27 November 2015 at 00:54, Christian Borntraeger >>> wrote: On

Re: [PATCH] vhost: replace % with & on data path

2015-11-30 Thread Joe Perches
On Mon, 2015-11-30 at 10:34 +0200, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. [] > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c [] > @@ -1366,10 +1366,12 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, > /* Only get

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Stefan Hajnoczi
On Mon, Nov 16, 2015 at 06:50:58PM +0800, Xiao Guangrong wrote: > This patchset can be found at: > https://github.com/xiaogr/qemu.git nvdimm-v8 > > It is based on pci branch on Michael's tree and the top commit is: > commit e3a4e177d9 (migration/ram: fix build on 32 bit hosts). > >

Re: [PATCH] vhost: replace % with & on data path

2015-11-30 Thread kbuild test robot
Hi Michael, [auto build test ERROR on: v4.4-rc3] [also build test ERROR on: next-20151127] url: https://github.com/0day-ci/linux/commits/Michael-S-Tsirkin/vhost-replace-with-on-data-path/20151130-163704 config: x86_64-randconfig-s0-11301655 (attached as .config) reproduce: # save the

Re: [for-2.6 PATCH 0/3] target-i386: Use C struct for xsave area layout, offsets & sizes

2015-11-30 Thread Eduardo Habkost
On Mon, Nov 30, 2015 at 12:21:23PM +0100, Paolo Bonzini wrote: > > > On 28/11/2015 20:56, Eduardo Habkost wrote: > > I still need to figure out a way to write unit tests for the new > > code. Maybe I will just copy and paste the new and old functions, > > and test them locally (checking if they

Re: best way to create a snapshot of a running vm ?

2015-11-30 Thread Stefan Hajnoczi
On Mon, Nov 30, 2015 at 12:36:56AM +0100, Lentes, Bernd wrote: > what is the best way to create a snapshot of a running vm ? qemu-img or virsh > ? > I#d like to create a snapshot which is copied afterwards by other means, e.g. > by a network based backup software. Hi Bernd, qemu-img cannot be

Re: [PATCH v2 08/21] arm64: KVM: Implement debug save/restore

2015-11-30 Thread Marc Zyngier
On Mon, 30 Nov 2015 12:00:24 + Alex Bennée wrote: > > Marc Zyngier writes: > > > Implement the debug save restore as a direct translation of > > the assembly code version. > > > > Signed-off-by: Marc Zyngier > > --- > >

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:32 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices Forgot to mention: Pls put spec info in code comments near relevant functions, not just the log. Sure, good to me.

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:38 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:50:58PM +0800, Xiao Guangrong wrote: This patchset can be found at: https://github.com/xiaogr/qemu.git nvdimm-v8 It is based on pci branch on Michael's tree and the top commit is: commit e3a4e177d9

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 04:51 PM, Stefan Hajnoczi wrote: Reviewed-by: Stefan Hajnoczi Thanks for your review Stefan. Will pick up your Reviewed-by in the next version. :) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Hello! > > Thank you for the note, i didn't know about irqchip-specific capability > > codes. There's the > > same issue with PowerPC, now i > > understand why there's no KVM_CAP_IRQCHIP for them. Because they have > > KVM_CAP_IRQ_MPIC and > > KVM_CAP_IRQ_XICS, similar to S390. > > But isn't

Re: [PATCH v8 4/5] nvdimm acpi: build ACPI nvdimm devices

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:30 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:51:02PM +0800, Xiao Guangrong wrote: NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device under \_SB and specified NVDIMM devices are under the root device. Each NVDIMM device has _ADR

Re: [PATCH v8 3/5] nvdimm acpi: build ACPI NFIT table

2015-11-30 Thread Xiao Guangrong
On 11/30/2015 06:30 PM, Michael S. Tsirkin wrote: On Mon, Nov 16, 2015 at 06:51:01PM +0800, Xiao Guangrong wrote: NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM

Re: [PATCH v4 06/21] KVM: ARM64: Add reset and access handlers for PMCEID0 and PMCEID1 register

2015-11-30 Thread Marc Zyngier
On Mon, 30 Nov 2015 19:59:53 +0800 Shannon Zhao wrote: > Hi Marc, > > On 2015/11/30 19:42, Marc Zyngier wrote: > >> +static void reset_pmceid(struct kvm_vcpu *vcpu, const struct sys_reg_desc > >> *r) > >> > +{ > >> > +u64 pmceid; > >> > + > >> > +if

Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2015 15:41:20 +0300 Pavel Fedin wrote: > Hello! > > > > Thank you for the note, i didn't know about irqchip-specific capability > > > codes. There's the > > > same issue with PowerPC, now i > > > understand why there's no KVM_CAP_IRQCHIP for them. Because

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Hello! > > b) I simply drop it as it is, because current qemu knows about the > > dependency and does not > try to use irqfd without irqchip, > > because there's simply no use for them. But, well, perhaps there would be > > an exception in > vhost, i don't remember testing it. > > Wouldn't

Re: [for-2.6 PATCH 1/3] target-i386: Define structs for layout of xsave area

2015-11-30 Thread Eduardo Habkost
On Mon, Nov 30, 2015 at 12:18:33PM +0100, Paolo Bonzini wrote: > On 28/11/2015 20:56, Eduardo Habkost wrote: > > +/* Ext. save area 2: AVX State */ > > +typedef struct XSaveAVX { > > +uint64_t ymmh[16][2]; > > +} XSaveAVX; > > + > > Because this is always little endian, I would write it as

Re: [RFC] kvm - possible out of bounds

2015-11-29 Thread Paul Mackerras
On Sun, Nov 29, 2015 at 05:14:03PM -0300, Geyslan Gregório Bem wrote: > Hello, > > I have found a possible out of bounds reading in > arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate > function). pteg[] array could be accessed twice using the i variable > after the for iteration. What

Re: [RFC] kvm - possible out of bounds

2015-11-29 Thread Paul Mackerras
On Sun, Nov 29, 2015 at 05:14:03PM -0300, Geyslan Gregório Bem wrote: > Hello, > > I have found a possible out of bounds reading in > arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate > function). pteg[] array could be accessed twice using the i variable > after the for iteration. What

Re: [RFC] kvm - possible out of bounds

2015-11-29 Thread Geyslan Gregório Bem
2015-11-29 18:33 GMT-03:00 Paul Mackerras : > On Sun, Nov 29, 2015 at 05:14:03PM -0300, Geyslan Gregório Bem wrote: >> Hello, >> >> I have found a possible out of bounds reading in >> arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate >> function). pteg[] array could

Re: [RFC] kvm - possible out of bounds

2015-11-29 Thread Geyslan Gregório Bem
2015-11-29 18:33 GMT-03:00 Paul Mackerras : > On Sun, Nov 29, 2015 at 05:14:03PM -0300, Geyslan Gregório Bem wrote: >> Hello, >> >> I have found a possible out of bounds reading in >> arch/powerpc/kvm/book3s_64_mmu.c (kvmppc_mmu_book3s_64_xlate >> function). pteg[] array could

Re: [PATCH kernel 5/9] KVM: PPC: Account TCE-containing pages in locked_vm

2015-11-29 Thread Paul Mackerras
On Tue, Sep 15, 2015 at 08:49:35PM +1000, Alexey Kardashevskiy wrote: > At the moment pages used for TCE tables (in addition to pages addressed > by TCEs) are not counted in locked_vm counter so a malicious userspace > tool can call ioctl(KVM_CREATE_SPAPR_TCE) as many times as RLIMIT_NOFILE and >

Re: [PATCH kernel 5/9] KVM: PPC: Account TCE-containing pages in locked_vm

2015-11-29 Thread Paul Mackerras
On Tue, Sep 15, 2015 at 08:49:35PM +1000, Alexey Kardashevskiy wrote: > At the moment pages used for TCE tables (in addition to pages addressed > by TCEs) are not counted in locked_vm counter so a malicious userspace > tool can call ioctl(KVM_CREATE_SPAPR_TCE) as many times as RLIMIT_NOFILE and >

Re: [PATCH net-next 0/3] basic busy polling support for vhost_net

2015-11-29 Thread David Miller
From: Jason Wang Date: Wed, 25 Nov 2015 15:11:26 +0800 > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx/rx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of >

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-11-29 Thread Lan, Tianyu
On 11/26/2015 11:56 AM, Alexander Duyck wrote: > I am not saying you cannot modify the drivers, however what you are doing is far too invasive. Do you seriously plan on modifying all of the PCI device drivers out there in order to allow any device that might be direct assigned to a port to

Re: [PATCH kernel 5/9] KVM: PPC: Account TCE-containing pages in locked_vm

2015-11-29 Thread Alexey Kardashevskiy
On 11/30/2015 01:06 PM, Paul Mackerras wrote: On Tue, Sep 15, 2015 at 08:49:35PM +1000, Alexey Kardashevskiy wrote: At the moment pages used for TCE tables (in addition to pages addressed by TCEs) are not counted in locked_vm counter so a malicious userspace tool can call

Re: [PATCH kernel 5/9] KVM: PPC: Account TCE-containing pages in locked_vm

2015-11-29 Thread Alexey Kardashevskiy
On 11/30/2015 01:06 PM, Paul Mackerras wrote: On Tue, Sep 15, 2015 at 08:49:35PM +1000, Alexey Kardashevskiy wrote: At the moment pages used for TCE tables (in addition to pages addressed by TCEs) are not counted in locked_vm counter so a malicious userspace tool can call

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

2015-11-28 Thread Eduardo Habkost
On Fri, Nov 27, 2015 at 08:16:42AM +0800, Haozhong Zhang wrote: > 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

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

2015-11-27 Thread Tyler Baker
On 27 November 2015 at 00:54, Christian Borntraeger wrote: > On 11/26/2015 09:47 PM, Christian Borntraeger wrote: >> 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

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

2015-11-27 Thread Tyler Baker
On 27 November 2015 at 09:08, Tyler Baker wrote: > On 27 November 2015 at 00:54, Christian Borntraeger > wrote: >> On 11/26/2015 09:47 PM, Christian Borntraeger wrote: >>> On 11/26/2015 05:17 PM, Tyler Baker wrote: Hi Christian, The

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

2015-11-27 Thread KY Srinivasan
> -Original Message- > From: Andrey Smetanin [mailto:asmeta...@virtuozzo.com] > Sent: Wednesday, November 25, 2015 7:20 AM > To: kvm@vger.kernel.org > Cc: Gleb Natapov ; Paolo Bonzini > ; KY Srinivasan ; Haiyang > Zhang

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

2015-11-27 Thread KY Srinivasan
Srinivasan <k...@microsoft.com>; > Haiyang Zhang <haiya...@microsoft.com>; Vitaly Kuznetsov > <vkuzn...@redhat.com>; Roman Kagan <rka...@virtuozzo.com>; Denis V. > Lunev <d...@openvz.org>; qemu-de...@nongnu.org > Subject: Re: [PATCH v1 2/7] drivers/hv: Move s

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

2015-11-27 Thread Paolo Bonzini
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 in appropriate > ISR's. > >

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

2015-11-27 Thread Paolo Bonzini
On 27/11/2015 12:30, Andrey Smetanin wrote: >>> >>> + >>> +static void stimer_test_cleanup(void *ctx) >>> +{ >>> +irq_enable(); >> >> Why enable again? > I'll remove it. I guess you can remove the one in stimer_test_prepare too. If the interrupts are disabled you don't get the IPI either,

Re: [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: [PATCH v1 5/5] x86: Hyper-V SynIC timers test

2015-11-27 Thread Paolo Bonzini
The test logic is good, but the glue can be improved a bit so that the output is more useful if it breaks. 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

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

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

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

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

2015-11-27 Thread Tyler Baker
On 27 November 2015 at 10:53, Tyler Baker wrote: > On 27 November 2015 at 09:08, Tyler Baker wrote: >> On 27 November 2015 at 00:54, Christian Borntraeger >> wrote: >>> On 11/26/2015 09:47 PM, Christian Borntraeger wrote:

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

2015-11-27 Thread Paolo Bonzini
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 Smetanin >

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

2015-11-27 Thread Roman Kagan
On Wed, Nov 25, 2015 at 06:20:21PM +0300, Andrey Smetanin wrote: > 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 message > to the

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

2015-11-27 Thread Roman Kagan
On Wed, Nov 25, 2015 at 06:20:20PM +0300, Andrey Smetanin wrote: > The SynIC message protocol mandates that the message slot is claimed > by atomically setting message type to something other than HVMSG_NONE. > If another message is to be delivered while the slot is still busy, > message pending

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

2015-11-27 Thread Christian Borntraeger
On 11/26/2015 09:47 PM, Christian Borntraeger wrote: > 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

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

2015-11-27 Thread Paolo Bonzini
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_rem(). It took me a while to understand why

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 > debugfs dir and stat files for

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 <feng...@intel.com> > Cc: kvm@vger.kernel.org; Dong, Eddie <eddie.d...@intel

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

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

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 commit on top

Re: [PATCH 09/10] KVM: x86: MMU: Move parent_pte handling from kvm_mmu_get_page() to link_shadow_page()

2015-11-25 Thread Paolo Bonzini
On 20/11/2015 09:57, Xiao Guangrong wrote: > > > You can move this patch to the front of > [PATCH 08/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of > pte_list_walk() > > By moving kvm_mmu_mark_parents_unsync() to the behind of mmu_spte_set() > (then the parent > spte is present

Re: [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Borislav Petkov
On Wed, Nov 25, 2015 at 01:49:49PM -0200, Eduardo Habkost wrote: > Instead of silently clearing mcg_cap bits when the host doesn't > support them, print a warning when doing that. Why the host? Why would we want there to be any relation between the MCA capabilities of the host and what qemu is

Re: [PATCH] KVM: nVMX: remove incorrect vpid check in nested invvpid emulation

2015-11-25 Thread Bandan Das
Haozhong Zhang writes: > On 11/25/15 10:45, Bandan Das wrote: >> Haozhong Zhang writes: >> >> > This patch removes the vpid check when emulating nested invvpid >> > instruction of type all-contexts invalidation. The existing code is >> >

Re: [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Eduardo Habkost
On Wed, Nov 25, 2015 at 05:45:20PM +0100, Paolo Bonzini wrote: > On 25/11/2015 16:49, Eduardo Habkost wrote: > > Instead of silently clearing mcg_cap bits when the host doesn't > > support them, print a warning when doing that. > > > > Signed-off-by: Eduardo Habkost > > ---

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 12:21 AM, Lan Tianyu wrote: > On 2015年11月25日 13:30, Alexander Duyck wrote: >> No, what I am getting at is that you can't go around and modify the >> configuration space for every possible device out there. This >> solution won't scale. > > > PCI

Re: [PATCH] KVM: nVMX: remove incorrect vpid check in nested invvpid emulation

2015-11-25 Thread Haozhong Zhang
On 11/25/15 10:45, Bandan Das wrote: > Haozhong Zhang writes: > > > This patch removes the vpid check when emulating nested invvpid > > instruction of type all-contexts invalidation. The existing code is > > incorrect because: > > (1) According to Intel SDM Vol 3,

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Lan, Tianyu
On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: Frankly, I don't really see what this short term hack buys us, and if it goes in, we'll have to maintain it forever. The framework of how to notify VF about migration status won't be changed regardless of stopping VF or not before doing

Re: [PATCH 1/3] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 18:26, Eduardo Habkost wrote: >> > Yoda conditions? >> > >> > if (banks < MCE_BANKS_DEF) { >> > error_report("kvm: Unsupported MCE bank count (QEMU = %d, KVM >> > = %d)", >> > MCE_BANKS_DEF, banks); > This was on purpose, because

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

2015-11-25 Thread Radim Krčmář
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 hardware algorithm >> without adding a special treatment for KVM. >> (I'd vote for the simple

Re: [RFC PATCH V2 09/10] Qemu/VFIO: Add SRIOV VF migration support

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 11:32:23PM +0800, Lan, Tianyu wrote: > > On 11/25/2015 5:03 AM, Michael S. Tsirkin wrote: > >>>+void vfio_migration_cap_handle(PCIDevice *pdev, uint32_t addr, > >>>+ uint32_t val, int len) > >>>+{ > >>>+VFIOPCIDevice *vdev =

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Thu, Nov 26, 2015 at 12:02:33AM +0800, Lan, Tianyu wrote: > On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: > >Frankly, I don't really see what this short term hack buys us, > >and if it goes in, we'll have to maintain it forever. > > > > The framework of how to notify VF about migration

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Michael S. Tsirkin
On Wed, Nov 25, 2015 at 08:24:38AM -0800, Alexander Duyck wrote: > >> Also, assuming you just want to do ifdown/ifup for some reason, it's > >> easy enough to do using a guest agent, in a completely generic way. > >> > > > > Just ifdown/ifup is not enough for migration. It needs to restore some

Re: [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 18:29, Eduardo Habkost wrote: >>> > > >>> > > +unsupported_caps = env->mcg_cap & ~(mcg_cap | >>> > > MCG_CAP_BANKS_MASK); >>> > > +if (unsupported_caps) { >>> > > +error_report("warning: Unsupported MCG_CAP bits: 0x%" >>> > > PRIx64 "\n", >> > >> >

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-25 Thread Alexander Duyck
On Wed, Nov 25, 2015 at 8:02 AM, Lan, Tianyu wrote: > On 11/25/2015 8:28 PM, Michael S. Tsirkin wrote: >> >> Frankly, I don't really see what this short term hack buys us, >> and if it goes in, we'll have to maintain it forever. >> > > The framework of how to notify VF about

Re: [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-25 Thread Paolo Bonzini
On 25/11/2015 16:49, Eduardo Habkost wrote: > Instead of silently clearing mcg_cap bits when the host doesn't > support them, print a warning when doing that. > > Signed-off-by: Eduardo Habkost > --- > target-i386/kvm.c | 8 +++- > 1 file changed, 7 insertions(+), 1

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

2015-11-25 Thread Paolo Bonzini
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 *page; > + gpa_t gpa; > + struct

Re: [PATCH] KVM: nVMX: remove incorrect vpid check in nested invvpid emulation

2015-11-25 Thread Bandan Das
Haozhong Zhang writes: > This patch removes the vpid check when emulating nested invvpid > instruction of type all-contexts invalidation. The existing code is > incorrect because: > (1) According to Intel SDM Vol 3, Section "INVVPID - Invalidate > Translations

Re: [PATCH 08/10] KVM: x86: MMU: Use for_each_rmap_spte macro instead of pte_list_walk()

2015-11-25 Thread Paolo Bonzini
On 20/11/2015 09:47, Takuya Yoshikawa wrote: > kvm_mmu_mark_parents_unsync() alone uses pte_list_walk(), witch does > nearly the same as the for_each_rmap_spte macro. The only difference > is that is_shadow_present_pte() checks cannot be placed there because > kvm_mmu_mark_parents_unsync() can

<    5   6   7   8   9   10   11   12   13   14   >