qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Farhan Ali <alifm@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, stefanha@redhat.com, fam@euphon.net,
	alifm@linux.ibm.com
Subject: QEMU Userspace NVMe driver and multiple iothreads
Date: Thu, 20 Mar 2025 11:13:04 -0700	[thread overview]
Message-ID: <0fe1ff1e-2388-453e-9fd9-b550b6be0c41@linux.ibm.com> (raw)

Hi,

I have been experimenting with the QEMU Userspace NVMe driver on s390x 
architecture. I have noticed an issue when assigning multiple virtqueues 
and multiple iothreads to the block device. The driver works well with a 
single iothread, but when using more than one iothread we can hit a 
problem where 2 iothreads can update the completion queue head doorbell 
register with the same value within microseconds of each other. As far 
as I understand this would be an invalid doorbell write as per NVMe spec 
(for eg spec version 1.4 section 5.2.1 defines this as an invalid 
write). This causes the NVMe device not to post any further completions. 
As far i understand this doesn't seem to be specific to s390x architecture.

I would appreciate some guidance on this to see if there is some known 
limitations with the userspace NVMe driver and multi queue/multi 
iothread? This is an example xml snippet i used to define the nvme block 
device

...

<disk type='nvme' device='disk'>
       <driver name='qemu' type='raw' queues='8' packed='on'>
             <iothreads>
                   <iothread id='1'/>
             </iothreads>
       </driver>
       <source type='pci' managed='yes' namespace='1'>
             <address domain='0x0004' bus='0x00' slot='0x00' 
function='0x0'/>
       </source>
       <target dev='vde' bus='virtio'/>
       <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>

</disk>
....

Appreciate any help on this!

Thanks
Farhan



             reply	other threads:[~2025-03-20 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 18:13 Farhan Ali [this message]
2025-03-20 19:17 ` QEMU Userspace NVMe driver and multiple iothreads Stefan Hajnoczi
2025-03-21 16:49   ` Farhan Ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fe1ff1e-2388-453e-9fd9-b550b6be0c41@linux.ibm.com \
    --to=alifm@linux.ibm.com \
    --cc=fam@euphon.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).