[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: David Gibson
Subject: Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device fd files
Date: Fri, 30 Sep 2011 18:55:06 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 28, 2011 at 10:58:26AM +0200, Alexander Graf wrote:
> On 28.09.2011, at 04:40, Alex Williamson wrote:
> > On Tue, 2011-09-27 at 16:28 -0500, Scott Wood wrote:
> I'm honestly pretty indifferent on ioctl vs. linear read. I got the
> impression that people dislike ioctls for whatever reason, so we
> went ahead and did the design based on read(). With KVM, ioctls are
> a constant pain to extend, but so are the constant sized fields
> here.
> Whatever you do, please introduce a "flags" field to every struct
> you use and add some padding at the end, so it can possibly be
> extended.

Yes, those are good ideas.  Plus whenever creating an ioctl() that has
a structure "return value", it's a good idea for the size of the
structure to be specified as an input.  Again this allows later
extension.  Older userspace which only knows the old structure won't
get the new fields, but presumably it wouldn't know or care what to do
with them anyway.

David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!

reply via email to

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