From: Juergen Gross <jgross@suse.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [Xen-devel] [Patch V1 3/3] xen: add pvUSB backend
Date: Wed, 9 Sep 2015 13:22:18 +0200 [thread overview]
Message-ID: <55F0166A.8090303@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1509071630020.2672@kaball.uk.xensource.com>
On 09/07/2015 07:38 PM, Stefano Stabellini wrote:
> On Thu, 3 Sep 2015, Juergen Gross wrote:
>> Add a backend for para-virtualized USB devices for xen domains.
>>
>> The backend is using host-libusb to forward USB requests from a
>> domain via libusb to the real device(s) passed through.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Aside from a few minor comments below, this looks pretty good from a Xen
> perspective, however I am not too qualified to review the details of the
> pvusb protocol or the way the requests are handled internally in QEMU.
>
> I would be glad if Gerd could take a look at this too.
>
> Juergen, if we commit this, would you be happy to maintain it going
> forward?
Sure.
>> diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c
>> new file mode 100644
>> index 0000000..2570bd7
>> --- /dev/null
>> +++ b/hw/usb/xen-usb.c
...
>> +#define TR(fmt, args...) \
>> + { \
>> + struct timeval tv; \
>> + \
>> + gettimeofday(&tv, NULL); \
>> + fprintf(stderr, "%8ld.%06ld xen-usb(%s):" fmt, tv.tv_sec, \
>> + tv.tv_usec, __func__, ##args); \
>
> Please use xen_be_printf. I am not sure I would go as far as using
> gettimeofday, but I can see it could be useful here.
Okay. I'll keep the time information as it has been proved to be really
valuable.
>> + }
>> +#define TR_REQ(fmt, args...) { if (tr_debug & 1) TR(fmt, ##args) }
>> +#define TR_BUS(fmt, args...) { if (tr_debug & 2) TR(fmt, ##args) }
>
> I would drop these and just use the loglevels of xen_be_printf.
Hmm, something like:
TR -> level 1
TR_BUS -> level 2
TR_REQ -> level 3
Is it possible to control trace levels per device? If not, trying to
catch an error requiring to trace on request level might be hard as
concurrent qdisk trace entries could affect timing severely.
...
>> +static void xen_bus_child_detach(USBPort *port, USBDevice *child)
>> +{
>> + TR_BUS("called\n");
>> +}
>> +
>> +static void xen_bus_complete(USBPort *port, USBPacket *packet)
>> +{
>> + TR_REQ("called\n");
>
> Could you please either remove these debug messages or make them more
> informative.
Which information are you missing? As long as the TR_* macros aren't
changed they'll trace the function as well. In the context of other
traces written they have been completely valuable.
Juergen
next prev parent reply other threads:[~2015-09-09 11:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 10:45 [Qemu-devel] [Patch V1 0/3] usb, xen: add pvUSB backend Juergen Gross
2015-09-03 10:45 ` [Qemu-devel] [Patch V1 1/3] xen: introduce dummy system device Juergen Gross
2015-09-07 15:29 ` Stefano Stabellini
2015-09-09 11:01 ` [Qemu-devel] [Xen-devel] " Juergen Gross
2015-09-03 10:45 ` [Qemu-devel] [Patch V1 2/3] xen/usb: add capability for passing through isoc jobs to host devices Juergen Gross
2015-09-04 13:25 ` Gerd Hoffmann
2015-09-09 11:37 ` Juergen Gross
2015-09-09 12:01 ` Gerd Hoffmann
2015-09-09 13:10 ` Juergen Gross
2015-09-09 14:43 ` Gerd Hoffmann
2015-09-15 19:17 ` [Qemu-devel] [Xen-devel] " Konrad Rzeszutek Wilk
2015-09-03 10:45 ` [Qemu-devel] [Patch V1 3/3] xen: add pvUSB backend Juergen Gross
2015-09-07 17:38 ` Stefano Stabellini
2015-09-09 11:22 ` Juergen Gross [this message]
2015-09-09 13:13 ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2015-10-27 18:54 ` Konrad Rzeszutek Wilk
2016-03-07 12:43 ` Juergen Gross
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=55F0166A.8090303@suse.com \
--to=jgross@suse.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).