Re: [Qemu-devel] Re: [RFC][PATCH] PCI: fix pci_to_cpu_addr() issue

2010-07-02 Thread chen huacai
I have some doubts: when newcfg=0, Qemu Monitor shows BAR6: 32bit memory at 0x0400 [0x0400] Does this means the physical address 0x0400 isn't in RAM but in PCI memory? If yes, seems like it will cause problems. If no, how to understand the output of "info pci" in Qemu Monitor? On Fri,

[Qemu-devel] [Bug 586420] Re: WinXP install cd hangs at boot time if machine started with floppy

2010-07-02 Thread tekditt
@Jes: No, it doesn't boot on its own, it's a simple FAT formatted floppy image. I've even tried to format a real floppy on Windows, copied the drivers on it, and saved the whole floppy as an image with rawrite. I also tried other floppy images, but: QEMU 0.12.4 hangs if I try to boot from the Win

[Qemu-devel] [Bug 586175] Re: Windows XP/2003 doesn't boot

2010-07-02 Thread tekditt
Long time no post, i tried to install Win2k3 through RIS/PXE this time. I still get the same error at boot time: "A disk read error occurred. Press Ctrl + Alt + Del to restart". Neither the Win2k3 install source nor the VirtIO drivers are defective. Something's just wrong with QEMU. Currently qem

[Qemu-devel] Re: qemu-kvm.git unittest failures

2010-07-02 Thread Marcelo Tosatti
On Thu, Jul 01, 2010 at 01:25:51PM -0300, Lucas Meneghel Rodrigues wrote: > Now that we already have a mechanism to perform automated and regular > unittesting, let me start by reporting the first problems I'm seeing > with the unittests. Some (or all) of the problems might be due to > inappropriat

[Qemu-devel] [PATCH 2/2] monitor: Convert 'info qdm' to QMP

2010-07-02 Thread Miguel Di Ciurcio Filho
Converts the 'info qdm' command to QMP, allowing the discovery of all devices known to the QEMU binary without relying on command line paramaters like -device ? and -device devtype,? This change does not modify the output of the 'info qdm' monitor command. Signed-off-by: Miguel Di Ciurcio Filho

[Qemu-devel] [PATCH 0/2] QMP: Introduce query-qdm

2010-07-02 Thread Miguel Di Ciurcio Filho
This series introduces the documentation for the query-qdm command and the conversion of the monitor command 'info qdm' to QMP. The documentation and code are based on a patch previously sent to qemu-devel by Daniel P. Berrange: http://lists.gnu.org/archive/html/qemu-devel/2010-06/msg00931.html

[Qemu-devel] [PATCH 1/2] QMP: Introduce the documentation for query-qdm

2010-07-02 Thread Miguel Di Ciurcio Filho
--- qemu-monitor.hx | 68 +++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 9f62b94..5348899 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -2490,6 +2490,74 @@ STEXI show device

Re: [Qemu-devel] [Bug 600589] [NEW] xchg r8,rax treated as nop

2010-07-02 Thread Richard Henderson
On 07/02/2010 12:13 PM, vic3d...@gmail.com wrote: > Sorry for inconvenience, I just forgot to look in source. :) > Do you plan to fix it in the near future? No, in the near past. ;-) The fix was committed to qemu.git head yesterday. r~

[Qemu-devel] Re: [PATCH] ARM v4t/arm920t support

2010-07-02 Thread Rob Landley
On Thursday 01 July 2010 16:50:29 Paul Brook wrote: > > Here is the patch again. There may be more work to be done on top of > > this, but this patch staying out of tree hasn't noticeably accelerated > > that work in the past year and change. Could it please be merged? > > As mentioned previously

Re: [Qemu-devel] [Bug 600589] [NEW] xchg r8,rax treated as nop

2010-07-02 Thread vic3dexe
You wrote 1 июля 2010 г., 19:43:06: > On Thu, 1 Jul 2010, Richard Henderson wrote: >> On 07/01/2010 05:04 AM, Vic3Dexe wrote: >> > Public bug reported: >> > >> > xchg r8,rax (49h 90h) executed as nop (90h) in long mode, in other words >> > REX not used. >> > >> > qemu 0.12.4, host Win 7 x64, r

[Qemu-devel] Re: [PATCH v7 0/4] Inter-VM shared memory device

2010-07-02 Thread Cam Macdonell
On Tue, Jun 15, 2010 at 2:23 PM, Cam Macdonell wrote: > Latest patch for PCI shared memory device that maps a host shared memory > object > to be shared between guests > > new in this series > >    - replace marking memory from v6 with marking device as unmigratable > indicating >      that it s

[Qemu-devel] [PATCH 0/2] Improve qemu-img check output

2010-07-02 Thread Kevin Wolf
qemu-img check produces messages that are hard to understand. Even worse is that in the end it just says something like "42 errors" with no further explanation. Recently I got bug reports from people who though that their image was corrupted, when in fact there were only a few leaked clusters after

[Qemu-devel] [PATCH v3 16/16] ramblocks: No more being lazy about duplicate names

2010-07-02 Thread Alex Williamson
Now that we have a working qemu_ram_free() and the primary runtime user of it has been updated, don't be lenient about duplicate id strings. We also shouldn't need to create them ondemand at the target. Signed-off-by: Alex Williamson --- arch_init.c |5 +++-- exec.c | 13 +++-

[Qemu-devel] [PATCH 2/2] qcow2/vdi: Change check to distinguish error cases

2010-07-02 Thread Kevin Wolf
This distinguishes between harmless leaks and real corruption. Hopefully users better understand what qemu-img check wants to tell them. Signed-off-by: Kevin Wolf --- block.c|3 +- block/qcow2-refcount.c | 120 ++-- block/qcow2.c

[Qemu-devel] [PATCH v3 14/16] qemu_ram_free: Implement it

2010-07-02 Thread Alex Williamson
Now that we can support a ram_addr_t space with holes, we can implement qemu_ram_free(). Signed-off-by: Alex Williamson --- cpu-all.h |3 +++ exec.c| 62 + 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/cpu-a

[Qemu-devel] [PATCH v3 12/16] savevm: Use RAM blocks for basis of migration

2010-07-02 Thread Alex Williamson
We don't want to assume a contiguous address space, so migrate based on RAM blocks instead of a fixed linear address map. This will allow us to have holes in the ram_addr_t namespace, so we can implement qemu_ram_free(). Signed-off-by: Alex Williamson --- arch_init.c | 67 +++

Re: [Qemu-devel] Re: Status update

2010-07-02 Thread Eduard - Gabriel Munteanu
On Fri, Jul 02, 2010 at 06:41:55PM +0900, Isaku Yamahata wrote: > On Fri, Jul 02, 2010 at 09:03:39AM +0100, Stefan Hajnoczi wrote: > > On Thu, Jul 1, 2010 at 8:30 PM, Eduard - Gabriel Munteanu > > wrote: > > > But suddenly the guest OS changes mappings and expects the IOMMU to > > > enforce them a

[Qemu-devel] [PATCH v3 15/16] pci: Free the space allocated for the option rom on removal

2010-07-02 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/pci.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index fe7c5c3..a7ff566 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -76,6 +76,7 @@ static struct BusInfo pci_bus_info = { static void pci_update_mapping

[Qemu-devel] [PATCH v3 07/16] eepro100: Add a dev field to eeprom new/free functions

2010-07-02 Thread Alex Williamson
This allows us to create a more meaningful savevm string. Signed-off-by: Alex Williamson --- hw/eepro100.c |4 ++-- hw/eeprom93xx.c |8 hw/eeprom93xx.h |4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index 0ddca8b..2b7

[Qemu-devel] [PATCH v3 11/16] savevm: Migrate RAM based on name/offset

2010-07-02 Thread Alex Williamson
Synchronize RAM blocks with the target and migrate using name/offset pairs. This ensures both source and target have the same view of RAM and that we get the right bits into the right slot. Signed-off-by: Alex Williamson --- arch_init.c | 118 ++

[Qemu-devel] [PATCH 1/2] qemu-img check: Distinguish different kinds of errors

2010-07-02 Thread Kevin Wolf
People think that their images are corrupted when in fact there are just some leaked clusters. Differentiating several error cases should make the messages more comprehensible. Signed-off-by: Kevin Wolf --- block.c| 10 ++-- block.h| 10 - qemu-img.c | 62 ++

[Qemu-devel] [PATCH v3 06/16] savevm: Make use of DeviceState

2010-07-02 Thread Alex Williamson
For callers that pass a device we can traverse up the qdev tree and make use of the BusInfo.get_dev_path information for creating unique savevm id strings. This avoids needing to rely on the instance number, which can cause problems with device initialization order and hotplug. For compatibility,

[Qemu-devel] [PATCH v3 02/16] pc: Allocate all ram in a single qemu_ram_alloc()

2010-07-02 Thread Alex Williamson
This will benefit us when we migrate based on ramblock name since we won't be bouncing between separate blocks. Signed-off-by: Alex Williamson --- hw/pc.c | 22 +- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 25ebafa..de60686 1006

[Qemu-devel] [PATCH v3 09/16] qemu_ram_alloc: Add DeviceState and name parameters

2010-07-02 Thread Alex Williamson
These will be used to generate unique id strings for ramblocks. The name field is required, the device pointer is optional as most callers don't have a device. When there's no device or the device isn't a child of a bus implementing BusInfo.get_dev_path, the name should be unique for the platform

[Qemu-devel] [PATCH v3 13/16] savevm: Create a new continue flag to avoid resending block name

2010-07-02 Thread Alex Williamson
Allows us to compress the protocol a bit by setting a flag on the offset which indicates we're still working within the same block as last time. That way we can avoid sending the block name for every page. Suggested by Anthony Liguori. Signed-off-by: Alex Williamson --- arch_init.c | 94 +++

[Qemu-devel] [PATCH 13/23] blkdebug: Fix set_state_opts definition

2010-07-02 Thread Kevin Wolf
The list head was initialized to point to the wrong list, so all actions ended up being handled as inject-error even if they were set-state in fact. Signed-off-by: Kevin Wolf --- block/blkdebug.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/blkdebug.c b/block/b

[Qemu-devel] [PATCH v3 00/16] Make migration work with hotplug

2010-07-02 Thread Alex Williamson
v3: Still looking for comments... changes: - Rebase to latest upstream to pickup a few more callers - Fix a bug in patch introducing qemu_ram_free(). Since we now try to place blocks into existing holes in the address space, the end of the current block isn't necessarily the top

[Qemu-devel] [PATCH v3 03/16] qdev: Add a get_dev_path() function to BusInfo

2010-07-02 Thread Alex Williamson
This function is meant to provide a stable device path for buses which are able to implement it. If a bus has a globally unique addresses scheme, one address level may be sufficient to provide a path. Other buses may need to recursively traverse up the qdev tree. Signed-off-by: Alex Williamson

[Qemu-devel] [PATCH 12/23] qemu-option: New qemu_opts_reset()

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- qemu-option.c |9 + qemu-option.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 7f70d0f..30327d4 100644 --- a/qemu-option.c +++ b/q

[Qemu-devel] [PATCH v3 04/16] pci: Implement BusInfo.get_dev_path()

2010-07-02 Thread Alex Williamson
This works great for PCI since a ::. uniquely describes a global address. No need to traverse up the qdev tree. PCI segment support is a placeholder for compatibility once we support multiple segments. Signed-off-by: Alex Williamson --- hw/pci.c | 14 ++ 1 files changed, 14 inser

[Qemu-devel] [PATCH 14/23] blkdebug: Free QemuOpts after having read the config

2010-07-02 Thread Kevin Wolf
Forgetting to free them means that the next instance inherits all rules and gets its own rules only additionally. Signed-off-by: Kevin Wolf --- block/blkdebug.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 4ec8ca6..78cbff4 10

[Qemu-devel] [PATCH v3 10/16] ramblocks: Make use of DeviceState pointer and BusInfo.get_dev_path

2010-07-02 Thread Alex Williamson
With these two pieces in place, we can start naming ramblocks. When the device is present and it lives on a bus that provides a device path, we concatenate the path and the provided name. Otherwise we just use name. The resulting id string must be unique. For now we assume an allocation for the

[Qemu-devel] [PATCH v3 08/16] virtio-net: Incorporate a DeviceState pointer and let savevm track instances

2010-07-02 Thread Alex Williamson
Stuff a pointer to the DeviceState into the VirtIONet structure so that we can easily remove the vmstate entry later. Also, let vmstate track the instance number (it should always be zero internally since the device path should now be unique). Signed-off-by: Alex Williamson --- hw/virtio-net.c

[Qemu-devel] [PATCH v3 01/16] Remove uses of ram.last_offset (aka last_ram_offset)

2010-07-02 Thread Alex Williamson
We currently need this either to allocate the next ram_addr_t for a new block, or for total memory to be migrated. Both of which we can calculate without need of this to keep us in a contiguous address space. Signed-off-by: Alex Williamson --- arch_init.c | 23 --- cpu-al

[Qemu-devel] [PATCH 04/23] ide: Make it explicit that ide_create_drive() can't fail

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster All callers of ide_create_drive() ignore its value. Currently harmless, because it fails only when qdev_init() fails, which fails only when ide_drive_initfn() fails, which never fails. Brittle. Change it to die instead of silently ignoring failure. Signed-off-by: Marku

[Qemu-devel] Re: Status update

2010-07-02 Thread Eduard - Gabriel Munteanu
On Fri, Jul 02, 2010 at 09:03:39AM +0100, Stefan Hajnoczi wrote: > > That's true, but it's fair to be concerned about the guest itself. > > Imagine it runs some possibly malicious apps which program the hardware > > to do DMA. That should be safe when a IOMMU is present. > > > > But suddenly the gu

[Qemu-devel] [PATCH 18/23] block: Fix virtual media change for if=none

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster BlockDriverState member removable controls whether virtual media change (monitor commands change, eject) is allowed. It is set when the "type hint" is BDRV_TYPE_CDROM or BDRV_TYPE_FLOPPY. The type hint is only set by drive_init(). It sets BDRV_TYPE_FLOPPY for if=floppy.

[Qemu-devel] [PATCH 05/23] blockdev: Remove drive_get_serial()

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Unused since commit 6ced55a5. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- blockdev.c | 12 blockdev.h |1 - 2 files changed, 0 insertions(+), 13 deletions(-) diff --git a/blockdev.c b/blockdev.c index 3b8c606..e0495e5 100644 --- a

[Qemu-devel] [PATCH 08/23] blockdev: Clean up automatic drive deletion

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster We automatically delete blockdev host parts on unplug of the guest device. Too much magic, but we can't change that now. The delete happens early in the guest device teardown, before the connection to the host part is severed. Thus, the guest part's pointer to the host

[Qemu-devel] [PATCH 07/23] blockdev: New drive_get_by_blockdev()

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- blockdev.c | 12 blockdev.h |1 + 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index e0495e5..ba4f66f 100644 --- a/blockdev.c +++ b/blockdev.c @@

[Qemu-devel] [PATCH 09/23] qdev: Decouple qdev_prop_drive from DriveInfo

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Make the property point to BlockDriverState, cutting out the DriveInfo middleman. This prepares the ground for block devices that don't have a DriveInfo. Currently all user-defined ones have a DriveInfo, because the only way to define one is -drive & friends (they go thr

[Qemu-devel] [PATCH 15/23] blkdebug: Initialize state as 1

2010-07-02 Thread Kevin Wolf
state = 0 in rules means that the rule is valid for any state. Therefore it's impossible to have a rule that works only in the initial state. This changes the initial state from 0 to 1 to make this possible. Signed-off-by: Kevin Wolf --- block/blkdebug.c |3 +++ 1 files changed, 3 insertions

[Qemu-devel] [PATCH 16/23] savevm: Survive hot-unplug of snapshot device

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster savevm.c keeps a pointer to the snapshot block device. If you manage to get that device deleted, the pointer dangles, and the next snapshot operation will crash & burn. Unplugging a guest device that uses it does the trick: $ MALLOC_PERTURB_=234 qemu-system-x86_64 [

[Qemu-devel] [PATCH 17/23] block: Clean up bdrv_snapshots()

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- block.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index feda755..003d132 100644 --- a/block.c +++ b/block.c @@ -1789,19 +1789,18 @@ BlockDriverState *

[Qemu-devel] [PATCH 21/23] qemu-img: avoid calling exit(1) to release resources properly

2010-07-02 Thread Kevin Wolf
From: MORITA Kazutaka This patch removes exit(1) from error(), and properly releases resources such as a block driver and an allocated memory. For testing the Sheepdog block driver with qemu-iotests, it is necessary to call bdrv_delete() before the program exits. Because the driver releases the

[Qemu-devel] [PATCH 22/23] block: Fix early failure in multiwrite

2010-07-02 Thread Kevin Wolf
bdrv_aio_writev may call the callback immediately (and it will commonly do so in error cases). Current code doesn't consider this. For details see the comment added by this patch. Signed-off-by: Kevin Wolf --- block.c | 35 +-- 1 files changed, 29 insertions(+),

[Qemu-devel] [PATCH 23/23] block: Handle multiwrite errors only when all requests have completed

2010-07-02 Thread Kevin Wolf
Don't try to be clever by freeing all temporary data and calling all callbacks when the return value (an error) is certain. Doing so has at least two important problems: * The temporary data that is freed (qiov, possibly zero buffer) is still used by the requests that have not yet completed. * C

[Qemu-devel] [PATCH 20/23] pc: Fix CMOS info for drives defined with -device

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Drives defined with -drive if=ide get get created along with the IDE controller, inside machine->init(). That's before cmos_init(). Drives defined with -device get created during generic device init. That's after cmos_init(). Because of that, CMOS has no information on t

[Qemu-devel] [PATCH 11/23] block: Catch attempt to attach multiple devices to a blockdev

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster For instance, -device scsi-disk,drive=foo -device scsi-disk,drive=foo happily creates two SCSI disks connected to the same block device. It's all downhill from there. Device usb-storage deliberately attaches twice to the same blockdev, which fails with the fix in place.

[Qemu-devel] [PATCH 19/23] ide: Make PIIX and ISA IDE init functions return the qdev

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- hw/ide.h | 11 ++- hw/ide/isa.c |8 hw/ide/piix.c |6 -- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/ide.h b/hw/ide.h index bb635b6..82b3c11 10064

[Qemu-devel] [PATCH 06/23] Don't reset bs->is_temporary in bdrv_open_common

2010-07-02 Thread Kevin Wolf
From: Ryan Harper To fix https://bugs.launchpad.net/qemu/+bug/597402 where qemu fails to call unlink() on temporary snapshots due to bs->is_temporary getting clobbered in bdrv_open_common() after being set in bdrv_open() which calls the former. We don't need to initialize bs->is_temporary in bdr

[Qemu-devel] [PATCH 03/23] scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster None of its callers checks for failure. scsi_hot_add() can crash because of that: (qemu) drive_add 4 if=scsi,format=host_device,file=/dev/sg1 scsi-generic: scsi generic interface too old Segmentation fault (core dumped) Fix all callers, not just scsi_hot_add(). Signed-

[Qemu-devel] [PATCH 10/23] blockdev: drive_get_by_id() is no longer used, remove

2010-07-02 Thread Kevin Wolf
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- blockdev.c | 12 blockdev.h |1 - 2 files changed, 0 insertions(+), 13 deletions(-) diff --git a/blockdev.c b/blockdev.c index 4848112..cecde2b 100644 --- a/blockdev.c +++ b/blockdev.c @@

[Qemu-devel] [PATCH 02/23] block: allow filenames with colons again for host devices

2010-07-02 Thread Kevin Wolf
From: Christoph Hellwig Before the raw/file split we used to allow filenames with colons for host device only. While this was more by accident than by design people rely on it, so we need to bring it back. So move the host device probing to be before the protocol detection again. Signed-off-by

[Qemu-devel] [PATCH 01/23] qcow2: Fix error handling during metadata preallocation

2010-07-02 Thread Kevin Wolf
People were wondering why qemu-img check failed after they tried to preallocate a large qcow2 file and ran out of disk space. Signed-off-by: Kevin Wolf --- block/qcow2.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index d29

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

2010-07-02 Thread Kevin Wolf
The following changes since commit 8713f8ffb87a28c94b4f22b9a9ec16c55381187e: Andi Kleen (1): Don't declare XSAVE as supported are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Christoph Hellwig (1): block: allow filenames with colons again for

[Qemu-devel] Re: [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Jan Kiszka
Коренберг Марк wrote: > void scsi_req_complete(SCSIRequest *req) > { > assert(req->status != -1); > req->bus->complete(req->bus, SCSI_REASON_DONE, >req->tag, >req->status); > } > > (gdb) bt 1 > #0 0x0852cd88 in ?? () > (More stack frames fol

[Qemu-devel] [RFC] env stored in segment register for i386

2010-07-02 Thread Richard Henderson
On 07/02/2010 08:37 AM, Paolo Bonzini wrote: > The second (more real) reason is inline assembly failures, for example > (32-bit x86): > > register int e asm("edi"); > > static inline int h() > { > int x; > asm volatile ("mov $0, %0" : "=D" (x)); > } > > int g(

[Qemu-devel] Re: [PATCH 01/14] Add new data type for fprintf like function pointers

2010-07-02 Thread Paolo Bonzini
On 04/09/2010 01:20 PM, Stefan Weil wrote: Some restrictions why qemu-common.h was not used might be no longer valid (I think they came from pre-tcg times). Nevertheless, cris-dis.c even says that it cannot include qemu-common.h (without giving a reason). I think these are no longer valid. In

[Qemu-devel] Re: [PATCH v2 1/2] block: Fix early failure in multiwrite

2010-07-02 Thread Kevin Wolf
Am 02.07.2010 15:18, schrieb Stefan Hajnoczi: > On Fri, Jul 2, 2010 at 1:07 PM, Kevin Wolf wrote: >> bdrv_aio_writev may call the callback immediately (and it will commonly do so >> in error cases). Current code doesn't consider this. For details see the >> comment added by this patch. >> >> Signe

[Qemu-devel] Re: [PATCH v2 1/2] block: Fix early failure in multiwrite

2010-07-02 Thread Stefan Hajnoczi
On Fri, Jul 2, 2010 at 1:07 PM, Kevin Wolf wrote: > bdrv_aio_writev may call the callback immediately (and it will commonly do so > in error cases). Current code doesn't consider this. For details see the > comment added by this patch. > > Signed-off-by: Kevin Wolf > --- >  block.c |   35 +++

[Qemu-devel] slow ext4 O_SYNC writes (why qemu qcow2 is so slow on ext4 vs ext3)

2010-07-02 Thread Michael Tokarev
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello. I noticed that qcow2 images, esp. fresh ones (so that they receive lots of metadata updates) are very slow on my machine. And on IRC (#kvm), Sheldon Hearn found that on ext3, it is fast again. So I tested different combinations for a bit, and

[Qemu-devel] [PATCH v2 1/2] block: Fix early failure in multiwrite

2010-07-02 Thread Kevin Wolf
bdrv_aio_writev may call the callback immediately (and it will commonly do so in error cases). Current code doesn't consider this. For details see the comment added by this patch. Signed-off-by: Kevin Wolf --- block.c | 35 +-- 1 files changed, 29 insertions(+),

[Qemu-devel] [PATCH v2 2/2] block: Handle multiwrite errors only when all requests have completed

2010-07-02 Thread Kevin Wolf
Don't try to be clever by freeing all temporary data and calling all callbacks when the return value (an error) is certain. Doing so has at least two important problems: * The temporary data that is freed (qiov, possibly zero buffer) is still used by the requests that have not yet completed. * C

[Qemu-devel] [PATCH v2 0/2] block: Fix multiwrite error handling

2010-07-02 Thread Kevin Wolf
The bdrv_aio_multiwrite error handling has some bugs that lead to premature cleanup, causing use-after-free and double free problems. v2: - Completely replaced patch 1 which Stefan found to be incorrect (thanks for the good review!). Hope I've got it right this time. Kevin Wolf (2): block: Fi

[Qemu-devel] [PATCH] Makefile: Fix compilation for non-standard host kernel path

2010-07-02 Thread Prerna Saxena
Set up host kernel include paths specified by --kerneldir When host kernel headers are placed in non-standard paths, the KVM_CFLAGS are presently invoked only for a few .c files (kvm*.c,vhost*.c) and not for other files like machine.c, cpus.c ..etc which also depend on linux/kvm.h Signed-off-

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
void scsi_req_complete(SCSIRequest *req) { assert(req->status != -1); req->bus->complete(req->bus, SCSI_REASON_DONE, req->tag, req->status); } (gdb) bt 1 #0 0x0852cd88 in ?? () (More stack frames follow...) (gdb) frame 1 #1 0x080f0f16 in scsi

Re: [Qemu-devel] Tracing: outstanding tasks

2010-07-02 Thread Stefan Hajnoczi
On Fri, Jul 2, 2010 at 5:23 AM, Ananth N Mavinakayanahalli wrote: > On Wed, Jun 30, 2010 at 12:51:59PM +0100, Stefan Hajnoczi wrote: >> On Wed, Jun 30, 2010 at 11:20 AM, Prerna Saxena >> wrote: >> > On 06/26/2010 01:36 PM, Stefan Hajnoczi wrote: >> >> >> >> Here are the outstanding tasks for QEMU

Re: [Qemu-devel] [PATCH] ARM v4t/arm920t support

2010-07-02 Thread Vincent Sanders
On Thu, Jul 01, 2010 at 04:35:53PM -0500, Rob Landley wrote: > I just confirmed that Vincent Sanders' patch (which he posted on May 29, 2009, > and again on November 27, 2009) still applies to (and works with )current > qemu-git. > > It adds a -cpu arm920t option to qemu-system-arm which boots a L

[Qemu-devel] Re: [PATCH 4/4] require #define NEED_GLOBAL_ENV for files that need the global register variable

2010-07-02 Thread Paolo Bonzini
On 07/01/2010 09:42 PM, Blue Swirl wrote: I still maintain that 'env' may not be unpoisoned until the name is less likely to invite accidents. The *global* env is still unavailable (i.e. no difference WRT poisoning), by virtue of being defined in exec.h which is not available unless -DNEED_CP

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
/* Helper function for command completion. */ static void scsi_command_complete(SCSIDiskReq *r, int status, int sense) { DPRINTF("Command complete tag=0x%x status=%d sense=%d\n", r->req.tag, status, sense); scsi_req_set_status(&r->req, status, sense); scsi_req_complete(&r->

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
Yeah. I have compile non-stripped kvm binary. (gdb) bt #0 0x0852cd88 in ?? () #1 0x080f0f16 in scsi_command_complete (r=0x86252d8, status=, sense=) at /home/mmarkk/src/KVM/qemu-kvm-0.12.3+noroms/hw/scsi-disk.c:105 #2 0x080d4d19 in qcow_aio_write_cb (opaque=0x85e68b8, ret=0) at block/qcow2.c

Re: [Qemu-devel] Re: Status update

2010-07-02 Thread Isaku Yamahata
On Fri, Jul 02, 2010 at 09:03:39AM +0100, Stefan Hajnoczi wrote: > On Thu, Jul 1, 2010 at 8:30 PM, Eduard - Gabriel Munteanu > wrote: > > On Wed, Jun 30, 2010 at 09:37:31AM +0100, Stefan Hajnoczi wrote: > >> On Tue, Jun 29, 2010 at 6:25 PM, Eduard - Gabriel Munteanu > >> wrote: > >> > On the othe

Re: [Qemu-devel] [PATCH 2/2] block: Handle multiwrite errors only when all requests have completed

2010-07-02 Thread Christoph Hellwig
On Thu, Jul 01, 2010 at 04:31:58PM +0200, Kevin Wolf wrote: > Don't try to be clever by freeing all temporary data and calling all callbacks > when the return value (an error) is certain. Doing so has at least two > important problems: > > * The temporary data that is freed (qiov, possibly zero bu

Re: [Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite

2010-07-02 Thread Christoph Hellwig
On Thu, Jul 01, 2010 at 04:31:57PM +0200, Kevin Wolf wrote: > bdrv_aio_writev may call the callback immediately (and it will commonly do so > in error cases). If num_requests doesn't have its final value yet, > multiwrite_cb will falsely detect that all requests are completed and frees > the mcb. H

[Qemu-devel] Re: [PATCH] device-assignment: Rework "name" of assigned pci device

2010-07-02 Thread Gerd Hoffmann
Hi, As far as I can tell, "name" predates the qdev conversion, and was used just for error messages and such. Yes, was already there when I touched the code the first time. It defaulted to "host". When Gerd did the qdev conversion, he made "id" default to "name", then "host". See commit 6

Re: [Qemu-devel] [PATCH] win32: Add missing function setenv

2010-07-02 Thread Jes Sorensen
On 07/01/10 19:53, Stefan Weil wrote: > Two patches are needed anyway. > > For reasons of economy, I won't send a new patch. > Feel free do send one which meets your criteria. > > Regards, > Stefan > Well if you are not interested in working the way the community works, please don't expect us t

Re: [Qemu-devel] [PATCH 2/2] block: Handle multiwrite errors only when all requests have completed

2010-07-02 Thread Stefan Hajnoczi
On Thu, Jul 1, 2010 at 3:31 PM, Kevin Wolf wrote: > Don't try to be clever by freeing all temporary data and calling all callbacks > when the return value (an error) is certain. Doing so has at least two > important problems: > > * The temporary data that is freed (qiov, possibly zero buffer) is s

Re: [Qemu-devel] [PATCH 1/2] block: Fix too early free in multiwrite

2010-07-02 Thread Stefan Hajnoczi
On Thu, Jul 1, 2010 at 3:31 PM, Kevin Wolf wrote: > bdrv_aio_writev may call the callback immediately (and it will commonly do so > in error cases). If num_requests doesn't have its final value yet, > multiwrite_cb will falsely detect that all requests are completed and frees > the mcb. However, t

[Qemu-devel] Re: [PATCH] device-assignment: Rework "name" of assigned pci device

2010-07-02 Thread Markus Armbruster
[cc: kraxel] Hidetoshi Seto writes: > (2010/06/30 15:53), Markus Armbruster wrote: >> Summary: upstream qemu commit b560a9ab broke -pcidevice and pci_add host >> in two ways: >> >> * Use without options id and name is broken when option host contains >> ':'. That's because id defaults to hos

[Qemu-devel] Re: Status update

2010-07-02 Thread Stefan Hajnoczi
On Thu, Jul 1, 2010 at 8:30 PM, Eduard - Gabriel Munteanu wrote: > On Wed, Jun 30, 2010 at 09:37:31AM +0100, Stefan Hajnoczi wrote: >> On Tue, Jun 29, 2010 at 6:25 PM, Eduard - Gabriel Munteanu >> wrote: >> > On the other hand, we could just leave it alone for now. Changing >> > mappings during D

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
(gdb) bt #0 0x0202 in ?? () #1 0x080f362c in ?? () #2 0x080f0f16 in ?? () #3 0x080d4d19 in ?? () #4 0x080c472f in ?? () #5 0x080c47e7 in ?? () #6 0x08052266 in ?? () #7 0x0806dcc4 in ?? () #8 0x08055465 in ?? () #9 0xb7a42bd6 in __libc_start_main (main=0x8053f20, argc=14, ubp_av=0xbf

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
sudo apt-get install libaio1-dbg libcomerr2-dbg libdbus-glib-1-2-dbg libgcrypt11-dbg keyutils-dbg libncurses5-dbg zlib1g-dbg libc6-dbg libcurl3-dbg libdirectfb-1.2-0-dbg libgnutls26-dbg libkrb5-dbg libice6-dbg libldap-2.4-2-dbg libogg-dbg libpulse0-dbg gsasl-dbg libsm6-dbg libtasn1-3-dbg libx11-6-d

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
scsi-disk: Tag 0x0 already in use maybe problem here? -- KVM segmentation fault, using SCSI+writeback and linux 2.4 guest https://bugs.launchpad.net/bugs/595438 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug de

[Qemu-devel] [Bug 595438] Re: KVM segmentation fault, using SCSI+writeback and linux 2.4 guest

2010-07-02 Thread Коренберг Марк
(gdb) run Starting program: /usr/bin/kvm -M pc-0.12 -enable-kvm -m 256 -smp 1 -boot d -drive file=/mnt/megadiff/cdiso_400_130.iso,if=ide,media=cdrom,index=2 -drive file=/home/mmarkk/spamsender2.img,if=scsi,index=0,format=qcow2,cache=writeback [Thread debugging using libthread_db enabled] [New Thr