[Top][All Lists]

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

Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device

From: Scott Wood
Subject: Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device fd files
Date: Mon, 19 Sep 2011 16:15:42 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

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

>> 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_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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]