lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1aebeab4-6de1-1776-065f-01fb4bafcd79@intel.com>
Date:   Wed, 5 Aug 2020 16:12:42 +0800
From:   "Zhu, Lingshan" <lingshan.zhu@...el.com>
To:     Jason Wang <jasowang@...hat.com>, alex.williamson@...hat.com,
        mst@...hat.com, pbonzini@...hat.com,
        sean.j.christopherson@...el.com, wanpengli@...cent.com
Cc:     virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        kvm@...r.kernel.org, eli@...lanox.com, shahafs@...lanox.com,
        parav@...lanox.com
Subject: Re: [PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa


On 8/5/2020 4:06 PM, Jason Wang wrote:
>
> On 2020/7/31 下午2:55, Zhu Lingshan wrote:
>> +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, u16 qid)
>> +{
>> +    struct vhost_virtqueue *vq = &v->vqs[qid];
>> +    const struct vdpa_config_ops *ops = v->vdpa->config;
>> +    struct vdpa_device *vdpa = v->vdpa;
>> +    int ret, irq;
>> +
>> +    spin_lock(&vq->call_ctx.ctx_lock);
>> +    irq = ops->get_vq_irq(vdpa, qid);
>
>
> Btw, this assumes that get_vq_irq is mandatory. This looks wrong since 
> there's no guarantee that the vDPA device driver can see irq. And this 
> break vdpa simulator.
>
> Let's add a check and make it optional by document this assumption in 
> the vdpa.h.
fix soon. Thanks!
>
> Thanks
>
>
>> +    if (!vq->call_ctx.ctx || irq < 0) {
>> +        spin_unlock(&vq->call_ctx.ctx_lock);
>> +        return;
>> +    }
>> +
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ