Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED

2012-02-10 Thread Paolo Bonzini
On 02/09/2012 04:01 PM, Markus Armbruster wrote: Your GUEST_MEDIUM_EJECTED does*not* track my open<-> closed. I think it's more complex than a straight open<-> closed event. Evidence: your event documentation in qmp-events.txt needs an extra note to clarify when exactly the event is emitted.

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Paolo Bonzini
On 02/10/2012 01:26 AM, Paul Brook wrote: The reason we have this is because there are bits of code that rely on polling. IIRC slirp and the floppy DMA engine were the main culprits. qemu_calculate_timeout is an ugly hack to poll at least once a second, allowing the guest to make forward progres

[Qemu-devel] [Bug 824650] Re: Latest GIT assert error in arp_table.c

2012-02-10 Thread Bjoern Bornemann
slirp/ip_icmp.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 4b43994..5dbf21d 100644 --- a/slirp/ip_icmp.c +++ b/slirp/ip_icmp.c @@ -262,6 +262,11 @@ icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, #endif

Re: [Qemu-devel] How to follow a child process created in the guest OS?

2012-02-10 Thread Max Filippov
>  The question is not so related to QEMU itself, but I want to give it a try. > I am running a tiny OS on QEMU and debugging it with gdbstub. The tiny OS will > fork process 1, 2, ... and so on. I want to follow the child process, but the > GDB command `set follow-fork-mode child` doesn't work. Th

Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED

2012-02-10 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 09 Feb 2012 16:01:21 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > I've tried to implement a BLOCK_MEDIUM_EJECT event that, as we >> > discussed[1], >> > would be emitted by guest-initiated ejects and by the QMP/HMP eject and >> > cha

Re: [Qemu-devel] [Bug 899140] Re: Problem with Linux Kernel Traffic Control

2012-02-10 Thread Vincent Autefage
Hi, No I don't try, i will :) The probleme is not present with another NIC so I use another one for the moment. Vincent Le 09/02/2012 20:05, Henrique Rodrigues a écrit : > Vincent, > > Have you tried to change the mtu of the tbf qdisc? The traffic control should > work well if you set it to 6

Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED

2012-02-10 Thread Markus Armbruster
Paolo Bonzini writes: > On 02/09/2012 04:01 PM, Markus Armbruster wrote: >> Your GUEST_MEDIUM_EJECTED does*not* track my open<-> closed. I think >> it's more complex than a straight open<-> closed event. Evidence: your >> event documentation in qmp-events.txt needs an extra note to clarify >

Re: [Qemu-devel] How to follow a child process created in the guest OS?

2012-02-10 Thread Stefan Hajnoczi
On Thu, Feb 09, 2012 at 06:33:16PM +0800, 陳韋任 wrote: > The question is not so related to QEMU itself, but I want to give it a try. > I am running a tiny OS on QEMU and debugging it with gdbstub. The tiny OS will > fork process 1, 2, ... and so on. I want to follow the child process, but the > GDB

Re: [Qemu-devel] [PATCH] brk() debugging

2012-02-10 Thread Stefan Hajnoczi
On Thu, Feb 09, 2012 at 07:04:27PM +, Paul Brook wrote: > Fix format type mismatches in do_brk debug printfs. > > Signed-off-by: Paul Brook > --- > linux-user/syscall.c | 16 +--- > 1 files changed, 9 insertions(+), 7 deletions(-) Thanks, applied to the trivial patches tree: h

Re: [Qemu-devel] [Qemu-trivial] [TRIVIAL] sas_ss_flags bug for powerpc

2012-02-10 Thread Stefan Hajnoczi
On Thu, Feb 09, 2012 at 08:00:49PM +0100, Alex Barcelo wrote: > On Thu, Feb 9, 2012 at 19:43, Andreas Färber wrote: > > Am 09.02.2012 19:30, schrieb Alex Barcelo: > > The patch should describe what it touches > > (linux-user), what it does, what for and make clear why that is correct. > > Is there

[Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Zhi Yong Wu
HI, Today i tried to create one VM with the option "-m 4000", and found it failed with the following errors: Failed to allocate 4194304000 B: Cannot allocate memory Aborted (core dumped) I checked the qemu code, and found that in qemu_memalign() function, posix_memalign() failed to allocate requ

Re: [Qemu-devel] [PATCH 1/3] Add support for 128-bit arithmeticRe: [PATCH 1/3] Add support for 128-bit arithmetic

2012-02-10 Thread Jay Foad
On 30 Oct 2011, Avi Kivity wrote: > The memory API supports 64-bit buses (e.g. PCI). A size on such a bus cannot > be represented with a 64-bit data type, if both 0 and the entire address > space size are to be represented. Futhermore, any address arithemetic may > overflow and return unexpected

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Paul Brook
> On 02/10/2012 01:26 AM, Paul Brook wrote: > > The reason we have this is because there are bits of code that rely on > > polling. IIRC slirp and the floppy DMA engine were the main culprits. > > qemu_calculate_timeout is an ugly hack to poll at least once a second, > > allowing the guest to make

[Qemu-devel] [TRIVIAL v2] Bad zero comparison for sas_ss_flags on powerpc

2012-02-10 Thread Alex Barcelo
This is v2 of the patch "sas_ss_flags bug for powerpc", which had a horrible name and no description. All architectures work the same way, and all check for sas_ss_flags == 0. The powerpc lines are wrong, and do the check the other way round (it's a qemu internal check, which is done wrong only fo

Re: [Qemu-devel] [TRIVIAL v2] Bad zero comparison for sas_ss_flags on powerpc

2012-02-10 Thread Alex Barcelo
// Test source and desired /real output: #include #include #include #include void handler(int sig) { unsigned int a; // to prevent uninitialized stack, normally a = 0 if ( a>10 ) a = 0; a = a + 1; printf ("new value: %d\n" , a ); if (a > 7) _exit(a); return; } int main()

[Qemu-devel] [PATCH 2/4] vnc: fix ctrl key in vnc terminal emulation

2012-02-10 Thread Gerd Hoffmann
Make the control keys for terminals on the vnc display (i.e. qemu -vnc :0 -serial vc) work. Makes the terminals alot more usable as typing Ctrl-C in your serial console actually has the desired effect ;) Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 10 -- 1 files changed, 8 insertions(

[Qemu-devel] [PATCH 3/4] vnc: implement shared flag handling.

2012-02-10 Thread Gerd Hoffmann
VNC clients send a shared flag in the client init message. Up to now qemu completely ignores this. This patch implements shared flag handling. It comes with three policies: By default qemu behaves as one would expect: Asking for a exclusive access grants exclusive access to the client connecti

[Qemu-devel] [PULL] vnc patch collection

2012-02-10 Thread Gerd Hoffmann
Hi, Here comes my vnc patch collection again. Rebased to latest master. gained one more patch. All patches have been on the list before, the last patch just once, the other ones multiple times. Seems nobody wants tp pick them up, MAINTAINERS has no vnc entry too, so I'll try a straigt pull re

[Qemu-devel] [PATCH 4/4] vnc: lift modifier keys on client disconnect.

2012-02-10 Thread Gerd Hoffmann
For any modifier key (shift, ctrl, alt) still pressed on disconnect inject a key-up event into the guest. The vnc client is gone, it will not do that, so qemu has to do it instead. Without this keys will get stuck, making the guest act in weird ways after reconnecting. Reproducer: exit vnc clien

[Qemu-devel] [PATCH 1/4] Fix vnc memory corruption with width = 1400

2012-02-10 Thread Gerd Hoffmann
vnc assumes that the screen width is a multiple of 16 in several places. If this is not the case vnc will overrun buffers, corrupt memory, make qemu crash. This is the minimum fix for this bug. It makes sure we don't overrun the scanline, thereby fixing the segfault. The rendering is *not* correc

Re: [Qemu-devel] [PATCH v2 03/11] trace: [tracetool] Simplify event line parsing

2012-02-10 Thread Harsh Bora
Hi Lluis, Sorry for a late response as I was out of office for last 2 weeks because of some medical emergency at home. While trying to merge your changes with mine, I found something (see below): On 02/04/2012 02:41 AM, Lluís Vilanova wrote: Signed-off-by: Lluís Vilanova --- scripts/traceto

[Qemu-devel] QEMU applying for Google Summer of Code 2012

2012-02-10 Thread Stefan Hajnoczi
This year's Google Summer of Code has been announced: http://www.google-melange.com/gsoc/events/google/gsoc2012 For those who haven't heard of GSoC before, it funds university students to work on open source projects during the summer. Organizations, such as QEMU, can participate to attract stude

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Stefan Hajnoczi
On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu wrote: > Today i tried to create one VM with the option "-m 4000", and found it > failed with the following errors: > > Failed to allocate 4194304000 B: Cannot allocate memory > Aborted (core dumped) Did you run on a 32-bit host? > I checked the qemu

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Stefan Hajnoczi
On Fri, Feb 10, 2012 at 10:35 AM, Stefan Hajnoczi wrote: > On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu wrote: >> Today i tried to create one VM with the option "-m 4000", and found it >> failed with the following errors: >> >> Failed to allocate 4194304000 B: Cannot allocate memory >> Aborted (c

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Paolo Bonzini
On 02/10/2012 10:52 AM, Paul Brook wrote: > At least the floppy DMA engine is fine with it, it uses idle bottom > halves (which are a hack and could be replaced by timers, but that's not > relevant now). I thought idle bottom halves were one of the things that made this timout necessary. How

Re: [Qemu-devel] [libvirt] QEMU applying for Google Summer of Code 2012

2012-02-10 Thread Daniel P. Berrange
On Fri, Feb 10, 2012 at 10:30:24AM +, Stefan Hajnoczi wrote: > This year's Google Summer of Code has been announced: > > http://www.google-melange.com/gsoc/events/google/gsoc2012 > > For those who haven't heard of GSoC before, it funds university > students to work on open source projects dur

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Zhi Yong Wu
On Fri, Feb 10, 2012 at 6:35 PM, Stefan Hajnoczi wrote: > On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu wrote: >> Today i tried to create one VM with the option "-m 4000", and found it >> failed with the following errors: >> >> Failed to allocate 4194304000 B: Cannot allocate memory >> Aborted (co

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Paul Brook
> >> > At least the floppy DMA engine is fine with it, it uses idle bottom > >> > halves (which are a hack and could be replaced by timers, but that's > >> > not relevant now). > > > > I thought idle bottom halves were one of the things that made this timout > > necessary. How else are they go

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Stefan Hajnoczi
On Fri, Feb 10, 2012 at 11:00 AM, Zhi Yong Wu wrote: > On Fri, Feb 10, 2012 at 6:35 PM, Stefan Hajnoczi wrote: >> On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu wrote: >>> Today i tried to create one VM with the option "-m 4000", and found it >>> failed with the following errors: >>> >>> Failed to

Re: [Qemu-devel] [libvirt] QEMU applying for Google Summer of Code 2012

2012-02-10 Thread Stefan Hajnoczi
On Fri, Feb 10, 2012 at 10:59 AM, Daniel P. Berrange wrote: > On Fri, Feb 10, 2012 at 10:30:24AM +, Stefan Hajnoczi wrote: >> This year's Google Summer of Code has been announced: >> >> http://www.google-melange.com/gsoc/events/google/gsoc2012 >> >> For those who haven't heard of GSoC before,

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Stefano Stabellini
On Fri, 10 Feb 2012, Paul Brook wrote: > > >> > At least the floppy DMA engine is fine with it, it uses idle bottom > > >> > halves (which are a hack and could be replaced by timers, but that's > > >> > not relevant now). > > > > > > I thought idle bottom halves were one of the things that made

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Paolo Bonzini
On 02/10/2012 12:19 PM, Stefano Stabellini wrote: I think you are right and the right thing to do would be blocking indefinitely. However if slirp doesn't support it, we could have a timeout of 1000 if CONFIG_SLIRP, otherwise block indefinitely. You could add a similar hack to qemu_bh_update_ti

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Zhi Yong Wu
On Fri, Feb 10, 2012 at 7:10 PM, Stefan Hajnoczi wrote: > On Fri, Feb 10, 2012 at 11:00 AM, Zhi Yong Wu wrote: >> On Fri, Feb 10, 2012 at 6:35 PM, Stefan Hajnoczi wrote: >>> On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu wrote: Today i tried to create one VM with the option "-m 4000", and fo

Re: [Qemu-devel] [PATCH] spice: support ipv6 channel address in monitor events and in spice info

2012-02-10 Thread Gerd Hoffmann
On 02/08/12 14:40, Yonit Halperin wrote: > RHBZ #788444 Looks good. Well, the #ifdef mess isn't exactly pretty, but I have no idea how it could be done better. Ping me when the spice server patch is committed, I'll go queue this patch for qemu then. thanks, Gerd

[Qemu-devel] [PULL] slirp: cleanups & fixes

2012-02-10 Thread Jan Kiszka
The following changes since commit 57c83dacfe179bf061b8fa79d9553ebabe4d2ff4: make: Remove duplicate use of GLIB_CFLAGS (2012-02-09 20:44:38 +0400) are available in the git repository at: git://git.kiszka.org/qemu.git queues/slirp Jan Kiszka (1): slirp: Prevent sending ICMP error replie

Re: [Qemu-devel] [PATCH v2] Add SPICE support to add_client monitor command

2012-02-10 Thread Gerd Hoffmann
On 02/07/12 15:38, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > This is a followup to > > http://patchwork.ozlabs.org/patch/121004/ > > With the acceptance of some new APIs to libspice-server.so it > is possible to add support for SPICE to the 'add_client' > monitor command, bri

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Stefan Hajnoczi
On Fri, Feb 10, 2012 at 11:23 AM, Zhi Yong Wu wrote: > On Fri, Feb 10, 2012 at 7:10 PM, Stefan Hajnoczi wrote: >> On Fri, Feb 10, 2012 at 11:00 AM, Zhi Yong Wu wrote: >>> On Fri, Feb 10, 2012 at 6:35 PM, Stefan Hajnoczi wrote: On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu wrote: > Toda

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Jan Kiszka
On 2012-02-10 12:18, Paolo Bonzini wrote: > On 02/10/2012 12:19 PM, Stefano Stabellini wrote: >> I think you are right and the right thing to do would be blocking >> indefinitely. >> However if slirp doesn't support it, we could have a timeout of 1000 if >> CONFIG_SLIRP, otherwise block indefinitel

[Qemu-devel] [PATCH 1/9] linux-user: fail execve() if env/args too big

2012-02-10 Thread Stefan Hajnoczi
From: Ulrich Hecht If the host's page size is equal to or smaller than the target's, native execve() will fail appropriately with E2BIG if called with too big an environment for the target to handle. It may falsely succeed, however, if the host's page size is bigger, and feed the executed target

[Qemu-devel] [PATCH 6/9] fmopl: Fix typo in function name

2012-02-10 Thread Stefan Hajnoczi
From: Stefan Weil Fix a typo in a local function name. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/fmopl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/fmopl.c b/hw/fmopl.c index 734d2f4..f0a0234 100644 --- a/hw/fmopl.c +++ b/hw/fmopl.c @

[Qemu-devel] [PATCH 9/9] linux-user: brk() debugging

2012-02-10 Thread Stefan Hajnoczi
From: Paul Brook Fix format type mismatches in do_brk debug printfs. Signed-off-by: Paul Brook Signed-off-by: Stefan Hajnoczi --- linux-user/syscall.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e868

[Qemu-devel] [PATCH 4/9] ide: fix compilation errors when DEBUG_IDE is set

2012-02-10 Thread Stefan Hajnoczi
From: Hervé Poussineau Signed-off-by: Hervé Poussineau Signed-off-by: Stefan Hajnoczi --- hw/ide/pci.c |2 +- hw/ide/piix.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 246dd57..88c0942 100644 --- a/hw/ide/pci.c +++ b/hw/ide

[Qemu-devel] [PATCH 02/28] usb-ehci: Clear the portstatus powner bit on device disconnect

2012-02-10 Thread Gerd Hoffmann
From: Hans de Goede According to the EHCI spec port ownership should revert to the EHCI controller on device disconnect. This fixes the problem of a port getting stuck on USB 1 when using redirection and plugging in a USB 2 device after a USB 1 device has been redirected. Signed-off-by: Hans de

[Qemu-devel] [PATCH 15/28] usb: kill handle_packet callback

2012-02-10 Thread Gerd Hoffmann
All drivers except usb-hub use usb_generic_handle_packet. The only reason the usb hub has its own function is that it used to be called with packets which are intended for downstream devices. With the new, separate device lookup step this doesn't happen any more, so the need for a different handl

[Qemu-devel] [PATCH 26/28] xhci: kill port arg from xhci_setup_packet

2012-02-10 Thread Gerd Hoffmann
Unused argument, remove it. Signed-off-by: Gerd Hoffmann --- hw/usb-xhci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 7682126..65214af 100644 --- a/hw/usb-xhci.c +++ b/hw/usb-xhci.c @@ -1392,7 +1392,7 @@ static int xhci_hle_c

[Qemu-devel] [PATCH v3 00/11] tracetool: Improvements for future expansion

2012-02-10 Thread Lluís Vilanova
NOTE: Depend's on Harsh's port of tractool to python. A general overhaul of the pythonic tracetool script to allow simpler future extensions. Signed-off-by: Lluís Vilanova --- Changes in v3: * Fix arg counting in intermediate patch (so that git bisect will not blame me). Changes in v2: * Min

[Qemu-devel] [PATCH v3 01/11] [trivial] Fix a compiler warning

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 6874f66..f0d7e1e 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -183,7 +183,7 @@ def simple_c(events)

[Qemu-devel] [PATCH v3 05/11] trace: [tracetool] Add support for event properties

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 67a2f23..e35eb68 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -472,7 +472,9 @@ trace_gen = {

Re: [Qemu-devel] Memory: how to determine the max memory size of one VM?

2012-02-10 Thread Zhi Yong Wu
On Fri, Feb 10, 2012 at 7:31 PM, Stefan Hajnoczi wrote: > On Fri, Feb 10, 2012 at 11:23 AM, Zhi Yong Wu wrote: >> On Fri, Feb 10, 2012 at 7:10 PM, Stefan Hajnoczi wrote: >>> On Fri, Feb 10, 2012 at 11:00 AM, Zhi Yong Wu wrote: On Fri, Feb 10, 2012 at 6:35 PM, Stefan Hajnoczi wrote:

Re: [Qemu-devel] [PATCH v3 03/11] trace: [tracetool] Simplify event line parsing

2012-02-10 Thread Harsh Bora
On 02/10/2012 05:19 PM, Lluís Vilanova wrote: Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 51 +++--- 1 files changed, 19 insertions(+), 32 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 7042728..549a90e 10

[Qemu-devel] [PATCH v4 00/11] tracetool: Improvements for future expansion

2012-02-10 Thread Lluís Vilanova
NOTE: Depend's on Harsh's port of tractool to python. A general overhaul of the pythonic tracetool script to allow simpler future extensions. Signed-off-by: Lluís Vilanova --- Changes in v4: * Remove debugging message. Changes in v3: * Fix arg counting in intermediate patch (so that git bis

[Qemu-devel] [PATCH v4 01/11] [trivial] Fix a compiler warning

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 6874f66..f0d7e1e 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -183,7 +183,7 @@ def simple_c(events)

[Qemu-devel] [PATCH v4 10/11] trace: Provide a per-event status define for conditional compilation

2012-02-10 Thread Lluís Vilanova
NOTE: This is a port of a patch in Stefanha's tracing tree to the new pythonic tracetool version. Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in "trace.h". This lets the user conditionally compile code with a relatively high execution cost that is only necessar

Re: [Qemu-devel] [PATCH 05/15] scsi: pass residual amount to command_complete

2012-02-10 Thread Paolo Bonzini
On 02/10/2012 12:44 PM, Stefan Hajnoczi wrote: > +static void esp_command_complete(SCSIRequest *req, uint32_t status, > + int32_t resid) Is there a reason to use a signed type for resid? (I expected uint32_t to be safer and more natural.) It's a mess; req->cmd.

Re: [Qemu-devel] [PATCH v2 03/11] trace: [tracetool] Simplify event line parsing

2012-02-10 Thread Harsh Bora
On 02/10/2012 05:24 PM, Lluís Vilanova wrote: Harsh Bora writes: Hi Lluis, Sorry for a late response as I was out of office for last 2 weeks because of some medical emergency at home. Hope it turned out to be nothing serious. Yeh, situation is better now. While trying to merge your cha

[Qemu-devel] [PATCH v3 08/11] trace: [tracetool] Make format-specific code optional and with access to event information

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 35 ++- 1 files changed, 10 insertions(+), 25 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index cd1c29d..91e7620 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -3

[Qemu-devel] [PATCH 12/28] usb-ohci: switch to usb_find_device()

2012-02-10 Thread Gerd Hoffmann
Switch over OHCI to use the new usb_find_device() function for device lookup. Signed-off-by: Gerd Hoffmann --- hw/usb-ohci.c | 73 + 1 files changed, 37 insertions(+), 36 deletions(-) diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 70f0

[Qemu-devel] [PATCH 24/28] xhci: add trb type name lookup support.

2012-02-10 Thread Gerd Hoffmann
When logging TRBs add a the type name for more readable debug output. Signed-off-by: Gerd Hoffmann --- hw/usb-xhci.c | 64 +--- 1 files changed, 60 insertions(+), 4 deletions(-) diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 27bdc2b..5e618

[Qemu-devel] [PATCH 27/28] xhci: remote wakeup support

2012-02-10 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb-xhci.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 65214af..3026edb 100644 --- a/hw/usb-xhci.c +++ b/hw/usb-xhci.c @@ -2698,6 +2698,26 @@ static void xhci_detach(USBPort *

[Qemu-devel] [PATCH 04/28] usb: kill USB_MSG_{ATTACH,DETACH}

2012-02-10 Thread Gerd Hoffmann
The USB subsystem pipes internal attach/detach notifications through usb_handle_packet() with a special magic PID. This indirection is a pretty pointless excercise as it ends up being handled by usb_generic_handle_packet anyway. Remove it. Signed-off-by: Gerd Hoffmann --- hw/usb.c | 14 +++--

[Qemu-devel] [PATCH v3 03/11] trace: [tracetool] Simplify event line parsing

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 51 +++--- 1 files changed, 19 insertions(+), 32 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 7042728..549a90e 100755 --- a/scripts/tracetool.py +++ b/scripts/tra

[Qemu-devel] [PULL 0/9] Trivial patches for 28 January to 10 February 2012

2012-02-10 Thread Stefan Hajnoczi
The following changes since commit 57c83dacfe179bf061b8fa79d9553ebabe4d2ff4: make: Remove duplicate use of GLIB_CFLAGS (2012-02-09 20:44:38 +0400) are available in the git repository at: git://github.com/stefanha/qemu.git trivial-patches Benjamin MARSILI (1): net: remove extra spaces i

Re: [Qemu-devel] [PATCH 11/15] virtio-scsi: Add virtio-scsi stub device

2012-02-10 Thread Stefan Hajnoczi
On Mon, Jan 16, 2012 at 4:30 PM, Paolo Bonzini wrote: > +static void virtio_scsi_get_config(VirtIODevice *vdev, > +                                   uint8_t *config) > +{ > +    VirtIOSCSIConfig *scsiconf = (VirtIOSCSIConfig *)config; > +    VirtIOSCSI *s = (VirtIOSCSI *)vdev; > + > +    stl_raw(

[Qemu-devel] [PATCH 05/28] usb: kill USB_MSG_RESET

2012-02-10 Thread Gerd Hoffmann
The USB subsystem pipes internal reset notifications through usb_handle_packet() with a special magic PID. This indirection is a pretty pointless excercise as it ends up being handled by usb_generic_handle_packet anyway. Replace the USB_MSG_RESET with a usb_device_reset() function which can be ca

[Qemu-devel] [PATCH 12/11] suspend: add qmp events

2012-02-10 Thread Gerd Hoffmann
Send qmp events on suspend and wakeup so libvirt has a chance to track the vm state. Signed-off-by: Gerd Hoffmann --- monitor.c |6 ++ monitor.h |2 ++ vl.c | 15 +++ 3 files changed, 23 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index aadbdc

[Qemu-devel] [PATCH 19/28] usb: Set USBEndpoint in usb_packet_setup().

2012-02-10 Thread Gerd Hoffmann
With the separation of the device lookup (via usb_find_device) and packet processing we can lookup device and endpoint before setting up the usb packet. So we can initialize USBPacket->ep early and keep it valid for the whole lifecycle of the USBPacket. Also the devaddr and devep fields are not n

[Qemu-devel] [PULL 00/15] Block patches

2012-02-10 Thread Kevin Wolf
The following changes since commit 57c83dacfe179bf061b8fa79d9553ebabe4d2ff4: make: Remove duplicate use of GLIB_CFLAGS (2012-02-09 20:44:38 +0400) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Alexander Graf (2): AHCI: Fix port reset race AHC

[Qemu-devel] [PATCH v4 04/11] trace: [ŧracetool] Do not precompute the event number

2012-02-10 Thread Lluís Vilanova
This would otherwise break event numbering when actually using the "disable" property. Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 21 + 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index b0c1904..0

[Qemu-devel] [PATCH 01/15] cutils: extract buffer_is_zero() from qemu-img.c

2012-02-10 Thread Kevin Wolf
From: Stefan Hajnoczi The qemu-img.c:is_not_zero() function checks if a buffer contains all zeroes. This function will come in handy for zero-detection in the block layer, so clean it up and move it to cutils.c. Note that the function now returns true if the buffer is all zeroes. This avoids th

[Qemu-devel] [PATCH 11/28] usb-ehci: switch to usb_find_device()

2012-02-10 Thread Gerd Hoffmann
Switch over EHCI to use the new usb_find_device() function for device lookup. Signed-off-by: Gerd Hoffmann --- hw/usb-ehci.c | 69 - 1 files changed, 29 insertions(+), 40 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 4872

[Qemu-devel] [PATCH 15/15] AHCI: Masking of IRQs actually masks them

2012-02-10 Thread Kevin Wolf
From: Alexander Graf When masking IRQ lines, we should actually mask them out and not declare them active anymore. Once we mask them in again, they are allowed to trigger again. Signed-off-by: Alexander Graf Signed-off-by: Kevin Wolf --- hw/ide/ahci.c |2 ++ 1 files changed, 2 insertions(

Re: [Qemu-devel] [PATCH 11/15] virtio-scsi: Add virtio-scsi stub device

2012-02-10 Thread Paolo Bonzini
On 02/10/2012 01:41 PM, Stefan Hajnoczi wrote: At this early stage we still have the option of designing the device to be little- or big-endian. I'm in favour of a fixed endianness even though existing virtio devices tend to use guest-endian. What do you think? Interesting idea, but I'd say n

[Qemu-devel] [PATCH 09/28] usb: handle dev == NULL in usb_handle_packet()

2012-02-10 Thread Gerd Hoffmann
Allow passing in a NULL pointer, return USB_RET_NODEV in that case. Removes the burden to to a NULL pointer check from the callers. Signed-off-by: Gerd Hoffmann --- hw/usb.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/usb.c b/hw/usb.c index bacdc81..9976f81 100

Re: [Qemu-devel] [PATCH 1/5] raw-posix: always prefer specific devices to hdev

2012-02-10 Thread Markus Armbruster
Paolo Bonzini writes: > There is no need to try matching device names; using ioctls is more > effective. So, always return a low priority from the generic > hdev_probe_device and let the ioctl tests override it. Matching file names is lame. There are a few instances left, but this is a welcome

Re: [Qemu-devel] [PATCH 3/5] raw-posix: keep complete control of door locking if possible

2012-02-10 Thread Markus Armbruster
Paolo Bonzini writes: > Try to open the disk O_EXCL so that udev will not receive eject > request and media change events. These will work fine with SCSI > passthrough. > > With IDE and scsi-disk the user will need to use the monitor in order > to eject the disk and put it back (respectively wit

[Qemu-devel] [PULL 00/28] usb patch queue

2012-02-10 Thread Gerd Hoffmann
Hi, Here comes the current usb patch queue. It brings some bugfixes. It also revamps the usb packet workflow to move the whole thing to a event-based workflow. xhci emulation needs this, and we also might be able to use this with the other host adapters to reduce emulation cpu overhead, altho

[Qemu-devel] [PATCH v4 05/11] trace: [tracetool] Add support for event properties

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 07563f0..f369579 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -472,7 +472,9 @@ trace_gen = {

Re: [Qemu-devel] [Qemu-trivial] [TRIVIAL] sas_ss_flags bug for powerpc

2012-02-10 Thread Paul Brook
> Changes which require knowledge of a specific device model are often not > trivial to anyone who hasn't studied the specification. So if the patch > requires background knowledge of ppc ABI, hardware registers, etc then > it's usually best sent to relevant subsystem maintainer (see > ./MAINTAINE

[Qemu-devel] [PATCH 09/15] vpc: Round up image size during fixed image creation

2012-02-10 Thread Kevin Wolf
The geometry calculation algorithm from the VHD spec rounds the image size down if it doesn't exactly match a geometry. During image conversion, this causes the image to be truncated. For dynamic images, we already have code in place to round up instead, let's do the same for fixed images. Signed-

[Qemu-devel] [PATCH 11/15] qcow2: Keep unknown header extension when rewriting header

2012-02-10 Thread Kevin Wolf
If we want header extensions to work as compatible extensions, we can't destroy yet unknown header extensions when rewriting the header (e.g. for changing the backing file). Save all unknown header extensions in a list of blobs and include them in a new header. Signed-off-by: Kevin Wolf --- bloc

Re: [Qemu-devel] [PATCH 05/15] scsi: pass residual amount to command_complete

2012-02-10 Thread Stefan Hajnoczi
On Mon, Jan 16, 2012 at 4:30 PM, Paolo Bonzini wrote: > -static void esp_command_complete(SCSIRequest *req, uint32_t status) > +static void esp_command_complete(SCSIRequest *req, uint32_t status, > +                                 int32_t resid) Is there a reason to use a signed type for resid?

[Qemu-devel] [PATCH 3/9] cpu-exec.c: Correct comment about this file and indentation cleanup

2012-02-10 Thread Stefan Hajnoczi
From: 陳韋任 Each target uses the #define macro (in target-xxx/cpu.h) to rename cpu_exec (cpu-exec.c) to cpu_xxx_exec, then defines its own cpu_loop which calls cpu_xxx_exec. So basically, cpu-exec.c is not only the i386 emulator main execution loop. This patch corrects the comment of this file and

[Qemu-devel] [PATCH 06/28] usb: kill usb_send_msg

2012-02-10 Thread Gerd Hoffmann
No users left. Zap it. Signed-off-by: Gerd Hoffmann --- hw/usb.c | 13 - hw/usb.h |1 - 2 files changed, 0 insertions(+), 14 deletions(-) diff --git a/hw/usb.c b/hw/usb.c index c8e6be4..0c26164 100644 --- a/hw/usb.c +++ b/hw/usb.c @@ -295,19 +295,6 @@ int set_usb_string(uint8

[Qemu-devel] [PATCH 14/28] usb-xhci: switch to usb_find_device()

2012-02-10 Thread Gerd Hoffmann
Switch over xHCI to use the new usb_find_device() function for device lookup. Signed-off-by: Gerd Hoffmann --- hw/usb-xhci.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 7028338..aa236c9 100644 --- a/hw/usb-xhci.c +++ b/

[Qemu-devel] [PATCH v4 06/11] trace: [tracetool] Process the "disable" event property

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index f369579..f2bcb65 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -365,6 +365,9 @@ def dtra

[Qemu-devel] [PATCH 03/15] block: perform zero-detection during copy-on-read

2012-02-10 Thread Kevin Wolf
From: Stefan Hajnoczi Copy-on-Read populates the image file with data read from a backing image. In order to avoid bloating the image file when all zeroes are read we should scan the buffer and perform an optimized zero write operation. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH 03/28] usb-redir: Add the posibility to filter out certain devices from redirecion

2012-02-10 Thread Gerd Hoffmann
From: Hans de Goede This patch adds the posibility to filter out certain devices from redirecion. To use this pass the filter property to -device usb-redir. The filter property takes a string consisting of filter rules, the format for a rule is: -1 can be used to allow any value for a fiel

[Qemu-devel] [PATCH v3 06/11] trace: [tracetool] Process the "disable" event property

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index e35eb68..b185724 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -365,6 +365,9 @@ def dtra

[Qemu-devel] [PATCH 2/9] CODING_STYLE: Clarify style for enum and function type names

2012-02-10 Thread Stefan Hajnoczi
From: Peter Maydell Clarify that enum type names and function type names should follow the CamelCase style used for structured type names. Signed-off-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- CODING_STYLE |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/CO

[Qemu-devel] [PATCH 12/15] rewrite QEMU_BUILD_BUG_ON

2012-02-10 Thread Kevin Wolf
From: Dong Xu Wang On some platforms, __LINE__ will not expand to real number in QEMU_BUILD_BUG_ON, so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch will fix it. BTW, I got error message on RHEL 6.1/gcc 4.4.5. Signed-off-by: Dong Xu Wang Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH v3 02/11] trace: [tracetool] Do not rebuild event list in backend code

2012-02-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index f0d7e1e..7042728 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -171,15 +171,14 @@ def si

[Qemu-devel] [PATCH 16/28] usb: fold usb_generic_handle_packet into usb_handle_packet

2012-02-10 Thread Gerd Hoffmann
There is no reason to have a separate usb_generic_handle_packet function any more, fold it into usb_handle_packet(). Also call the do_token_* functions which handle control transfer emulation for control pipe packets only. Signed-off-by: Gerd Hoffmann --- hw/usb.c | 58 +++

Re: [Qemu-devel] [PATCH v2 03/11] trace: [tracetool] Simplify event line parsing

2012-02-10 Thread Lluís Vilanova
Harsh Bora writes: > Hi Lluis, > Sorry for a late response as I was out of office for last 2 weeks because of > some medical emergency at home. Hope it turned out to be nothing serious. > While trying to merge your changes with mine, I found something (see below): Nice catch, I didn't realize

[Qemu-devel] [PATCH 05/15] qed: add .bdrv_co_write_zeroes() support

2012-02-10 Thread Kevin Wolf
From: Stefan Hajnoczi Zero writes are a dedicated interface for writing regions of zeroes into the image file. If clusters are not yet allocated it is possible to use an efficient metadata representation which keeps the image file compact and does not store individual zero bytes. Implementing t

[Qemu-devel] [PATCH 5/9] vl.c: Fix typo in variable name

2012-02-10 Thread Stefan Hajnoczi
From: Peter Maydell Fix a typo in a local variable name. Signed-off-by: Peter Maydell Reviewed-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- vl.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index 63dd725..c4b3aab 100644 --- a/vl.c +++ b/

[Qemu-devel] [PATCH 1/1] char: Add a QemuChrHandlers struct to initialise chardev handlers

2012-02-10 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah --- gdbstub.c |9 +++-- hw/ccid-card-passthru.c | 11 +++ hw/debugcon.c |2 +- hw/es

[Qemu-devel] [PATCH v3 10/11] trace: Provide a per-event status define for conditional compilation

2012-02-10 Thread Lluís Vilanova
NOTE: This is a port of a patch in Stefanha's tracing tree to the new pythonic tracetool version. Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in "trace.h". This lets the user conditionally compile code with a relatively high execution cost that is only necessar

[Qemu-devel] [PATCH 13/28] usb-musb: switch to usb_find_device()

2012-02-10 Thread Gerd Hoffmann
Switch over musb to use the new usb_find_device() function for device lookup. Signed-off-by: Gerd Hoffmann --- hw/usb-musb.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/usb-musb.c b/hw/usb-musb.c index c2753c9..ecac631 100644 --- a/hw/usb-musb.c +++ b/hw/usb

[Qemu-devel] [PATCH 10/15] qcow2: Update whole header at once

2012-02-10 Thread Kevin Wolf
In order to switch the backing file, qcow2 issues multiple write requests that only changed a part of the image header. Any failure after the first one would leave the header in an corrupted state. With this patch, the whole header is written at once, so we can't fail in the middle. At the same ti

[Qemu-devel] [PATCH 20/28] usb: maintain async packet list per endpoint

2012-02-10 Thread Gerd Hoffmann
Maintain a list of async packets per endpoint. With the current code the list will never receive more than a single item. I think you can guess what the future plan is though ;) Signed-off-by: Gerd Hoffmann --- hw/usb.c | 127 +- hw/

  1   2   3   >