[Qemu-devel] Re: [PATCH] kvm: x86: Save/restore error_code

2010-12-10 Thread Jason Wang
Juan Quintela writes: Jason Wang jasow...@redhat.com wrote: Juan Quintela writes: Jason Wang jasow...@redhat.com wrote: The saving and restoring of error_code seems lost and convert the error_code to uint32_t. Signed-off-by: Jason Wang jasow...@redhat.com

[Qemu-devel] Re: [PATCH V2] qemu, kvm: Enable user space NMI injection for kvm guest

2010-12-10 Thread Jan Kiszka
Am 10.12.2010 08:42, Lai Jiangshan wrote: Make use of the new KVM_NMI IOCTL to send NMIs into the KVM guest if the user space raised them. (example: qemu monitor's nmi command) Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/configure b/configure index 2917874..f6f9362

[Qemu-devel] Re: [PATCH] fix qruncom compilation problems

2010-12-10 Thread Paolo Bonzini
On 12/09/2010 06:29 PM, Stefano Bonifazi wrote: how can one think that addresses around zero are free for a mapping?? Addresses around zero are always free, because if they weren't you couldn't detect NULL pointer dereferences reliably. mmap-ing at zero thus is a tricky operation, because

[Qemu-devel] Re: [PATCH 09/13] ahci: add ahci emulation

2010-12-10 Thread Kevin Wolf
Am 09.12.2010 17:18, schrieb Alexander Graf: Kevin Wolf wrote: Am 09.12.2010 16:48, schrieb Alexander Graf: +static void ncq_cb(void *opaque, int ret) +{ +NCQTransferState *ncq_tfs = (NCQTransferState *)opaque; +IDEState *ide_state; + +if (ret 0) { +/* XXX error

[Qemu-devel] [Bug 595117] Re: qemu-nbd slow and missing writeback cache option

2010-12-10 Thread Stephane Chazelas
For the record, there's more on that bug at http://thread.gmane.org/gmane.linux.ubuntu.bugs.server/36923 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/595117 Title: qemu-nbd slow and missing

Re: [Qemu-devel] [RFC][PATCH v5 00/21] virtagent: host/guest RPC communication agent

2010-12-10 Thread Stefan Hajnoczi
On Thu, Dec 9, 2010 at 8:45 PM, Michael Roth mdr...@linux.vnet.ibm.com wrote: On 12/08/2010 04:10 AM, Stefan Hajnoczi wrote: What concrete use-cases are there? * Reboot support on x86.  A QMP command can invoke guest-initiated reboot via virtagent. * ? * viewfile The ability to do a quick

[Qemu-devel] Re: [PATCH v2 2/2] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-10 Thread Markus Armbruster
Lai Jiangshan la...@cn.fujitsu.com writes: Convert do_inject_nmi() to QObject, QError, we need to use it(via libvirt). changed from v1 Add document. Add error handling when the cpu index is invalid. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/hmp-commands.hx

[Qemu-devel] Re: [PATCH v2 1/2] QError: new QERR_INVALID_CPU_INDEX

2010-12-10 Thread Luiz Capitulino
On Fri, 10 Dec 2010 14:36:01 +0800 Lai Jiangshan la...@cn.fujitsu.com wrote: Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com As Markus said, we report this as an invalid parameter in do_cpu(), we can do the same for inject-nmi. --- diff --git a/qerror.c b/qerror.c index

[Qemu-devel] Re: [PATCH v2 2/2] qemu, qmp: convert do_inject_nmi() to QObject, QError

2010-12-10 Thread Luiz Capitulino
On Fri, 10 Dec 2010 14:36:08 +0800 Lai Jiangshan la...@cn.fujitsu.com wrote: +SQMP +inject_nmi +-- + +Inject an NMI on the given CPU (x86 only). + +Arguments: + +- cpu_index: the index of the CPU to be injected NMI (json-int) + +Example: + +- { execute: inject_nmi, arguments:

Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices.

2010-12-10 Thread Markus Armbruster
Gerd Hoffmann kra...@redhat.com writes: I understand why you're adding this but this is one of those horrible abuses of qdev that we really need to avoid. There are two valid reasons why hotplug is not possible: 1) Hotplugging is not supported by the *slot*. This is something that needs

Re: [Qemu-devel] [PATCH 10/11] config: Add header file for device config options

2010-12-10 Thread Alexander Graf
On 10.12.2010, at 13:37, Markus Armbruster wrote: Alexander Graf ag...@suse.de writes: On 21.11.2010, at 13:37, Blue Swirl wrote: On Fri, Nov 19, 2010 at 2:56 AM, Alexander Graf ag...@suse.de wrote: So far we have C preprocessor defines for target and host config options, but we're

Re: [Qemu-devel] [PATCH 1/1] NBD isn't used by qemu-img, so don't link qemu-img against NBD objects

2010-12-10 Thread Markus Armbruster
Jes Sorensen jes.soren...@redhat.com writes: On 11/22/10 16:20, Anthony Liguori wrote: On 11/22/2010 09:10 AM, Jes Sorensen wrote: On 11/22/10 16:08, Anthony Liguori wrote: On 11/22/2010 08:58 AM, Jes Sorensen wrote: Right, the right solution is probably to create a block driver list

[Qemu-devel] [PATCH 0/5] virtio-serial: Trivial fixes, don't copy buffers to host

2010-12-10 Thread Amit Shah
Hi, This patch series converts virtio-serial-bus to use the guest buffers instead of copying over guest data to the host, as suggested by Paul. In addition, there are some trivial fixes for the virtio-console and virtio-serial code. Amit Shah (5): virtio-console: Factor out common init

[Qemu-devel] [PATCH 1/5] virtio-console: Factor out common init between console and generic ports

2010-12-10 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH 2/5] virtio-console: Remove unnecessary braces

2010-12-10 Thread Amit Shah
Remove unnecessary braces around a case statement. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index d7fe68b..d0b9354 100644 --- a/hw/virtio-console.c

[Qemu-devel] [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host

2010-12-10 Thread Amit Shah
When the guest writes something to a host, we copied over the entire buffer first into the host and then processed it. Do away with that, it could result in a malicious guest causing a DoS on the host. Reported-by: Paul Brook p...@codesourcery.com Signed-off-by: Amit Shah amit.s...@redhat.com

[Qemu-devel] [PATCH 3/5] virtio-serial: Simplify condition for a while loop

2010-12-10 Thread Amit Shah
Separate out a non-changing condition over the period of a loop into an if statement before the loop. This will be used later to re-work the loop. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] [PATCH 5/5] virtio-serial: Error out if guest sends unexpected vq elements

2010-12-10 Thread Amit Shah
Check if the guest really sent any items in the out_vq before using them. Similarly, check if there is a buffer to send data in before writing. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH 4/5] ide: add TRIM support

2010-12-10 Thread Christoph Hellwig
On Thu, Dec 02, 2010 at 03:07:49PM +0100, Kevin Wolf wrote: This looks wrong. Wouldn't werror=stop cause the request to be retried as a write when the VM is resumed? Indeed. But having a copypaste error gives just about right reason to mention that after read and write this is the third

Re: [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for devices.

2010-12-10 Thread Gerd Hoffmann
Hi, Wrong. PCI certainly isn't the only bus which supports hotplug. It *does* make sense to handle generic hotplug stuff at qdev level. Could the proper place be qbus instead of qdev? No. But PCI is the only bus where some devices are hot-pluggable and some are not. On all other

[Qemu-devel] [PATCH] ide: Register vm change state handler once only

2010-12-10 Thread Stefan Hajnoczi
We register the vm change state handler in a PCI BAR map() function. This function can be called multiple times throughout the lifetime of a PCI IDE device. This results in duplicate vm change state handlers being register, none of which are ever unregistered. Instead, register the vm change

[Qemu-devel] ]PATCH 0/7] add TRIM/UNMAP support, v3

2010-12-10 Thread Christoph Hellwig
This patchset adds support for the ATA TRIM and SCSI WRITE SAME with unmap commands, which allow reclaiming free space from a backing image. The user facing implementation is pretty complete, but not really efficient because the underlying bdrv_discard implementation doesn't use the aio

[Qemu-devel] Re: [PATCH 5/5] virtio-serial: Error out if guest sends unexpected vq elements

2010-12-10 Thread Amit Shah
On (Fri) Dec 10 2010 [13:59:50], Paul Brook wrote: Check if the guest really sent any items in the out_vq before using them. Similarly, check if there is a buffer to send data in before writing. Can this actually happen? If so why/how? Why does it need a special case in this device? A

[Qemu-devel] [PATCH 3/7] make dma_bdrv_io available to drivers

2010-12-10 Thread Christoph Hellwig
Make dma_bdrv_io available for drivers, and pass an explicit I/O function instead of hardcoding bdrv_aio_readv/bdrv_aio_writev. This is required to implement non-READ/WRITE dma commands in the ide driver, e.g. the upcoming TRIM support. Signed-off-by: Christoph Hellwig h...@lst.de Index:

[Qemu-devel] [PATCH 2/7] scsi-disk: support WRITE SAME (16) with unmap bit

2010-12-10 Thread Christoph Hellwig
Support discards via the WRITE SAME command with the unmap bit set, and tell the initiator about the support for it via the block limit and the new thin provisioning EVPD pages. Also fix the comment which incorrectly describedthe block limits EVPD page. Signed-off-by: Christoph Hellwig

[Qemu-devel] [PATCH 7/7] raw-posix: add discard support

2010-12-10 Thread Christoph Hellwig
Add support to discard blocks in a raw image residing on an XFS filesystem by calling the XFS_IOC_UNRESVSP64 ioctl to punch holes. Support for other hole punching mechanisms can be added when they become available. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu/block/raw-posix.c

[Qemu-devel] [PATCH 1/7] block: add discard support

2010-12-10 Thread Christoph Hellwig
Add a new bdrv_discard method to free blocks in a mapping image, and a new drive property to set the granularity for these discard. If no discard granularity support is set discard support is disabled. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu/block.c

[Qemu-devel] Re: [PATCH] blockdev: check dinfo ptr before using

2010-12-10 Thread Kevin Wolf
Am 08.12.2010 17:05, schrieb Ryan Harper: If a user decides to punish a guest by revoking its block device via drive_del, and subsequently also attempts to remove the pci device backing it, and the device is using blockdev_auto_del() then we get a segfault when we attempt to access

[Qemu-devel] [PATCH 5/7] ide: also reset io_buffer_index for writes

2010-12-10 Thread Christoph Hellwig
Currenly the code only resets the io_buffer_index field for reads, but the code seems to expect this for all types of I/O. I guess we simply don't hit large enough transfers that would require this often enough. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu/hw/ide/core.c

[Qemu-devel] [PATCH 4/7] ide: factor dma handling helpers

2010-12-10 Thread Christoph Hellwig
The DMA I/O path is duplicated between read and write commands, and support for the TRIM command would add another copy. Factor the code into common helpers using the s-is_read flag added for the macio ATA controller, and the newly added dma_bdrv_io function. Signed-off-by: Christoph Hellwig

[Qemu-devel] [PATCH 6/7] ide: add TRIM support

2010-12-10 Thread Christoph Hellwig
Add support for the data set management command, and the TRIM sub function in it. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu/hw/ide/core.c === --- qemu.orig/hw/ide/core.c 2010-12-10 11:35:30.471253949 +0100 +++

[Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host

2010-12-10 Thread Paul Brook
On (Fri) Dec 10 2010 [14:02:37], Paul Brook wrote: -if (!discard) { +if (discard) { +goto next; +} +next: virtqueue_push(vq, elem, 0); Please don't do this. Could you elaborate? I can move the 'discard' check into

[Qemu-devel] [PATCH v2 4/4] virtio-serial: Don't copy over guest buffer to host

2010-12-10 Thread Amit Shah
When the guest writes something to a host, we copied over the entire buffer first into the host and then processed it. Do away with that, it could result in a malicious guest causing a DoS on the host. Reported-by: Paul Brook p...@codesourcery.com Signed-off-by: Amit Shah amit.s...@redhat.com

[Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host

2010-12-10 Thread Amit Shah
On (Fri) Dec 10 2010 [15:17:18], Paul Brook wrote: On (Fri) Dec 10 2010 [14:02:37], Paul Brook wrote: -if (!discard) { +if (discard) { +goto next; +} +next: virtqueue_push(vq, elem, 0); Please don't do this.

[Qemu-devel] Re: [PATCH] correct migrate_set_speed's args_type

2010-12-10 Thread Markus Armbruster
[Note cc: Dan, Avi] Luiz Capitulino lcapitul...@redhat.com writes: On Tue, 23 Nov 2010 10:43:48 -0200 Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 23 Nov 2010 13:41:26 +0800 Wen Congyang we...@cn.fujitsu.com wrote: The args_type of migrate_set_speed in qmp-commands.hx is wrong.

[Qemu-devel] Re: [PATCH] correct migrate_set_speed's args_type

2010-12-10 Thread Luiz Capitulino
On Fri, 10 Dec 2010 16:20:34 +0100 Markus Armbruster arm...@redhat.com wrote: [Note cc: Dan, Avi] Luiz Capitulino lcapitul...@redhat.com writes: On Tue, 23 Nov 2010 10:43:48 -0200 Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 23 Nov 2010 13:41:26 +0800 Wen Congyang

[Qemu-devel] [PATCH v2 0/4] virtio-serial: Trivial fixes, don't copy buffers to host

2010-12-10 Thread Amit Shah
Hi, This patch series converts virtio-serial-bus to use the guest buffers instead of copying over guest data to the host, as suggested by Paul. In addition, there are some trivial fixes for the virtio-console and virtio-serial code. v2: - drop the erroring out patch till we decide what's to be

Re: [Qemu-devel] [PATCH] audio: reset timer when enabling capture mode

2010-12-10 Thread malc
On Thu, 9 Dec 2010, Michael Walle wrote: The audio timer also has to be reset when a capture device is enabled. This will ensure the timer to be started even if just capture devices are active. It was done in 39deb1e496de81957167daebf5cf5d1fbd5e47c2 -- mailto:av1...@comtv.ru

Re: [Qemu-devel] [PATCH] noaudio: fix return value for read()

2010-12-10 Thread malc
On Thu, 9 Dec 2010, Michael Walle wrote: Read should return bytes instead of samples. Thanks, applied. [..snip..] -- mailto:av1...@comtv.ru

[Qemu-devel] Re: [PATCH 1/6] qemu, kvm: Enable NMI support for user space irqchip

2010-12-10 Thread Lai Jiangshan
On 12/09/2010 03:25 PM, Jan Kiszka wrote: Am 09.12.2010 07:58, Lai Jiangshan wrote: Make use of the new KVM_NMI IOCTL to send NMIs into the KVM guest if the user space APIC emulation or some other source raised them. In that light, the subject is not absolutely correct. [...]

[Qemu-devel] Re: [PATCH] kvm: x86: Save/restore error_code

2010-12-10 Thread Juan Quintela
Jason Wang jasow...@redhat.com wrote: Juan Quintela writes: Jason Wang jasow...@redhat.com wrote: The saving and restoring of error_code seems lost and convert the error_code to uint32_t. Signed-off-by: Jason Wang jasow...@redhat.com --- target-i386/cpu.h |4

Re: [Qemu-devel] [PATCH 1/6] [RFC] Emulation of GRLIB GPTimer as defined in GRLIB IP Core User's Manual.

2010-12-10 Thread Edgar E. Iglesias
On Wed, Dec 08, 2010 at 10:39:43AM +0100, Fabien Chouteau wrote: On 12/08/2010 09:30 AM, Edgar E. Iglesias wrote: On Tue, Dec 07, 2010 at 10:55:33AM +0100, Fabien Chouteau wrote: On 12/06/2010 06:12 PM, Blue Swirl wrote: On Mon, Dec 6, 2010 at 9:26 AM, Fabien Chouteauchout...@adacore.com

[Qemu-devel] [Bug 543478] Re: qemus pmemsave doesn't accept / in filename

2010-12-10 Thread Launchpad Bug Tracker
[Expired for qemu-kvm (Ubuntu) because there has been no activity for 60 days.] ** Changed in: qemu-kvm (Ubuntu) Status: Incomplete = Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] Re: [RFC][PATCH v5 07/21] virtagent: add va.getfile RPC

2010-12-10 Thread Jes Sorensen
On 12/09/10 22:04, Michael Roth wrote: On 12/09/2010 08:40 AM, Adam Litke wrote: Actually, a host-controlled interface would be both simpler to implement (on both ends) and would concentrate control in the host (which is what we probably want anyway). I also like the host-controlled

Re: [Qemu-devel] [RFC][PATCH v5 00/21] virtagent: host/guest RPC communication agent

2010-12-10 Thread Stefan Hajnoczi
On Thu, Dec 9, 2010 at 9:03 PM, Anthony Liguori aligu...@linux.vnet.ibm.com wrote: On 12/09/2010 02:45 PM, Michael Roth wrote: On 12/08/2010 04:10 AM, Stefan Hajnoczi wrote: On Fri, Dec 3, 2010 at 6:03 PM, Michael Rothmdr...@linux.vnet.ibm.com  wrote: These patches apply to master, and can

Re: [Qemu-devel] [PATCH 10/11] config: Add header file for device config options

2010-12-10 Thread Markus Armbruster
Alexander Graf ag...@suse.de writes: On 21.11.2010, at 13:37, Blue Swirl wrote: On Fri, Nov 19, 2010 at 2:56 AM, Alexander Graf ag...@suse.de wrote: So far we have C preprocessor defines for target and host config options, but we're lacking any information on which devices are available.

Re: [Qemu-devel] [PATCH 1/5] block: add discard support

2010-12-10 Thread Christoph Hellwig
On Thu, Dec 02, 2010 at 01:12:13PM +0100, Kevin Wolf wrote: DEFINE_PROP_UINT16(physical_block_size, _state, \ _conf.physical_block_size, 512), \ DEFINE_PROP_UINT16(min_io_size, _state, _conf.min_io_size, 0), \ -

[Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host

2010-12-10 Thread Paul Brook
-if (!discard) { +if (discard) { +goto next; +} +next: virtqueue_push(vq, elem, 0); Please don't do this. Paul

[Qemu-devel] RFC; usb redirection protocol

2010-12-10 Thread Hans de Goede
Hi All, Here is what I have in mind as usb redirection protocol: USB redirerection protocol (draft) -- The protocol described in this document is meant for tunneling usb transfers to a single usb device. Note: not an entire hub, only a single device. The most

[Qemu-devel] [Bug 687733] Re: Linux KSM not compiled in (MADV_MERGEABLE always undef)

2010-12-10 Thread Paul Brook
Not a qemu bug. madvise and (associated constants via sys/mman.h) are supplied by glibc. You need to update your C library. ** Changed in: qemu Status: New = Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host

2010-12-10 Thread Amit Shah
On (Fri) Dec 10 2010 [14:02:37], Paul Brook wrote: -if (!discard) { +if (discard) { +goto next; +} +next: virtqueue_push(vq, elem, 0); Please don't do this. Could you elaborate? I can move the 'discard' check into the following

[Qemu-devel] [PATCH v2 1/4] virtio-console: Factor out common init between console and generic ports

2010-12-10 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v2 3/4] virtio-serial: Simplify condition for a while loop

2010-12-10 Thread Amit Shah
Separate out a non-changing condition over the period of a loop into an if statement before the loop. This will be used later to re-work the loop. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] Re: [PATCH 5/5] virtio-serial: Error out if guest sends unexpected vq elements

2010-12-10 Thread Amit Shah
On (Fri) Dec 10 2010 [15:17:58], Paul Brook wrote: On (Fri) Dec 10 2010 [13:59:50], Paul Brook wrote: Check if the guest really sent any items in the out_vq before using them. Similarly, check if there is a buffer to send data in before writing. Can this actually happen? If

[Qemu-devel] TCG flow vs dyngen

2010-12-10 Thread Stefano Bonifazi
Hi all! From the technical documentation (http://www.usenix.org/publications/library/proceedings/usenix05/tech/freenix/bellard.html) I read: The first step is to split each target CPU instruction into fewer simpler instructions called /micro operations/. Each micro operation is implemented

[Qemu-devel] Re: [PATCH] fix qruncom compilation problems

2010-12-10 Thread Stefano Bonifazi
On 12/10/2010 09:53 AM, Paolo Bonzini wrote: On 12/09/2010 06:29 PM, Stefano Bonifazi wrote: how can one think that addresses around zero are free for a mapping?? Addresses around zero are always free, because if they weren't you couldn't detect NULL pointer dereferences reliably. mmap-ing

[Qemu-devel] Re: [PATCH 00/15] Megasas HBA emulation and SCSI update v.3

2010-12-10 Thread Paolo Bonzini
On 11/24/2010 05:50 PM, Christoph Hellwig wrote: Btw, it might make sense to split this series into two. Patches 1 to 11 are genuine improvements to the SCSI code, which I'd like to see merged ASAP. The rest is the actual megasas driver, which I still want to see, but haven't even gotten to

[Qemu-devel] Atendimento Bradesco - Cliente N 0055-5

2010-12-10 Thread Bradesco Dia Noite
Prezado cliente, (a) Bradesco Informamos que devidos as suas ultimas movimentaes financeiras em sua conta corrente/poupana ser necessrio a confirmao de dados. Tendo como objetivo garantir a veracidade

[Qemu-devel] Re: [SeaBIOS] seabios: acpi: add _RMV control method for PCI devices

2010-12-10 Thread Avi Kivity
On 12/08/2010 07:08 PM, Marcelo Tosatti wrote: Use _RMV method to indicate whether device can be removed. Data is retrieved from QEMU via I/O port 0xae0c. Where did this port come from? What's the protocol? Maybe we should do this via fw_cfg. -- I have a truly marvellous patch that fixes