On Jul 26 15:55, Jinhao Fan wrote:
> at 3:41 PM, Klaus Jensen <i...@irrelevant.dk> wrote:
> 
> > On Jul 26 15:35, Jinhao Fan wrote:
> >> at 4:55 AM, Klaus Jensen <i...@irrelevant.dk> wrote:
> >> 
> >>> We have a regression following this patch that we need to address.
> >>> 
> >>> With this patch, issuing a reset on the device (`nvme reset /dev/nvme0`
> >>> will do the trick) causes QEMU to hog my host cpu at 100%.
> >>> 
> >>> I'm still not sure what causes this. The trace output is a bit
> >>> inconclusive still.
> >>> 
> >>> I'll keep looking into it.
> >> 
> >> I cannot reproduce this bug. I just start the VM and used `nvme reset
> >> /dev/nvme0`. Did you do anything before the reset?
> > 
> > Interesting and thanks for checking! Looks like a kernel issue then!
> > 
> > I remember that I'm using a dev branch (nvme-v5.20) of the kernel and
> > reverting to a stock OS kernel did not produce the bug.
> 
> I’m using 5.19-rc4 which I pulled from linux-next on Jul 1. It works ok on
> my machine.

Interesting. I can reproduce on 5.19-rc4 from torvalds tree. Can you
drop your qemu command line here?

This is mine.

/home/kbj/work/src/qemu/build/x86_64-softmmu/qemu-system-x86_64 \
  -nodefaults \
  -display "none" \
  -machine "q35,accel=kvm,kernel-irqchip=split" \
  -cpu "host" \
  -smp "4" \
  -m "8G" \
  -device "intel-iommu" \
  -netdev "user,id=net0,hostfwd=tcp::2222-:22" \
  -device "virtio-net-pci,netdev=net0" \
  -device "virtio-rng-pci" \
  -drive 
"id=boot,file=/home/kbj/work/vol/machines/img/nvme.qcow2,format=qcow2,if=virtio,discard=unmap,media=disk,read-only=no"
 \
  -device "pcie-root-port,id=pcie_root_port1,chassis=1,slot=0" \
  -device "nvme,id=nvme0,serial=deadbeef,bus=pcie_root_port1,mdts=7" \
  -drive "id=null,if=none,file=null-co://,file.read-zeroes=on,format=raw" \
  -device 
"nvme-ns,id=nvm-1,drive=nvm-1,bus=nvme0,nsid=1,drive=null,logical_block_size=4096,physical_block_size=4096"
 \
  -pidfile "/home/kbj/work/vol/machines/run/null/pidfile" \
  -kernel "/home/kbj/work/src/kernel/linux/arch/x86_64/boot/bzImage" \
  -append "root=/dev/vda1 console=ttyS0,115200 audit=0 intel_iommu=on" \
  -virtfs 
"local,path=/home/kbj/work/src/kernel/linux,security_model=none,readonly=on,mount_tag=kernel_dir"
 \
  -serial "mon:stdio" \
  -d "guest_errors" \
  -D "/home/kbj/work/vol/machines/log/null/qemu.log" \
  -trace "pci_nvme*"

Attachment: signature.asc
Description: PGP signature

Reply via email to