Re: [Qemu-devel] [PATCH] sigfd: use pthread_sigmask

2011-06-08 Thread Jan Kiszka
On 2011-06-09 00:55, Alexander Graf wrote: > Qemu uses signalfd to figure out, if a signal occured without the need > to actually receive the signal. Instead, it can read from the fd to receive > its news. > > Now, we obviously don't always have signalfd around. Especially not on > non-Linux syste

[Qemu-devel] qemu-system-arm hang

2011-06-08 Thread rainbow
hello,I recently use qemu-system-arm to emulate versatilepb on my gentoo,but when I boot it ,it will stop after printing: "Uncompressing Linux... done, booting the kernel". The detail is as following: linux kernel:2.6.39 cross compile:arm-none-linux-gnueabi- qemu-system-version:arm-none-linux-gnuea

Re: [Qemu-devel] [PATCH] sigfd: use pthread_sigmask

2011-06-08 Thread Paolo Bonzini
On 06/09/2011 12:55 AM, Alexander Graf wrote: Qemu uses signalfd to figure out, if a signal occured without the need to actually receive the signal. Instead, it can read from the fd to receive its news. Now, we obviously don't always have signalfd around. Especially not on non-Linux systems. So

[Qemu-devel] [PATCH] Replaced tabs with spaces in block.h and block_int.h

2011-06-08 Thread Devin Nakamura
Signed-off-by: Devin Nakamura --- block.h |6 +++--- block_int.h |4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.h b/block.h index da7d39c..859d1d9 100644 --- a/block.h +++ b/block.h @@ -110,7 +110,7 @@ int bdrv_check(BlockDriverState *bs, BdrvCheckResult

Re: [Qemu-devel] [PATCH v3 00/39] pci: initialize ids in pci common code

2011-06-08 Thread Isaku Yamahata
Ping? On Wed, May 25, 2011 at 10:57:57AM +0900, Isaku Yamahata wrote: > Okay, here is the v3 as there seems no more comments on the series. > > patch descriptions: > vender id/device id... in pci configuration space are read-only registers > which are commonly defined for all pci devices. > So in

Re: [Qemu-devel] virtio scsi host draft specification, v3

2011-06-08 Thread Rusty Russell
On Tue, 07 Jun 2011 15:43:49 +0200, Paolo Bonzini wrote: > Hi all, > > after some preliminary discussion on the QEMU mailing list, I present a > draft specification for a virtio-based SCSI host (controller, HBA, you > name it). OK, I'm impressed. This is very well written and I doesn't make any

Re: [Qemu-devel] [PATCH] sigfd: use pthread_sigmask

2011-06-08 Thread Alexandre Raymond
On Wed, Jun 8, 2011 at 6:55 PM, Alexander Graf wrote: > Qemu uses signalfd to figure out, if a signal occured without the need > to actually receive the signal. Instead, it can read from the fd to receive > its news. > > Now, we obviously don't always have signalfd around. Especially not on > non-

[Qemu-devel] [PATCH] sigfd: use pthread_sigmask

2011-06-08 Thread Alexander Graf
Qemu uses signalfd to figure out, if a signal occured without the need to actually receive the signal. Instead, it can read from the fd to receive its news. Now, we obviously don't always have signalfd around. Especially not on non-Linux systems. So what we do there is that we create a new thread,

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Jan Kiszka
On 2011-06-08 23:18, Jan Kiszka wrote: > On 2011-06-08 23:14, Michael S. Tsirkin wrote: >> On Wed, Jun 08, 2011 at 11:03:43PM +0200, Jan Kiszka wrote: >>> On 2011-06-08 23:01, Michael S. Tsirkin wrote: On Wed, Jun 08, 2011 at 10:57:13PM +0200, Jan Kiszka wrote: > On 2011-06-08 22:56, Micha

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 11:03:43PM +0200, Jan Kiszka wrote: > On 2011-06-08 23:01, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 10:57:13PM +0200, Jan Kiszka wrote: > >> On 2011-06-08 22:56, Michael S. Tsirkin wrote: > >>> On Wed, Jun 08, 2011 at 10:44:58PM +0200, Jan Kiszka wrote: > O

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 11:02:44PM +0200, Jan Kiszka wrote: > On 2011-06-08 23:00, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 10:48:10PM +0200, Jan Kiszka wrote: > >> On 2011-06-08 21:53, Michael S. Tsirkin wrote: > >>> On Wed, Jun 08, 2011 at 06:21:51PM +0200, Jan Kiszka wrote: > A

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Jan Kiszka
On 2011-06-08 23:01, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 10:57:13PM +0200, Jan Kiszka wrote: >> On 2011-06-08 22:56, Michael S. Tsirkin wrote: >>> On Wed, Jun 08, 2011 at 10:44:58PM +0200, Jan Kiszka wrote: On 2011-06-08 21:48, Michael S. Tsirkin wrote: > On Wed, Jun 08, 20

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 10:44:58PM +0200, Jan Kiszka wrote: > On 2011-06-08 21:48, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 06:21:52PM +0200, Jan Kiszka wrote: > >> Signed-off-by: Jan Kiszka > > > > pci_regs.h from linux does not have these > > this is why we keep them in msi.c > >

Re: [Qemu-devel] [PATCH v2 5/9] msi: Invoke msi/msix_reset from PCI core

2011-06-08 Thread Jan Kiszka
On 2011-06-08 21:59, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 06:21:48PM +0200, Jan Kiszka wrote: >> There is no point in pushing this burden to the devices, they may rather >> forget to call them (like intel-hda and ahci ATM). Instead, reset >> functions are now called from pci_device_r

[Qemu-devel] [PATCH] doc: Minor typo fix.

2011-06-08 Thread Brad Hards
Thanks to agraf_, stefanha and Snader_LB for their IRC assistance. Thanks to Markus Armbruster and Alexander Graf (again) for their assistance with the second version of this patch. No patch is too simple to test... Signed-off-by: Brad Hards --- qemu-options.hx |4 ++-- 1 files changed, 2 i

Re: [Qemu-devel] [PATCH 6/7] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 04:46:13PM +0200, Jan Kiszka wrote: > On 2011-06-08 16:43, Isaku Yamahata wrote: > > On Wed, Jun 08, 2011 at 12:26:44PM +0200, Jan Kiszka wrote: > >> Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant > >> names to libpci style. Will be used for device as

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 11:18:05PM +0200, Jan Kiszka wrote: > On 2011-06-08 23:14, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 11:03:43PM +0200, Jan Kiszka wrote: > >> On 2011-06-08 23:01, Michael S. Tsirkin wrote: > >>> On Wed, Jun 08, 2011 at 10:57:13PM +0200, Jan Kiszka wrote: > O

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 11:11:37PM +0200, Jan Kiszka wrote: > On 2011-06-08 23:09, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 11:02:44PM +0200, Jan Kiszka wrote: > >> On 2011-06-08 23:00, Michael S. Tsirkin wrote: > >>> On Wed, Jun 08, 2011 at 10:48:10PM +0200, Jan Kiszka wrote: > O

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 06:21:51PM +0200, Jan Kiszka wrote: > Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant > names to libpci style. Will be used for device assignment code in > qemu-kvm. > > Signed-off-by: Jan Kiszka > --- > hw/msix.c | 24 +++-

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Jan Kiszka
On 2011-06-08 23:09, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 11:02:44PM +0200, Jan Kiszka wrote: >> On 2011-06-08 23:00, Michael S. Tsirkin wrote: >>> On Wed, Jun 08, 2011 at 10:48:10PM +0200, Jan Kiszka wrote: On 2011-06-08 21:53, Michael S. Tsirkin wrote: > On Wed, Jun 08, 20

Re: [Qemu-devel] [RFC] ppc: qdev-ify CPU creation

2011-06-08 Thread Andreas Färber
Am 21.12.2010 um 21:01 schrieb Andreas Färber: From: Hervé Poussineau v1: * Coding style fixes. Signed-off-by: Hervé Poussineau Cc: Alexander Graf Signed-off-by: Andreas Färber --- Hello Alex, Seeing the discussions about Leon3, is this the way to go for ppc? Is ppc.[hc] right? The u

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Jan Kiszka
On 2011-06-08 23:14, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 11:03:43PM +0200, Jan Kiszka wrote: >> On 2011-06-08 23:01, Michael S. Tsirkin wrote: >>> On Wed, Jun 08, 2011 at 10:57:13PM +0200, Jan Kiszka wrote: On 2011-06-08 22:56, Michael S. Tsirkin wrote: > On Wed, Jun 08, 20

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 10:57:13PM +0200, Jan Kiszka wrote: > On 2011-06-08 22:56, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 10:44:58PM +0200, Jan Kiszka wrote: > >> On 2011-06-08 21:48, Michael S. Tsirkin wrote: > >>> On Wed, Jun 08, 2011 at 06:21:52PM +0200, Jan Kiszka wrote: > S

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Jan Kiszka
On 2011-06-08 23:00, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 10:48:10PM +0200, Jan Kiszka wrote: >> On 2011-06-08 21:53, Michael S. Tsirkin wrote: >>> On Wed, Jun 08, 2011 at 06:21:51PM +0200, Jan Kiszka wrote: Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 10:48:10PM +0200, Jan Kiszka wrote: > On 2011-06-08 21:53, Michael S. Tsirkin wrote: > > On Wed, Jun 08, 2011 at 06:21:51PM +0200, Jan Kiszka wrote: > >> Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant > >> names to libpci style. Will be used for devic

[Qemu-devel] [RFC v4 06/12] parallel: Implement ISA set_state callback

2011-06-08 Thread Andreas Färber
Add "enabled" property. Signed-off-by: Andreas Färber --- hw/parallel.c | 69 ++-- 1 files changed, 47 insertions(+), 22 deletions(-) diff --git a/hw/parallel.c b/hw/parallel.c index cc853a5..0cfc697 100644 --- a/hw/parallel.c +++ b/hw/paral

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Jan Kiszka
On 2011-06-08 22:56, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 10:44:58PM +0200, Jan Kiszka wrote: >> On 2011-06-08 21:48, Michael S. Tsirkin wrote: >>> On Wed, Jun 08, 2011 at 06:21:52PM +0200, Jan Kiszka wrote: Signed-off-by: Jan Kiszka >>> >>> pci_regs.h from linux does not have

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Jan Kiszka
On 2011-06-08 21:53, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 06:21:51PM +0200, Jan Kiszka wrote: >> Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant >> names to libpci style. Will be used for device assignment code in >> qemu-kvm. >> >> Signed-off-by: Jan Kiszka >

[Qemu-devel] [RFC v4 04/12] isa: Allow to un-assign I/O ports

2011-06-08 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/isa-bus.c | 14 ++ hw/isa.h |1 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index d258932..1f64673 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -105,6 +105,20 @@ void isa_init_ioport(IS

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Jan Kiszka
On 2011-06-08 21:48, Michael S. Tsirkin wrote: > On Wed, Jun 08, 2011 at 06:21:52PM +0200, Jan Kiszka wrote: >> Signed-off-by: Jan Kiszka > > pci_regs.h from linux does not have these > this is why we keep them in msi.c > > [mst@tuck linux-2.6]$ grep PCI_MSI_ include/linux/pci_regs.h > #define

[Qemu-devel] [RFC v4 11/12] ide: Implement ISA set_state() callback

2011-06-08 Thread Andreas Färber
Incorporate ISA VMState. Add "enabled" property. Signed-off-by: Andreas Färber --- hw/ide/isa.c | 32 +++- 1 files changed, 27 insertions(+), 5 deletions(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 4ac7453..fd5c55e 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c

[Qemu-devel] [PATCH v4 01/12] qdev: Add support for property type bool

2011-06-08 Thread Andreas Färber
VMState supports the type bool but qdev instead supports bit, backed by uint32_t. Therefore let's add DEFINE_PROP_BOOL() and qdev_prop_set_bool(). Since, e.g., enabled=on does not look nice, parse/print "yes" and "no". Cc: Juan Quintela Signed-off-by: Andreas Färber --- hw/qdev-properties.c |

Re: [Qemu-devel] [PATCH v2 5/9] msi: Invoke msi/msix_reset from PCI core

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 06:21:48PM +0200, Jan Kiszka wrote: > There is no point in pushing this burden to the devices, they may rather > forget to call them (like intel-hda and ahci ATM). Instead, reset > functions are now called from pci_device_reset and pci_bridge_reset. > They do nothing if the

[Qemu-devel] [RFC v4 07/12] serial: Implement ISA set_state() callback

2011-06-08 Thread Andreas Färber
Incorporate ISA VMState. Add "enabled" property. Signed-off-by: Andreas Färber --- hw/serial.c | 30 +- 1 files changed, 25 insertions(+), 5 deletions(-) diff --git a/hw/serial.c b/hw/serial.c index 0ee61dd..a058cb6 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -75

Re: [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 06:21:51PM +0200, Jan Kiszka wrote: > Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant > names to libpci style. Will be used for device assignment code in > qemu-kvm. > > Signed-off-by: Jan Kiszka Besides keeping pci_regs.h aligned with the original,

Re: [Qemu-devel] [PATCH 0/7] msi: Small cleanups and fixes

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 12:26:38PM +0200, Jan Kiszka wrote: > A few patches to the MSI and MSI-X layer that clean up the interfaces > and fix reset issues. Are there any more fixes besides the typo in uninit? > They are from my MSI rework to prepare it for > KVM's requirements (in-kernel irqchip)

[Qemu-devel] [RFC v4 00/12] ISA reconfigurability v4

2011-06-08 Thread Andreas Färber
Hey, I've refined the series to track the state in ISADevice and to expose it as VMState. Error handling has been improved, and setting the state multiple times is no-op now. To read the state, I'm introducing support for bool qdev properties. Some more qdev_prop_get_*() helpers are introduced,

Re: [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Michael S. Tsirkin
On Wed, Jun 08, 2011 at 06:21:52PM +0200, Jan Kiszka wrote: > Signed-off-by: Jan Kiszka pci_regs.h from linux does not have these this is why we keep them in msi.c [mst@tuck linux-2.6]$ grep PCI_MSI_ include/linux/pci_regs.h #define PCI_MSI_FLAGS 2 /* Various flags */ #define P

Re: [Qemu-devel] [PATCH v2][ 18/21] qapi: Makefile changes to build test-visiter

2011-06-08 Thread Anthony Liguori
On 06/08/2011 12:39 PM, Luiz Capitulino wrote: On Fri, 3 Jun 2011 17:33:16 -0500 Michael Roth wrote: Signed-off-by: Michael Roth This doesn't build: ~/src/qmp-unstable/build (qapi-review)/ mk test-visiter GEN qapi-generated/test-qapi-types.h GEN qapi-generated/test-qapi-visit.h

Re: [Qemu-devel] [PATCH v2][ 18/21] qapi: Makefile changes to build test-visiter

2011-06-08 Thread Luiz Capitulino
On Wed, 08 Jun 2011 12:55:29 -0500 Michael Roth wrote: > On 06/08/2011 12:39 PM, Luiz Capitulino wrote: > > On Fri, 3 Jun 2011 17:33:16 -0500 > > Michael Roth wrote: > > > >> > >> Signed-off-by: Michael Roth > > > > This doesn't build: > > > > ~/src/qmp-unstable/build (qapi-review)/ mk test-vis

[Qemu-devel] [RFC v4 12/12] prep: Add pc87312 Super I/O emulation

2011-06-08 Thread Andreas Färber
Signed-off-by: Hervé Poussineau Create all devices ahead of time and enable/disable instead. Check the qdev properties for whether a change is necessary. Signed-off-by: Andreas Färber --- Makefile.objs |1 + default-configs/ppc-softmmu.mak |2 + hw/pc87312.c

Re: [Qemu-devel] [PULL 00/26] Alpha system emulation, v5

2011-06-08 Thread Richard Henderson
Ping^3. Anyone? Bueller? Bueller? r~ On 06/02/2011 07:56 AM, Richard Henderson wrote: > Ping^2. > > r~ > > On 05/27/2011 12:55 PM, Richard Henderson wrote: >> Ping? >> >> >> r~ >> >> On 05/23/2011 01:28 PM, Richard Henderson wrote: >>> Changes from v4 -> v5 >>> >>> * Claim official ownersh

Re: [Qemu-devel] [PATCH v2][ 18/21] qapi: Makefile changes to build test-visiter

2011-06-08 Thread Michael Roth
On 06/08/2011 12:39 PM, Luiz Capitulino wrote: On Fri, 3 Jun 2011 17:33:16 -0500 Michael Roth wrote: Signed-off-by: Michael Roth This doesn't build: ~/src/qmp-unstable/build (qapi-review)/ mk test-visiter GEN qapi-generated/test-qapi-types.h GEN qapi-generated/test-qapi-visit.h

[Qemu-devel] [RFC v4 05/12] isa: Allow to un-associate an IRQ

2011-06-08 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/isa-bus.c | 14 ++ hw/isa.h |1 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index 1f64673..6ac3e61 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -80,6 +80,20 @@ void isa_init_irq(ISADevi

[Qemu-devel] [PATCH v4 08/12] fdc: Parametrize ISA base, IRQ and DMA

2011-06-08 Thread Andreas Färber
From: Hervé Poussineau Keep the PC values as defaults but allow to override them for PReP. Signed-off-by: Hervé Poussineau Cc: Markus Armbruster Signed-off-by: Andreas Färber --- hw/fdc.c | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/hw/

[Qemu-devel] [RFC v4 09/12] fdc: Implement ISA set_state() callback

2011-06-08 Thread Andreas Färber
Incorporate ISA VMState. Add "enabled" property. Signed-off-by: Andreas Färber --- hw/fdc.c | 47 ++- 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/hw/fdc.c b/hw/fdc.c index f4e3e0d..e2dcff0 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@

Re: [Qemu-devel] inconsistency between device traversal in qdev and legacy

2011-06-08 Thread Peter Maydell
On 8 June 2011 18:37, Andreas Färber wrote: > From Peter's description I believe this could be the root cause of Rob's > reversed -net /dev/ethX devices as well? That supposedly broke with 0.14. So > for setups earlier than 0.14 reversing would be a bugfix, but if people > adapted to 0.14 behavior

Re: [Qemu-devel] inconsistency between device traversal in qdev and legacy

2011-06-08 Thread Andreas Färber
Am 08.06.2011 um 19:39 schrieb Peter Maydell: On 8 June 2011 18:37, Andreas Färber wrote: From Peter's description I believe this could be the root cause of Rob's reversed -net /dev/ethX devices as well? That supposedly broke with 0.14. So for setups earlier than 0.14 reversing would be a b

[Qemu-devel] [RFC v4 03/12] isa: Provide set_state callback

2011-06-08 Thread Andreas Färber
To allow enabling/disabling present ISA devices without hotplug, keep track of state and add a helper to avoid enabling twice. Since the properties to be configured are defined at device level, delegate the actual work to a callback function. If no callback is supplied, the device can't be disable

[Qemu-devel] [PATCH v4 02/12] qdev: Add helpers for reading properties

2011-06-08 Thread Andreas Färber
Add helpers qdev_prop_get_*() to access all integer qdev properties as well as string properties. This effectively turns qdev properties from write-only to read/write, allowing to inspect a private DeviceState. Signed-off-by: Andreas Färber --- hw/qdev-properties.c | 53 ++

[Qemu-devel] [RFC v4 10/12] ide: Allow to discard I/O ports

2011-06-08 Thread Andreas Färber
Signed-off-by: Andreas Färber --- hw/ide/core.c |8 hw/ide/internal.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 45410e8..c3b82de 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1760,6 +1760,14 @@ void ide_init_

Re: [Qemu-devel] [PATCH] msi: Fix copy&paste mistake in msi_uninit

2011-06-08 Thread Michael S. Tsirkin
On Tue, Jun 07, 2011 at 07:26:20PM +0200, Jan Kiszka wrote: > Signed-off-by: Jan Kiszka Applied, thanks! > --- > hw/msi.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/msi.c b/hw/msi.c > index b087fe5..e8c5607 100644 > --- a/hw/msi.c > +++ b/hw/msi.c > @@ -1

Re: [Qemu-devel] inconsistency between device traversal in qdev and legacy

2011-06-08 Thread Andreas Färber
Hi, Am 08.06.2011 um 19:00 schrieb Gerd Hoffmann: Since qbus_create_inplace() adds each new child bus to the front of the parent's child_bus list, this means that qbus_find_recursive() will encounter the last-added bus first, whereas usb_bus_find() will get the first-added bus. Quite a while

Re: [Qemu-devel] [PATCH] doc: Minor typo fix.

2011-06-08 Thread Markus Armbruster
Brad Hards writes: > Thanks to agraf_, stefanha and Snader_LB for their IRC assistance. > > Signed-off-by: Brad Hards > --- > qemu-options.hx |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qemu-options.hx b/qemu-options.hx > index 82e085a..005c141 100644 > ---

Re: [Qemu-devel] inconsistency between device traversal in qdev and legacy

2011-06-08 Thread Rob Landley
On 06/08/2011 12:39 PM, Peter Maydell wrote: > On 8 June 2011 18:37, Andreas Färber wrote: >> From Peter's description I believe this could be the root cause of Rob's >> reversed -net /dev/ethX devices as well? That supposedly broke with 0.14. So >> for setups earlier than 0.14 reversing would be

Re: [Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v2

2011-06-08 Thread Luiz Capitulino
On Wed, 08 Jun 2011 12:03:04 -0500 Michael Roth wrote: > On 06/08/2011 11:43 AM, Luiz Capitulino wrote: > > On Fri, 3 Jun 2011 17:32:58 -0500 > > Michael Roth wrote: > > > >> This is Set 2/3 of the QAPI+QGA patchsets. > > > > I have started taking a look at this series, but it turns out that th

[Qemu-devel] [PATCH v3 01/12] Add kernel header update script

2011-06-08 Thread Jan Kiszka
This helper pulls the required kernel headers for KVM and vhost into a specified directory. The update is triggered via scripts/update-linux-headers.sh LINUX_PATH and will place the output under linux-headers/linux and linux-headers/asm-*. It also imports the COPYING to care for headers witho

Re: [Qemu-devel] [PATCH v2][ 02/21] qlist: add qlist_first()/qlist_next()

2011-06-08 Thread Luiz Capitulino
On Fri, 3 Jun 2011 17:33:00 -0500 Michael Roth wrote: > > Signed-off-by: Michael Roth > --- > qlist.h | 11 +++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/qlist.h b/qlist.h > index dbe7b92..cd2d23e 100644 > --- a/qlist.h > +++ b/qlist.h > @@ -16,6 +16,7 @@

Re: [Qemu-devel] [PATCH v2][ 18/21] qapi: Makefile changes to build test-visiter

2011-06-08 Thread Luiz Capitulino
On Wed, 08 Jun 2011 13:12:50 -0500 Anthony Liguori wrote: > On 06/08/2011 12:39 PM, Luiz Capitulino wrote: > > On Fri, 3 Jun 2011 17:33:16 -0500 > > Michael Roth wrote: > > > >> > >> Signed-off-by: Michael Roth > > > > This doesn't build: > > > > ~/src/qmp-unstable/build (qapi-review)/ mk test-

[Qemu-devel] [PATCH v2 2/9] msi: Guard msi/msix_write_config with msi_present

2011-06-08 Thread Jan Kiszka
Terminate msi/msix_write_config early if support is not enabled. This allows to remove checks at the caller site if MSI is optional. Signed-off-by: Jan Kiszka --- hw/msi.c |3 ++- hw/msix.c |2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index e

Re: [Qemu-devel] [PATCH v3 01/12] Add kernel header update script

2011-06-08 Thread Peter Maydell
On 8 June 2011 17:22, Jan Kiszka wrote: > This helper pulls the required kernel headers for KVM and vhost into a > specified directory. The update is triggered via > >    scripts/update-linux-headers.sh LINUX_PATH > Signed-off-by: Jan Kiszka > --- > > Changes in v3: >  - remove bashism Thanks;

[Qemu-devel] [PATCH v2 1/9] msi: Fix copy&paste mistake in msi_uninit

2011-06-08 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- hw/msi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index b087fe5..e8c5607 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -172,7 +172,7 @@ void msi_uninit(struct PCIDevice *dev) } flags = pci_get_word(dev->config

Re: [Qemu-devel] [PATCH v2][ 18/21] qapi: Makefile changes to build test-visiter

2011-06-08 Thread Luiz Capitulino
On Fri, 3 Jun 2011 17:33:16 -0500 Michael Roth wrote: > > Signed-off-by: Michael Roth This doesn't build: ~/src/qmp-unstable/build (qapi-review)/ mk test-visiter GEN qapi-generated/test-qapi-types.h GEN qapi-generated/test-qapi-visit.h CCqapi/qmp-input-visiter.o CCqapi/qm

[Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h

2011-06-08 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- hw/msi.c |4 hw/pci_regs.h |2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index e23f5df..d548939 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -21,10 +21,6 @@ #include "msi.h" #include "range.h" -/* Eventuall

[Qemu-devel] [PATCH v2 4/9] msi: Use msi/msix_present more consistently

2011-06-08 Thread Jan Kiszka
Replace some open-coded msi/msix_present checks and drop redundant msix_supported tests (present implies supported). Signed-off-by: Jan Kiszka --- hw/msi.c |2 +- hw/msix.c | 13 - 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index b039893

[Qemu-devel] [PATCH v2 5/9] msi: Invoke msi/msix_reset from PCI core

2011-06-08 Thread Jan Kiszka
There is no point in pushing this burden to the devices, they may rather forget to call them (like intel-hda and ahci ATM). Instead, reset functions are now called from pci_device_reset and pci_bridge_reset. They do nothing if the MSI/MSI-X is not in use. CC: Alexander Graf CC: Gerd Hoffmann CC:

Re: [Qemu-devel] [patch 6/7] QEMU live block copy

2011-06-08 Thread Stefan Hajnoczi
On Wed, Jun 8, 2011 at 4:10 PM, Jagane Sundar wrote: > On 6/7/2011 5:15 AM, Stefan Hajnoczi wrote: >> >> On Mon, Jun 6, 2011 at 5:55 PM, Marcelo Tosatti >>  wrote: >> >> I haven't reviewed this whole patch yet, but comments below. >> >> This patch, like image streaming, may hit deadlocks due to sy

Re: [Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v2

2011-06-08 Thread Michael Roth
On 06/08/2011 11:43 AM, Luiz Capitulino wrote: On Fri, 3 Jun 2011 17:32:58 -0500 Michael Roth wrote: This is Set 2/3 of the QAPI+QGA patchsets. I have started taking a look at this series, but it turns out that this is complex stuff and I'd like to spend time playing with it and testing it

[Qemu-devel] [PATCH v2 7/9] msi: Invoke msi/msix_uninit from PCI core

2011-06-08 Thread Jan Kiszka
Again less boilerplate: Clean up MSI/MSI-X unconditionally from the PCI PCI core. Both services do nothing if there was no support registered. Eliminates virtio_exit_pci among other things. CC: Alexander Graf CC: Gerd Hoffmann CC: Isaku Yamahata Signed-off-by: Jan Kiszka --- hw/ide/ich.c

Re: [Qemu-devel] inconsistency between device traversal in qdev and legacy

2011-06-08 Thread Gerd Hoffmann
Hi, Since qbus_create_inplace() adds each new child bus to the front of the parent's child_bus list, this means that qbus_find_recursive() will encounter the last-added bus first, whereas usb_bus_find() will get the first-added bus. Quite a while back I've tried to switch qdev from QLIST to

[Qemu-devel] [PATCH] Clean up virtio-9p error handling code

2011-06-08 Thread Sassan Panahinejad
In a lot of cases, the handling of errors was quite ugly. This patch moves reading of errno to immediately after the system calls and passes it up through the system more cleanly. Also, in the case of the xattr functions (and possibly others), completely the wrong error was being returned. This

Re: [Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v2

2011-06-08 Thread Luiz Capitulino
On Fri, 3 Jun 2011 17:32:58 -0500 Michael Roth wrote: > This is Set 2/3 of the QAPI+QGA patchsets. I have started taking a look at this series, but it turns out that this is complex stuff and I'd like to spend time playing with it and testing it throughly. I don't oppose merging this as is, as

[Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Jan Kiszka
Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant names to libpci style. Will be used for device assignment code in qemu-kvm. Signed-off-by: Jan Kiszka --- hw/msix.c | 24 +++- hw/pci_regs.h | 14 -- 2 files changed, 19 insertions(+),

[Qemu-devel] [PATCH v2 0/9] msi: Small cleanups and fixes

2011-06-08 Thread Jan Kiszka
A few patches to the MSI and MSI-X layer that clean up the interfaces and fix reset issues. They are from my MSI rework to prepare it for KVM's requirements (in-kernel irqchip). In contrast to the previous version, this one moves msi[x]_reset, msi[x]_write_config and msi[x]_uninit into the PCI cor

Re: [Qemu-devel] [patch 6/7] QEMU live block copy

2011-06-08 Thread Jagane Sundar
On 6/7/2011 5:15 AM, Stefan Hajnoczi wrote: On Mon, Jun 6, 2011 at 5:55 PM, Marcelo Tosatti wrote: I haven't reviewed this whole patch yet, but comments below. This patch, like image streaming, may hit deadlocks due to synchronous I/O emulation. I discovered this problem when working on image

[Qemu-devel] [PATCH v2 6/9] msi: Invoke msi/msix_write_config from PCI core

2011-06-08 Thread Jan Kiszka
Also this functions is better invoked by the core than by each and every device. This allows to drop the config_write callbacks from ich and intel-hda. CC: Alexander Graf CC: Gerd Hoffmann CC: Isaku Yamahata Signed-off-by: Jan Kiszka --- hw/ide/ich.c|8 hw/intel-hda.c

Re: [Qemu-devel] vmdk fails qemu-iotest 019

2011-06-08 Thread Kevin Wolf
Am 08.06.2011 16:17, schrieb Fam Zheng: > Oh, you're right, and I think there is a patch of mine related to the fail: > > "[PATCH 02/12] VMDK: bugfix, align offset to cluster in get_whole_cluster" > > Can you test if this fixes it? Thanks, this works for me. However, I had to fix your patch man

[Qemu-devel] [PATCH v2 3/9] msi: Guard msi_reset with msi_present

2011-06-08 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- hw/msi.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index b7a92c9..b039893 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -183,6 +183,10 @@ void msi_reset(PCIDevice *dev) uint16_t flags; bool msi64bit; +if

Re: [Qemu-devel] [PATCH v2 01/12] Add kernel header update script

2011-06-08 Thread Peter Maydell
On 8 June 2011 16:06, Jan Kiszka wrote: > +    if [ $arch == x86 ]; then This should be a single '=' -- '==' is a bashism. The 'checkbashisms' script (available in 'devscripts' package on debian and ubuntu) catches this: cam-vm-266:maverick:testing$ checkbashisms scripts/update-linux-headers.sh

[Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-08 Thread Dmitry Konishchev
This patch optimizes 'qemu-img convert' operation for volumes which are almost fully unallocated. Here are the results of simple tests: We have a snapshot of a volume: $ qemu-img info snapshot.qcow2 image: snapshot.qcow2 file format: qcow2 virtual size: 5.0G (5372805120 bytes) disk size: 4.0G clus

Re: [Qemu-devel] vmdk fails qemu-iotest 019

2011-06-08 Thread Fam Zheng
Oh, you're right, and I think there is a patch of mine related to the fail: "[PATCH 02/12] VMDK: bugfix, align offset to cluster in get_whole_cluster" Can you test if this fixes it? On Wed, Jun 8, 2011 at 9:52 PM, Kevin Wolf wrote: > Am 08.06.2011 15:29, schrieb Fam Zheng: >> Yes I noticed the

[Qemu-devel] inconsistency between device traversal in qdev and legacy

2011-06-08 Thread Peter Maydell
If you have a model with more than one USB bus, and you create a USB device on the command line without specifying which bus to plug it into, QEMU will choose a different bus depending on whether you use the legacy "-usbdevice keyboard" or the qdev "-device usb-kbd". This is because the legacy opt

Re: [Qemu-devel] [PATCH 01/12] Add kernel header update script

2011-06-08 Thread Peter Maydell
2011/6/8 Jan Kiszka : > On 2011-06-08 16:33, Peter Maydell wrote: >> On 8 June 2011 15:10, Jan Kiszka wrote: >>> +tmpdir=$TMPDIR/.tmp-hdrs-$$ >> >> Better (safer) to use mktemp, I think. > > Is that portable? I don't think so. We don't expect every random end user to run this script, though, righ

Re: [Qemu-devel] [PATCH 6/7] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Isaku Yamahata
On Wed, Jun 08, 2011 at 12:26:44PM +0200, Jan Kiszka wrote: > Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant > names to libpci style. Will be used for device assignment code in > qemu-kvm. So since libpci would be used by qemu, you are claiming that it should be switched to

[Qemu-devel] [PATCH 06/12] kvm: Drop useless zero-initializations

2011-06-08 Thread Jan Kiszka
Backing KVMState is alreay zero-initialized. Signed-off-by: Jan Kiszka --- kvm-all.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 106eb3a..4a9910a 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -764,28 +764,23 @@ int kvm_init(void) } #

Re: [Qemu-devel] [PATCH 01/12] Add kernel header update script

2011-06-08 Thread Jan Kiszka
On 2011-06-08 16:33, Peter Maydell wrote: > On 8 June 2011 15:10, Jan Kiszka wrote: >> --- /dev/null >> +++ b/scripts/update-linux-headers.sh >> @@ -0,0 +1,55 @@ >> +#!/bin/sh -e >> +# > >> +if [ -z "$output" ]; then >> +output=$PWD >> +fi > >> +mkdir -p $output/linux-headers/asm-$arch >

Re: [Qemu-devel] [PATCH 01/12] Add kernel header update script

2011-06-08 Thread Peter Maydell
On 8 June 2011 15:10, Jan Kiszka wrote: > --- /dev/null > +++ b/scripts/update-linux-headers.sh > @@ -0,0 +1,55 @@ > +#!/bin/sh -e > +# > +if [ -z "$output" ]; then > +    output=$PWD > +fi > +    mkdir -p $output/linux-headers/asm-$arch This script is rather lacking in quoting throughout. As a

[Qemu-devel] [PATCH 03/12] Switch build system to accompanied kernel headers

2011-06-08 Thread Jan Kiszka
This helps reducing our build-time checks for feature support in the available Linux kernel headers. And it helps users that do not have sufficiently recent headers installed on their build machine. Consequently, the patch removes and build-time checks for kvm and vhost in configure, the --kerneld

[Qemu-devel] [PATCH 10/12] kvm: Clean up stubs

2011-06-08 Thread Jan Kiszka
No one references kvm_check_extension, kvm_has_vcpu_events, and kvm_has_robust_singlestep outside KVM code. kvm_update_guest_debug is never called, thus has no job besides returning an error. Signed-off-by: Jan Kiszka --- kvm-stub.c | 18 +- 1 files changed, 1 insertions(+), 1

[Qemu-devel] [PATCH v2 01/12] Add kernel header update script

2011-06-08 Thread Jan Kiszka
This helper pulls the required kernel headers for KVM and vhost into a specified directory. The update is triggered via scripts/update-linux-headers.sh LINUX_PATH and will place the output under linux-headers/linux and linux-headers/asm-*. It also imports the COPYING to care for headers witho

[Qemu-devel] [PATCH 07/12] kvm: Drop KVM_CAP build dependencies

2011-06-08 Thread Jan Kiszka
No longer needed with accompanied kernel headers. We are only left with build dependencies that are controlled by kvm arch headers. CC: Alexander Graf Signed-off-by: Jan Kiszka --- kvm-all.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/kvm-all.c b/kvm-all.c in

Re: [Qemu-devel] [PATCH 2/7] msi: Guard msi/msix_write_config with msi_present

2011-06-08 Thread Jan Kiszka
On 2011-06-08 14:33, Jan Kiszka wrote: > On 2011-06-08 14:28, Gerd Hoffmann wrote: >>> @@ -1173,12 +1173,8 @@ static int intel_hda_exit(PCIDevice *pci) >>> static void intel_hda_write_config(PCIDevice *pci, uint32_t addr, >>> uint32_t val, int len) >>> { >>>

[Qemu-devel] [PATCH 08/12] kvm: x86: Drop KVM_CAP build dependencies

2011-06-08 Thread Jan Kiszka
No longer needed with accompanied kernel headers. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 67 ++-- 1 files changed, 3 insertions(+), 64 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 0efcf97..1c2d32c 100644 --- a

[Qemu-devel] [PATCH 12/12] Remove unneeded kvm.h from cpu-exec.c

2011-06-08 Thread Jan Kiszka
This was obsoleted by 6792a57bf1. Signed-off-by: Jan Kiszka --- cpu-exec.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 6ddd8dd..9bb6405 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -20,7 +20,6 @@ #include "exec.h" #include "disas.h" #i

[Qemu-devel] [PATCH 00/12] [uq/master] Import linux headers and some cleanups

2011-06-08 Thread Jan Kiszka
Licensing of the virtio headers is no clarified. So we can finally resolve the clumbsy and constantly buggy #ifdef'ery around old KVM and virtio headers. Recent example: current qemu-kvm does not build against 2.6.32 headers. This series introduces an import mechanism for all required Linux header

Re: [Qemu-devel] [PATCH 6/7] msix: Align MSI-X constants to libpci definitions and extend them

2011-06-08 Thread Jan Kiszka
On 2011-06-08 16:43, Isaku Yamahata wrote: > On Wed, Jun 08, 2011 at 12:26:44PM +0200, Jan Kiszka wrote: >> Add PCI_MSIX_TABLE and PCI_MSIX_PBA, align other MSIX related constant >> names to libpci style. Will be used for device assignment code in >> qemu-kvm. > > So since libpci would be used by

[Qemu-devel] [PATCH 04/12] kvm: Drop CONFIG_KVM_PARA

2011-06-08 Thread Jan Kiszka
The kvm_para.h header is now always available. Signed-off-by: Jan Kiszka --- configure |1 - hw/kvmclock.c |9 - target-i386/kvm.c | 26 +- 3 files changed, 1 insertions(+), 35 deletions(-) diff --git a/configure b/configure index 0e1dc46..e

[Qemu-devel] [PATCH 11/12] kvm: x86: Pass KVMState to kvm_arch_get_supported_cpuid

2011-06-08 Thread Jan Kiszka
kvm_arch_get_supported_cpuid checks for global cpuid restrictions, it does not require any CPUState reference. Changing its interface allows to call it before any VCPU is initialized. CC: Eduardo Habkost Signed-off-by: Jan Kiszka --- kvm.h |2 +- target-i386/cpuid.c | 20 +++

[Qemu-devel] [PATCH 09/12] kvm: ppc: Drop KVM_CAP build dependencies

2011-06-08 Thread Jan Kiszka
No longer needed with accompanied kernel headers. CC: Alexander Graf Signed-off-by: Jan Kiszka --- target-ppc/kvm.c | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 0500e3f..21f35af 100644 --- a/target-ppc/kvm.c +++

[Qemu-devel] [PATCH 01/12] Add kernel header update script

2011-06-08 Thread Jan Kiszka
This helper pulls the required kernel headers for KVM and vhost into a specified directory. The update is triggered via scripts/update-linux-headers.sh LINUX_PATH and will place the output under linux-headers/linux and linux-headers/asm-*. It also imports the COPYING to care for headers witho

  1   2   >