Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-20 Thread Gerd Hoffmann
Hi, > As for Xen, It's too later. After suspend vm, the qemu process can response > the event > of usb tablet event. Because guest os's vcpus are paused, guest os cannot > response > interrupt injected by qemu. Then the interrupt will be lost. When the guest can't handle the interrupt (due t

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-15 Thread Gonglei (Arei)
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Thursday, May 15, 2014 2:50 PM > To: Gonglei (Arei) > Cc: Paolo Bonzini; qemu-devel@nongnu.org; Huangweidong (C); Michael S. > Tsirkin > Subject: Re: usb: usb tablet freeze when save/restore guest os > > Hi, >

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-14 Thread Gerd Hoffmann
Hi, > Well then, may I post a formal patch for this issue, Gerd? Thanks. I'd like to know what the root cause for the lost interrupt is. Not implementing PIRQ enable could be it, especially as the guest os seems to use it (otherwise your patch would have no effect). The check for the PIRQ ena

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-14 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Wednesday, May 14, 2014 6:26 PM > To: Gonglei (Arei); Gerd Hoffmann > Cc: qemu-devel@nongnu.org; Huangweidong (C); Michael S. Tsirkin > Subject: Re: usb: usb tablet freeze when save/restore guest os > > Il

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-14 Thread Paolo Bonzini
Il 14/05/2014 03:47, Gonglei (Arei) ha scritto: > There was a kernel bug recently causing lost interrupts on migration, > maybe this is the same (rh bug 1036478)? Paolo? Is the fix upstream? > Which kernel has it? It is in 3.15, but it only affects edge-triggered interrupts, so not UHCI. Pao

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-13 Thread Gonglei (Arei)
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Tuesday, May 13, 2014 9:27 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Huangweidong (C); Michael S. Tsirkin > Subject: Re: usb: usb tablet freeze when save/restore guest os > > Hi, > > > In the situat

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-13 Thread Gerd Hoffmann
Hi, > In the situation of save/restore guest os, when the guest os is saving > memory iteratively, meanwhile the usb tablet work normally (by vnc). When qemu > has set the UHCI_PORT_RD bit to 1, and post a interrupt to guest os, but > guest os has hibernated this moment, so the interrupt cannot

Re: [Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-13 Thread Gonglei (Arei)
Signed-off-by: Gonglei --- hw/usb/hcd-uhci.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 0820244..fe0ad81 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -680,6 +680,12 @@ static void uhci_wakeup(USBPort *port1) { UHC

[Qemu-devel] usb: usb tablet freeze when save/restore guest os

2014-05-13 Thread Gonglei (Arei)
Hi, For recent Linux guests, the usb tablet will be suspended when it is idle. When Qemu detect the usb tablet event, will call uhci_wakeup(), which according the value of port->ctrl to decide to call uhci_resume() or not. UHCI_PORT_RD bit is set to 1 for UHCI is resuming, and qemu will not call