Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-12 Thread Ming Lei
On Thu, Sep 11, 2014 at 6:26 PM, Christian Borntraeger wrote: > Folks, > > we have seen the following bug with 3.16 as a KVM guest. It suspect the > blk-mq rework that happened between 3.15 and 3.16, but it can be something > completely different. > Care to share how you reproduce the issue? >

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-17 Thread Ming Lei
On Wed, Sep 17, 2014 at 3:59 PM, Christian Borntraeger wrote: > On 09/12/2014 10:09 PM, Christian Borntraeger wrote: >> On 09/12/2014 01:54 PM, Ming Lei wrote: >>> On Thu, Sep 11, 2014 at 6:26 PM, Christian Borntraeger >>> wrote: >>>> Folks, >>>&g

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-17 Thread Ming Lei
cause: > > tags->rqs[..] is not initialized with zeroes (via alloc_pages_node in > blk-mq.c:blk_mq_init_rq_map()). Yes, it may cause problem when the request is allocated at the 1st time, and timeout handler may comes just after the allocation and before its initialization, then oops t

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-17 Thread Ming Lei
tag_to_rq and the > calling > method to do the wrong thing. Yes, clearing rq->cmd_flags should be enough. And looks better to move rq initialization to __blk_mq_free_request() too, otherwise timeout still may see old cmd_flags and rq->q before rq's new initialization. Thanks,

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-17 Thread Ming Lei
() >> too, otherwise timeout still may see old cmd_flags and rq->q before >> rq's new initialization. > > Yes, __blk_mq_free_request() should also reset at least rq->cmd_flags, and I > think we can remove the initialization from __blk_mq_alloc_request(). > > David > >> >> >> Thanks, > -- Ming Lei -- 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.kernel.org/majordomo-info.html

[PATCH] ARM/ARM64: support KVM_IOEVENTFD

2014-11-18 Thread Ming Lei
n't work in QEMU. Signed-off-by: Ming Lei --- arch/arm/kvm/Kconfig |1 + arch/arm/kvm/Makefile |2 +- arch/arm/kvm/arm.c |1 + arch/arm/kvm/mmio.c| 19 +++ arch/arm64/kvm/Kconfig |1 + 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/

Re: [PATCH] ARM/ARM64: support KVM_IOEVENTFD

2014-11-18 Thread Ming Lei
On Tue, Nov 18, 2014 at 11:24 PM, Ming Lei wrote: > From Documentation/virtual/kvm/api.txt, all ARCHs should support > ioeventfd. > > Also ARM VM has supported PCI bus already, and ARM64 will do too, > ioeventfd is required for some popular devices, like virtio-blk > and virtio

[PATCH v1] ARM/ARM64: support KVM_IOEVENTFD

2014-11-18 Thread Ming Lei
n't work in QEMU. This patch has been tested on both ARM and ARM64. Signed-off-by: Ming Lei --- v1: - make eventfd.o built in ARM64 arch/arm/kvm/Kconfig|1 + arch/arm/kvm/Makefile |2 +- arch/arm/kvm/arm.c |1 + arch/arm/kvm/mmio.c | 19 +

Re: [PATCH v1] ARM/ARM64: support KVM_IOEVENTFD

2014-11-22 Thread Ming Lei
Hi Eric, Thanks for your FYI. On Fri, Nov 21, 2014 at 8:58 PM, Eric Auger wrote: > Hi Ming, > > for your information there is a series written by Antonios (added in CC) > https://lists.cs.columbia.edu/pipermail/kvmarm/2014-March/008416.html > exactly on the same topic. > > The thread was reactiv

Re: [GIT PULL] KVM/ARM for 3.15

2014-03-04 Thread Ming Lei
ter applying the 5 patches, qemu can boot kernel successfully, otherwise kernel can't be booted from qemu. Thanks Marc. Thanks, -- Ming Lei -- 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.kernel.org/majordomo-info.html

Re: [GIT PULL] KVM/ARM for 3.15

2014-03-04 Thread Ming Lei
On Wed, Mar 5, 2014 at 1:23 PM, Ming Lei wrote: > On Tue, Mar 4, 2014 at 10:27 AM, Marc Zyngier >> >> Marc Zyngier (12): >> arm64: KVM: force cache clean on page fault when caches are off >> arm64: KVM: allows discrimination of AArch32 sysreg access >> arm

Re: [GIT PULL] KVM/ARM for 3.15

2014-03-05 Thread Ming Lei
On Wed, Mar 5, 2014 at 5:16 PM, Anup Patel wrote: > On Wed, Mar 5, 2014 at 10:55 AM, Ming Lei wrote: >> On Wed, Mar 5, 2014 at 1:23 PM, Ming Lei wrote: >>> On Tue, Mar 4, 2014 at 10:27 AM, Marc Zyngier >>>> >>>> Marc Zyngier (12): >>>> a

[PATCH] arm, kvm: fix double lock on cpu_add_remove_lock

2014-04-06 Thread Ming Lei
le lock on cpu_add_remove_lock. Considered that both two functions are only called inside kvm_arch_init() with holding cpu_add_remove_lock, so simply use __register_cpu_notifier() to fix the problem. Cc: Paolo Bonzini Cc: Christoffer Dall Cc: Srivatsa S. Bhat Cc: Rafael J. Wysocki Signed-off-by

[PATCH] ARM/ARM64: KVM: remove 'config KVM_ARM_MAX_VCPUS'

2015-09-01 Thread Ming Lei
~2000 when running kernel building load in VM from APM xgene KVM host, so the effect is very small, and the difference can't be observed in my test at all. Cc: Dann Frazier Cc: Christoffer Dall Cc: Marc Zyngier Cc: kvm...@lists.cs.columbia.edu Cc: kvm@vger.kernel.org Signed-off-by: Ming L

Re: [PATCH] ARM/ARM64: KVM: remove 'config KVM_ARM_MAX_VCPUS'

2015-09-02 Thread Ming Lei
On Wed, Sep 2, 2015 at 6:25 PM, Christoffer Dall wrote: > On Wed, Sep 02, 2015 at 02:31:21PM +0800, Ming Lei wrote: >> This patch removes config option of KVM_ARM_MAX_VCPUS, >> and like other ARCHs, just choose the maximum allowed >> value from hardware, and follows the r

Re: [PATCH] ARM/ARM64: KVM: remove 'config KVM_ARM_MAX_VCPUS'

2015-09-16 Thread Ming Lei
On Wed, Sep 2, 2015 at 7:42 PM, Ming Lei wrote: > On Wed, Sep 2, 2015 at 6:25 PM, Christoffer Dall > wrote: >> On Wed, Sep 02, 2015 at 02:31:21PM +0800, Ming Lei wrote: >>> This patch removes config option of KVM_ARM_MAX_VCPUS, >>> and like other ARCHs, just choose