Re: [Qemu-devel] [PATCH] egl-helpers: Support newer MESA versions

2017-03-13 Thread Hans de Goede
Hi, On 13-03-17 10:39, Frediano Ziglio wrote: Hi, On 20-02-17 10:50, Frediano Ziglio wrote: According to https://www.khronos.org/registry/EGL/extensions/MESA/EGL_MESA_platform_gbm.txt if MESA_platform_gbm is supported display should be initialized from a GBM handle using eglGetPlatformDispl

Re: [Qemu-devel] [PATCH] egl-helpers: Support newer MESA versions

2017-03-13 Thread Hans de Goede
Hi, On 20-02-17 10:50, Frediano Ziglio wrote: According to https://www.khronos.org/registry/EGL/extensions/MESA/EGL_MESA_platform_gbm.txt if MESA_platform_gbm is supported display should be initialized from a GBM handle using eglGetPlatformDisplayEXT. Signed-off-by: Frediano Ziglio --- This

Re: [Qemu-devel] [PATCH] egl-helpers: Support newer MESA versions

2017-03-13 Thread Hans de Goede
Hi, On 20-02-17 10:50, Frediano Ziglio wrote: According to https://www.khronos.org/registry/EGL/extensions/MESA/EGL_MESA_platform_gbm.txt if MESA_platform_gbm is supported display should be initialized from a GBM handle using eglGetPlatformDisplayEXT. Signed-off-by: Frediano Ziglio --- This sh

Re: [Qemu-devel] [PATCH] ehci: clear suspend bit on detach

2015-10-21 Thread Hans de Goede
specs mention setting suspend with enable being unset is undefined behavior. So clearing them both looks reasonable, and it actually fixes the reported bug. https://bugzilla.redhat.com/show_bug.cgi?id=1268879 Cc: Hans de Goede Signed-off-by: Gerd Hoffmann Thanks for fixing this. Patch looks good

Re: [Qemu-devel] Revert commit 5af35d7feccaa7d26b72c6c3d14116421d736b36 - "usb-host-libusb: Fix reset handling"

2015-02-10 Thread Hans de Goede
Hi, On 10-02-15 22:02, Dennis Ostermann wrote: Hello Hans, thanks for taking care. 09-02-15 09:09, Hans de Goede wrote: Hi, On 09-02-15 22:09, Dennis Ostermann wrote: Hi there, please revert commit 5af35d7feccaa7d26b72c6c3d14116421d736b36 - "usb-host-libusb: Fix reset handling&q

Re: [Qemu-devel] Revert commit 5af35d7feccaa7d26b72c6c3d14116421d736b36 - "usb-host-libusb: Fix reset handling"

2015-02-10 Thread Hans de Goede
Hi, On 09-02-15 22:09, Dennis Ostermann wrote: Hi there, please revert commit 5af35d7feccaa7d26b72c6c3d14116421d736b36 - "usb-host-libusb: Fix reset handling" This breaks usb pass through of FTDI based usb devices: On the host: lsusb | grep FT2232 Bus 003 Device 008: ID 0403:6010 Future Tec

Re: [Qemu-devel] [PATCH v2] xhci: add property to turn on/off streams support

2014-10-28 Thread Hans de Goede
off support for streams in the xhci host controller > will work better as the guest can figure beforehand that streams are > not going to work. > > Signed-off-by: Gerd Hoffmann Looks good: Reviewed-by: Hans de Goede Regards, Hans > --- > hw/usb/hcd-xhci.c | 15 +++

Re: [Qemu-devel] [PATCH] xhci: add property to turn on/off streams support

2014-10-22 Thread Hans de Goede
Hi, On 10/21/2014 03:16 PM, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Looks good: Acked-by: Hans de Goede Regards, Hans > --- > hw/usb/hcd-xhci.c | 15 --- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/hcd-xhci.c b

Re: [Qemu-devel] boot arm fedora via u-boot in qemu

2014-10-21 Thread Hans de Goede
Hi Gerd, On 10/21/2014 03:33 PM, Gerd Hoffmann wrote: > Hi, > > Played around with u-boot a bit, trying to get it work in qemu, so you > don't have to hop through loops copying the kernel+initrd from the disk > image to pass it to qemu on the command line. > > Guess why I'm asking here? No so

Re: [Qemu-devel] [PATCH] Revert "xhci: Fix number of streams allocated when using streams"

2014-08-29 Thread Hans de Goede
; static void xhci_alloc_streams(XHCIEPContext *epctx, dma_addr_t base) > { > assert(epctx->pstreams == NULL); > -epctx->nr_pstreams = 2 << (epctx->max_pstreams + 1); > +epctx->nr_pstreams = 2 << epctx->max_pstreams; > epctx->pstreams =

Re: [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation

2014-02-07 Thread Hans de Goede
Hi, Looks good, ack series. Regards, Hans On 02/06/2014 12:42 PM, Gerd Hoffmann wrote: Frameid specifies frames not microframes, so we need to shift it to get the microframe index. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support

2013-12-26 Thread Hans de Goede
Hi, On 12/26/2013 01:58 AM, Li Guang wrote: Peter Maydell wrote: On 26 December 2013 00:39, Li Guang wrote: Peter Maydell wrote: On 26 December 2013 00:14, Li Guang wrote: it's the approach sunxi-linux kernel config hardware, the binary is actually a transformed text script, and context o

[Qemu-devel] [PATCH 2/3] usb-host-libusb: Add alloc / free streams ops

2013-11-21 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 0dd60b2..894875b 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1280,6

[Qemu-devel] [PATCH 0/3] usb-host-libusb: streams support

2013-11-21 Thread Hans de Goede
Hi Gerd, Here is a new version of the 3 patches to add streams support to usb-host-libusb, with the error when building with an older libusbx fixed. Thanks & Regards, Hans

[Qemu-devel] [PATCH 1/3] usb-host-libusb: Fill in endpoint max_streams when available

2013-11-21 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index fd320cd..0dd60b2 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -720,6 +720,9 @@ static void

[Qemu-devel] [PATCH 3/3] usb-host-libusb: Set stream id when submitting bulk-stream transfers

2013-11-21 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 894875b..2277e1b 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1214,10 +1214,23

[Qemu-devel] [PATCH 8/9] usb-redir: Add support for bulk streams

2013-11-19 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 137 -- 1 file changed, 132 insertions(+), 5 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 287a505..4c6187b 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c

[Qemu-devel] [PATCH 9/9] uas: s/ui/iu/

2013-11-19 Thread Hans de Goede
The various uas data structures are called IU-s, which is short for Information Unit, rather then UI-s. Signed-off-by: Hans de Goede --- hw/usb/dev-uas.c | 76 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/hw/usb/dev

[Qemu-devel] [PATCH 6/9] usb-host-libusb: Add alloc / free streams ops

2013-11-19 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 0dd60b2..894875b 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1280,6

[Qemu-devel] [PATCH 7/9] usb-host-libusb: Set stream id when submitting bulk-stream transfers

2013-11-19 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 894875b..3376b96 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1214,10 +1214,22

[Qemu-devel] [PATCH 3/9] xhci: Call usb_device_alloc/free_streams

2013-11-19 Thread Hans de Goede
stick to the kernel API. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 117 ++ 1 file changed, 117 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index d84d510..9368348 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd

[Qemu-devel] [PATCH 5/9] usb-host-libusb: Fill in endpoint max_streams when available

2013-11-19 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index fd320cd..0dd60b2 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -720,6 +720,9 @@ static void

[Qemu-devel] [PATCH 4/9] xhci: Add a few missing checks for disconnected devices

2013-11-19 Thread Hans de Goede
to also check dev->attached, and add an extra check in a path where a device check was completely missing. This fixes various crashes (asserts triggering) I've been seeing when xhci attached usb devices get disconnected at the wrong time. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c

[Qemu-devel] [PATCH 0/9] usb: redirection streams support + small fixes

2013-11-19 Thread Hans de Goede
Hi Gerd, Here are my outstanding qemu usb patches. Most of them have been send before and are just rebases. As before these depend on kernel / libusb streams support, which will hopefully go upstream for 3.14 . New this time around are: [PATCH 4/9] xhci: Add a few missing checks for disconnected

[Qemu-devel] [PATCH 1/9] usb: Add max_streams attribute to endpoint info

2013-11-19 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/core.c| 22 ++ hw/usb/desc.c| 2 ++ include/hw/usb.h | 3 +++ 3 files changed, 27 insertions(+) diff --git a/hw/usb/core.c b/hw/usb/core.c index cf59a1a..67ba7d6 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -623,6 +623,7

[Qemu-devel] [PATCH 2/9] usb: Add usb_device_alloc/free_streams

2013-11-19 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/bus.c | 18 ++ include/hw/usb.h | 12 2 files changed, 30 insertions(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index ca329be..09848c6 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -203,6 +203,24 @@ void

Re: [Qemu-devel] [PATCH 1/7] usb: remove old usb-host code

2013-11-11 Thread Hans de Goede
Hi, On 11/11/2013 09:47 AM, Gerd Hoffmann wrote: On Fr, 2013-11-08 at 17:51 +0100, Jan Kiszka wrote: On 2013-11-08 16:39, Gerd Hoffmann wrote: Hi, OK, then here is the first issue I ran into while trying libusbx (git head, i.e. 1.0.17+: The new stack causes significant latency issues that

[Qemu-devel] [PATCH] uas: Fix response iu struct definition

2013-10-31 Thread Hans de Goede
s the responce code for an invalid iu, which confirms that the response code is being reported in byte 7 of the response iu rather then in byte 6. Signed-off-by: Hans de Goede --- hw/usb/dev-uas.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/usb/dev-uas

[Qemu-devel] [PATCH 5/5] uas: Bounds check tags when using streams

2013-10-24 Thread Hans de Goede
Disallow the guest to cause us to address the data3 and status3 arrays out of bounds. Signed-off-by: Hans de Goede --- hw/usb/dev-uas.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 70f41d3..5884035 100644 --- a/hw/usb/dev-uas.c

[Qemu-devel] [PATCH 4/5] uas: Streams are numbered 1-y, rather then 0-x

2013-10-24 Thread Hans de Goede
It is easier to simply make the arrays one larger, rather then substracting one everywhere. Signed-off-by: Hans de Goede --- hw/usb/dev-uas.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 12d79ef..70f41d3 100644 --- a/hw/usb

[Qemu-devel] [PATCH 2/5] uas: Only use report iu-s for task_mgmt status reporting

2013-10-24 Thread Hans de Goede
Regular scsi cmds should always report their status using a sense-iu, using the sense code to report any errors. Signed-off-by: Hans de Goede --- hw/usb/dev-uas.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev

[Qemu-devel] [PATCH 1/5] scsi: Add 2 new sense codes needed by uas

2013-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/scsi/scsi-bus.c | 10 ++ include/hw/scsi/scsi.h | 4 2 files changed, 14 insertions(+) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 24ec52f..2414696 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -1293,6 +1293,11

[Qemu-devel] [PATCH 3/5] uas: Fix / cleanup usb_uas_task error handling

2013-10-24 Thread Hans de Goede
ned-off-by: Hans de Goede --- hw/usb/dev-uas.c | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 36a75b2..12d79ef 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -746,17 +746,14 @@ static void usb_uas_t

[Qemu-devel] [PATCH 0/5] uas emulation fixes

2013-10-24 Thread Hans de Goede
Hi Gerd et al, Here is a bunch of uas fixes, they are hopefully self explanatory... Regards, Hans

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Hans de Goede
Hi, On 9 Oct 2013, at 20:42, Hans de Goede wrote: Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and older but there MIN_REARM_TIMER_NS limits the

Re: [Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-10 Thread Hans de Goede
Hi, On 10/10/2013 08:31 AM, Alex Bligh wrote: On 9 Oct 2013, at 20:42, Hans de Goede wrote: Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has clearly shown it self by trying to make a timer fire every nano second. Note we have a similar problem in 1.6, 1.5 and

[Qemu-devel] [PATCH 1/2] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up every *nano* second

2013-10-09 Thread Hans de Goede
/ second. This still causes a host cpu load of 50 % for simply playing audio, where as with this patch git master is at 13%, so we should backport this to 1.5 and 1.6 too. Note this will not apply to 1.5 and 1.6 as is. Cc: qemu-sta...@nongnu.org Signed-off-by: Hans de Goede --- audio/audio.c | 3

[Qemu-devel] [PATCH 2/2] audio: Lower default wakeup rate to 100 times / second

2013-10-09 Thread Hans de Goede
This is more then plenty to keep audio card fifos filles / emptied. This drops host cpu-load for audio playback inside a linux vm from 13% to 9%. Signed-off-by: Hans de Goede --- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 09:03 PM, Paolo Bonzini wrote: Il 09/10/2013 20:49, Hans de Goede ha scritto: I wonder whether it's meant to be 1 millisecond or 1 microsecond? Maybe once it was 1 ms, this code just exists to keep the buffers of a soundcard filled / emptied in time. 100 times / seco

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 08:36 PM, Alex Bligh wrote: On 9 Oct 2013, at 19:28, Alex Bligh wrote: static void audio_reset_timer (AudioState *s) { if (audio_is_timer_needed ()) { timer_mod (s->ts, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 1); } else { timer_del (s->ts); } } st

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 08:03 PM, Hans de Goede wrote: So I started looking for suspecious timers under audio/*.c and immediately found this in audio/audio.c : static void audio_reset_timer (AudioState *s) { if (audio_is_timer_needed ()) { timer_mod (s->ts, qemu_clock_get

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 04:37 PM, Paolo Bonzini wrote: Il 09/10/2013 14:58, Hans de Goede ha scritto: I still think we should add my patch in some form, since the lock starvation caused by timers set to expire in the past could still happen in other cases, esp for timer users who take a time stamp

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 03:18 PM, Alex Bligh wrote: qemu_mod_timer(timer->timer, qemu_get_clock_ms(rt_clock) + ms); qemu_mod_timer does not exist in master. This line is now: timer_mod(timer->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + ms); Ah yes my bad, I was accidentally looking a

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 06:26 PM, Paolo Bonzini wrote: Il 09/10/2013 18:19, Alex Bligh ha scritto: Do you also agree that the equivalent workaround, before Alex's patch, was MIN_REARM_TIMER_NS (and thus 250 microseconds)? I don't think this was the case, as if it's a timer constantly expiring we'd

Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 03:35 PM, Gerd Hoffmann wrote: Hi, Assuming we have a device with multiple configurations, each configuration has a different set of interfaces, guest switches from one config to another. Do we correctly unbind kernel / claim interfaces then? Yes we still have a usb_hos

Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier

2013-10-09 Thread Hans de Goede
Hi, On 10/09/2013 10:55 AM, Gerd Hoffmann wrote: On Di, 2013-10-08 at 21:58 +0200, Hans de Goede wrote: If we detach the kernel drivers on the first set_config, then they will be still attached when the device gets its initial reset. Causing the drivers to re-initialize the device after the

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-09 Thread Hans de Goede
Hi, On 10/08/2013 10:50 PM, Paolo Bonzini wrote: Il 08/10/2013 22:16, Hans de Goede ha scritto: No, it is calling main_loop_wait with nonblocking set to 0, so normally the lock would get released. But timerlistgroup_deadline_ns(&main_loop_tlg) is returning 0, causing timeout_ns to be 0,

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-08 Thread Hans de Goede
Hi, On 10/08/2013 09:48 PM, Alex Bligh wrote: On 8 Oct 2013, at 20:10, Hans de Goede wrote: I noticed today that current qemu master would hang as soon as Xorg starts in the guest when using qxl + a Linux guest. This message would be printed: main-loop: WARNING: I/O thread spun for 1000

[Qemu-devel] [PATCH 08/13] usb: Add max_streams attribute to endpoint info

2013-10-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/core.c| 22 ++ hw/usb/desc.c| 2 ++ include/hw/usb.h | 3 +++ 3 files changed, 27 insertions(+) diff --git a/hw/usb/core.c b/hw/usb/core.c index cf59a1a..67ba7d6 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -623,6 +623,7

[Qemu-devel] [PATCH 11/13] usb-host-libusb: Fill in endpoint max_streams when available

2013-10-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index fd320cd..0dd60b2 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -720,6 +720,9 @@ static void

[Qemu-devel] [PATCH 07/13] usb-hcd-xhci: Update endpoint context dequeue pointer for streams too

2013-10-08 Thread Hans de Goede
(and things won't work): xhci_hcd :00:05.0: Mismatch between completed Set TR Deq Ptr command & xHCI internal state. xhci_hcd :00:05.0: ep deq seg = 8800366f0880, deq ptr = 8800366ec010 Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 10 -- 1 file c

[Qemu-devel] [PATCH 00/13] usb: Add support for bulk streams to usb-host-libusb

2013-10-08 Thread Hans de Goede
Hi Gerd et al, After quite a bit of work I'm very happy to present this patch set which adds full support for using USB-3 devices which use bulkstreams with qemu's usb host redirection. This has been tested under a Linux guest, with an uas usb-3 device, and works well and stable. There is a bunc

[Qemu-devel] [PATCH 09/13] usb: Add usb_device_alloc/free_streams

2013-10-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/bus.c | 18 ++ include/hw/usb.h | 12 2 files changed, 30 insertions(+) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 72d5b92..bba554c 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -203,6 +203,24 @@ void

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-08 Thread Hans de Goede
Hi, On 10/08/2013 10:01 PM, Alex Bligh wrote: The purpose of the 1 ns timeout is to cause os_host_main_loop_wait to unlock the iothread, as $subject says the problem I'm seeing seems to be lock starvation not cpu starvation. Note as I already indicated I'm in no way an expert in this, if you

[Qemu-devel] [PATCH 01/13] usb-host-libusb: Fix reset handling

2013-10-08 Thread Hans de Goede
it is treated by the host as a new device and our handle is invalid, so on reset failure we need to call usb_host_nodev(). Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c

[Qemu-devel] [PATCH 13/13] usb-host-libusb: Set stream id when submitting bulk-stream transfers

2013-10-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 894875b..3376b96 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1214,10 +1214,22

[Qemu-devel] [PATCH 12/13] usb-host-libusb: Add alloc / free streams ops

2013-10-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 0dd60b2..894875b 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1280,6

[Qemu-devel] [PATCH 10/13] xhci: Call usb_device_alloc/free_streams

2013-10-08 Thread Hans de Goede
stick to the kernel API. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 117 ++ 1 file changed, 117 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index fa27299..c5889a9 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd

[Qemu-devel] [PATCH 06/13] usb-hcd-xhci: Report completion of active transfer with CC_STOPPED on ep stop

2013-10-08 Thread Hans de Goede
As we should per the XHCI spec "4.6.9 Stop Endpoint". Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 7cf89ce..0131151 100644 --- a/hw/usb/

[Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier

2013-10-08 Thread Hans de Goede
If we detach the kernel drivers on the first set_config, then they will be still attached when the device gets its initial reset. Causing the drivers to re-initialize the device after the reset, dirtying the device state. Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 7 +-- 1 file

[Qemu-devel] [PATCH 04/13] usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext

2013-10-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 469c24d..e078c50 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -374,7 +374,6 @@ struct XHCIStreamContext { dma_addr_t pctx

[Qemu-devel] [PATCH 02/13] usb-host-libusb: Configuration 0 may be a valid configuration

2013-10-08 Thread Hans de Goede
unconfigure the device. So don't compare the configuration value against 0 to check for unconfigured devices, instead check for a LIBUSB_ERROR_NOT_FOUND return from libusb_get_active_config_descriptor(). Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 9 - 1 file changed, 4 inser

[Qemu-devel] [PATCH 05/13] usb-hcd-xhci: Remove unused cancelled member from XHCITransfer

2013-10-08 Thread Hans de Goede
Since qemu's USB model is geared towards emulated devices cancellation is instanteneous, so no need to wait for cancellation to complete, as such there is no wait for cancellation code, and the cancelled bool as well as the bogus comment about it can be removed. Signed-off-by: Hans de

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-08 Thread Hans de Goede
Hi, On 10/08/2013 09:33 PM, Alex Bligh wrote: On 8 Oct 2013, at 20:21, Hans de Goede wrote: Wasn't it 1 ms until the offending commit (note 250 us does sound better to me). I believe you've made it 1 nanosecond not 1 millisecond; Correct, the 1 ms I referred to was before y

Re: [Qemu-devel] [PATCH 4/7] usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext

2013-10-08 Thread Hans de Goede
Hi, On 09/24/2013 11:37 AM, Gerd Hoffmann wrote: On Mo, 2013-09-23 at 20:54 +0200, Hans de Goede wrote: Signed-off-by: Hans de Goede Patch doesn't apply. Sorry, my bad, I had some other changes in my local tree which I was not yet ready to send and this depended on them. I'

Re: [Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-08 Thread Hans de Goede
Hi, On 10/08/2013 09:13 PM, Paolo Bonzini wrote: Il 08/10/2013 21:10, Hans de Goede ha scritto: @@ -480,6 +480,11 @@ int main_loop_wait(int nonblocking) timerlistgroup_deadline_ns( &main_loop

[Qemu-devel] [PATCH] main-loop: Don't lock starve io-threads when main_loop_tlg has pending events

2013-10-08 Thread Hans de Goede
d this was happening at the moment of the hang, so I wrote this patch which fixes the hang for me and seems like a good idea in general. Signed-off-by: Hans de Goede --- main-loop.c | 5 + 1 file changed, 5 insertions(+) diff --git a/main-loop.c b/main-loop.c index c3c9c28..921c939 100644 --- a/m

Re: [Qemu-devel] [Spice-devel] Current qemu-master hangs when used with qxl + linux guest

2013-10-08 Thread Hans de Goede
Hi, On 10/08/2013 04:30 PM, Daniel P. Berrange wrote: On Tue, Oct 08, 2013 at 04:27:38PM +0200, Hans de Goede wrote: Hi All, I'm having this weird problem with qemu master + spice/qxl using guests. As soon as the guest starts Xorg, I get the following message from qemu: main-loop: WARNI

[Qemu-devel] Current qemu-master hangs when used with qxl + linux guest

2013-10-08 Thread Hans de Goede
Hi All, I'm having this weird problem with qemu master + spice/qxl using guests. As soon as the guest starts Xorg, I get the following message from qemu: main-loop: WARNING: I/O thread spun for 1000 iterations And from then on the guest hangs and qemu consumes 100% cpu. The qemu console still w

[Qemu-devel] [PATCH 0/7] usb: host-libusb and xhci fixes

2013-09-23 Thread Hans de Goede
Hi Gerd, Here is a set of fixes for host-libusb and xhci, mostly the result of me working on adding support for streams to qemu's host redirection code (and libusb and usbfs in the kernel). I've this almost all working now. The 2 xhci fixes fixup error handling when the real uasp device I have er

[Qemu-devel] [PATCH 1/7] usb-host-libusb: Fix reset handling

2013-09-23 Thread Hans de Goede
it is treated by the host as a new device and our handle is invalid, so on reset failure we need to call usb_host_nodev(). Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c

[Qemu-devel] [PATCH 3/7] usb-host-libusb: Detach kernel drivers earlier

2013-09-23 Thread Hans de Goede
If we detach the kernel drivers on the first set_config, then they will be still attached when the device gets its initial reset. Causing the drivers to re-initialize the device after the reset, dirtying the device state. Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 7 +-- 1 file

[Qemu-devel] [PATCH 7/7] usb-hcd-xhci: Update endpoint context dequeue pointer for streams too

2013-09-23 Thread Hans de Goede
(and things won't work): xhci_hcd :00:05.0: Mismatch between completed Set TR Deq Ptr command & xHCI internal state. xhci_hcd :00:05.0: ep deq seg = 8800366f0880, deq ptr = 8800366ec010 Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 10 -- 1 file c

[Qemu-devel] [PATCH 5/7] usb-hcd-xhci: Remove unused cancelled member from XHCITransfer

2013-09-23 Thread Hans de Goede
Since qemu's USB model is geared towards emulated devices cancellation is instanteneous, so no need to wait for cancellation to complete, as such there is no wait for cancellation code, and the cancelled bool as well as the bogus comment about it can be removed. Signed-off-by: Hans de

[Qemu-devel] [PATCH 4/7] usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext

2013-09-23 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 286d272..b343235 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -374,7 +374,6 @@ struct XHCIStreamContext { dma_addr_t pctx

[Qemu-devel] [PATCH 2/7] usb-host-libusb: Configuration 0 may be a valid configuration

2013-09-23 Thread Hans de Goede
unconfigure the device. So don't compare the configuration value against 0 to check for unconfigured devices, instead check for a LIBUSB_ERROR_NOT_FOUND return from libusb_get_active_config_descriptor(). Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 9 - 1 file changed, 4 inser

[Qemu-devel] [PATCH 6/7] usb-hcd-xhci: Report completion of active transfer with CC_STOPPED on ep stop

2013-09-23 Thread Hans de Goede
As we should per the XHCI spec "4.6.9 Stop Endpoint". Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 9845554..4890344 100644 --- a/hw/usb/

[Qemu-devel] [PATCH 4/5] usb: Fix iovec memleak on combined-packet free

2013-09-17 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/combined-packet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c index 13f6602..ad77705 100644 --- a/hw/usb/combined-packet.c +++ b/hw/usb/combined-packet.c @@ -39,6 +39,7 @@ static void

[Qemu-devel] [PATCH 1/5] xhci: Init a transfers xhci, slotid and epid member on epctx alloc

2013-09-17 Thread Hans de Goede
each time a transfer gets submitted. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 6e73ced..120b038 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1229,6 +1229,9

[Qemu-devel] [PATCH 2/5] xhci: Add xhci_epid_to_usbep helper function

2013-09-17 Thread Hans de Goede
And use it instead of prying the USBEndpoint out of the packet struct in various places. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 120b038

[Qemu-devel] [PATCH 5/5] usb: Also reset max_packet_size on ep_reset

2013-09-17 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/core.c b/hw/usb/core.c index 31960c2..cf59a1a 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -622,6 +622,7 @@ void usb_ep_reset(USBDevice *dev) dev->ep_ctl.nr = 0;

[Qemu-devel] [PATCH 3/5] xhci: Fix memory leak on xhci_disable_ep

2013-09-17 Thread Hans de Goede
The USBPacket-s in the transfers need to be cleaned up so that the memory allocated by the iovec in there gets freed. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index c209228..18d2e13 100644

[Qemu-devel] [PATCH] xhci: Fix number of streams allocated when using streams

2013-09-16 Thread Hans de Goede
According to the xhci spec the total number of streams is 2 ^ (MaxPStreams + 1), and this is also how the Linux xhci driver uses this field. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd

Re: [Qemu-devel] [PATCH v2] ehci: save device pointer in EHCIState

2013-09-09 Thread Hans de Goede
Acked-by: Hans de Goede Regards, Hans Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 7 +++ hw/usb/hcd-ehci.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 137e200..22bdbf4 100644 --- a/hw/usb/hcd-ehci.c +

Re: [Qemu-devel] [PATCH] ehci: save device pointer in EHCIState

2013-09-09 Thread Hans de Goede
Hi, On 09/09/2013 10:20 AM, Gerd Hoffmann wrote: We'll need a pointer to the actual pci/sysbus device, stick a pointer to it into the EHCIState struct. https://bugzilla.redhat.com/show_bug.cgi?id=1005495 Looks like we've been working on exactly the same bug at the same time, but we've come up

[Qemu-devel] [PATCH] ehci: Fix crash with isoc usb packets

2013-09-09 Thread Hans de Goede
The isoc packet path in the ehci code has a bad qobject cast, causing an abort, this patch fixes this. Note this problem is backported in 1.6.0 too, and this patch should be backported to the 1.6.0 stable tree. Signed-off-by: Hans de Goede --- hw/usb/hcd-ehci.c | 3 ++- 1 file changed, 2

Re: [Qemu-devel] [PATCH 10/10] Revert "usb-hub: report status changes only once"

2013-08-28 Thread Hans de Goede
Hi, On 08/28/2013 02:43 PM, Gerd Hoffmann wrote: This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with

Re: [Qemu-devel] usb: a problem of using libusb for usb pass through

2013-07-30 Thread Hans de Goede
Hi, On 07/30/2013 07:13 PM, Hans de Goede wrote: Hi, On 07/22/2013 02:58 PM, Gerd Hoffmann wrote: On 07/16/13 10:45, Gonglei (Arei) wrote: Hi, Gerd My Qemu version is 1.5.1, and use libusb for usb pass through. I pass through a host usb device to the guest by bus number and physical

Re: [Qemu-devel] usb: a problem of using libusb for usb pass through

2013-07-30 Thread Hans de Goede
Hi, On 07/22/2013 02:58 PM, Gerd Hoffmann wrote: On 07/16/13 10:45, Gonglei (Arei) wrote: Hi, Gerd My Qemu version is 1.5.1, and use libusb for usb pass through. I pass through a host usb device to the guest by bus number and physical port, when I unplug the usb device from the

Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.

2013-07-11 Thread Hans de Goede
Hi, On 07/10/2013 03:37 PM, Geunhae Lee wrote: thank you for kind reply i personally tried to test QEMU on Windows with libusb feature (--enable-libusb) but, figured out qemu/hw/usb/host-libusb.c is linux-dependent . - because. it includes which is not compatible. Ah yes, that is true libu

Re: [Qemu-devel] [Qeustion] USB passthough doesn't work on Windows.

2013-07-10 Thread Hans de Goede
Hi, On 07/08/2013 05:08 PM, Geunhae Lee wrote: hi thanks for you kind answer, admit about lacking of infos haha.. here's my situations. 1. i currently use QEMU ver 1.2, but plan to upgrade to 1.5 soon. 2. in version 1.2, i found that USB passthrough is not supported on Windows/Mac. In ver

[Qemu-devel] [PATCH 0/1] spice: Add -spice disable-agent-file-transfer cmdline option (v3)

2013-06-08 Thread Hans de Goede
Hi All, And here is v3 of this patch, history: v2: Add documentation for the new cmdline option v3: Break a line which was longer then 80 chars Regards, Hans

[Qemu-devel] [PATCH] spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)

2013-06-08 Thread Hans de Goede
Signed-off-by: Hans de Goede --- qemu-options.hx | 7 +-- ui/spice-core.c | 13 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index bf94862..b62e542 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -917,8 +917,8 @@ DEF

[Qemu-devel] [PATCH] spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)

2013-06-06 Thread Hans de Goede
Signed-off-by: Hans de Goede --- qemu-options.hx | 7 +-- ui/spice-core.c | 12 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index bf94862..b62e542 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -917,8 +917,8 @@ DEF

[Qemu-devel] [PATCH 0/1] spice: Add -spice disable-agent-file-transfer cmdline option (v2)

2013-06-06 Thread Hans de Goede
Hi All, Now with documentation for the new option... Regards, Hans

Re: [Qemu-devel] kFreeBSD and USB support

2013-06-06 Thread Hans de Goede
Hi, On 06/06/2013 02:47 PM, Gerd Hoffmann wrote: Hi, This effectively disables host usb support for kFreeBSD. And since I guess the kernel headers are the same on regular FreeBSD, I think the same issue happens on regular FreeBSD too, that is, host usb does not work there as well. What is

[Qemu-devel] [PATCH] spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)

2013-06-06 Thread Hans de Goede
Signed-off-by: Hans de Goede --- ui/spice-core.c | 12 1 file changed, 12 insertions(+) diff --git a/ui/spice-core.c b/ui/spice-core.c index bcc4199..2faac93 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -446,6 +446,9 @@ static QemuOptsList qemu_spice_opts

[Qemu-devel] [PATCH 0/2] 2 compile / build fixes

2013-06-06 Thread Hans de Goede
Hi All, The joys of working with a cutting edge distro on my workstation ... Regards, Hans

[Qemu-devel] [PATCH 2/2] usb/host-libusb: Fix building with libusb git master code

2013-06-06 Thread Hans de Goede
The next libusb release will deprecate libusb_get_port_path, and since we compile with -Werror, this breaks the build. Signed-off-by: Hans de Goede --- hw/usb/host-libusb.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 3a582c5..0c12b0f

[Qemu-devel] [PATCH 1/2] device_tree: Fix build with latest libfdt

2013-06-06 Thread Hans de Goede
We override libfdt_env.h with our own copy, and the latest libfdt expects libfdt_env.h to define fdt##_t types. Signed-off-by: Hans de Goede --- include/libfdt_env.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 3667d4c..1cd8766

  1   2   3   4   5   6   7   8   >