All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 1 of 2] libxl: Allow multiple USB devices on HVM domain creation
Date: Thu, 29 Nov 2012 12:01:32 +0000	[thread overview]
Message-ID: <50B74E9C.3050805@eu.citrix.com> (raw)
In-Reply-To: <1354187797.25834.148.camel@zakaz.uk.xensource.com>

On 29/11/12 11:16, Ian Campbell wrote:
> On Wed, 2012-11-28 at 12:16 +0000, George Dunlap wrote:
>> # HG changeset patch
>> # User George Dunlap <george.dunlap@eu.citrix.com>
>> # Date 1354101445 0
>> # Node ID 538d9ffbd71b41e8cf6d7da0ded9e0a0b07f3c0d
>> # Parent  ae6fb202b233af815466055d9f1a635802a50855
>> libxl: Allow multiple USB devices on HVM domain creation
>>
>> This patch allows an HVM domain to be created with multiple USB
>> devices.
>>
>> Since the previous interface only allowed the passing of a single
>> device, this requires us to add a new element to the hvm struct of
>> libxl_domain_build_info -- usbdevice_list.  For API compatibility, the
>> old element, usbdevice, remains.
>>
>> If b_info->hvm.usbdevice is non-NULL, then it will be used exclusively;
>> otherwise, libxl will check for b_info->hvm.usbdevice_list instead.
> Is this the right way round? If the caller knows about usbdevice_list
> enough to have set it to something then surely that's the one it wanted?

  Well, I had considered returning an error if both were set. :-)  I 
suppose actually that's probably the way that is likely to flag up bugs 
in the toolstack the best -- only doing one or the other will cause 
weird buggy behavior that will be hard to track down.  Does that sound 
good to you?

>> Each device listed will cause an extra "-usbdevice [foo]" to be appended
>> to the qemu command line.
>>
>> In order to allow users of libxl to write software compatible with older
>> versions of libxl, also define LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST.  If
>> this is present, the caller should use b_info->hvm.usbdevice_list; otherwise
>> they should use b_info->hvm.usbdevice.
> Actually it's a both stricter and looser than that, if
> LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST is defined then the caller can
> choose to use usbdevice_list but can also use usbdevice if they wish
> (but not both). If it is not present then they must not use
> usbdevice_list at all.

Hmm, I think I wrote this first and then changed it and forgot to update 
it.  :-)  I also forgot that in this kind of "API spec" document, 
"should" and "must" are technical terms with very specific definitions.  
I'll revise it when I re-spin.

>
> I wonder if this LIBXL_HAVE should also be contained in a #ifdef
> LIBXL_API_VERSION >= 0x040300?

What would be the purpose of that?

  -George

  reply	other threads:[~2012-11-29 12:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <patchbomb.1354104964@elijah>
2012-11-28 12:16 ` [PATCH 1 of 2] libxl: Allow multiple USB devices on HVM domain creation George Dunlap
2012-11-29 11:16   ` Ian Campbell
2012-11-29 12:01     ` George Dunlap [this message]
2012-11-29 12:12       ` Ian Campbell
2012-11-28 12:16 ` [PATCH 2 of 2] xl: Accept a list for usbdevice in config file George Dunlap
2012-11-28 15:11   ` Pasi Kärkkäinen
2012-11-28 16:52     ` George Dunlap
2012-11-29 11:06       ` Ian Campbell
2012-11-29 11:44         ` George Dunlap
2012-11-29 12:20           ` George Dunlap
2012-11-29 12:25             ` Ian Campbell
2012-11-29 12:27               ` George Dunlap
2012-11-29 15:03               ` Pasi Kärkkäinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50B74E9C.3050805@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.