Re: [PATCH 22/33] vfio: selftests: Add driver for Intel DSA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Matlack <dmatlack@xxxxxxxxxx> writes:

> On Mon, Aug 18, 2025 at 4:41 PM Vinicius Costa Gomes
> <vinicius.gomes@xxxxxxxxx> wrote:
>> David Matlack <dmatlack@xxxxxxxxxx> writes:
>> > +
>> > +static int dsa_probe(struct vfio_pci_device *device)
>> > +{
>> > +     if (!vfio_pci_device_match(device, PCI_VENDOR_ID_INTEL,
>> > +                                PCI_DEVICE_ID_INTEL_DSA_SPR0))
>>
>> What are you thinking about adding support for multiple device ids?
>
> I haven't given it much thought yet. But we could definitely support
> fancier device matching (e.g. multiple acceptable device ids) if/when
> a use-case for that arises.
>

Fair enough. I just wanted to bring this up (hoping that's more a matter
of "when" than "if" :-))

>> > +static int dsa_completion_wait(struct vfio_pci_device *device,
>> > +                            struct dsa_completion_record *completion)
>> > +{
>> > +     u8 status;
>> > +
>> > +     for (;;) {
>> > +             dsa_check_sw_err(device);
>> > +
>> > +             status = READ_ONCE(completion->status);
>> > +             if (status)
>> > +                     break;
>> > +
>> > +             usleep(1000);
>>
>> Another minor/thing to think about: using umonitor/umwait.
>
> Thanks for the tip, I hadn't considered that. But I think for this
> driver, keeping things as simple as possible is best. This code is
> only used for testing so I don't think we care enough about efficiency
> to justify using unmonitor/umwait here.

Yeah, agreed.


Cheers,
-- 
Vinicius





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux