[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_st
From: |
Longpeng (Mike) |
Subject: |
Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start |
Date: |
Thu, 16 Nov 2017 17:32:11 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
Hi Jason,
On 2017/11/16 17:13, Jason Wang wrote:
>
>
> On 2017年11月16日 17:01, Gonglei (Arei) wrote:
>> No, Windows guest + vhost-user/DPDK.
>>
>> BTW pls see virtio spec in :
>>
>> "If VIRTIO_NET_F_MQ is negotiated, each of receiveq1. . .receiveqN that will
>> be used SHOULD be populated
>> with receive buffers."
>>
>> It is not mandatory that all queues must be initialized.
>
> I think not, since it said we should fill receive buffers for each queue which
> means we should initialize all queues. May Michael can clarify on this.
>
I think this doesn't matter, but QEMU should consider this scenario...
For example, if one queues isn't initialized (Windows guest), the vring.avail=0,
so vq->desc_phys=0, then vq->desc='a avail HVA'(which is the start addr of
pc.ram).
vq->desc_size = s = l = virtio_queue_get_desc_size(vdev, idx);
vq->desc_phys = a = virtio_queue_get_desc_addr(vdev, idx);
vq->desc = vhost_memory_map(dev, a, &l, 0);
if (!vq->desc || l != s) {
r = -ENOMEM;
goto fail_alloc_desc;
}
.....
r = vhost_virtqueue_set_addr(dev, vq, vhost_vq_index, dev->log_enabled);
if (r < 0) {
r = -errno;
goto fail_alloc;
}
Then the HVA is send to the vhost-user.
I think this is wrong, because the '0' here means guest driver doesn't init this
queues, it should not be used to calculate the HVA for this vq.
> Thanks
>
>>
>> Thanks,
>> -Gonglei
>>
>
>
>
>
> .
>
--
Regards,
Longpeng(Mike)
- [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Longpeng(Mike), 2017/11/15
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/15
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Longpeng(Mike), 2017/11/15
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Gonglei (Arei), 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start,
Longpeng (Mike) <=
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Longpeng (Mike), 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Michael S. Tsirkin, 2017/11/16
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Longpeng (Mike), 2017/11/17
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Jason Wang, 2017/11/17
- Re: [Qemu-devel] [Question] why need to start all queues in vhost_net_start, Longpeng (Mike), 2017/11/16