Re: [Qemu-devel] [Xen-devel] [PATCH] xen: fix interrupt routing

2011-05-19 Thread Ian Campbell
On Wed, 2011-05-18 at 18:53 +0100, Stefano Stabellini wrote: > From: Stefano Stabellini > > Match the routing informations built by seabios: > > - remove i440fx_write_config_xen > we don't need to intercept pci config writes to i440FX; > > - introduce piix3_write_config_xen > we do need to inte

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/18/2011 11:13 PM, Richard Henderson wrote: On 05/18/2011 09:47 AM, Avi Kivity wrote: > Yes. We'd change pci_register_bar() to accept a MemoryRegion. Surely this detail would be hidden on the pci_dev->bus? Not sure what you mean. The reason I want pci_register_bar() to accept a memory

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/18/2011 10:40 PM, Jan Kiszka wrote: On 2011-05-18 15:12, Avi Kivity wrote: > void cpu_register_memory_region(MemoryRegion *mr, target_phys_addr_t addr); OK, let's allow overlapping, but make it explicit: void cpu_register_memory_region_overlap(MemoryRegion *mr,

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 10:06, Avi Kivity wrote: > On 05/18/2011 10:40 PM, Jan Kiszka wrote: >> On 2011-05-18 15:12, Avi Kivity wrote: >> > void cpu_register_memory_region(MemoryRegion *mr, >> target_phys_addr_t addr); >> >> OK, let's allow overlapping, but make it explicit: >> >> void cpu_register_memory_r

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/18/2011 10:10 PM, Anthony Liguori wrote: On 05/18/2011 10:30 AM, Jan Kiszka wrote: On 2011-05-18 17:17, Peter Maydell wrote: On 18 May 2011 16:11, Jan Kiszka wrote: On 2011-05-18 16:36, Avi Kivity wrote: There is nothing we can do with a return code. You can't fail an mmio that cause

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Markus Armbruster
Isaku Yamahata writes: > use PCIDeviceInfo to initialize ids. > > Signed-off-by: Isaku Yamahata > --- > hw/acpi_piix4.c |8 > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index 96f5222..03d833a 100644 > --- a/hw/acpi_piix4.c

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 11:08 AM, Jan Kiszka wrote: On 2011-05-19 10:06, Avi Kivity wrote: > On 05/18/2011 10:40 PM, Jan Kiszka wrote: >> On 2011-05-18 15:12, Avi Kivity wrote: >> > void cpu_register_memory_region(MemoryRegion *mr, >> target_phys_addr_t addr); >> >> OK, let's allow overlapping, but

Re: [Qemu-devel] [PATCH] multiboot: set boot_device to first partition

2011-05-19 Thread Stefan Hajnoczi
On Wed, May 18, 2011 at 11:49:26PM +0200, Arun Thomas wrote: > On Sun, May 1, 2011 at 6:35 PM, Stefan Hajnoczi wrote: > > On Thu, Apr 28, 2011 at 3:11 PM, Arun Thomas wrote: > >> The multiboot info struct's 'boot_device' field has 'part1' set to 0x01, > >> which > >> maps to the second primary p

Re: [Qemu-devel] Qcow2

2011-05-19 Thread Stefan Hajnoczi
On Wed, May 18, 2011 at 7:03 PM, wrote: > I was getting only the problem with audio(only Warning and error log) when I > checking the logs > > {snip} > > LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > HOME=/root USER=root LOGNAME=root TMPDIR=/tmp/root-tmp.2af1b17/fil

Re: [Qemu-devel] [PATCH 01/27] Clean up PowerPC SLB handling code

2011-05-19 Thread Andreas Färber
QEMU HEAD still uses a 32-bit binary for both 32-bit and 64-bit. That one uses mtsrin so will need the compatibility, it seemed affected, too. OpenBIOS SVN HEAD (blob) uses slb* as linked to. We're in the preparation of 1.1 and I need to test it before we can update the QEMU binary. ;) Sorry fo

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 10:13, Avi Kivity wrote: > On 05/19/2011 11:08 AM, Jan Kiszka wrote: >> On 2011-05-19 10:06, Avi Kivity wrote: >> > On 05/18/2011 10:40 PM, Jan Kiszka wrote: >> >> On 2011-05-18 15:12, Avi Kivity wrote: >> >> > void cpu_register_memory_region(MemoryRegion *mr, >> >> target_phys_

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Gleb Natapov
On Wed, May 18, 2011 at 09:27:55PM +0200, Jan Kiszka wrote: > > if an I/O is to the APIC page, > >it's handled by the APIC > > That's not that simple. We need to tell apart: > - if a cpu issued the request, and which one => forward to APIC And cpu mode may affect where access is forwarded to.

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 10:26, Gleb Natapov wrote: > On Wed, May 18, 2011 at 09:27:55PM +0200, Jan Kiszka wrote: >>> if an I/O is to the APIC page, >>>it's handled by the APIC >> >> That's not that simple. We need to tell apart: >> - if a cpu issued the request, and which one => forward to APIC > And cp

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 11:25 AM, Jan Kiszka wrote: > > Unspecified doesn't mean abort. It means we need to specify something > (which translates to: we get to pick the priorities). Of course, PCI bars would have to be registered via cpu_register_memory_region_overlap, just specifying the default prior

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 11:30 AM, Jan Kiszka wrote: >> >> That's not that simple. We need to tell apart: >> - if a cpu issued the request, and which one => forward to APIC > And cpu mode may affect where access is forwarded to. If cpu is in SMM > mode access to frame buffer may be forwarded to a memo

Re: [Qemu-devel] [Bug 784977] [NEW] qemu-img convert fails to convert, generates a 512byte file output

2011-05-19 Thread Stefan Hajnoczi
On Thu, May 19, 2011 at 5:17 AM, Andy Brook wrote: > Public bug reported: > > I have a Vmware image, so I have files like 'Ubuntu.vmdk', want to > convert to VirtualBox .vdi format using qemu, the first stage of > extracting the image with 'qemu-img convert Ubuntu.vmdk output.bin' just > generates

[Qemu-devel] [PATCH 0/3] ide: add TRIM support

2011-05-19 Thread Christoph Hellwig
This patchset resurrects my older patches to add TRIM support. The old approach to pass an action handler through the IDE subsystem doesn't work any more after the refactoring for the AHCI driver, so not we simple switch on the type of command passed in.

[Qemu-devel] [PATCH 1/3] make dma_bdrv_io available to drivers

2011-05-19 Thread Christoph Hellwig
Make dma_bdrv_io available for drivers, and pass an explicit I/O function instead of hardcoding bdrv_aio_readv/bdrv_aio_writev. This is required to implement non-READ/WRITE dma commands in the ide driver, e.g. the upcoming TRIM support. Signed-off-by: Christoph Hellwig Index: qemu/dma-helpers.c

[Qemu-devel] [PATCH 3/3] ide: add TRIM support

2011-05-19 Thread Christoph Hellwig
Add support for TRIM sub function of the data set management command, and wire it up to the qemu discard infrastructure. Signed-off-by: Christoph Hellwig Index: qemu/hw/ide/core.c === --- qemu.orig/hw/ide/core.c 2011-05-18 20:30

[Qemu-devel] [PATCH 2/3] ide: allow other dma comands than read and write

2011-05-19 Thread Christoph Hellwig
Replace the is_read flag with a dma_cmd flag to allow the dma and restart logic to handler other commands like TRIM. Signed-off-by: Christoph Hellwig Index: qemu/hw/ide/core.c === --- qemu.orig/hw/ide/core.c 2011-05-18 20:24:04.

Re: [Qemu-devel] [Bug 784977] [NEW] qemu-img convert fails to convert, generates a 512byte file output

2011-05-19 Thread Christoph Hellwig
On Thu, May 19, 2011 at 09:56:37AM +0100, Stefan Hajnoczi wrote: > Please post the output of "qemu-img info Ubuntu.vmdk". I suspect this > image file is not being recognized as vmdk and is being treated as a > raw image, hence the literal copy of its 512-byte sector size > contents. It's not. It

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Gleb Natapov
On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > On 05/18/2011 06:36 PM, Jan Kiszka wrote: > >> > >> We need to head for the more hardware-like approach. What happens when > >> you program overlapping BARs? I imagine the result is > >> implementation-defined, but ends up with one

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 12:08 PM, Gleb Natapov wrote: On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > On 05/18/2011 06:36 PM, Jan Kiszka wrote: > >> > >> We need to head for the more hardware-like approach. What happens when > >> you program overlapping BARs? I imagine the result is

[Qemu-devel] [PULL] Fix CVE-2011-1751.

2011-05-19 Thread Gerd Hoffmann
Hi folks, Urgent security fix. Details are in the commit message. please pull, Gerd Gerd Hoffmann (1): Ignore pci unplug requests for unpluggable devices (CVE-2011-1751) hw/acpi_piix4.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) The following changes since commit 96d

[Qemu-devel] [PATCH] Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)

2011-05-19 Thread Gerd Hoffmann
This patch makes qemu ignore unplug requests from the guest for pci devices which are tagged as non-hotpluggable. Trouble spot is the piix4 chipset with the ISA bridge. Requests to unplug that one will make it go away together with all ISA bus devices, which are not prepared to be unplugged and t

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Gleb Natapov
On Thu, May 19, 2011 at 12:10:38PM +0300, Avi Kivity wrote: > On 05/19/2011 12:08 PM, Gleb Natapov wrote: > >On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > >> On 05/18/2011 06:36 PM, Jan Kiszka wrote: > >> >> > >> >> We need to head for the more hardware-like approach. What hap

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Edgar E. Iglesias
On Thu, May 19, 2011 at 12:08:51PM +0300, Gleb Natapov wrote: > On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > > On 05/18/2011 06:36 PM, Jan Kiszka wrote: > > >> > > >> We need to head for the more hardware-like approach. What happens when > > >> you program overlapping BARs? I i

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 10:43, Avi Kivity wrote: > On 05/19/2011 11:25 AM, Jan Kiszka wrote: >> > >> > Unspecified doesn't mean abort. It means we need to specify something >> > (which translates to: we get to pick the priorities). >> >> Of course, PCI bars would have to be registered via >> cpu_register_

[Qemu-devel] Unsubscription Confirmation

2011-05-19 Thread RealEstateMalaysian.com
Thank you for subscribing. You have now unsubscribed and no more messages will be sent.

[Qemu-devel] [PATCH] ahci: Fix non-NCQ accesses for LBA > 16bits

2011-05-19 Thread Alexander Graf
AHCI provides two ways of reading/writing data: 1) NCQ 2) ATA commands with the LBA in the command FIS In the second code path, we didn't handle any LBAs that were bigger than 16 bits, so whenever a guest that used high LBA numbers wanted to access data, the LBA got truncated down to 16 bits, g

Re: [Qemu-devel] [PATCH] Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)

2011-05-19 Thread Markus Armbruster
Gerd Hoffmann writes: > This patch makes qemu ignore unplug requests from the guest for pci > devices which are tagged as non-hotpluggable. Trouble spot is the > piix4 chipset with the ISA bridge. Requests to unplug that one will > make it go away together with all ISA bus devices, which are no

Re: [Qemu-devel] [PATCH] ahci: Fix non-NCQ accesses for LBA > 16bits

2011-05-19 Thread Kevin Wolf
Am 19.05.2011 11:57, schrieb Alexander Graf: > AHCI provides two ways of reading/writing data: > > 1) NCQ > 2) ATA commands with the LBA in the command FIS > > In the second code path, we didn't handle any LBAs that were bigger than > 16 bits, so whenever a guest that used high LBA numbers want

Re: [Qemu-devel] [PATCH] Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)

2011-05-19 Thread Gerd Hoffmann
Hi, diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 96f5222..6c908ff 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -471,11 +471,13 @@ static void pciej_write(void *opaque, uint32_t addr, uint32_t val) BusState *bus = opaque; DeviceState *qdev, *next; PCIDevice *

Re: [Qemu-devel] [PATCH] Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)

2011-05-19 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > > Markus Armbruster writes: > >> Gerd Hoffmann writes: >> >>> This patch makes qemu ignore unplug requests from the guest for pci >>> devices which are tagged as non-hotpluggable. Trouble spot is the >>> piix4 chipset with the ISA bridge. Requests to unplug tha

[Qemu-devel] [PATCH 4/4] ide: Turn properties any IDE device must have into bus properties

2011-05-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ide/qdev.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 2bb5c27..dcc4a3a 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -31,6 +31,10 @@ static struct BusInfo ide_bus_info = { .name

[Qemu-devel] [PATCH 0/4] A few cleanups of qdev users

2011-05-19 Thread Markus Armbruster
Markus Armbruster (4): usb-ccid: Drop unused CCIDCardInfo callback print() virtio-serial: Clean up virtser_bus_dev_print() output virtio-serial: Turn props any virtio-serial-bus device must have into bus props ide: Turn properties any IDE device must have into bus properties hw/ccid.h

[Qemu-devel] [PATCH 3/4] virtio-serial: Turn props any virtio-serial-bus device must have into bus props

2011-05-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/virtio-console.c|4 hw/virtio-serial-bus.c |5 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/virtio-console.c b/hw/virtio-console.c index de539c4..9185140 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c

[Qemu-devel] [PATCH 2/4] virtio-serial: Clean up virtser_bus_dev_print() output

2011-05-19 Thread Markus Armbruster
Old version looks like this in info qtree (last four lines): dev: virtconsole, id "" dev-prop: is_console = 1 dev-prop: nr = 0 dev-prop: chardev = dev-prop: name = dev-prop-int: id: 0 dev-prop-int: guest_connecte

[Qemu-devel] [PATCH 1/4] usb-ccid: Drop unused CCIDCardInfo callback print()

2011-05-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/ccid.h |1 - hw/usb-ccid.c | 11 --- 2 files changed, 0 insertions(+), 12 deletions(-) diff --git a/hw/ccid.h b/hw/ccid.h index dbfc13c..d3e0371 100644 --- a/hw/ccid.h +++ b/hw/ccid.h @@ -29,7 +29,6 @@ struct CCIDCardState { */ struct

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 12:14 PM, Gleb Natapov wrote: On Thu, May 19, 2011 at 12:10:38PM +0300, Avi Kivity wrote: > On 05/19/2011 12:08 PM, Gleb Natapov wrote: > >On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > >> On 05/18/2011 06:36 PM, Jan Kiszka wrote: > >> >> > >> >>We need

Re: [Qemu-devel] [PATCH 1/4] usb-ccid: Drop unused CCIDCardInfo callback print()

2011-05-19 Thread Alon Levy
On Thu, May 19, 2011 at 01:37:14PM +0200, Markus Armbruster wrote: > > Signed-off-by: Markus Armbruster ACK. > --- > hw/ccid.h |1 - > hw/usb-ccid.c | 11 --- > 2 files changed, 0 insertions(+), 12 deletions(-) > > diff --git a/hw/ccid.h b/hw/ccid.h > index dbfc13c..d3e0371

Re: [Qemu-devel] [PATCH] Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)

2011-05-19 Thread Isaku Yamahata
On Thu, May 19, 2011 at 01:23:18PM +0200, Markus Armbruster wrote: > Gerd Hoffmann writes: > > > Hi, > > > > Markus Armbruster writes: > > > >> Gerd Hoffmann writes: > >> > >>> This patch makes qemu ignore unplug requests from the guest for pci > >>> devices which are tagged as non-hotpluggab

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Gleb Natapov
On Thu, May 19, 2011 at 02:44:29PM +0300, Avi Kivity wrote: > On 05/19/2011 12:14 PM, Gleb Natapov wrote: > >On Thu, May 19, 2011 at 12:10:38PM +0300, Avi Kivity wrote: > >> On 05/19/2011 12:08 PM, Gleb Natapov wrote: > >> >On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > >> >> On

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Isaku Yamahata
On Thu, May 19, 2011 at 10:10:09AM +0200, Markus Armbruster wrote: > Isaku Yamahata writes: > > > use PCIDeviceInfo to initialize ids. > > > > Signed-off-by: Isaku Yamahata > > --- > > hw/acpi_piix4.c |8 > > 1 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/hw/

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 13:54, Gleb Natapov wrote: > On Thu, May 19, 2011 at 02:44:29PM +0300, Avi Kivity wrote: >> On 05/19/2011 12:14 PM, Gleb Natapov wrote: >>> On Thu, May 19, 2011 at 12:10:38PM +0300, Avi Kivity wrote: On 05/19/2011 12:08 PM, Gleb Natapov wrote: >On Wed, May 18, 2011 at 06:4

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 02:54 PM, Gleb Natapov wrote: > > In this case the device would call a chipset function, passing the > memory region as a parameter, and the chipset would call > m_r_add_subregion(). But then chipset can resolve all overlapping by itself and register only regions that are actuall

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 12:24 PM, Jan Kiszka wrote: On 2011-05-19 10:43, Avi Kivity wrote: > On 05/19/2011 11:25 AM, Jan Kiszka wrote: >> > >> > Unspecified doesn't mean abort. It means we need to specify something >> > (which translates to: we get to pick the priorities). >> >> Of course, PCI ba

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Gleb Natapov
On Thu, May 19, 2011 at 01:57:15PM +0200, Jan Kiszka wrote: > On 2011-05-19 13:54, Gleb Natapov wrote: > > On Thu, May 19, 2011 at 02:44:29PM +0300, Avi Kivity wrote: > >> On 05/19/2011 12:14 PM, Gleb Natapov wrote: > >>> On Thu, May 19, 2011 at 12:10:38PM +0300, Avi Kivity wrote: > On 05/19/

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Michael S. Tsirkin
On Thu, May 19, 2011 at 08:55:13PM +0900, Isaku Yamahata wrote: > On Thu, May 19, 2011 at 10:10:09AM +0200, Markus Armbruster wrote: > > Isaku Yamahata writes: > > > > > use PCIDeviceInfo to initialize ids. > > > > > > Signed-off-by: Isaku Yamahata > > > --- > > > hw/acpi_piix4.c |8 ---

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 02:58 PM, Gleb Natapov wrote: > > Devices shall register their regions with the bus. Every device is on > some bus, so that's not a problem. And we can then provide registration > handlers at bus level that either implement specific logic or just > forward the request to the nex

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 13:58, Gleb Natapov wrote: > On Thu, May 19, 2011 at 01:57:15PM +0200, Jan Kiszka wrote: >> On 2011-05-19 13:54, Gleb Natapov wrote: >>> On Thu, May 19, 2011 at 02:44:29PM +0300, Avi Kivity wrote: On 05/19/2011 12:14 PM, Gleb Natapov wrote: > On Thu, May 19, 2011 at 12:10:38P

Re: [Qemu-devel] [PATCH 0/4] A few cleanups of qdev users

2011-05-19 Thread Gerd Hoffmann
On 05/19/11 13:37, Markus Armbruster wrote: Markus Armbruster (4): usb-ccid: Drop unused CCIDCardInfo callback print() virtio-serial: Clean up virtser_bus_dev_print() output virtio-serial: Turn props any virtio-serial-bus device must have into bus props ide: Turn properties any I

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Isaku Yamahata
On Thu, May 19, 2011 at 02:59:42PM +0300, Michael S. Tsirkin wrote: > no reason to respin the whole patchset, just this patch. Here is the update patch. >From c3629ffd472018505a6818422b310ce96aedbc42 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Isaku Yamahata Date: Wed

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 13:57, Avi Kivity wrote: > On 05/19/2011 02:54 PM, Gleb Natapov wrote: >>> >>> In this case the device would call a chipset function, passing the >>> memory region as a parameter, and the chipset would call >>> m_r_add_subregion(). >> But then chipset can resolve all overlapping by

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Gleb Natapov
On Thu, May 19, 2011 at 03:02:09PM +0300, Avi Kivity wrote: > On 05/19/2011 02:58 PM, Gleb Natapov wrote: > >> > >> Devices shall register their regions with the bus. Every device is on > >> some bus, so that's not a problem. And we can then provide registration > >> handlers at bus level that e

[Qemu-devel] TAP32 networking on windows

2011-05-19 Thread lode leroy
Please consider the patch I submitted on 2010-07-05 I tried it in qemu-0.14.1 and this makes it work. https://bugs.launchpad.net/qemu/+bug/589564 --- net/tap-win32.c 2010-07-05 11:14:51 +0200 +++ net/tap-win32.c-orig2010-07-05 11:33:11 +0200 @@ -479,7 +479,7 @@ static int tap_win3

[Qemu-devel] [PATCH 01/18] ide: cleanup warnings

2011-05-19 Thread Kevin Wolf
From: Andrea Arcangeli Add \n. Signed-off-by: Andrea Arcangeli Signed-off-by: Kevin Wolf --- hw/ide/pci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 65cb56c..f5ac932 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -298,9 +298,

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

2011-05-19 Thread Kevin Wolf
The following changes since commit 96d19bcbf5f679bbaaeab001b572c367fbfb2b03: ahci: Unbreak bar registration (2011-05-16 10:15:47 -0500) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Alexander Graf (1): ahci: Fix non-NCQ accesses for LBA > 16bits A

[Qemu-devel] [PATCH 02/18] posix-aio-compat: Fix idle_threads counter

2011-05-19 Thread Kevin Wolf
A thread should only be counted as idle when it really is waiting for new requests. Without this patch, sometimes too few threads are started as busy threads are counted as idle. Not sure if it makes a difference in practice outside some artificial qemu-io/qemu-img tests, but I think the change ma

[Qemu-devel] [PATCH 06/18] Add documentation for qemu_progress_{init, print}()

2011-05-19 Thread Kevin Wolf
From: Jes Sorensen Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- qemu-common.h |2 +- qemu-progress.c | 24 +--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/qemu-common.h b/qemu-common.h index bba8dfe..b851b20 100644 --- a/qemu-common

[Qemu-devel] [PATCH 03/18] qemu-img.c: Remove superfluous parenthesis

2011-05-19 Thread Kevin Wolf
From: Jes Sorensen Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- qemu-img.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index e825123..1da5484 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -785,7 +785,7 @@ static int img_conve

[Qemu-devel] [PATCH 07/18] ahci: Fix crashes on duplicate BH registration

2011-05-19 Thread Kevin Wolf
From: Jan Kiszka If ahci_dma_set_inactive is called a while there is still a pending BH from a previous run, we will crash on the second run of ahci_check_cmd_bh as it overwrites AHCIDevice::check_bh. Avoid this broken and redundant duplicate registration. Signed-off-by: Jan Kiszka Signed-off-b

[Qemu-devel] [PATCH 05/18] ide: Turn debug messages into assertions

2011-05-19 Thread Kevin Wolf
These printfs aren't really debug messages, but clearly indicate a bug if they ever become effective. Noone uses DEBUG_IDE, let's re-enable the check unconditionally and make it an assertion instead of printfs in the device emulation. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- h

[Qemu-devel] [PATCH 14/18] defaults: ide-cd, ide-hd and scsi-cd devices suppress default CD-ROM

2011-05-19 Thread Kevin Wolf
From: Markus Armbruster ide-hd has to suppress the default CD-ROM, or else you can't put one on secondary master without -nodefaults. Unlike legacy scsi-disk, scsi-cd suppresses default CD-ROM. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- vl.c |3 +++ 1 files changed, 3

[Qemu-devel] [PATCH 08/18] qemu-tool: Stub out qemu-timer functions

2011-05-19 Thread Kevin Wolf
From: Stefan Hajnoczi Block drivers may use timers for flushing metadata to disk or reconnecting to a network drive. Stub out the following functions in qemu-tool.c: QEMUTimer *qemu_new_timer_ns(QEMUClock *clock, int scale, QEMUTimerCB *cb, void *opaque) void qemu_f

[Qemu-devel] [PATCH 04/18] hw/xen_disk: Remove unused local variable

2011-05-19 Thread Kevin Wolf
From: Stefan Weil cppcheck report: hw/xen_disk.c:309: style: Variable 'len' is assigned a value that is never used Cc: Kevin Wolf Signed-off-by: Stefan Weil Signed-off-by: Kevin Wolf --- hw/xen_disk.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/hw/xen_disk.c

[Qemu-devel] [PATCH 11/18] qed: support for growing images

2011-05-19 Thread Kevin Wolf
From: Stefan Hajnoczi The .bdrv_truncate() operation resizes images and growing is easy to implement in QED. Simply check that the new size is valid and then update the image_size header field to reflect the new size. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qed.c |

[Qemu-devel] [PATCH 15/18] block QMP: Deprecate query-block's "type", drop info block's "type="

2011-05-19 Thread Kevin Wolf
From: Markus Armbruster query-block's specification documents response member "type" with values "hd", "cdrom", "floppy", "unknown". Its value is unreliable: a block device used as floppy has type "floppy" if created with if=floppy, but type "hd" if created with if=none. That's because with if=

[Qemu-devel] [PATCH 09/18] qed: Periodically flush and clear need check bit

2011-05-19 Thread Kevin Wolf
From: Stefan Hajnoczi One strategy to limit the startup delay of consistency check when opening image files is to ensure that the file is marked dirty for as little time as possible. QED currently marks the image dirty when the first allocating write request is issued and clears the dirty bit ag

[Qemu-devel] [PATCH 10/18] qemu_img: is_not_zero() optimization

2011-05-19 Thread Kevin Wolf
From: Dmitry Konishchev I run qemu-img under profiler and realized, that most of CPU time is consumed by is_not_zero() function. I had made a couple of optimizations on it and got the following output for `time qemu-img convert -O qcow2 volume.qcow2 snapshot.qcow2`: Original qemu-img: real 0m56.

[Qemu-devel] [PATCH 16/18] blockdev: Store -drive option media in DriveInfo

2011-05-19 Thread Kevin Wolf
From: Markus Armbruster DriveInfo is closely tied to -drive, and like -drive, it mixes information about host and guest part of the block device. Unlike DriveInfo, BlockDriverState should be about the host part only. One of the remaining guest bits there is the "type hint". -drive option media

[Qemu-devel] [PATCH 12/18] ide: Split qdev "ide-drive" into "ide-hd" and "ide-cd"

2011-05-19 Thread Kevin Wolf
From: Markus Armbruster An "ide-drive" is either a hard disk or a CD-ROM, depending on the associated BlockDriverState's type hint. Unclean; disk vs. CD belongs to the guest part, not the host part. Have separate qdevs "ide-hd" and "ide-cd" to model disk vs. CD in the guest part. Keep ide-driv

[Qemu-devel] [PATCH 17/18] block: Remove type hint, it's guest matter, doesn't belong here

2011-05-19 Thread Kevin Wolf
From: Markus Armbruster No users of bdrv_get_type_hint() left. bdrv_set_type_hint() can make the media removable by side effect. Make that explicit. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- block.c | 12 block.h |5 - block_int.h |1 -

[Qemu-devel] [PATCH 13/18] scsi: Split qdev "scsi-disk" into "scsi-hd" and "scsi-cd"

2011-05-19 Thread Kevin Wolf
From: Markus Armbruster A "scsi-disk" is either a hard disk or a CD-ROM, depending on the associated BlockDriverState's type hint. Unclean; disk vs. CD belongs to the guest part, not the host part. Have separate qdevs "scsi-hd" and "scsi-cd" to model disk vs. CD in the guest part. Keep scsi-di

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Thu, May 19, 2011 at 08:55:13PM +0900, Isaku Yamahata wrote: >> On Thu, May 19, 2011 at 10:10:09AM +0200, Markus Armbruster wrote: >> > Isaku Yamahata writes: >> > >> > > use PCIDeviceInfo to initialize ids. >> > > >> > > Signed-off-by: Isaku Yamahata >> > > -

[Qemu-devel] [PATCH 18/18] ahci: Fix non-NCQ accesses for LBA > 16bits

2011-05-19 Thread Kevin Wolf
From: Alexander Graf AHCI provides two ways of reading/writing data: 1) NCQ 2) ATA commands with the LBA in the command FIS In the second code path, we didn't handle any LBAs that were bigger than 16 bits, so whenever a guest that used high LBA numbers wanted to access data, the LBA got trunc

Re: [Qemu-devel] TAP32 networking on windows

2011-05-19 Thread Yann Quelen
Hello, This patch is already present in the master branch (commit c3febae6). I confirm it solves the problem for me when applied on version 0.14.0 2011/5/19 lode leroy : > > Please consider the patch I submitted on 2010-07-05 > I tried it in qemu-0.14.1 and this makes it work. > > https://bugs.l

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 03:20 PM, Jan Kiszka wrote: > > An example is ne2000-isa and ne2000-pci. There's no getting around some > glue logic, but I think this API minimizes it (you can declare > everything about your memory region in common code, the only thing that > is different is registration). I

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 14:50, Avi Kivity wrote: > On 05/19/2011 03:20 PM, Jan Kiszka wrote: >>> >>> An example is ne2000-isa and ne2000-pci. There's no getting around some >>> glue logic, but I think this API minimizes it (you can declare >>> everything about your memory region in common code, the only

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 03:58 PM, Jan Kiszka wrote: > > Eventually we may make the memory API a sub-API of qdev. I don't want > to start with that however, the change is large enough already. Touching all devices again at that point to change the way they register regions may not be the best approach.

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 15:00, Avi Kivity wrote: > On 05/19/2011 03:58 PM, Jan Kiszka wrote: >>> >>> Eventually we may make the memory API a sub-API of qdev. I don't want >>> to start with that however, the change is large enough already. >> >> Touching all devices again at that point to change the way th

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Isaku Yamahata
On Thu, May 19, 2011 at 02:36:04PM +0200, Markus Armbruster wrote: > > no reason to respin the whole patchset, just this patch. > > Same comment in 14/38 and possibly more. Suggest a quick grep. I revised the series and fixed the followings. 03, 08, 11, 14, 18, 22, 26, 30, 31, 33, 35, 39, 40, 41

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 04:03 PM, Jan Kiszka wrote: On 2011-05-19 15:00, Avi Kivity wrote: > On 05/19/2011 03:58 PM, Jan Kiszka wrote: >>> >>> Eventually we may make the memory API a sub-API of qdev. I don't want >>> to start with that however, the change is large enough already. >> >> Touching all

Re: [Qemu-devel] [PATCH 2/4] virtio-serial: Clean up virtser_bus_dev_print() output

2011-05-19 Thread Amit Shah
On (Thu) 19 May 2011 [13:37:15], Markus Armbruster wrote: > Old version looks like this in info qtree (last four lines): > > dev: virtconsole, id "" > dev-prop: is_console = 1 > dev-prop: nr = 0 > dev-prop: chardev = > dev-prop: name = >

Re: [Qemu-devel] [PATCH 3/4] virtio-serial: Turn props any virtio-serial-bus device must have into bus props

2011-05-19 Thread Amit Shah
On (Thu) 19 May 2011 [13:37:16], Markus Armbruster wrote: > diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c > index bd3121e..a7d6b2b 100644 > --- a/hw/virtio-serial-bus.c > +++ b/hw/virtio-serial-bus.c > @@ -642,6 +642,11 @@ static struct BusInfo virtser_bus_info = { > .name

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Anthony Liguori
On 05/19/2011 01:31 AM, Jan Kiszka wrote: On 2011-05-18 21:10, Anthony Liguori wrote: On 05/18/2011 10:30 AM, Jan Kiszka wrote: static void i440fx_io_intercept(void *opaque, uint64_t addr, uint32_t value, int size, MemRegion *next) { I440FX *s = opaque; if (range_overlaps(addr, size,

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 15:23, Anthony Liguori wrote: > On 05/19/2011 01:31 AM, Jan Kiszka wrote: >> On 2011-05-18 21:10, Anthony Liguori wrote: >>> On 05/18/2011 10:30 AM, Jan Kiszka wrote: >>> static void i440fx_io_intercept(void *opaque, uint64_t addr, uint32_t >>> value, int size, MemRegion *next) >>> {

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 15:07, Avi Kivity wrote: > On 05/19/2011 04:03 PM, Jan Kiszka wrote: >> On 2011-05-19 15:00, Avi Kivity wrote: >>> On 05/19/2011 03:58 PM, Jan Kiszka wrote: > > Eventually we may make the memory API a sub-API of qdev. I don't want > to start with that however, the ch

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 04:23 PM, Anthony Liguori wrote: Actually, things are a bit more complicated: This layer has to properly adopt the coalescing properties of underlying regions or we cause performance regressions to VGA emulation. That means it has to register dispatching slots of the corresponding s

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 04:26 PM, Jan Kiszka wrote: On 2011-05-19 15:07, Avi Kivity wrote: > On 05/19/2011 04:03 PM, Jan Kiszka wrote: >> On 2011-05-19 15:00, Avi Kivity wrote: >>> On 05/19/2011 03:58 PM, Jan Kiszka wrote: > >Eventually we may make the memory API a sub-API of qdev. I don't

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Anthony Liguori
On 05/19/2011 08:26 AM, Avi Kivity wrote: On 05/19/2011 04:23 PM, Anthony Liguori wrote: Actually, things are a bit more complicated: This layer has to properly adopt the coalescing properties of underlying regions or we cause performance regressions to VGA emulation. That means it has to regist

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Anthony Liguori
On 05/18/2011 02:40 PM, Jan Kiszka wrote: On 2011-05-18 15:12, Avi Kivity wrote: void cpu_register_memory_region(MemoryRegion *mr, target_phys_addr_t addr); OK, let's allow overlapping, but make it explicit: void cpu_register_memory_region_overlap(MemoryRegion *mr,

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 15:35, Anthony Liguori wrote: > On 05/19/2011 08:26 AM, Avi Kivity wrote: >> On 05/19/2011 04:23 PM, Anthony Liguori wrote: Actually, things are a bit more complicated: This layer has to properly adopt the coalescing properties of underlying regions or we cause performa

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 15:36, Anthony Liguori wrote: > On 05/18/2011 02:40 PM, Jan Kiszka wrote: >> On 2011-05-18 15:12, Avi Kivity wrote: >>> void cpu_register_memory_region(MemoryRegion *mr, target_phys_addr_t >>> addr); >> >> OK, let's allow overlapping, but make it explicit: >> >> void cpu_register_memo

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 04:35 PM, Anthony Liguori wrote: On 05/19/2011 08:26 AM, Avi Kivity wrote: On 05/19/2011 04:23 PM, Anthony Liguori wrote: Actually, things are a bit more complicated: This layer has to properly adopt the coalescing properties of underlying regions or we cause performance regressi

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 04:37 PM, Jan Kiszka wrote: > The device doesn't actually know how overlapping is handled. This is > based on the bus hierarchy. Devices don't register their regions, buses do. Exactly. Devices may register sub-regions to describe complex BARs, but most will just create a r

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Avi Kivity
On 05/19/2011 04:36 PM, Jan Kiszka wrote: > > There's two places coalescing currently matters: VGA and PCI devices. > Since VGA is just a special PCI device, let's just focus on PCI devices. Every frame buffer device, PCI or not, benefits from it. Don't focus on PCI or x86. Actually, only fr

Re: [Qemu-devel] [PATCH v2 09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

2011-05-19 Thread Michael S. Tsirkin
On Thu, May 19, 2011 at 10:06:20PM +0900, Isaku Yamahata wrote: > On Thu, May 19, 2011 at 02:36:04PM +0200, Markus Armbruster wrote: > > > no reason to respin the whole patchset, just this patch. > > > > Same comment in 14/38 and possibly more. Suggest a quick grep. > > I revised the series and

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Jan Kiszka
On 2011-05-19 15:30, Avi Kivity wrote: > On 05/19/2011 04:26 PM, Jan Kiszka wrote: >> On 2011-05-19 15:07, Avi Kivity wrote: >>> On 05/19/2011 04:03 PM, Jan Kiszka wrote: On 2011-05-19 15:00, Avi Kivity wrote: > On 05/19/2011 03:58 PM, Jan Kiszka wrote: >>> >>>Eventually we

Re: [Qemu-devel] [RFC] Memory API

2011-05-19 Thread Anthony Liguori
On 05/19/2011 04:10 AM, Avi Kivity wrote: On 05/19/2011 12:08 PM, Gleb Natapov wrote: On Wed, May 18, 2011 at 06:42:14PM +0300, Avi Kivity wrote: > On 05/18/2011 06:36 PM, Jan Kiszka wrote: > >> > >> We need to head for the more hardware-like approach. What happens when > >> you program overlapp

  1   2   3   >