Re: RFC [v2]: vfio / device assignment -- layout of device fd files

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

 



On 09/19/2011 04:07 PM, Alex Williamson wrote:
> On Mon, 2011-09-19 at 14:37 -0500, Scott Wood wrote:
>>> A DTPATH as a record, an INTERRUPT as a sub-record, etc.
>>
>> Same as any other unrecognized (sub)record type, you ignore it -- but
>> the kernel should not be generating this.
> 
> I'm trying to express that I think the spec is unclear here.  It's easy
> to hand wave that the code will do the right thing, but if the next
> person comes along and doesn't understand that a DTPATH is only a
> sub-type and a DTINDEX needs to be paired with a DTPATH, then we've
> failed.

Sure, the spec needs to be clear about which types are expected in each
context.

>> I'd prefer to keep one numberspace, with documented restrictions on what
>> types/subtypes are allowed in each context.  Makes it easier if we end
>> up in a situation where a (sub)record type is applicable to multiple
>> contexts, and easier to detect when an error has been made.
> 
> Couldn't we accomplish the same with separate type and subtype number
> spaces?
> 
> enum types {
> 	REGION,
> 	INTERRUPT,
> };
> 
> enum subtypes {
> 	DTPATH,
> 	DTINDEX,
> 	PHYS_ADDR,
> 	PCI_CONFIG_SPACE,
> 	PCI_BAR_INDEX,
> };
> 
> I just find it confusing that we intermix them when defining them.
> Thanks,

As long as we don't have separate numberspaces for PCI/DT/future-stuff,
I'm reasonably happy.

-Scott

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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