Re: [Qemu-devel] [PATCH 14/17] Move daemonize handling to OS specific files

2010-06-25 Thread Frank Arnold
On Fri, 2010-06-25 at 13:02 -0400, Jes Sorensen wrote: > On 06/25/10 18:41, Frank Arnold wrote: > > On Thu, 2010-06-10 at 05:42 -0400, jes.soren...@redhat.com wrote: > >> diff --git a/os-posix.c b/os-posix.c > >> index 6417d16..1672e06 100644 > >> --- a/os-posix.c > >> +++ b/os-posix.c > >> @@ -160

Re: [Qemu-devel] [PATCH 14/17] Move daemonize handling to OS specific files

2010-06-25 Thread Frank Arnold
On Thu, 2010-06-10 at 05:42 -0400, jes.soren...@redhat.com wrote: > diff --git a/os-posix.c b/os-posix.c > index 6417d16..1672e06 100644 > --- a/os-posix.c > +++ b/os-posix.c > @@ -160,6 +162,9 @@ void os_parse_cmd_args(int index, const char *optarg) > case QEMU_OPTION_chroot: > chroo

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

2010-06-25 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 +++

Re: [Qemu-devel] Guest OS hangs on usb_add

2010-06-25 Thread TJ
On 06/25/10 12:32, Gianni Tedesco wrote: > A device MAY provide extended descriptors in 2 ways mentioned in the > spec, but ISTR finding at least one device in the wild with standard > descriptors extended which were not so much used by the "host" but by > application software. So not sure about y

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

2010-06-25 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| 59 +++ 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/cpu-all

[Qemu-devel] [PATCH 05/12] blockdev: Clean up automatic drive deletion

2010-06-25 Thread 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 part dangles for a brief t

Re: [Qemu-devel] [PATCH 14/17] Move daemonize handling to OS specific files

2010-06-25 Thread Frank Arnold
On Fri, 2010-06-25 at 19:34 +0200, Frank Arnold wrote: > On Fri, 2010-06-25 at 13:02 -0400, Jes Sorensen wrote: > > On 06/25/10 18:41, Frank Arnold wrote: > > > On Thu, 2010-06-10 at 05:42 -0400, jes.soren...@redhat.com wrote: > > >> diff --git a/os-posix.c b/os-posix.c > > >> index 6417d16..1672e0

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

2010-06-25 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 +++

[Qemu-devel] [PATCH] ARM: semi-hosting support for stderr

2010-06-25 Thread Christophe LYON
Hello, I propose this small patch so that ARM semi-hosting handles stderr as expected when linking with Newlib/libgloss. diff --git a/arm-semi.c b/arm-semi.c index 9549e6c..6874036 100644 --- a/arm-semi.c +++ b/arm-semi.c @@ -211,8 +211,11 @@ uint32_t do_arm_semihosting(CPUState *env)

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

2010-06-25 Thread 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. It sets BDRV_TYPE_CDROM

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

2010-06-25 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 11/12] ide: Make PIIX and ISA IDE init functions return the qdev

2010-06-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- 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 0e7d540..f0cb320 100644 --- a/hw/ide.h +++ b/hw/ide.h @@ -1,17 +1,18 @@ #

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

2010-06-25 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 v2 16/16] ramblocks: No more being lazy about duplicate names

2010-06-25 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 3/8] Init qemu_system_cond

2010-06-25 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- cpus.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index fcd0f09..37e6b33 100644 --- a/cpus.c +++ b/cpus.c @@ -331,6 +331,7 @@ int qemu_init_main_loop(void) return ret; qemu_cond_init(&qemu_pause_cond); +

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

2010-06-25 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 06/12] qdev: Decouple qdev_prop_drive from DriveInfo

2010-06-25 Thread 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 through drive_init()). DriveI

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

2010-06-25 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 1/8] Introduce proper compiler barrier

2010-06-25 Thread Jan Kiszka
Define barrier() as optimization barrier and replace (potentially unreliable) asm("") fences. Signed-off-by: Jan Kiszka --- cpu-exec.c |5 +++-- qemu-barrier.h |3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 026980a..525b3b4 100644

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

2010-06-25 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 1848151..d6f3aa4 1006

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

2010-06-25 Thread 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 them (type, geometry, trans

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

2010-06-25 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 4/8] Fix cpu_exit for tcp_cpu_exec

2010-06-25 Thread Jan Kiszka
If a cpu_exit request is pending, ensure that we leave the CPU loop quickly. For this purpose, keep the global exit_request pending until we are about to leave tcg_cpu_exec. Also, immediately break out of the SMP loop if the request is set, do not run till the end of the chain. This preserves the V

[Qemu-devel] [PATCH 03/12] blockdev: Remove drive_get_serial()

2010-06-25 Thread Markus Armbruster
Unused since commit 6ced55a5. Signed-off-by: Markus Armbruster --- 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/blockdev.c +++ b/blockdev.c @@ -78,18 +78,6 @@ int d

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

2010-06-25 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 v2 09/16] qemu_ram_alloc: Add DeviceState and name parameters

2010-06-25 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 v2 00/16] Make migration work with hotplug

2010-06-25 Thread Alex Williamson
v2: Not too many comments, hope that's because everyone agrees ;) A couple minor changes. The 2nd patch is new and provides a bit of an optimization for large memory pc guets. The first two patches stand on their own even if we're undecided about the rest. Thanks, Alex changes: - Use pci_fi

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

2010-06-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- blockdev.c | 12 blockdev.h |1 - 2 files changed, 0 insertions(+), 13 deletions(-) diff --git a/blockdev.c b/blockdev.c index 827ea1c..3747098 100644 --- a/blockdev.c +++ b/blockdev.c @@ -75,18 +75,6 @@ DriveInfo *drive_get(BlockInterface

[Qemu-devel] [PATCH 1/2] Add virtio-blk support to path_id

2010-06-25 Thread Ryan Harper
This patch adds a case handling path_id invoked on a virtio-blk device. Currently path_id walks the parent path to virtio-pci but doesn't know that it's the end of the path and exits without building the path (providing no output resulting in no disk/by-path symlinks to virtio-blk devices). This pa

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

2010-06-25 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 v2 04/16] pci: Implement BusInfo.get_dev_path()

2010-06-25 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] Re: [PATCH 2/2] tcg-s390: New TCG Target.

2010-06-25 Thread Richard Henderson
On 06/17/2010 12:40 PM, Aurelien Jarno wrote: >> +/* Handle the modifiers. */ >> +if (ct & TCG_CT_CONST_NEG) { >> +val = -val; >> +} > > This "modifier" is only used by subi. Wouldn't it be better to use a > TCG_CT_CONST_SUBI instead? Not really. This negation needs to happe

Re: [Qemu-devel] [PATCH 14/17] Move daemonize handling to OS specific files

2010-06-25 Thread Jes Sorensen
On 06/25/10 18:41, Frank Arnold wrote: > On Thu, 2010-06-10 at 05:42 -0400, jes.soren...@redhat.com wrote: >> diff --git a/os-posix.c b/os-posix.c >> index 6417d16..1672e06 100644 >> --- a/os-posix.c >> +++ b/os-posix.c >> @@ -160,6 +162,9 @@ void os_parse_cmd_args(int index, const char *optarg) >>

Re: [Qemu-devel] [patch 2/3] QEMU-C-F: Introducing qemu userspace tool qemu-core-filter.

2010-06-25 Thread Mahesh Jagannath Salgaonkar
On 06/22/2010 06:32 PM, Anthony Liguori wrote: Hrm, the way you've sent this patch makes Thunderbird unhappy. It appears the whole thing is treated as an attachment. In the future, I'd suggest avoiding the Content-Disposition tag Sure. I will take care of this in future. On 06/21/2010 11:01

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

2010-06-25 Thread 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-off-by: Markus Armbruster

[Qemu-devel] [PATCH 09/12] savevm: Survive hot-unplug of snapshot device

2010-06-25 Thread 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 0.12.50 moni

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

2010-06-25 Thread 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. Detach before the second a

[Qemu-devel] [PATCH 7/8] Rename tcg_cpu_exec and tcg_has_work

2010-06-25 Thread Jan Kiszka
These functions are also used for kvm under !CONFIG_IOTHREAD, having 'tcg' in their name is just misleading. Signed-off-by: Jan Kiszka --- cpus.c | 10 +- cpus.h |2 +- vl.c |2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpus.c b/cpus.c index 2ce839d..c

[Qemu-devel] Re: UIO interrupts being lost

2010-06-25 Thread Michael S. Tsirkin
On Thu, Jun 24, 2010 at 05:43:15PM -0600, Cam Macdonell wrote: > Hi Michael, > > I'm trying to write a uio driver for my shared memory device for KVM > and I'm running into a situation where several interrupts in quick > succession are not all triggering the callback function in my kernel > UIO dr

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

2010-06-25 Thread 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: Markus Armbruster --- hw/ide/

[Qemu-devel] [PATCH 8/8] Rework debug exception processing for gdb use

2010-06-25 Thread Jan Kiszka
Guest debugging is currently broken under CONFIG_IOTHREAD. The reason is inconsistent or even lacking signaling the debug events from the source VCPU to the main loop and the gdbstub. This patch addresses the issue by pushing this signaling into a CPUDebugExcpHandler: cpu_debug_handler is register

[Qemu-devel] [PATCH 4/7] provide opaque CPUState to files that are compiled once

2010-06-25 Thread Paolo Bonzini
This patch unpoisons CPUState and env in once-compiled files. To achieve this, it defines an opaque struct CPUState in cpu-common.h. This also requires tweaking the relationship between CPUState and CPUXYZState in target files. Unpoisoning env is needed because it is widely used as the name for CP

[Qemu-devel] [PATCH 00/12] More block-related fixes and cleanups

2010-06-25 Thread Markus Armbruster
I'm working on cleanly separating block device host and guest parts. I'd like to route all this work through Kevin's block tree. This is still just preliminaries. There will be at least one more round of cleanup & fixes before blockdev_add proper. I intend to start with a minimal QMP-only versio

[Qemu-devel] [PATCH 04/12] blockdev: New drive_of_blockdev()

2010-06-25 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- blockdev.c | 12 blockdev.h |1 + 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index e0495e5..8023cfd 100644 --- a/blockdev.c +++ b/blockdev.c @@ -78,6 +78,18 @@ int drive_get_max_bus(BlockInterfac

[Qemu-devel] [PATCH 7/7] poison TARGET_xxx for compile once object

2010-06-25 Thread Paolo Bonzini
prevents those ifdefs from creeping in again. Cc: Isaku Yamahata Signed-off-by: Paolo Bonzini --- cpu-common.h |4 qemu-common.h |5 + 2 files changed, 1 insertions(+), 8 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index d905258..639c58d 100644 --- a/cpu-common.h ++

[Qemu-devel] [PATCH v3 0/2] Add virtio-blk support to persistent-storage rules

2010-06-25 Thread Ryan Harper
This patch series provides updates to udev to allow the creation symlinks for virtio-blk devices, specifically disk/by-id and disk/by-path. This is most useful for virtio-blk devices that do not yet have any filesystem for which a UUID can be extracted (disk/by-uuid). These patches (save the path

[Qemu-devel] [PATCH 5/7] add qdev property type "cpu"

2010-06-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- cpus.c | 16 cpus.h |2 ++ hw/qdev-properties.c | 44 hw/qdev.h|5 + 4 files changed, 67 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus

Re: [Qemu-devel] Guest OS hangs on usb_add

2010-06-25 Thread Gianni Tedesco
On Thu, 2010-06-24 at 05:45 +0100, TJ wrote: > Here is small patch that fixed my problem. > > In looking at the USB spec, it seems pretty clear cut about the whole > device/config/interface/endpoint descriptor hierarchy, so the > usb_host_claim_interfaces can be optimized instead of parsing throug

Re: [Qemu-devel] VxWorks kernel for qemu emulating PowerPC?

2010-06-25 Thread Jason Wessel
On 06/07/2010 04:03 AM, hadi motamedi wrote: > Dear All > Can you please let me know if the qemu emulating PowerPC (I mean > qemu-system-ppc.exe) can accept VxWork kernet for boot up? > Thank you > As is, the QEMU PowerPC platform will definitely not boot a VxWorks image. It is possible to boot a

[Qemu-devel] [PATCH 6/7] replace void* uses with opaque CPUState*

2010-06-25 Thread Paolo Bonzini
Because we all love type safety, don't we? Signed-off-by: Paolo Bonzini --- cpu-common.h |1 - cpus.c| 23 --- hw/apic.c |4 ++-- hw/pc.c |4 ++-- qemu-common.h |7 --- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/c

[Qemu-devel] [PATCH 3/7] include stdio.h freely, remove dyngen-exec.h hacks

2010-06-25 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- disas.h |5 + dyngen-exec.h | 16 qemu-common.h |7 --- 3 files changed, 1 insertions(+), 27 deletions(-) diff --git a/disas.h b/disas.h index 6a9332d..1af0511 100644 --- a/disas.h +++ b/disas.h @@ -2,17 +2,14 @@ #define

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

2010-06-25 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 2/7] include qemu-common.h when needed by the next patches

2010-06-25 Thread Paolo Bonzini
All of these files were already including qemu-common.h indirectly, e.g. via cpu-all.h, just not early enough. Signed-off-by: Paolo Bonzini --- arm-semi.c|2 +- bsd-user/qemu.h |1 + cpu-exec.c|1 + darwin-user/qemu.h|

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

2010-06-25 Thread Cole Robinson
I can reproduce with qemu-kvm 0.12.4 like the original reporter. I cannot reproduce with qemu-kvm upstream, qemu stable, or qemu upstream. So boot=on could be the culprit. Libvirt generated command line: LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin /qemu-system-x86_64 -

[Qemu-devel] RE: qemu fail to parse command line with "-pcidevice 00:19.0"

2010-06-25 Thread Hao, Xudong
Thanks, Mark. -Original Message- From: Markus Armbruster [mailto:arm...@redhat.com] Sent: 2010年6月25日 12:58 To: Hao, Xudong Cc: qemu-devel@nongnu.org; aligu...@us.ibm.com; k...@vger.kernel.org Subject: Re: qemu fail to parse command line with "-pcidevice 00:19.0" "Hao, Xudong" writes:

[Qemu-devel] [PATCH 6/8] Drop redundant global cur_cpu variable

2010-06-25 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- cpus.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cpus.c b/cpus.c index aef92cd..2ce839d 100644 --- a/cpus.c +++ b/cpus.c @@ -39,7 +39,6 @@ #define SIG_IPI SIGUSR1 #endif -static CPUState *cur_cpu; static CPUState *next_cpu;

[Qemu-devel] [PATCH 0/8] Fix various IO-thread breakages

2010-06-25 Thread Jan Kiszka
This series unbreaks -smp >1 and guest debugging in CONFIG_IOTHREAD mode. I still find the SMP scheduling in cpu_exec_all suboptimal, but at least it works now. Dependencies are: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/52718 (kvm queue) http://thread.gmane.org/gmane.comp.emulators.q

[Qemu-devel] Re: qemu fail to parse command line with "-pcidevice 00:19.0"

2010-06-25 Thread Markus Armbruster
Hidetoshi Seto writes: > (2010/06/24 15:08), Markus Armbruster wrote: >> Note to qemu-devel: this issue is qemu-kvm only. >> >> "Hao, Xudong" writes: >> >>> When assign one PCI device, qemu fail to parse the command line: >>> qemu-system_x86 -smp 2 -m 1024 -hda /path/to/img -pcidevice host=00:

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

2010-06-25 Thread Christoph Hellwig
On Thu, Jun 24, 2010 at 01:16:03AM +0100, Jamie Lokier wrote: > Serge Hallyn wrote: > > The default of qemu-img (of using O_SYNC) is not very sensible > > because anyway, the client (the kernel) uses caches (write-back), > > (and "qemu-nbd -d" doesn't flush those by the way). So if for > > instance

[Qemu-devel] [PATCH 2/8] Fix cpu_unlink_tb race

2010-06-25 Thread Jan Kiszka
If a signal hit after the env->exit_request check but before cpu_exec updated env->current_tb, cpu_unlink_tb called from the signal hander will not unlink the current TB. This may leave us stuck in a guest loop if no further unlink is invoked. Fix this by reordering current_tb update and exit_requ

[Qemu-devel] [PATCH 2/2] Add virtio-blk by-id rules based on 'serial' attribute

2010-06-25 Thread Ryan Harper
Using virtio-blk serial attributes add rules to extract drive serial numbers and generate by-id links for the block device and partitions. With these rules added, we now see the following symlinks in disk/by-id % ls -al /dev/disk/by-id | grep vdb lrwxrwxrwx. 1 root root 9 Jun 1 22:09 virtio-QM

[Qemu-devel] Re: [PATCH 03/12] blockdev: Remove drive_get_serial()

2010-06-25 Thread Christoph Hellwig
On Fri, Jun 25, 2010 at 06:53:23PM +0200, Markus Armbruster wrote: > Unused since commit 6ced55a5. > > Signed-off-by: Markus Armbruster Looks good, Reviewed-by: Christoph Hellwig

[Qemu-devel] [PATCH 1/7] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix

2010-06-25 Thread Paolo Bonzini
From: Amit Shah qemu-config.c doesn't contain any target-specific code, and the TARGET_I386 conditional code didn't get compiled as a result. Removing this enables the driftfix parameter for rtc. Signed-off-by: Amit Shah Signed-off-by: Paolo Bonzini --- qemu-config.c |2 -- 1 files change

[Qemu-devel] [PATCH 0/7] poison TARGET_xxx for compile once object and header file cleanups

2010-06-25 Thread Paolo Bonzini
This is a different way to achieve the same objective as Isamu's patch. Basically, his patch becomes the (much simpler) patch 7 of this series, and everything else is something I had had lying around for a while. :) Patch 1 is simply Amit's patch, included here for convenience as it's not been app

[Qemu-devel] Re: qemu fail to parse command line with "-pcidevice 00:19.0"

2010-06-25 Thread Hidetoshi Seto
(2010/06/24 15:08), Markus Armbruster wrote: > Note to qemu-devel: this issue is qemu-kvm only. > > "Hao, Xudong" writes: > >> When assign one PCI device, qemu fail to parse the command line: >> qemu-system_x86 -smp 2 -m 1024 -hda /path/to/img -pcidevice host=00:19.0 >> Error: >> qemu-system-x86

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

2010-06-25 Thread Christoph Hellwig
On Fri, Jun 25, 2010 at 06:53:22PM +0200, Markus Armbruster wrote: > 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

[Qemu-devel] Re: [PATCHv3] virtio-net: correct packet length math

2010-06-25 Thread Michael S. Tsirkin
On Fri, Jun 25, 2010 at 12:47:03PM +0530, Amit Shah wrote: > On (Thu) Jun 24 2010 [18:54:07], Michael S. Tsirkin wrote: > > We were requesting too much when checking buffer > > length: size already includes host header length. > > > > Further, we should not exit if we get a packet that > > is too

[Qemu-devel] Re: [PATCH v2] lsi53c895a: fix Phase Mismatch Jump

2010-06-25 Thread Paolo Bonzini
On 06/14/2010 07:11 PM, Paolo Bonzini wrote: lsi_bad_phase has a bug in the choice of pmjad1/pmjad2. This does not matter with Linux guests because it uses just one routine for both, but it breaks Windows 64-bit guests. This is the text from the spec: "[The PMJCTL] bit controls which decis

[Qemu-devel] Re: [PATCHv3] virtio-net: correct packet length math

2010-06-25 Thread Amit Shah
On (Thu) Jun 24 2010 [18:54:07], Michael S. Tsirkin wrote: > We were requesting too much when checking buffer > length: size already includes host header length. > > Further, we should not exit if we get a packet that > is too long, since this might not be under control > of the guest. Just drop t

[Qemu-devel] Re: [PATCH v2] Makefile: poison TARGET_xxx for compile once.

2010-06-25 Thread Paolo Bonzini
On 06/25/2010 05:02 AM, Isaku Yamahata wrote: poison TARGET_xxx for compile once object to prevent those ifdef from creeping in again. didn't poison env which is used as function argument as void *env. Although it would be possible to sort it out, for now just not poison it. qemu-malloc.c didn'

[Qemu-devel] Re: [PATCH 01/12] scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers

2010-06-25 Thread Christoph Hellwig
On Fri, Jun 25, 2010 at 06:53:21PM +0200, Markus Armbruster wrote: > 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

[Qemu-devel] Qemu support for integration

2010-06-25 Thread Enno Wein
Hi, we are a company which makes a toolset for hardware/software co-design and parallel programming http://www.proximusda.com We would like to try to link Qemu with our solution in order to support virtual prototyping. For that we are looking for (potentially paid) support by the Qemu develope

[Qemu-devel] [PATCH 5/8] Fix qemu_wait_io_event processing in io-thread mode

2010-06-25 Thread Jan Kiszka
When checking for I/O events in the tcg CPU loop, make sure that we call qemu_wait_io_event_common for all CPUs, not only the current one. Otherwise pause_all_vcpus may lock up or run_on_cpu requests may starve. Rename qemu_wait_io_event to qemu_tcg_wait_io_event at this chance and purge its argum

[Qemu-devel] Re: [PATCH 04/12] blockdev: New drive_of_blockdev()

2010-06-25 Thread Christoph Hellwig
> +DriveInfo *drive_of_blockdev(BlockDriverState *bs) I'd call this find_drive_by_blockdev.

Re: [Qemu-devel] [PATCH 0/7] poison TARGET_xxx for compile once object and header file cleanups

2010-06-25 Thread Richard Henderson
On 06/25/2010 05:52 AM, Paolo Bonzini wrote: > This is a different way to achieve the same objective as Isamu's patch. > Basically, his patch becomes the (much simpler) patch 7 of this series, > and everything else is something I had had lying around for a while. :) > > Patch 1 is simply Amit's pa

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

2010-06-25 Thread Markus Armbruster
Cole Robinson writes: > I can reproduce with qemu-kvm 0.12.4 like the original reporter. I > cannot reproduce with qemu-kvm upstream, qemu stable, or qemu upstream. > So boot=on could be the culprit. Libvirt generated command line: > > LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=no

[Qemu-devel] Re: [PATCH 04/12] blockdev: New drive_of_blockdev()

2010-06-25 Thread Markus Armbruster
Christoph Hellwig writes: >> +DriveInfo *drive_of_blockdev(BlockDriverState *bs) > > I'd call this find_drive_by_blockdev. For what it's worth, all externally visible functions dealing with drives start with "drive_".

[Qemu-devel] Re: [PATCH] virtio-serial: Simplify virtio_serial_load()

2010-06-25 Thread Markus Armbruster
Did this fall through the cracks? Markus Armbruster writes: > For all i, ports_map[i] is used in and only in the i-th iteration. > Replace the dynamic array by a scalar variable. > > Signed-off-by: Markus Armbruster > --- > hw/virtio-serial-bus.c | 12 +++- > 1 files changed, 3 inser

Re: [Qemu-devel] [PATCH] tcg-s390: New TCG Target.

2010-06-25 Thread malc
On Fri, 25 Jun 2010, Richard Henderson wrote: > Original patch from Ulrich Hecht, further work from Alexander Graf > and Richard Henderson. > > Cc: Ulrich Hecht > Cc: Alexander Graf > Signed-off-by: Richard Henderson [..snip..] > +/* #define DEBUG_S390_TCG */ > + > +#ifdef DEBUG_S390_TCG > +#

Re: [Qemu-devel] [PATCH 00/19] RFC: Reporting QEMU binary capabilities

2010-06-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: [...] > The main problem encountered with this patch series is the > split between argv and config parameters. The qemu-config.c > file provides the information is a good data format, allowing > programatic access to the list of parameters for each config > option (eg

Re: [Qemu-devel] [PATCH 03/19] Add enum handlers for easy & efficient string <-> int conversion

2010-06-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: > There is quite alot of code using an enumeration of possible > values, which also needs todo conversions to/from a string > representation of enum values. These string <-> int conversions > have been repeated in an adhoc manner throughout the code. > > This makes it