Re: [Qemu-devel] [PATCH v4 2/3] Extract code to nbd_setup function to be used for many purposes

2011-12-06 Thread Paolo Bonzini
On 12/06/2011 07:56 AM, Chunyan Liu wrote: Currently, the nbd_setup needs parameters: device, srcpath, flags, partition, dev_offset, nbdflags, sockpath, bindto, port, shared, persistent, verbose, sigterm_rfd. More than 10 parameters. I still didn't find a better way to reduce parameters. Making

Re: [Qemu-devel] [PATCH v4 2/3] Extract code to nbd_setup function to be used for many purposes

2011-12-06 Thread Chunyan Liu
2011/12/6 Paolo Bonzini pbonz...@redhat.com On 12/06/2011 07:56 AM, Chunyan Liu wrote: Currently, the nbd_setup needs parameters: device, srcpath, flags, partition, dev_offset, nbdflags, sockpath, bindto, port, shared, persistent, verbose, sigterm_rfd. More than 10 parameters. I still

Re: [Qemu-devel] [PATCH v4 2/3] Extract code to nbd_setup function to be used for many purposes

2011-12-06 Thread Paolo Bonzini
On 12/06/2011 09:42 AM, Chunyan Liu wrote: I do not understand why you cannot simply do it like this: - in the server thread, do everything as it is now Nope. When device changes, both client thread and server thread should be refreshed. sockpath and sharing_fds[] is changed with

Re: [Qemu-devel] [PATCH v4 2/3] Extract code to nbd_setup function to be used for many purposes

2011-12-06 Thread Chunyan Liu
2011/12/6 Paolo Bonzini pbonz...@redhat.com On 12/06/2011 09:42 AM, Chunyan Liu wrote: I do not understand why you cannot simply do it like this: - in the server thread, do everything as it is now Nope. When device changes, both client thread and server thread should be refreshed.

[Qemu-devel] About the snapshot

2011-12-06 Thread Zhi Hui Li
1) : for example: BDRVQcowState *s = bs-opaque; s-snapshots s-nb_snapshots 1:use the command: qemu-img snapshot ./test.qcow2 -c aa the memory of the s-snapshot don't free, if the s-nb_snapshots is large, Does it have some problems. 2: use the command: qemu-system-x86_64 ./test.qcow2

Re: [Qemu-devel] Qemu stable releases

2011-12-06 Thread Stefan Hajnoczi
On Mon, Dec 5, 2011 at 8:08 PM, Justin M. Forbes jmfor...@linuxtx.org wrote: The stable tree for 1.0 has now been created and the mailing list exists. Where does the stable 1.0 tree live? Stefan

Re: [Qemu-devel] About the snapshot

2011-12-06 Thread Stefan Hajnoczi
On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui Li zhihu...@linux.vnet.ibm.com wrote: 1) : for example: BDRVQcowState *s = bs-opaque; s-snapshots s-nb_snapshots 1:use the command:   qemu-img snapshot ./test.qcow2  -c aa the memory of the s-snapshot don't free, if the s-nb_snapshots is large,

Re: [Qemu-devel] About the snapshot

2011-12-06 Thread Zhi Hui Li
On 2011年12月06日 17:40, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui Lizhihu...@linux.vnet.ibm.com wrote: 1) : for example: BDRVQcowState *s = bs-opaque; s-snapshots s-nb_snapshots 1:use the command: qemu-img snapshot ./test.qcow2 -c aa the memory of the s-snapshot

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Convert source files to UTF-8 encoding

2011-12-06 Thread Stefan Hajnoczi
On Fri, Dec 02, 2011 at 10:30:41AM +0100, Stefan Weil wrote: Most QEMU files either are pure ASCII or use UTF-8. Convert some files which still used ISO-8859-1 to UTF-8. Signed-off-by: Stefan Weil s...@weilnetz.de --- hw/ds1225y.c |2 +- hw/fdc.c |2 +-

Re: [Qemu-devel] [PATCH 0/2] linux-user: Fix non-UTF-8 characters

2011-12-06 Thread Stefan Hajnoczi
On Sat, Dec 03, 2011 at 08:55:59AM +0100, Stefan Weil wrote: Am 02.12.2011 20:30, schrieb Peter Maydell: These two patches fix some non-UTF-8 characters in linux-user/ source files. Other than the five files Stefan Weil recently sent a patch to fix, these are the only remaining non-UTF-8

Re: [Qemu-devel] About the snapshot

2011-12-06 Thread Stefan Hajnoczi
On Tue, Dec 6, 2011 at 10:01 AM, Zhi Hui Li zhihu...@linux.vnet.ibm.com wrote: On 2011年12月06日 17:40, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui Lizhihu...@linux.vnet.ibm.com  wrote: 1) : for example: BDRVQcowState *s = bs-opaque; s-snapshots s-nb_snapshots

Re: [Qemu-devel] [ANNOUNCE] QEMU 1.0 release

2011-12-06 Thread Avi Kivity
On 12/05/2011 08:05 PM, Anthony Liguori wrote: On 12/05/2011 11:50 AM, Avi Kivity wrote: On 12/05/2011 05:28 PM, Anthony Liguori wrote: On 12/05/2011 09:06 AM, Alex Jia wrote: Hi Anthony, It seems the following link is unavailable now: http://wiki.qemu.org/download/qemu-1.0.tar.gz The VM

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Convert keymap file to UTF-8 encoding

2011-12-06 Thread Stefan Hajnoczi
On Sat, Dec 03, 2011 at 10:45:25AM +0100, Stefan Weil wrote: Most QEMU files either are pure ASCII or use UTF-8. Convert this keymap file which still used ISO-8859-1 to UTF-8. Signed-off-by: Stefan Weil s...@weilnetz.de --- pc-bios/keymaps/is |2 +- 1 files changed, 1 insertions(+), 1

Re: [Qemu-devel] [Qemu-trivial] endless loop when use qemu-system-mipsel to load bios

2011-12-06 Thread Stefan Hajnoczi
On Sat, Dec 03, 2011 at 11:27:29PM +0100, Stefan Weil wrote: Am 16.11.2011 16:21, schrieb rui chen: sorry, here is my new patch file: From 05f4abe8d8c37f1585f2bb7cb89b15426044bb65 Mon Sep 17 00:00:00 2001 From: Chen Rui chenn...@gmail.com mailto:chenn...@gmail.com Date: Sun, 13 Nov 2011

Re: [Qemu-devel] [PATCH] Rename get_tls to tls_var

2011-12-06 Thread Stefan Hajnoczi
On Mon, Dec 05, 2011 at 03:18:54PM +0100, Jan Kiszka wrote: get_tls() can serve as a lvalue as well, so 'get' might be confusing. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpu-all.h |2 +- qemu-tls.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Thanks,

Re: [Qemu-devel] [Qemu-trivial] [PATCH] linux-user/syscall.c: Don't skip stracing for fcntl64 failure case

2011-12-06 Thread Stefan Hajnoczi
On Mon, Dec 05, 2011 at 11:11:50PM +, Peter Maydell wrote: In an fcntl64 failure path, we were returning directly rather than simply breaking out of the switch statement. This skips the strace code for printing the syscall return value, so don't do that. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory: minor documentation fixes/enhancements

2011-12-06 Thread Stefan Hajnoczi
On Mon, Dec 05, 2011 at 10:48:37PM +0100, Stefan Weil wrote: Am 05.12.2011 20:54, schrieb Ademar de Souza Reis Jr: Fix typos and minor documentation errors in both memory.h and docs/memory.txt. Also add missing documentation formatting tags to transaction functions. Signed-off-by: Ademar

Re: [Qemu-devel] [PATCH v3 for-1.1 0/9] target-arm: More inference rules for features

2011-12-06 Thread Peter Maydell
On 6 December 2011 00:30, Andreas Färber andreas.faer...@web.de wrote: Question: Should we also add the following rules? V7MP = V7 Well, V7MP indicates support for the Multiprocessing Extensions, which are an optional extension to ARMv7-A and ARMv7-R. So in some sense V7MP implies V7. However

[Qemu-devel] [PATCH 00/11] virtio-scsi device model

2011-12-06 Thread Paolo Bonzini
Given that the discussion on the spec has converged, here is finally the virtio-scsi device model. The first patch is an (already posted) bug fix. The next 6 patches add scatter/gather support to the SCSI layer; the final 4 add the device---first a stub, and then progressively more features.

[Qemu-devel] [PATCH 04/11] dma-helpers: add accounting wrappers

2011-12-06 Thread Paolo Bonzini
The length of the transfer is already in the sglist, so add a wrapper that fetches it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- dma-helpers.c |6 ++ dma.h |3 +++ hw/ide/ahci.c | 10 -- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 01/11] qiov: prevent double free or use-after-free

2011-12-06 Thread Paolo Bonzini
qemu_iovec_destroy does not clear the QEMUIOVector fully, and the data could thus be used after free or freed again. This can be observed with virtio-scsi, because canceling DMA requests can happen more easily with SCSI (due to task management functions) than with other backends. Signed-off-by:

[Qemu-devel] [PATCH 11/11] virtio-scsi: process control queue requests

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio-scsi.c | 128 ++--- 1 files changed, 120 insertions(+), 8 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index dbb4003..601a646 100644 --- a/hw/virtio-scsi.c +++

[Qemu-devel] [PATCH 05/19] configure: Print a banner comment at the top of config.log

2011-12-06 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org Print a banner comment at the top of config.log identifying when configure was run and the arguments used. This is occasionally useful for debugging purposes. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 04/19] configure: Include #define name in check_define compiler error

2011-12-06 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org Include the name of the #define being tested for in the compiler error produced when a check_define test is run and fails. This appears only in the config.log, but it does make it a little easier to debug problems by inspecting config.log.

[Qemu-devel] [PATCH 14/19] linux-user/cpu-uname.c: Convert to UTF-8

2011-12-06 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org Convert comment from ISO-8859-1 encoding to UTF-8 to match the rest of QEMU's source code. Reviewed-by: Stefan Weil s...@weilnetz.de Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com ---

[Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var

2011-12-06 Thread Stefan Hajnoczi
From: Jan Kiszka jan.kis...@siemens.com get_tls() can serve as a lvalue as well, so 'get' might be confusing. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- cpu-all.h |2 +- qemu-tls.h |4 ++-- 2 files changed, 3

[Qemu-devel] [PATCH 17/19] linux-user/syscall.c: Don't skip stracing for fcntl64 failure case

2011-12-06 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org In an fcntl64 failure path, we were returning directly rather than simply breaking out of the switch statement. This skips the strace code for printing the syscall return value, so don't do that. Acked-by: Alexander Graf ag...@suse.de Signed-off-by:

[Qemu-devel] [PATCH 15/19] linux-user/arm/nwfpe/fpopcode.h: Fix non-UTF-8 characters

2011-12-06 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org Fix some stray non-UTF-8 characters used in some ASCII art tables by converting them to plain ASCII '|' instead. Reviewed-by: Stefan Weil s...@weilnetz.de Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 18/19] memory: minor documentation fixes/enhancements

2011-12-06 Thread Stefan Hajnoczi
From: Ademar de Souza Reis Jr ar...@redhat.com Fix typos and minor documentation errors in both memory.h and docs/memory.txt. Also add missing documentation formatting tags to transaction functions. Reviewed-by: Stefan Weil s...@weilnetz.de Signed-off-by: Ademar de Souza Reis Jr

[Qemu-devel] [PATCH 19/19] mips_malta: resolve endless loop when loading bios

2011-12-06 Thread Stefan Hajnoczi
From: Chen Rui chenn...@gmail.com Tested-by: Stefan Weil s...@weilnetz.de Signed-off-by: Chen Rui chenn...@gmail.com --- hw/mips_malta.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index bb49749..e7dfbd6 100644 --- a/hw/mips_malta.c

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

2011-12-06 Thread Paolo Bonzini
With the upcoming sglist support, HBAs will not see any transfer_data call and will not have a way to detect short transfers. So pass the residual amount of data upon command completion. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/esp.c |3 ++- hw/lsi53c895a.c |2 +-

[Qemu-devel] [PATCH 10/19] pcie_aer: adjust do_pcie_aer_inejct_error - do_pcie_aer_inject_error

2011-12-06 Thread Stefan Hajnoczi
From: Zhi Yong Wu wu...@linux.vnet.ibm.com This function name is a bit wrong. Although it doesn't impact function, it is a bit necessary that we should fixup it. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hmp-commands.hx |

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

2011-12-06 Thread Paolo Bonzini
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Add a useless virtio SCSI HBA device: qemu -device virtio-scsi-pci Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Makefile.target |1 +

[Qemu-devel] [PATCH 02/11] dma-helpers: make QEMUSGList target independent

2011-12-06 Thread Paolo Bonzini
This lets scsi-* observe the overall s/g list and pass it to the DMA helpers. size_t can potentially be smaller than dma_addr_t. However, the overall size of a S/G list can actually be bigger than dma_addr_t because (for writes) you could reuse the same buffer multiple times. So there is no

[Qemu-devel] [PATCH 02/19] console: Fix console_putchar() for CSI J

2011-12-06 Thread Stefan Hajnoczi
From: Markus Armbruster arm...@redhat.com It falls through to the code for CSI K. Erase Down also does Erase End of Line, Erase Up also does Erase Start of Line, and Erase Screen also does Erase Line. Happens not to be visible. Fix it anyway. Spotted by Coverity. Signed-off-by: Markus

[Qemu-devel] [PULL 00/19] Trivial patches for 3 to 6 December 2011

2011-12-06 Thread Stefan Hajnoczi
The following changes since commit 217bfb445b54db618a30f3a39170bebd9fd9dbf2: hw/arm_gic.c: Ignore attempts to complete nonexistent IRQs (2011-12-05 21:38:56 +0100) are available in the git repository at: ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches-next Ademar de Souza Reis

[Qemu-devel] [PATCH 07/11] scsi-disk: enable scatter/gather functionality

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi-disk.c | 63 --- 1 files changed, 50 insertions(+), 13 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 505accd..1640d2d 100644 --- a/hw/scsi-disk.c +++

[Qemu-devel] [PATCH 03/11] dma-helpers: add dma_buf_read and dma_buf_write

2011-12-06 Thread Paolo Bonzini
These helpers do a full transfer from an in-memory buffer to target memory, with support for scatter/gather lists. It will be used to store the reply of an emulated command into a QEMUSGList provided by the adapter. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- dma-helpers.c | 30

[Qemu-devel] [PATCH 09/19] fix spelling in hw sub directory

2011-12-06 Thread Stefan Hajnoczi
From: Dong Xu Wang wdon...@linux.vnet.ibm.com Correct obvious spelling errors in qemu/hw directory. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/9pfs/virtio-9p-coth.h |2 +- hw/9pfs/virtio-9p-handle.c |2 +-

Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var

2011-12-06 Thread Andreas Färber
Am 06.12.2011 12:01, schrieb Stefan Hajnoczi: From: Jan Kiszka jan.kis...@siemens.com get_tls() can serve as a lvalue as well, so 'get' might be confusing. Note that this does not work for POSIX pthread_getspecific(), which we'll need to support at some point in time, so I don't think this is

Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var

2011-12-06 Thread Jan Kiszka
On 2011-12-06 12:43, Andreas Färber wrote: Am 06.12.2011 12:01, schrieb Stefan Hajnoczi: From: Jan Kiszka jan.kis...@siemens.com get_tls() can serve as a lvalue as well, so 'get' might be confusing. Note that this does not work for POSIX pthread_getspecific(), which we'll need to support

[Qemu-devel] [PATCH 11/19] configure: Pull linux-headers/asm symlink creation out of loop

2011-12-06 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org Pull the creation of the linux-headers/asm symlink out of the loop so we don't pointlessly delete and recreate it once for each target. Also move the setting of the includes variable up so that it is in the same place as the other code which sets this

[Qemu-devel] [PATCH 08/19] fix typo: delete redundant semicolon

2011-12-06 Thread Stefan Hajnoczi
From: Dong Xu Wang wdon...@linux.vnet.ibm.com Double semicolons should be single. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- block/nbd.c|4 ++-- cpus.c |2 +- hw/9pfs/codir.c

[Qemu-devel] [PATCH 10/11] virtio-scsi: add basic SCSI bus operation

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio-scsi.c | 101 +++--- 1 files changed, 89 insertions(+), 11 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index c86e15e..dbb4003 100644 --- a/hw/virtio-scsi.c +++

[Qemu-devel] [PATCH 12/19] Convert source files to UTF-8 encoding

2011-12-06 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Most QEMU files either are pure ASCII or use UTF-8. Convert some files which still used ISO-8859-1 to UTF-8. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/ds1225y.c |2 +- hw/fdc.c

[Qemu-devel] [PATCH 03/19] console: Fix qemu_default_pixelformat() for 24 bpp

2011-12-06 Thread Stefan Hajnoczi
From: Markus Armbruster arm...@redhat.com Falls through to 32 bpp. Harmless, because the only difference is the alpha component, and we're not using that. Spotted by Coverity. Acked-by: Stefano Stabellini stefano.stabell...@eu.citrix.com Signed-off-by: Markus Armbruster arm...@redhat.com

[Qemu-devel] [PATCH 01/19] console: Clean up confusing indentation in console_putchar()

2011-12-06 Thread Stefan Hajnoczi
From: Markus Armbruster arm...@redhat.com Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- console.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/console.c b/console.c index

[Qemu-devel] [PATCH 06/11] scsi: add scatter/gather functionality

2011-12-06 Thread Paolo Bonzini
Scatter/gather functionality uses the newly added DMA helpers. The device can choose between doing DMA itself, or calling scsi_req_data as usual. In the latter case, scsi_req_data will use the buffer-based DMA helpers to copy piecewise to/from the destination area(s). Signed-off-by: Paolo

Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var

2011-12-06 Thread Paolo Bonzini
On 12/06/2011 12:43 PM, Andreas Färber wrote: Am 06.12.2011 12:01, schrieb Stefan Hajnoczi: From: Jan Kiszkajan.kis...@siemens.com get_tls() can serve as a lvalue as well, so 'get' might be confusing. Note that this does not work for POSIX pthread_getspecific(), which we'll need to support

[Qemu-devel] [PATCH 09/11] virtio-scsi: Add basic request processing infrastructure

2011-12-06 Thread Paolo Bonzini
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio-scsi.c | 142 +- 1 files changed, 140 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH v3 for-1.1 0/9] target-arm: More inference rules for features

2011-12-06 Thread Peter Maydell
On 6 December 2011 00:30, Andreas Färber andreas.faer...@web.de wrote: Hello Peter, Here's an extended and cleaned up version of my inference series, taking into account your suggestions and dropping my motivating FYI patches for Cortex-R4F. The intent is to reduce effort and knowledge

[Qemu-devel] [Bug 899961] Re: qemu/kvm locks up when run 32bit userspace with 64bit kernel

2011-12-06 Thread Michael Tokarev
** Description changed: - Applies to both qemu and qemu-kvm 1.0, but only when kernel is 64bit and + Only applies to qemu-kvm 1.0, and only when kernel is 64bit and userspace is 32bit, on x86. Did not happen with previous released versions, such as 0.15. Not all guests triggers this issue -

[Qemu-devel] [PATCH 13/19] Convert keymap file to UTF-8 encoding

2011-12-06 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Most QEMU files either are pure ASCII or use UTF-8. Convert this keymap file which still used ISO-8859-1 to UTF-8. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- pc-bios/keymaps/is |2 +- 1 files

[Qemu-devel] [PATCH 06/19] net/socket.c : fix memory leak

2011-12-06 Thread Stefan Hajnoczi
From: Zhi Hui Li zhihu...@linux.vnet.ibm.com Signed-off-by: Li Zhi Hui zhihu...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- net/socket.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/net/socket.c b/net/socket.c index

[Qemu-devel] [PATCH 07/19] win32: fix memory leak

2011-12-06 Thread Stefan Hajnoczi
From: Zhi Hui Li zhihu...@linux.vnet.ibm.com string is allocated by g_malloc, will not be used after putenv, should be free before return. Paolo Bonzini pbonz...@redhat.com confirmed this is safe under Wine: 1) the underlying Win32 APIs require separate arguments for the variable and value; 2)

Re: [Qemu-devel] winXP Standard PC HAL and qemu-kvm = 0.15

2011-12-06 Thread Michael S. Tsirkin
On Tue, Dec 06, 2011 at 03:02:49PM +0400, Michael Tokarev wrote: On 06.12.2011 14:32, Avi Kivity wrote: On 12/05/2011 10:19 PM, Michael Tokarev wrote: On 05.12.2011 17:28, Avi Kivity wrote: [] I haven't debugged further yet, -- because it were not easy to find out what was causing the

Re: [Qemu-devel] [PATCH] Add minimal Vexpress Cortex A15 support

2011-12-06 Thread Avi Kivity
On 12/01/2011 03:37 AM, bill4car...@gmail.com wrote: From: Bill Carson bill4car...@gmail.com This patch adds minimal codes to support A15 which enables ARM KVM could run Guest OS build with Versatile Express Cortex-A15x4 tile. + +static inline int +gic_get_current_cpu(void) +{ + return

Re: [Qemu-devel] [PATCH] Add minimal Vexpress Cortex A15 support

2011-12-06 Thread Peter Maydell
On 6 December 2011 12:28, Avi Kivity a...@redhat.com wrote: On 12/01/2011 03:37 AM, bill4car...@gmail.com wrote: +    /* ??? Hack to map an additional page of ram for the secondary CPU +       startup code.  I guess this works on real hardware because the +       BootROM happens to be in

Re: [Qemu-devel] [Bug 899961] Re: qemu/kvm locks up when run 32bit userspace with 64bit kernel

2011-12-06 Thread Avi Kivity
On 12/04/2011 07:45 PM, Michael Tokarev wrote: Actually after trying to do lots of experiments and finally a git bisection, it turned out that the issue only affects qemu-kvm, not upstream qemu. Bisection between qemu-kvm 0.15.0 and 1.0 lead to this commit: commit

Re: [Qemu-devel] [PATCH] Add minimal Vexpress Cortex A15 support

2011-12-06 Thread Avi Kivity
On 12/06/2011 02:35 PM, Peter Maydell wrote: On 6 December 2011 12:28, Avi Kivity a...@redhat.com wrote: On 12/01/2011 03:37 AM, bill4car...@gmail.com wrote: +/* ??? Hack to map an additional page of ram for the secondary CPU + startup code. I guess this works on real hardware

Re: [Qemu-devel] [PATCH] Add minimal Vexpress Cortex A15 support

2011-12-06 Thread Peter Maydell
On 6 December 2011 12:39, Avi Kivity a...@redhat.com wrote: On 12/06/2011 02:35 PM, Peter Maydell wrote: On 6 December 2011 12:28, Avi Kivity a...@redhat.com wrote: Do you have a better suggestion in this case? We've had the same code in the realview board since 2007 when ARM SMP support was

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Marcelo Tosatti
On Tue, Nov 15, 2011 at 01:28:51PM +0800, Dong Xu Wang wrote: From: Dong Xu Wang wdon...@linux.vnet.ibm.com Provide a new file format: add-cow. The usage can be found in add-cow.txt of this patch. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- Makefile.objs |1 +

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Kevin Wolf
Am 06.12.2011 13:48, schrieb Marcelo Tosatti: On Tue, Nov 15, 2011 at 01:28:51PM +0800, Dong Xu Wang wrote: From: Dong Xu Wang wdon...@linux.vnet.ibm.com Provide a new file format: add-cow. The usage can be found in add-cow.txt of this patch. Signed-off-by: Dong Xu Wang

[Qemu-devel] [PATCH v3 00/16] uq/master: Introduce basic irqchip support

2011-12-06 Thread Jan Kiszka
In this revision, I'm now trying the approach of backend/frontend split-ups for the affected IRQ chips. That means we keep a single qdev device description but fork off specific logic early during device init. The backends support this by providing hooks that user space and KVM models can

[Qemu-devel] [PATCH v3 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-06 Thread Jan Kiszka
More KVM-specific devices will come, so let's start with moving the kvmclock into a dedicated folder. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target|4 ++-- configure |1 + hw/{kvmclock.c = kvm/clock.c} |4 ++--

[Qemu-devel] [PATCH v3 13/16] kvm: x86: Add user space part for in-kernel APIC

2011-12-06 Thread Jan Kiszka
This introduces the alternative APIC backend which makes use of KVM's in-kernel device model. MSI is not yet supported, so we disable this when the in-kernel model is in use. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target |2 +- hw/kvm/apic.c | 129

[Qemu-devel] [PATCH v3 15/16] kvm: x86: Add user space part for in-kernel IOAPIC

2011-12-06 Thread Jan Kiszka
This introduces the KVM-accelerated IOAPIC backend and extends the IRQ routing setup by the 0-2 redirection when needed. The IOAPIC gains a KVM-specific property that allows to define the GSI base for injecting interrupts into the kernel model. This will allow to disentangle PIC and IOAPIC pins

Re: [Qemu-devel] [PATCH] Add minimal Vexpress Cortex A15 support

2011-12-06 Thread Avi Kivity
On 12/06/2011 02:48 PM, Peter Maydell wrote: On 6 December 2011 12:39, Avi Kivity a...@redhat.com wrote: On 12/06/2011 02:35 PM, Peter Maydell wrote: On 6 December 2011 12:28, Avi Kivity a...@redhat.com wrote: Do you have a better suggestion in this case? We've had the same code in the

Re: [Qemu-devel] [PATCH] Add minimal Vexpress Cortex A15 support

2011-12-06 Thread Peter Maydell
On 6 December 2011 13:12, Avi Kivity a...@redhat.com wrote: On 12/06/2011 02:48 PM, Peter Maydell wrote: Real hardware runs the boot ROM. The boot ROM is an unredistributable binary blob, and in any case we almost certainly don't implement the hardware well enough to pass the boot ROM's self

Re: [Qemu-devel] [PATCH] coroutine: switch per-thread free pool to a global pool

2011-12-06 Thread Stefan Hajnoczi
On Mon, Dec 5, 2011 at 5:20 PM, Avi Kivity a...@redhat.com wrote: ucontext-based coroutines use a free pool to reduce allocations and deallocations of coroutine objects.  The pool is per-thread, presumably to improve locality.  However, as coroutines are usually allocated in a vcpu thread and

[Qemu-devel] [PATCH v3 09/16] ioapic: Introduce backend/frontend infrastructure for KVM reuse

2011-12-06 Thread Jan Kiszka
Split up the IOAPIC analogously to APIC and i8259. KVM will share the device description, reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target |2 +- hw/ioapic.c | 130

[Qemu-devel] [PATCH v3 10/16] memory: Introduce memory_region_init_reservation

2011-12-06 Thread Jan Kiszka
Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug, but could theoretically be triggered by guest code (DMA to

[Qemu-devel] [PATCH v3 06/16] i8259: Introduce backend/frontend infrastructure for KVM reuse

2011-12-06 Thread Jan Kiszka
Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. Again, we create a PIC backend infrastructure and provide hooks for init, reset, and vmload/save. This also introduces a common helper to instantiate a single i8259 chip from the cascade- creating i8259_init

[Qemu-devel] [PATCH v3 08/16] ioapic: Reject non-dword accesses to IOWIN register

2011-12-06 Thread Jan Kiszka
Aligns the model with the spec. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/ioapic.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 56b1612..eb75766 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -208,6 +208,9 @@

[Qemu-devel] [PATCH v3 16/16] kvm: Arm in-kernel irqchip support

2011-12-06 Thread Jan Kiszka
Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-config.c |4 qemu-options.hx |5 - 2 files changed, 8

Re: [Qemu-devel] [PATCH v3 00/16] uq/master: Introduce basic irqchip support

2011-12-06 Thread Avi Kivity
On 12/06/2011 02:58 PM, Jan Kiszka wrote: In this revision, I'm now trying the approach of backend/frontend split-ups for the affected IRQ chips. That means we keep a single qdev device description but fork off specific logic early during device init. The backends support this by providing

[Qemu-devel] [PATCH v3 01/16] msi: Generalize msix_supported to msi_supported

2011-12-06 Thread Jan Kiszka
Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9

[Qemu-devel] [PATCH v3 03/16] apic: Stop timer on reset

2011-12-06 Thread Jan Kiszka
All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH v3 12/16] kvm: x86: Establish IRQ0 override control

2011-12-06 Thread Jan Kiszka
KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/pc.c|3 ++- kvm-all.c |5 +

[Qemu-devel] [PATCH v3 04/16] apic: Introduce backend/frontend infrastructure for KVM reuse

2011-12-06 Thread Jan Kiszka
The KVM in-kernel APIC model will reuse parts of the user space model while providing the same frontend view to guest and most management interfaces. Introduce an APIC backend concept to encapsulate those parts that will tell user space and KVM model apart. The backend offers callback hooks for

[Qemu-devel] [PATCH v3 05/16] apic: Open-code timer save/restore

2011-12-06 Thread Jan Kiszka
To enable migration between accelerated and non-accelerated APIC models, we will need to handle the timer saving and restoring specially and can no longer rely on the automatics of VMSTATE_TIMER. Specifically, accelerated model will not start any QEMUTimer. This patch therefore factors out the

[Qemu-devel] [PATCH v3 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-06 Thread Jan Kiszka
Introduce the alternative i8259 backend that exploits KVM in-kernel acceleration. The PIIX3 initialization code is furthermore extended by KVM specific IRQ route setup. GSI injection differs in KVM mode from the user space model. As we can dispatch ISA-range IRQs to both IOAPIC and PIC inside the

[Qemu-devel] [PATCH v3 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-06 Thread Jan Kiszka
Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into these models, and maintain IRQ routes. Routing is optional and depends on the host arch supporting KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as we can't route GSI0 to IOAPIC pin 2.

[Qemu-devel] [PATCH v3 07/16] ioapic: Convert to memory API

2011-12-06 Thread Jan Kiszka
This maintains the old imprecise access size handling. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/ioapic.c | 28 +++- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 61991d7..56b1612 100644 --- a/hw/ioapic.c

Re: [Qemu-devel] [PATCH v3 00/16] uq/master: Introduce basic irqchip support

2011-12-06 Thread Jan Kiszka
On 2011-12-06 14:55, Avi Kivity wrote: On 12/06/2011 02:58 PM, Jan Kiszka wrote: In this revision, I'm now trying the approach of backend/frontend split-ups for the affected IRQ chips. That means we keep a single qdev device description but fork off specific logic early during device init.

[Qemu-devel] [PATCH 0/2] [RFC] qemu-ga: add support for guest command execution

2011-12-06 Thread Michael Roth
The code is still in rough shape, but while we're on the topic of guest agents I wanted to put out a working example of how exec functionality can be added to qemu-ga to provide a mechansim for building arbitrarilly high-level interfaces. The hope is that by allowing qemu-ga to execute commands

[Qemu-devel] [PATCH 2/2] guest agent: add guest-exec and guest-exec-status interfaces

2011-12-06 Thread Michael Roth
Interfaces to execute/manage processes in the guest. Child process' stdin/stdout/stderr can be associated with handles for communication via read/write interfaces. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qapi-schema-guest.json | 55 qga/guest-agent-commands.c |

[Qemu-devel] [PATCH 1/2] guest agent: add guest-file-open-pipe

2011-12-06 Thread Michael Roth
Creates a FIFO pair that can be used with existing file read/write interfaces to communicate with processes spawned via the forthcoming guest-file-exec interface. Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qapi-schema-guest.json | 24 ++- qga/guest-agent-commands.c |

Re: [Qemu-devel] [PATCH 0/2] [RFC] qemu-ga: add support for guest command execution

2011-12-06 Thread Daniel P. Berrange
On Tue, Dec 06, 2011 at 08:34:06AM -0600, Michael Roth wrote: The code is still in rough shape, but while we're on the topic of guest agents I wanted to put out a working example of how exec functionality can be added to qemu-ga to provide a mechansim for building arbitrarilly high-level

Re: [Qemu-devel] winXP Standard PC HAL and qemu-kvm = 0.15

2011-12-06 Thread Michael Tokarev
On 06.12.2011 16:27, Michael S. Tsirkin wrote: On Tue, Dec 06, 2011 at 03:02:49PM +0400, Michael Tokarev wrote: [] And after applying Avi's instructions here's the real bisect result: ab431c283e7055bcd6fb622f212bb29e84a6a134 is the first bad commit commit

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Kevin Wolf
Am 15.11.2011 06:28, schrieb Dong Xu Wang: From: Dong Xu Wang wdon...@linux.vnet.ibm.com Provide a new file format: add-cow. The usage can be found in add-cow.txt of this patch. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- Makefile.objs |1 + block.c

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Marcelo Tosatti
On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: + +ret = bdrv_pread(bs-file, sizeof(header), state-bitmap, +state-bitmap_size); +if (ret != state-bitmap_size) { +goto fail; +} Reading the entire bitmap in memory is not acceptable, it may

Re: [Qemu-devel] About the snapshot

2011-12-06 Thread Zhi Hui Li
2011/12/6 Stefan Hajnoczi stefa...@gmail.com On Tue, Dec 6, 2011 at 10:01 AM, Zhi Hui Li zhihu...@linux.vnet.ibm.com wrote: On 2011年12月06日 17:40, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui Lizhihu...@linux.vnet.ibm.com wrote: 1) : for example:

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Marcelo Tosatti
On Tue, Dec 06, 2011 at 12:53:16PM -0200, Marcelo Tosatti wrote: On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: + +ret = bdrv_pread(bs-file, sizeof(header), state-bitmap, +state-bitmap_size); +if (ret != state-bitmap_size) { +goto fail; +

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Kevin Wolf
Am 06.12.2011 15:53, schrieb Marcelo Tosatti: On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: + +ret = bdrv_pread(bs-file, sizeof(header), state-bitmap, +state-bitmap_size); +if (ret != state-bitmap_size) { +goto fail; +} Reading the entire

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Kevin Wolf
Am 06.12.2011 16:06, schrieb Marcelo Tosatti: On Tue, Dec 06, 2011 at 12:53:16PM -0200, Marcelo Tosatti wrote: On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: + +ret = bdrv_pread(bs-file, sizeof(header), state-bitmap, +state-bitmap_size); +if (ret !=

[Qemu-devel] [PATCH 01/25] add qemu_send_full and qemu_recv_full

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- osdep.c | 67 + qemu-common.h |4 +++ 2 files changed, 71 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 56e6963..70bad27 100644 --- a/osdep.c +++

[Qemu-devel] [PATCH 05/25] nbd: allow multiple in-flight requests

2011-12-06 Thread Paolo Bonzini
Allow sending up to 16 requests, and drive the replies to the coroutine that did the request. The code is written to be exactly the same as before this patch when MAX_NBD_REQUESTS == 1 (modulo the extra mutex and state). Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/nbd.c | 69

[Qemu-devel] [PATCH 23/25] qemu-nbd: add client pointer to NBDRequest

2011-12-06 Thread Paolo Bonzini
By attaching a client to an NBDRequest, we can avoid passing around the socket descriptor and data buffer. Also, we can now manage the reference count for the client in nbd_request_get/put request instead of having to do it ourselved in nbd_read. This simplifies things when coroutines are used.

Re: [Qemu-devel] About the snapshot

2011-12-06 Thread Stefan Hajnoczi
2011/12/6 Zhi Hui Li zhihu...@linux.vnet.ibm.com: 2011/12/6 Stefan Hajnoczi stefa...@gmail.com On Tue, Dec 6, 2011 at 10:01 AM, Zhi Hui Li zhihu...@linux.vnet.ibm.com wrote: On 2011年12月06日 17:40, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui

  1   2   >