RE: [PATCH 06/13] kvm/vfio: Accept vfio device file from userspace

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

 



> From: Eric Auger <eric.auger@xxxxxxxxxx>
> Sent: Thursday, January 19, 2023 5:35 PM
> Hi Yi,
> 
> On 1/17/23 14:49, Yi Liu wrote:
> > This defines KVM_DEV_VFIO_FILE* and make alias with
> KVM_DEV_VFIO_GROUP*.
> > Old userspace uses KVM_DEV_VFIO_GROUP* works as well.
> >
> > Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx>
> > ---
>
> > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> > index 55155e262646..ad36e144a41d 100644
> > --- a/include/uapi/linux/kvm.h
> > +++ b/include/uapi/linux/kvm.h
> > @@ -1396,15 +1396,26 @@ struct kvm_create_device {
> >
> >  struct kvm_device_attr {
> >  	__u32	flags;		/* no flags currently defined */
> > -	__u32	group;		/* device-defined */
> > -	__u64	attr;		/* group-defined */
> > +	union {
> > +		__u32	group;
> > +		__u32	file;
> > +	}; /* device-defined */
> > +	__u64	attr;		/* VFIO-file-defined or group-defined */
> I think there is a confusion here between the 'VFIO group' terminology
> and the 'kvm device group' terminology. Commands for kvm devices are
> gathered in groups and within groups you have sub-commands called
> attributes.

You are right 😊 will fix it in next version. So even the union is not
needed.

Regards,
Yi Liu





[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