[Qemu-devel] Re: [PATCH] A bit optimization for tlb_set_page()

2010-04-30 Thread Jan Kiszka
Jun Koi wrote: On Wed, Apr 28, 2010 at 3:53 PM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: On Wed, Apr 28, 2010 at 8:48 AM, Jun Koi junkoi2...@gmail.com wrote: On Wed, Apr 28, 2010 at 3:36 AM, Jan Kiszka jan.kis...@web.de wrote: Jun Koi wrote: It is not necessary to continue

[Qemu-devel] Qemu Debugging

2010-04-30 Thread Ehsan Ul haq
Hi, How can I debug the Qemu source code? Thanks,

[Qemu-devel] Re: [PATCH] block: Release allocated options after bdrv_open

2010-04-30 Thread Kevin Wolf
Am 29.04.2010 18:24, schrieb Jan Kiszka: They aren't used afterwards nor supposed to be stored by a bdrv_create handler. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Thanks, applied to the block branch. Kevin

[Qemu-devel] [PATCH v2 2/2] virtio-console: Notify resize to the guest.

2010-04-30 Thread Kusanagi Kouichi
I tested this patch as follows: I put printf()s into involved functions. Then ran qemu on a terminal emulator, and resized it. The guest kernel gets initial size. However, it doesn't update the size. It seems to need to enable multiport for resize. v2: Rename virtio_serial_resize to

[Qemu-devel] Re: [PATCH v2 2/2] virtio-console: Notify resize to the guest.

2010-04-30 Thread Amit Shah
On (Fri) Apr 30 2010 [17:12:19], Kusanagi Kouichi wrote: I tested this patch as follows: I put printf()s into involved functions. Then ran qemu on a terminal emulator, and resized it. The guest kernel gets initial size. However, it doesn't update the size. It seems to need to enable multiport

[Qemu-devel] Re: [PATCH] lsi: Properly initialize controller state on reset

2010-04-30 Thread Jan Kiszka
Jan Kiszka wrote: The LSI controller was lacking any system reset handler. This is an attempt to fix it. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/lsi53c895a.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/lsi53c895a.c

[Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs

2010-04-30 Thread Amit Shah
In the flush_queued_data() function, we expect port to be valid. Assert only for port and not port || discard. Reported-by: Juan Quintela quint...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-serial-bus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH v2 1/2] lsi: Purge request queue on soft reset

2010-04-30 Thread Jan Kiszka
Avoid keeping zombie requests across controller reset by purging the queue and also dropping the currently active request. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/lsi53c895a.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/lsi53c895a.c

[Qemu-devel] [PATCH v2 2/2] lsi: Properly initialize controller state on reset

2010-04-30 Thread Jan Kiszka
The LSI controller was lacking a system reset handler. Simply invoke the existing soft reset handler in this case. This also allows to drop its explicit invocation during init. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/lsi53c895a.c | 10 -- 1 files changed, 8

[Qemu-devel] add ahci support into qemu

2010-04-30 Thread 乔崇
Hi,everyone! I just add AHCI Emulation into qemu. I have tested it on linux kernel,it works well. run like this: qemu -hda disk ... Now only support sata disk. -- 乔崇 qiaochong.ac.cn 龙芯技术服务中心 office:010-62600855-108 mobile:13521990614 2009年 11月 16日 星期一 10:31:04 CST /* * QEMU AHCI Emulation

[Qemu-devel] Adding Additional Platforms/Boards to Qemu

2010-04-30 Thread Nikos Valavanis
Hi, I am interested in adding a Renesas ARM Multicore Cortex A9 Development board to Qemu. Are there any FAQs on how to this? Is anyone else working on adding additional Platforms/Boards to Qemu? Nikos

[Qemu-devel] Re: [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs

2010-04-30 Thread Juan Quintela
Amit Shah amit.s...@redhat.com wrote: In the flush_queued_data() function, we expect port to be valid. Assert only for port and not port || discard. Reported-by: Juan Quintela quint...@redhat.com Signed-off-by: Amit Shah amit.s...@redhat.com reviewed-by: Juan Quintela quint...@redhat.com

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

2010-04-30 Thread Kevin Wolf
Hi Anthony, this is the second part of the block patches in my queue that I promised in the pull request last week. I also included the high watermark patch even if it didn't sit on the list for a very long time - but the people that I expected to comment on it have already done so, either on the

[Qemu-devel] [PATCH 01/18] block: separate raw images from the file protocol

2010-04-30 Thread Kevin Wolf
From: Christoph Hellwig h...@lst.de We're running into various problems because the raw file access, which is used internally by the various image formats is entangled with the raw image format, which maps the VM view 1:1 to a file system. This patch renames the raw file backends to the file

[Qemu-devel] [PATCH 02/18] block: Split bdrv_open

2010-04-30 Thread Kevin Wolf
bdrv_open contains quite some code that is only useful for opening images (as opposed to opening files by a protocol), for example snapshots. This patch splits the code so that we have bdrv_open_file() for files (uses protocols), bdrv_open() for images (uses format drivers) and bdrv_open_common()

[Qemu-devel] [PATCH 03/18] block: Avoid forward declaration of bdrv_open_common

2010-04-30 Thread Kevin Wolf
Move bdrv_open_common so it's defined before its callers and remove the forward declaration. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 145 +++ 1 files changed, 71 insertions(+), 74 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH 05/18] block: bdrv_has_zero_init

2010-04-30 Thread Kevin Wolf
This fixes the problem that qemu-img's use of no_zero_init only considered the no_zero_init flag of the format driver, but not of the underlying protocols. Between the raw/file split and this fix, converting to host devices is broken. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c|

[Qemu-devel] [PATCH 06/18] vmdk: Fix COW

2010-04-30 Thread Kevin Wolf
When trying to do COW, VMDK wrote the data back to the backing file. This problem was revealed by the patch that made backing files read-only. This patch does not only fix the problem, but also simplifies the VMDK code a bit. This fixes the backing file qemu-iotests cases for VMDK.

[Qemu-devel] [PATCH 08/18] vmdk: Convert to bdrv_open

2010-04-30 Thread Kevin Wolf
It's a format driver, so implement bdrv_open instead of bdrv_file_open. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/vmdk.c | 51 +-- 1 files changed, 21 insertions(+), 30 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index

[Qemu-devel] [PATCH 07/18] vmdk: Clean up backing file handling

2010-04-30 Thread Kevin Wolf
VMDK is doing interesting things when it needs to open a backing file. This patch changes that part to look more like in other drivers. The nice side effect is that the file name isn't needed any more in the open function. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/vmdk.c | 58

[Qemu-devel] [PATCH 09/18] block: Set backing_hd to NULL after deleting it

2010-04-30 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com It is safer to set backing_hd to NULL after deleting it so that any use after deletion is obvious during development. Happy segfaulting! This patch should be applied after Kevin Wolf's vmdk: Convert to bdrv_open so that vmdk does not segfault on

[Qemu-devel] [PATCH 10/18] qcow2: Avoid shadowing variable in alloc_clusters_noref()

2010-04-30 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com The i loop iterator is shadowed by the next free cluster index. Both using the variable name 'i' makes the code harder to read. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Kevin Wolf kw...@redhat.com ---

[Qemu-devel] [PATCH 11/18] raw-posix: Use pread/pwrite instead of lseek+read/write

2010-04-30 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch combines the lseek+read/write calls to use pread/pwrite instead. This will result in fewer system calls and is already used by AIO. Thanks to Jan Kiszka jan.kis...@siemens.com for identifying excessive lseek and Christoph Hellwig

[Qemu-devel] [PATCH 12/18] block: Cache total_sectors to reduce bdrv_getlength calls

2010-04-30 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com The BlockDriver bdrv_getlength function is called from the I/O code path when checking that the request falls within the device. Unfortunately this involves an lseek system call in the raw protocol; every read or write request will incur this

[Qemu-devel] [PATCH 14/18] qcow2: Remove abort on free_clusters failure

2010-04-30 Thread Kevin Wolf
While it's true that during regular operation free_clusters failure would be a bug, an I/O error can always happen. There's no need to kill the VM, the worst thing that can happen (and it will) is that we leak some clusters. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-refcount.c |

[Qemu-devel] [PATCH 17/18] qemu-img rebase: Fix output image corruption

2010-04-30 Thread Kevin Wolf
qemu-img rebase must always give clusters in the COW file priority over those in the backing file. As it failed to use number of non-allocated clusters but assumed the maximum, it was possible that allocated clusters were taken from the backing file instead, leading to a corrupted output image.

[Qemu-devel] [PATCH 15/18] qcow2: Implement bdrv_truncate() for growing images

2010-04-30 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds the ability to grow qcow2 images in-place using bdrv_truncate(). This enables qemu-img resize command support for qcow2. Snapshots are not supported and bdrv_truncate() will return -ENOTSUP. The notion of resizing an image with

[Qemu-devel] [PATCH 18/18] block: Release allocated options after bdrv_open

2010-04-30 Thread Kevin Wolf
From: Jan Kiszka jan.kis...@siemens.com They aren't used afterwards nor supposed to be stored by a bdrv_create handler. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 13/18] qemu-img: Add 'resize' command to grow/shrink disk images

2010-04-30 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch adds a 'resize' command to grow/shrink disk images. This allows changing the size of disk images without copying to a new image file. Currently only raw files support resize. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com

[Qemu-devel] [PATCH 16/18] block: Add wr_highest_sector blockstat

2010-04-30 Thread Kevin Wolf
This adds the wr_highest_sector blockstat which implements what is generally known as the high watermark. It is the highest offset of a sector written to the respective BlockDriverState since it has been opened. The query-blockstat QMP command is extended to add this value to the result, and also

Re: [Qemu-devel] Adding Additional Platforms/Boards to Qemu

2010-04-30 Thread Thomas Monjalon
Nikos Valavanis wrote: I am interested in adding a Renesas ARM Multicore Cortex A9 Development board to Qemu. Are there any FAQs on how to this? There is a little doc on internals: http://git.qemu.org/qemu.git/tree/qemu-tech.texi But nothing about adding a board. Is anyone else working on

[Qemu-devel] [PATCH 0/2] QMP: Commands doc

2010-04-30 Thread Luiz Capitulino
Details in the patches.

[Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-04-30 Thread Luiz Capitulino
One of the most important missing feature in QMP today is its supported command documentation. The plan is to make it part of self-description support, however self-description is a big task we have been postponing for a long time now and still don't know when it's going to be done. In order not

[Qemu-devel] [PATCH 2/2] Monitor: Drop QMP documentation from code

2010-04-30 Thread Luiz Capitulino
Previous commit added the QMP/qmp-commands.txt file, which is a copy of this information. While it's good to keep it near code, maintaining two copies of the information is too hard and has little benefit as we don't expect client writers to consult the code to find this kind of documentation.

[Qemu-devel] Qemu: x86 machine on alpha Tru64 host

2010-04-30 Thread migli...@users.sourceforge.net
Can i build qemu on Tru64 5.1b / Alpha host using ee0 ( COMPAQ Intel 82559 ) or bcm0 ( Broadcom BCM5703X ) network adapter ? thanks a lot Andrea

Re: [Qemu-devel] [PATCH 0/2] QMP: Commands doc

2010-04-30 Thread Kevin Wolf
Am 30.04.2010 19:03, schrieb Luiz Capitulino: Details in the patches. This conflicts with the high watermark patch which changes the query-blockstats description. Can I convince you to rebase on top of it? (If you prefer some git tree, you can use git://repo.or.cz/qemu/kevin.git block) Kevin

Re: [Qemu-devel] [PATCH 0/2] QMP: Commands doc

2010-04-30 Thread Luiz Capitulino
On Fri, 30 Apr 2010 19:30:36 +0200 Kevin Wolf kw...@redhat.com wrote: Am 30.04.2010 19:03, schrieb Luiz Capitulino: Details in the patches. This conflicts with the high watermark patch which changes the query-blockstats description. Can I convince you to rebase on top of it? Sure, but I

Re: [Qemu-devel] [PATCH 0/2] QMP: Commands doc

2010-04-30 Thread Luiz Capitulino
On Fri, 30 Apr 2010 15:15:50 -0300 Luiz Capitulino lcapitul...@redhat.com wrote: On Fri, 30 Apr 2010 19:30:36 +0200 Kevin Wolf kw...@redhat.com wrote: Am 30.04.2010 19:03, schrieb Luiz Capitulino: Details in the patches. This conflicts with the high watermark patch which changes the

[Qemu-devel] [PATCH] Fix boot once option

2010-04-30 Thread Alex Williamson
The boot once options seems to have gotten broken since it originally went in. We need to wait until the second time restore_boot_devices() gets called before restoring the standard boot order and removing itself from the reset list. Signed-off-by: Alex Williamson alex.william...@redhat.com --

[Qemu-devel] [PATCH] pflash_cfi01: add device ID read command

2010-04-30 Thread Michael Walle
Add support to read manufacturer and device ID. For everything else (eg. lock bits) 0 is returned. --- hw/pflash_cfi01.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index dfdced9..2d30968 100644 ---