Re: [Qemu-devel] [PATCH 0/3] linux-user: Implement setxattr/getxattr/removexattr syscalls

2011-09-02 Thread Riku Voipio
Hi, On Wed, Aug 17, 2011 at 02:30:53PM -0700, An-Cheng Huang wrote: On Tue, Aug 09, 2011 at 12:30:52PM -0700, An-Cheng Huang wrote: These patches implement the setxattr, getxattr, and removexattr syscalls. Since libattr uses indirect syscalls for these, the fix for the indirect syscall

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-02 Thread Paolo Bonzini
On 09/02/2011 02:11 AM, David Gibson wrote: Why not limit the change to ppc then? Because the bug is masked by the x86 memory model, but it is still there even there conceptually. It is not really true that x86 does not need memory barriers, though it doesn't in this case:

[Qemu-devel] target_phys_addr_t vs ram_addr_t

2011-09-02 Thread Sinha, Ani
Hi Folks : I am trying to write a virtio driver and towards this end I am looking at the qemu code. I am a little confused about a few things. Unfortunately, the few comments in the code does not make it clear for me. So I am wondering if any kind person on this mailing list would be able to

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-02 Thread Paolo Bonzini
On 09/02/2011 02:08 AM, David Gibson wrote: Signed-off-by: Alexey Kardashevskiya...@ozlabs.ru Signed-off-by: David Gibsonda...@gibson.dropbear.id.au It will most definitely break OpenBSD, but anyway: Uh, why? They use an ancient compiler because they do not want to use GPLv3. I

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Juha.Riihimaki
How to you test musb? Unfortunately I don't have any test cases which actively use the musb, so I settle for testing an n810 image (and a beagle image in my omap3 tree) and confirming that the init part of things still works ok. (I'm not entirely happy with this but init is really all we're

Re: [Qemu-devel] [PATCH 1/4] Probe for libcheck by default.

2011-09-02 Thread Gerd Hoffmann
On 09/01/11 21:37, Anthony Liguori wrote: On 09/01/2011 10:42 AM, Gerd Hoffmann wrote: Probe for libcheck and build checks (if found) by default. Can be explicitly disabled using --disable-check-utests. Signed-off-by: Gerd Hoffmannkra...@redhat.com --- configure | 2 +- 1 files changed, 1

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Gerd Hoffmann
On 09/02/11 09:03, juha.riihim...@nokia.com wrote: How to you test musb? Unfortunately I don't have any test cases which actively use the musb, so I settle for testing an n810 image (and a beagle image in my omap3 tree) and confirming that the init part of things still works ok. (I'm not

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Riku Voipio
On Fri, Sep 02, 2011 at 09:50:44AM +0200, Gerd Hoffmann wrote: On 09/02/11 09:03, juha.riihim...@nokia.com wrote: How to you test musb? Unfortunately I don't have any test cases which actively use the musb, so I settle for testing an n810 image (and a beagle image in my omap3 tree) and

Re: [Qemu-devel] [PATCH 3/3] async: Allow nested qemu_bh_poll calls

2011-09-02 Thread Stefan Hajnoczi
On Thu, Sep 1, 2011 at 3:31 PM, Kevin Wolf kw...@redhat.com wrote: qemu may segfault when a BH handler first deletes a BH and then (possibly indirectly) calls a nested qemu_bh_poll(). This is because the inner instance frees the BH and deletes it from the list that the outer one processes.

Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA

2011-09-02 Thread Avi Kivity
On 09/01/2011 07:32 PM, Anthony Liguori wrote: True. But I still think it's the right thing. We can't really pass a MemoryRegion as the source address, since there is no per-device MemoryRegion. Couldn't the PCI bus expose 255 MemoryRegions though? What would those mean? A MemoryRegion

Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA

2011-09-02 Thread Avi Kivity
On 09/01/2011 07:05 PM, Anthony Liguori wrote: The challenge is what you do about something like ne2k where the core chipset can either be a PCI device or an ISA device. You would have to implement a wrapper around pci_dma_rw() in order to turn it into cpu_physical_memory_rw when doing ISA.

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Marcin Juszkiewicz
W dniu 02.09.2011 10:00, Riku Voipio pisze: n800/n810 qemu images based on official are not redistributable, as they carry propiertary software. Instructions howto convert a firmare to qemu image exist, but to get your hands on a firmware you need to know a n800/n810 serial number:

Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link

2011-09-02 Thread Stefan Hajnoczi
2011/9/1 Michael Roth mdr...@linux.vnet.ibm.com: On 09/01/2011 01:54 PM, Anthony Liguori wrote: On 08/25/2011 03:18 AM, Stefan Hajnoczi wrote: Avoid duplicate object files during the link. There are legitimate cases where a link command-line would include duplicate object files because two

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Peter Maydell
On 2 September 2011 08:50, Gerd Hoffmann kra...@redhat.com wrote: For starters just qemu-system-arm -M n810 is better than nothing, this does at least make sure it doesn't blow up somewhere when creating the device tree. NB that the n810 machine doesn't create the usb device unless you pass

Re: [Qemu-devel] [PULL 00/15] Tracing patches

2011-09-02 Thread Stefan Hajnoczi
On Thu, Sep 1, 2011 at 8:08 PM, Anthony Liguori aligu...@us.ibm.com wrote: On 09/01/2011 03:06 AM, Stefan Hajnoczi wrote: The following changes since commit f0fb8b7180fdcf536ea635a0720e1496110ecb3b:   Merge branch 'omap-for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm into pm

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Daniel P. Berrange
On Thu, Sep 01, 2011 at 08:34:35PM -0500, Anthony Liguori wrote: On 09/01/2011 02:35 PM, Luiz Capitulino wrote: Sometimes, when having lots of VMs running on a RHEV host and the user attempts to close a SPICE window, libvirt will get corrupted json from QEMU. After some investigation, I

[Qemu-devel] [PATCH 03/18] usb-host: fix halted endpoints

2011-09-02 Thread Gerd Hoffmann
Two fixes for the price of one ;) First, reinitialize the endpoint table after device reset. This is needed anyway as the reset might have switched interfaces. It also clears the endpoint halted state. Second the CLEAR_HALT ioctl wants a unsigned int passed in as argument, not uint8_t. This

[Qemu-devel] [PATCH 02/18] usb-host: reapurb error report fix

2011-09-02 Thread Gerd Hoffmann
Don't report errors on devices which are in disconnected and closing state. --- usb-linux.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 4e4df61..12e8772 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -312,9 +312,11 @@ static void

[Qemu-devel] [PATCH 01/18] usb-host: start tracing support

2011-09-02 Thread Gerd Hoffmann
Add a bunch of trace points to usb-linux.c Drop a bunch of DPRINTK's in favor of the trace points. Also cleanup error reporting a bit while being at it. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- trace-events | 24 +++ usb-linux.c | 73

[Qemu-devel] [PATCH 15/18] usb-host: tag as unmigratable

2011-09-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- usb-linux.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 7995178..390bcd3 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -1354,10 +1354,16 @@ out: return 0; } +static const

[Qemu-devel] [PATCH 18/18] usb-musb: Add reset function

2011-09-02 Thread Gerd Hoffmann
From: Juha Riihimäki juha.riihim...@nokia.com Add a separate reset function musb_reset() to the usb-musb interface, so that users who implement a reset function can also reset usb-musb. Use this in tusb6010. Signed-off-by: Juha Riihimäki juha.riihim...@nokia.com [Riku Voipio: Fixes and

[Qemu-devel] [STABLE PULL] usb bugfixes

2011-09-02 Thread Gerd Hoffmann
Hi, These are the bugfixes for stable cherry-picked from master's usb patch queue. please pull, Gerd The following changes since commit 76e4e1d23711750f777333654f13cf6baf8d01f1: Update version to 0.15.0 (2011-08-08 13:27:32 -0500) are available in the git repository at:

[Qemu-devel] [PATCH 1/7] usb-host: reapurb error report fix

2011-09-02 Thread Gerd Hoffmann
Don't report errors on devices which are in disconnected and closing state. (cherry picked from commit 3d09d54e57b92aaaba8d4e8c0d1c9901f1a56c7f) Conflicts: usb-linux.c --- usb-linux.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usb-linux.c b/usb-linux.c

[Qemu-devel] [PATCH 7/7] usb: claim port at device initialization time.

2011-09-02 Thread Gerd Hoffmann
This patch makes qemu assign a port when creating the device, not when attaching it. For most usb devices this isn't a noticable difference because they are in attached state all the time. The change affects usb-host devices which live in detached state while the real device is unplugged from

Re: [Qemu-devel] [PATCH v2 07/45] ide: Use a table to declare which drive kinds accept each command

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 18:53, schrieb Blue Swirl: On Wed, Aug 3, 2011 at 1:07 PM, Markus Armbruster arm...@redhat.com wrote: No functional change. It would be nice to have handler functions in the table, like commit e1a064f9 did for ATAPI. Left for another day. Signed-off-by: Markus Armbruster

[Qemu-devel] [PULL] usb patch queue

2011-09-02 Thread Gerd Hoffmann
Hi, This is the current use patch queue with the following changes: * musb improvements (qdev windup) * fix ehci emulation for FreeBSD guests. * a bunch if usb-host fixes. * misc minir tweaks. please pull, Gerd Gerd Hoffmann (15): usb-host: start tracing support usb-host:

Re: [Qemu-devel] [Qemu-trivial] [PATCH] x86: fix daa opcode for al register values higher than 0xf9

2011-09-02 Thread Stefan Hajnoczi
On Tue, Aug 30, 2011 at 10:00:55AM +0300, Boris Figovsky wrote: The second if statement should consider the original al register value, and not the new one. Signed-off-by: Boris Figovsky boris.figov...@ravellosystems.com --- target-i386/op_helper.c |6 +++--- 1 files changed, 3

Re: [Qemu-devel] [PATCH] libcacard: use INSTALL_DATA for data

2011-09-02 Thread Stefan Hajnoczi
On Mon, Aug 22, 2011 at 01:34:57PM -0400, Brad wrote: On Sat, Aug 13, 2011 at 05:23:57PM -0400, Brad wrote: libcacard: use INSTALL_DATA for data Signed-off-by: Brad Smith b...@comstyle.com --- libcacard/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH 04/18] usb-host: limit open retries

2011-09-02 Thread Gerd Hoffmann
Limit the number of times qemu tries to open host devices to three. Reset error counter when the device goes away, after un-plugging and re-plugging the device qemu will try again three times. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- usb-linux.c | 13 - 1 files changed,

[Qemu-devel] [PATCH 3/3] libcacard: use INSTALL_DATA for data

2011-09-02 Thread Stefan Hajnoczi
From: Brad Smith b...@comstyle.com Signed-off-by: Brad Smith b...@comstyle.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- libcacard/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libcacard/Makefile b/libcacard/Makefile index

[Qemu-devel] [PATCH 2/3] x86: fix daa opcode for al register values higher than 0xf9

2011-09-02 Thread Stefan Hajnoczi
From: Boris Figovsky boris.figov...@ravellosystems.com The second if statement should consider the original al register value, and not the new one. Signed-off-by: Boris Figovsky boris.figov...@ravellosystems.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 1/3] sh4: Fix potential crash in debug code

2011-09-02 Thread Stefan Hajnoczi
From: Stefan Weil w...@mail.berlios.de cppcheck reports this error: qemu/hw/sh_intc.c:390: error: Possible null pointer dereference: s - otherwise it is redundant to check if s is null at line 385 If s were NULL, the printf() statement would crash. Setting braces fixes this bug.

[Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011

2011-09-02 Thread Stefan Hajnoczi
The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b: Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500) are available in the git repository at: ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches Boris Figovsky

Re: [Qemu-devel] [PATCH v2 09/45] ide/atapi: Clean up misleading name in cmd_start_stop_unit()

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:07, schrieb Markus Armbruster: eject is misleading; it means eject when start is clear, but load when start is set. Rename to loej, because that's how MMC-5 calls it, in section 6.40. Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/ide/atapi.c |8

Re: [Qemu-devel] [PATCH v2 10/45] ide/atapi: Track tray open/close state

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:07, schrieb Markus Armbruster: We already track it in BlockDriverState since commit 4be9762a. As discussed in that commit's message, we should track it in the device device models instead, because it's device state. Signed-off-by: Markus Armbruster arm...@redhat.com ---

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Peter Maydell
On 2 September 2011 08:50, Gerd Hoffmann kra...@redhat.com wrote: Booting an image and operating some usb device is even better. Incidentally, if anybody has both (1) an image/config that connects a keyboard via usb-musb and (2) a copy of the MUSB hardware spec they will be able to test and fix

[Qemu-devel] [PATCH 5/7] usb-ehci: handle siTDs

2011-09-02 Thread Gerd Hoffmann
This patch adds code to do minimal siTD handling, which is basically just following the next pointer. This is good enougth to handle the inactive siTDs used by FreeBSD. Active siTDs are skipped too as we don't have split transfer support in qemu, additionally a warning is printed.

[Qemu-devel] [PATCH 4/7] usb-host: endpoint table fixup

2011-09-02 Thread Gerd Hoffmann
USB Devices can have up to 15 IN and 15 OUT endpoints, not 15 endpoints total. Move from one array to two arrays (one IN, one OUT) to maintain the endpoint state. (cherry picked from commit 07d4920d2bca19c64827a226b0afdfe8c7f1e3f0) Conflicts: usb-linux.c --- usb-linux.c | 178

[Qemu-devel] [PATCH 17/18] usb-musb: Take a DeviceState* in init function

2011-09-02 Thread Gerd Hoffmann
From: Peter Maydell peter.mayd...@linaro.org Initialise usb-musb by passing it a DeviceState* and the offset of the IRQs in its gpio array, rather than a plain pointer to an irq array. This is simpler for callers and also allows us to pass in a valid parent to usb_bus_new(), so the USB bus

[Qemu-devel] [PATCH 6/7] usb: fix use after free

2011-09-02 Thread Gerd Hoffmann
The -complete() callback might have released the USBPacket (uhci actually does), so we must not touch it after the callback returns. Signed-off-by: Gerd Hoffmann kra...@redhat.com (cherry picked from commit 722d89396b6ccb49cd9d3aafd991ae01c8a30744) --- hw/usb.c |2 +- 1 files changed, 1

[Qemu-devel] [PATCH 11/18] usb: fix use after free

2011-09-02 Thread Gerd Hoffmann
The -complete() callback might have released the USBPacket (uhci actually does), so we must not touch it after the callback returns. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb.c b/hw/usb.c index

Re: [Qemu-devel] [PATCH] libcacard: use INSTALL_DATA for data

2011-09-02 Thread Alon Levy
On Fri, Sep 02, 2011 at 11:10:32AM +0100, Stefan Hajnoczi wrote: On Mon, Aug 22, 2011 at 01:34:57PM -0400, Brad wrote: On Sat, Aug 13, 2011 at 05:23:57PM -0400, Brad wrote: libcacard: use INSTALL_DATA for data Signed-off-by: Brad Smith b...@comstyle.com ---

Re: [Qemu-devel] [PATCH v2 11/45] scsi-disk: Factor out scsi_disk_emulate_start_stop()

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:07, schrieb Markus Armbruster: Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/scsi-disk.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index fa198f9..d549cb7 100644 ---

[Qemu-devel] [PATCH 14/18] usb: claim port at device initialization time.

2011-09-02 Thread Gerd Hoffmann
This patch makes qemu assign a port when creating the device, not when attaching it. For most usb devices this isn't a noticable difference because they are in attached state all the time. The change affects usb-host devices which live in detached state while the real device is unplugged from

[Qemu-devel] [PATCH 10/18] usb-host: parse port in /proc/bus/usb/devices scan

2011-09-02 Thread Gerd Hoffmann
Unfortunaly this is limited to root ports. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- usb-linux.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index ef29a76..7995178 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -1483,7

[Qemu-devel] [PATCH 07/18] usb-host: endpoint table fixup

2011-09-02 Thread Gerd Hoffmann
USB Devices can have up to 15 IN and 15 OUT endpoints, not 15 endpoints total. Move from one array to two arrays (one IN, one OUT) to maintain the endpoint state. --- usb-linux.c | 179 +-- 1 files changed, 101 insertions(+), 78

[Qemu-devel] [PATCH 08/18] usb-ehci: handle siTDs

2011-09-02 Thread Gerd Hoffmann
This patch adds code to do minimal siTD handling, which is basically just following the next pointer. This is good enougth to handle the inactive siTDs used by FreeBSD. Active siTDs are skipped too as we don't have split transfer support in qemu, additionally a warning is printed.

Re: [Qemu-devel] [PATCH v2 15/45] ide/atapi: Track tray locked state

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:07, schrieb Markus Armbruster: We already track it in BlockDriverState. Just like tray open/close state, we should track it in the device models instead, because it's device state. Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/ide/atapi.c|4 +++-

[Qemu-devel] [PATCH 06/18] usb-host: claim port

2011-09-02 Thread Gerd Hoffmann
When configured to pass through a specific host port (using hostbus and hostport properties), try to claim the port if supported by the kernel. That will avoid any kernel drivers binding to devices plugged into that port. It will not stop any userspace apps (such as usb_modeswitch) access the

[Qemu-devel] [PATCH 13/18] usb-ccid: remote wakeup support

2011-09-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb-ccid.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c index 4f0b347..3f794d4 100644 --- a/hw/usb-ccid.c +++ b/hw/usb-ccid.c @@ -447,7 +447,7 @@ static const USBDescDevice

[Qemu-devel] [PATCH 2/7] usb-host: fix halted endpoints

2011-09-02 Thread Gerd Hoffmann
Two fixes for the price of one ;) First, reinitialize the endpoint table after device reset. This is needed anyway as the reset might have switched interfaces. It also clears the endpoint halted state. Second the CLEAR_HALT ioctl wants a unsigned int passed in as argument, not uint8_t. This

[Qemu-devel] [PATCH 12/18] usb-ccid: switch to USBDesc*

2011-09-02 Thread Gerd Hoffmann
Switch the smard card emulation to use the USBDesc* structs for the usb descriptors. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb-ccid.c | 247 +++-- hw/usb-desc.h |2 +- 2 files changed, 84 insertions(+), 165 deletions(-)

[Qemu-devel] [PATCH 16/18] usb: Remove leading underscores from __musb_irq_max

2011-09-02 Thread Gerd Hoffmann
From: Peter Maydell peter.mayd...@linaro.org Identifiers with double leading underscore are reserved, so rename __musb_irq_max so we don't encroach on reserved namespace. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/tusb6010.c |

[Qemu-devel] [PATCH 3/7] usb-host: fix configuration tracking.

2011-09-02 Thread Gerd Hoffmann
It is perfectly fine to leave the usb device in unconfigured state (USBHostDevice-configuration == 0). Just do that and wait for the guest to explicitly set a configuration. This is closer to what real hardware does and it also simplifies the device initialization. There is no need to figure

[Qemu-devel] [PATCH 05/18] usb-host: fix configuration tracking.

2011-09-02 Thread Gerd Hoffmann
It is perfectly fine to leave the usb device in unconfigured state (USBHostDevice-configuration == 0). Just do that and wait for the guest to explicitly set a configuration. This is closer to what real hardware does and it also simplifies the device initialization. There is no need to figure

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Jan Kiszka
On 2011-09-02 11:41, Daniel P. Berrange wrote: On Thu, Sep 01, 2011 at 08:34:35PM -0500, Anthony Liguori wrote: On 09/01/2011 02:35 PM, Luiz Capitulino wrote: Sometimes, when having lots of VMs running on a RHEV host and the user attempts to close a SPICE window, libvirt will get corrupted

Re: [Qemu-devel] [PATCH v2 19/45] block: Rename bdrv_set_locked() to bdrv_lock_medium()

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:07, schrieb Markus Armbruster: Signed-off-by: Markus Armbruster arm...@redhat.com --- block.c |8 block.h |2 +- block/raw-posix.c |8 block/raw.c |6 +++--- block_int.h |2 +- hw/ide/atapi.c|2

[Qemu-devel] [PATCH 09/18] usb-host: constify port

2011-09-02 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- usb-linux.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 6490582..ef29a76 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -54,7 +54,7 @@ struct usb_ctrltransfer { void

[Qemu-devel] [PATCH] usb-storage: fix NULL pointer dereference.

2011-09-02 Thread Gerd Hoffmann
When a usb packet is canceled we need to check whenever we actually have a scsi request in flight before we try to cancel it. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb-msd.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/usb-msd.c b/hw/usb-msd.c

Re: [Qemu-devel] [PATCH v2 22/45] ide/atapi: Avoid physical/virtual tray state mismatch

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: When ide-cd is backed by a physical drive, we want the physical tray match the virtual one. To that end, we call bdrv_eject() on guest's load/eject, and bdrv_lock_medium() on guest's prevent/allow removal. But we don't set the initial state on

Re: [Qemu-devel] [PATCH v2 26/45] ide/atapi: Preserve tray state on migration

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: Use a subsection, so that migration to older version still works, provided the tray is closed and unlocked. Signed-off-by: Markus Armbruster arm...@redhat.com Ah, here is the migration part. The state wasn't migrated before, so not doing it in

Re: [Qemu-devel] [PATCH v2 27/45] scsi-disk: Preserve tray state on migration

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: Breaks migration of qdevs scsi-cd and legacy scsi-disk to older versions. We normally use subsections to avoid that. Not possible here, because we don't have a section to begin with. Too bad. Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 26/45] ide/atapi: Preserve tray state on migration

2011-09-02 Thread Paolo Bonzini
On 09/02/2011 02:20 PM, Kevin Wolf wrote: Ah, here is the migration part. The state wasn't migrated before, so not doing it in patch 10 doesn't break anything. I would still prefer to add migration in the same patch that adds the fields. You could just move the subsection itself and keep the

Re: [Qemu-devel] [PATCH v2 37/45] block: Show whether the guest ejected the medium in info block

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: Need to ask the device, so this requires new BlockDevOps member is_medium_ejected(). Signed-off-by: Markus Armbruster arm...@redhat.com I find the name confusing. medium is ejected seems to mean tray is open. It isn't obvious that tray is

Re: [Qemu-devel] [PATCH v2 41/45] block: New bdrv_set_buffer_alignment()

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: Device models should be able to set it without an unclean include of block_int.h. Signed-off-by: Markus Armbruster arm...@redhat.com --- block.c |6 -- block.h |1 + hw/ide/core.c |2 +- hw/scsi-disk.c |

Re: [Qemu-devel] [PATCH v2 42/45] block: Reset buffer alignment on detach

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: BlockDriverState member buffer_alignment is initially 512. The device model may set them, with bdrv_set_buffer_alignment(). If the device model gets detached (hot unplug), the device's alignment is left behind. Only okay because device hot

Re: [Qemu-devel] pseries machine updates

2011-09-02 Thread Alexander Graf
On 09/01/2011 03:45 AM, David Gibson wrote: On Wed, Aug 31, 2011 at 11:17:13AM +0200, Alexander Graf wrote: On 11.08.2011, at 02:39, David Gibson wrote: On Wed, Aug 10, 2011 at 05:16:35PM +0200, Alexander Graf wrote: On 08/04/2011 09:02 AM, David Gibson wrote: Hi Alex, Here's another batch

Re: [Qemu-devel] [PATCH v2 44/45] block: New change_media_cb() parameter load

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:08, schrieb Markus Armbruster: To let device models distinguish between eject and load. Signed-off-by: Markus Armbruster arm...@redhat.com --- block.c| 12 ++-- block.h|3 ++- hw/fdc.c |2 +- hw/ide/core.c |2 +-

Re: [Qemu-devel] [PATCH 2/2] pseries: Implement hcall-bulk hypervisor interface

2011-09-02 Thread Alexander Graf
On 09/01/2011 03:50 AM, David Gibson wrote: On Wed, Aug 31, 2011 at 11:22:18AM +0200, Alexander Graf wrote: On 11.08.2011, at 04:36, David Gibson wrote: [snip] +#define H_BULK_REMOVE_TYPE 0xc000ULL +#define H_BULK_REMOVE_REQUEST0x4000ULL +#define

Re: [Qemu-devel] [PATCH v2 00/45] Block layer cleanup fixes

2011-09-02 Thread Kevin Wolf
Am 03.08.2011 15:07, schrieb Markus Armbruster: This patch series looks bigger than it is. All the patches are small and hopefully easy to review. Objectives: * Push BlockDriverState members locked, tray_open, media_changed into device models, where they belong. * BlockDriverState

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Gerd Hoffmann
Hi, After some investigation, I found out that the problem is that different SPICE threads are calling monitor functions (such as monitor_protocol_event()) in parallel which causes concurrent access to the monitor's internal buffer outbuf[]. [ adding spice-list to Cc, see qemu-devel for the

Re: [Qemu-devel] [PATCH] main: force enabling of I/O thread

2011-09-02 Thread Mark Cave-Ayland
On 01/09/11 19:31, Andreas Färber wrote: If there aren't known issues, then I want to remove the non-I/O thread code. git history is still there for anyone that wants to test w/o it. My problem is that at HEAD *none* of the i386,ppc,sparc guests that used to work about a month ago boot *at

Re: [Qemu-devel] [PATCH 1/3] rbd: fix leak in failure path

2011-09-02 Thread Stefan Hajnoczi
On Tue, Aug 23, 2011 at 5:28 PM, Sage Weil s...@newdream.net wrote: Fix leak of s-snap when rados_create fails. Reported-by: Stefan Hajnoczi stefa...@gmail.com Signed-off-by: Sage Weil s...@newdream.net ---  block/rbd.c |    9 +  1 files changed, 5 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [PATCH 2/3] rbd: allow client id to be specified in config string

2011-09-02 Thread Stefan Hajnoczi
On Tue, Aug 23, 2011 at 5:28 PM, Sage Weil s...@newdream.net wrote: Allow the client id to be specified in the config string via 'id=' so that users can control who they authenticate as.  Currently they are stuck with the default ('admin').  This is necessary for anyone using authentication in

Re: [Qemu-devel] [PATCH 3/3] rbd: clean up, fix style

2011-09-02 Thread Stefan Hajnoczi
On Tue, Aug 23, 2011 at 5:28 PM, Sage Weil s...@newdream.net wrote: No assignment in condition.  Remove duplicate ret 0 check. Signed-off-by: Sage Weil s...@newdream.net ---  block/rbd.c |   17 -  1 files changed, 8 insertions(+), 9 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH 0/3] usb-musb: make qdev-aware

2011-09-02 Thread Gerd Hoffmann
Hi, http://narcissus.angstrom-distribution.org/ can generate jffs2/ubifs images for n8x0 (select nokia800 from machine selector). You will need a copy of config mtd partition from working n8x0 (at least it was needed when I was playing with it) with “no-lifeguard-reset” flag set. Got a

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Luiz Capitulino
On Fri, 02 Sep 2011 15:39:03 +0200 Gerd Hoffmann kra...@redhat.com wrote: Hi, After some investigation, I found out that the problem is that different SPICE threads are calling monitor functions (such as monitor_protocol_event()) in parallel which causes concurrent access to the

Re: [Qemu-devel] [PATCH 3/8] RunState: Add additional states

2011-09-02 Thread Luiz Capitulino
On Thu, 01 Sep 2011 22:58:51 +0200 Jan Kiszka jan.kis...@web.de wrote: On 2011-09-01 20:39, Luiz Capitulino wrote: On Thu, 01 Sep 2011 20:30:57 +0200 Jan Kiszka jan.kis...@siemens.com wrote: On 2011-09-01 20:12, Luiz Capitulino wrote: Currently, only vm_start() and vm_stop() change

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Anthony Liguori
On 09/02/2011 08:39 AM, Gerd Hoffmann wrote: Hi, After some investigation, I found out that the problem is that different SPICE threads are calling monitor functions (such as monitor_protocol_event()) in parallel which causes concurrent access to the monitor's internal buffer outbuf[]. [

Re: [Qemu-devel] emulated ARM performance vs real processor ?

2011-09-02 Thread David Gilbert
On 1 September 2011 08:32, Julien Heyman bidsom...@gmail.com wrote: Hi, I was wondering if anyone had some data regarding the relative performance of any given ARM board emulated in QEMU versus the real thing. Yes, I do know this depends a lot on the host PC running qemu, but some

Re: [Qemu-devel] [PATCH] main: force enabling of I/O thread

2011-09-02 Thread Anthony Liguori
On 09/01/2011 01:31 PM, Andreas Färber wrote: Am 30.08.2011 um 21:28 schrieb Anthony Liguori: On 08/30/2011 01:45 PM, Andreas Färber wrote: Am 30.08.2011 um 00:42 schrieb Jan Kiszka: What about making --enable-io-thread default as an intermediate step? That would leave --disable-io-thread

Re: [Qemu-devel] [PATCH 3/8] RunState: Add additional states

2011-09-02 Thread Jan Kiszka
On 2011-09-02 16:28, Luiz Capitulino wrote: On Thu, 01 Sep 2011 22:58:51 +0200 Jan Kiszka jan.kis...@web.de wrote: On 2011-09-01 20:39, Luiz Capitulino wrote: On Thu, 01 Sep 2011 20:30:57 +0200 Jan Kiszka jan.kis...@siemens.com wrote: On 2011-09-01 20:12, Luiz Capitulino wrote:

Re: [Qemu-devel] [PATCH 3/8] RunState: Add additional states

2011-09-02 Thread Luiz Capitulino
On Fri, 02 Sep 2011 16:32:25 +0200 Jan Kiszka jan.kis...@siemens.com wrote: On 2011-09-02 16:28, Luiz Capitulino wrote: On Thu, 01 Sep 2011 22:58:51 +0200 Jan Kiszka jan.kis...@web.de wrote: On 2011-09-01 20:39, Luiz Capitulino wrote: On Thu, 01 Sep 2011 20:30:57 +0200 Jan Kiszka

Re: [Qemu-devel] [PATCH] main: force enabling of I/O thread

2011-09-02 Thread Paolo Bonzini
On 09/02/2011 04:31 PM, Anthony Liguori wrote: For a platform to be supported, it needs to be actively maintained and fixed. If there aren't enough folks testing/fixing Darwin/ppc64, then it's not a platform we can reasonable support :-/ I agree unfortunately. I think personally that Darwin

Re: [Qemu-devel] [PATCH v2 07/45] ide: Use a table to declare which drive kinds accept each command

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 18:53, schrieb Blue Swirl: On Wed, Aug 3, 2011 at 1:07 PM, Markus Armbruster arm...@redhat.com wrote: No functional change. It would be nice to have handler functions in the table, like commit e1a064f9 did for ATAPI. Left for another day.

Re: [Qemu-devel] [PATCH v2 09/45] ide/atapi: Clean up misleading name in cmd_start_stop_unit()

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:07, schrieb Markus Armbruster: eject is misleading; it means eject when start is clear, but load when start is set. Rename to loej, because that's how MMC-5 calls it, in section 6.40. Signed-off-by: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] [PATCH v2 10/45] ide/atapi: Track tray open/close state

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:07, schrieb Markus Armbruster: We already track it in BlockDriverState since commit 4be9762a. As discussed in that commit's message, we should track it in the device device models instead, because it's device state. Signed-off-by:

Re: [Qemu-devel] [PATCH v2 11/45] scsi-disk: Factor out scsi_disk_emulate_start_stop()

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:07, schrieb Markus Armbruster: Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/scsi-disk.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index

Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link

2011-09-02 Thread Anthony Liguori
On 09/02/2011 03:42 AM, Stefan Hajnoczi wrote: 2011/9/1 Michael Rothmdr...@linux.vnet.ibm.com: On 09/01/2011 01:54 PM, Anthony Liguori wrote: On 08/25/2011 03:18 AM, Stefan Hajnoczi wrote: Avoid duplicate object files during the link. There are legitimate cases where a link command-line

Re: [Qemu-devel] [PATCH v2 15/45] ide/atapi: Track tray locked state

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:07, schrieb Markus Armbruster: We already track it in BlockDriverState. Just like tray open/close state, we should track it in the device models instead, because it's device state. Signed-off-by: Markus Armbruster arm...@redhat.com ---

Re: [Qemu-devel] [PULL 00/15] Tracing patches

2011-09-02 Thread Anthony Liguori
On 09/02/2011 04:39 AM, Stefan Hajnoczi wrote: On Thu, Sep 1, 2011 at 8:08 PM, Anthony Liguorialigu...@us.ibm.com wrote: On 09/01/2011 03:06 AM, Stefan Hajnoczi wrote: The following changes since commit f0fb8b7180fdcf536ea635a0720e1496110ecb3b: Merge branch 'omap-for-upstream' of

Re: [Qemu-devel] [PATCH v2 19/45] block: Rename bdrv_set_locked() to bdrv_lock_medium()

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:07, schrieb Markus Armbruster: Signed-off-by: Markus Armbruster arm...@redhat.com --- block.c |8 block.h |2 +- block/raw-posix.c |8 block/raw.c |6 +++--- block_int.h

Re: [Qemu-devel] [PULL 00/15] Tracing patches

2011-09-02 Thread Anthony Liguori
On 09/02/2011 09:54 AM, Anthony Liguori wrote: On 09/02/2011 04:39 AM, Stefan Hajnoczi wrote: On Thu, Sep 1, 2011 at 8:08 PM, Anthony Liguorialigu...@us.ibm.com wrote: On 09/01/2011 03:06 AM, Stefan Hajnoczi wrote: The following changes since commit f0fb8b7180fdcf536ea635a0720e1496110ecb3b:

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-02 Thread Daniel P. Berrange
On Thu, Sep 01, 2011 at 05:55:43PM +0200, Christoph Hellwig wrote: Please try the attached (untested) patch: Yes, this patch worked succesfully with the following test case: $ dd if=/dev/zero of=loop.img bs=1M seek=100 count=0 $ losetup -f loop.img $ ./x86_64-softmmu/qemu-system-x86_64

[Qemu-devel] [PATCH] Display sector count in 'info block' output

2011-09-02 Thread Daniel P. Berrange
From: Daniel P. Berrange d...@berrange.com To aid in knowing whether a 'block_resize' was succesful, display the sector count in the 'info block' output Signed-off-by: Daniel P. Berrange d...@berrange.com --- block.c |6 -- qmp-commands.hx |1 + 2 files changed, 5

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Gerd Hoffmann
Hi, A patch like the attached (warning: untested) should do as quickdirty fix for stable. But IMO we really should fix spice instead. I agree. I'm not sure I like the idea of still calling QEMU code without holding the mutex (even the QObject code). I though just creating the objects

Re: [Qemu-devel] [PATCH v2 22/45] ide/atapi: Avoid physical/virtual tray state mismatch

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:08, schrieb Markus Armbruster: When ide-cd is backed by a physical drive, we want the physical tray match the virtual one. To that end, we call bdrv_eject() on guest's load/eject, and bdrv_lock_medium() on guest's prevent/allow removal.

[Qemu-devel] [PATCH] server: don't call reds_stream_free from worker thread context

2011-09-02 Thread Gerd Hoffmann
reds_stream_free() may call the channel_event callback which is not supposed to be callsed from worker thread context. This patch moves the reds_stream_free call for the display channel from the worker to the dispatcher to fix this issue. [ Note: not tested yet, against 0.8 branch, sending out

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-02 Thread Anthony Liguori
On 09/02/2011 10:18 AM, Gerd Hoffmann wrote: Hi, A patch like the attached (warning: untested) should do as quickdirty fix for stable. But IMO we really should fix spice instead. I agree. I'm not sure I like the idea of still calling QEMU code without holding the mutex (even the QObject

Re: [Qemu-devel] [PATCH v2 26/45] ide/atapi: Preserve tray state on migration

2011-09-02 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 03.08.2011 15:08, schrieb Markus Armbruster: Use a subsection, so that migration to older version still works, provided the tray is closed and unlocked. Signed-off-by: Markus Armbruster arm...@redhat.com Ah, here is the migration part. The state

  1   2   >