Re: [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device.

2012-07-18 Thread Jan Kiszka
On 2012-07-18 22:42, Ma, Stephen B. wrote: > Sorry for taking so long to reply. I am new to this. Should this patch be > committed or just dropped This bug was fixed by 266ca11a0433643a3cc3146a9837d9f2b0bfbe3b in the meantime. Jan > > > -Original Message- > From: Jan Kiszka [mailto:

Re: [Qemu-devel] [help]: how to use HMP command dump-guest-memory

2012-07-18 Thread Wen Congyang
At 07/19/2012 12:47 AM, Sheldon Wrote: > I want to dump all guest's memory to file ./guestcore > I execute this command as follow: > (qemu) dump-guest-memory -p protocol file:./guestcore > invalid char in expression Please try this command: dump-guest-memory -p file:./guestcore Thanks Wen Congyan

[Qemu-devel] [PATCH] vfio-powerpc: added VFIO support (v5)

2012-07-18 Thread Alexey Kardashevskiy
It literally does the following: 1. POWERPC IOMMU support (the kernel counterpart is required) 2. The patch assumes that IOAPIC calls are going to be replaced with something generic. 3. Added sPAPRVFIOData (hw/spapr_iommu_vfio.h) which describes the interface between VFIO and sPAPR IOMMU. 4. Ch

Re: [Qemu-devel] [PATCH] vfio-powerpc: added VFIO support (v4)

2012-07-18 Thread Alexey Kardashevskiy
On 19/07/12 00:14, Alex Williamson wrote: > On Wed, 2012-07-18 at 21:09 +1000, Alexey Kardashevskiy wrote: >> It literally does the following: >> >> 1. POWERPC IOMMU support (the kernel counterpart is required) >> >> 2. The patch assumes that IOAPIC calls are going to be replaced >> with something

Re: [Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-18 Thread Khoa Huynh
Michael S. Tsirkin wrote on 07/18/2012 10:43:23 AM: > From: "Michael S. Tsirkin" > To: Stefan Hajnoczi , > Cc: Kevin Wolf , Anthony Liguori/Austin/IBM@IBMUS, > k...@vger.kernel.org, qemu-devel@nongnu.org, Khoa Huynh/Austin/ > IBM@IBMUS, Paolo Bonzini , Asias He > Date: 07/18/2012 10:45 AM > Sub

[Qemu-devel] Mapping Hugepage to Guest

2012-07-18 Thread Haines, Brent R
Hello, I have a process that allocates a number of hugepages in a /mnt/huge directory on the Linux host. I would like to map those same hugepages when starting the guest in the same /mnt/huge directory. Is there an existing way to do this? Thanks, Brent

Re: [Qemu-devel] [PATCH 5/6] add-cow: support snapshot_blkdev

2012-07-18 Thread Dong Xu Wang
On Thu, Jun 14, 2012 at 7:33 PM, Kevin Wolf wrote: > Am 14.06.2012 13:18, schrieb Paolo Bonzini: >> Il 14/06/2012 12:59, Kevin Wolf ha scritto: >>> Am 13.06.2012 16:36, schrieb Dong Xu Wang: add-cow will let raw file support snapshot_blkdev indirectly. Signed-off-by: Dong Xu Wang >

[Qemu-devel] [Bug 1004050] Re: qemu-system-ppc64 by default has non-working keyboard

2012-07-18 Thread Truman Boyes
I have also experienced the same issue with qemu-system-ppc64. It appears that ppc64 is not able to communicate with the USB controller. This issue is not seen with with qemu-system-ppc. tboyes@tboyes-dev:~/qemu$ qemu-system-ppc64 -serial stdio -m 1024 -net nic -net user debian-ppc.qcow2 -cdrom d

Re: [Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-18 Thread Khoa Huynh
"Michael S. Tsirkin" wrote on 07/18/2012 10:43:23 AM: > From: "Michael S. Tsirkin" > To: Stefan Hajnoczi , > Cc: qemu-devel@nongnu.org, k...@vger.kernel.org, Anthony Liguori/ > Austin/IBM@IBMUS, Kevin Wolf , Paolo Bonzini > , Asias He , Khoa Huynh/ > Austin/IBM@IBMUS > Date: 07/18/2012 10:46 AM

[Qemu-devel] [help]: how to use HMP command dump-guest-memory

2012-07-18 Thread Sheldon
I want to dump all guest's memory to file ./guestcore I execute this command as follow: (qemu) dump-guest-memory -p protocol file:./guestcore invalid char in expression

Re: [Qemu-devel] qemu in full emulation on win32

2012-07-18 Thread Alexey Kardashevskiy
On 19/07/12 02:35, Stefan Weil wrote: > Am 18.07.2012 08:30, schrieb Alexey Kardashevskiy: >> Hi! >> >> Found 2 problems while I was debugging >> qemu/ppc64-softmmu/qemu-system-ppc64.exe >> WindowsXP SP3 Pro, 32bit, i686-pc-mingw32-gcc (GCC) 4.5.2. >> >> >> 1. The size of the following is 7 bytes

[Qemu-devel] [PATCH] msi/msix: added API to set MSI message address and data

2012-07-18 Thread Alexey Kardashevskiy
Added (msi|msix)_set_message() function for whoever might want to use them. Currently msi_notify()/msix_notify() write to these vectors to signal the guest about an interrupt so the correct values have to written there by the guest or QEMU. For example, POWER guest never initializes MSI/MSIX vect

Re: [Qemu-devel] [PATCH] msi/msix: added API to set MSI message address and data

2012-07-18 Thread Alexey Kardashevskiy
On 19/07/12 01:23, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 11:17:12PM +1000, Alexey Kardashevskiy wrote: >> On 18/07/12 22:43, Michael S. Tsirkin wrote: >>> On Thu, Jun 21, 2012 at 09:39:10PM +1000, Alexey Kardashevskiy wrote: Added (msi|msix)_set_message() functions. Cur

Re: [Qemu-devel] [PATCH 2/2] vexpress: Add NOR1 Flash support

2012-07-18 Thread Peter Crosthwaite
On Thu, Jul 19, 2012 at 5:03 AM, <402ja...@gmail.com> wrote: > From: Jagan <402ja...@gmail.com> > > This patch adds support for NOR1 flash (Bank #2) on > vexpress-a9 platform. It is 64MB CFI01 compliant flash. > > Tested on stable u-boot version through Linux. > > Signed-off-by: Jagan <402ja...@gm

[Qemu-devel] [Bug 1007269] Re: Can’t install or boot up 32bit win8 guest.

2012-07-18 Thread Marcelo Tosatti
PAE/NX/SSE2 Support Requirement Guide for Windows 8 http://answers.microsoft.com/en- us/windows/forum/windows_8-windows_install/error-when-installing- windows-8-release-preview/a2c11f2c-d43b-44fc-9bc0-61805a2d95ef Perhaps adding 3DNow allows qemu64 to boot? In any case, this is not a KVM bug. -

Re: [Qemu-devel] [PATCH] qemu kvm: Recognize PCID feature

2012-07-18 Thread Marcelo Tosatti
On Wed, Jul 18, 2012 at 11:29:36AM +0200, Jan Kiszka wrote: > On 2012-07-18 10:44, Mao, Junjie wrote: > > Hi, Avi > > > > Any comments on this patch? :) > > Always include qemu-devel when your are changing QEMU, qemu-kvm is just > staging for the latter. This patch can actually go into upstream >

Re: [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device.

2012-07-18 Thread Ma, Stephen B.
Sorry for taking so long to reply. I am new to this. Should this patch be committed or just dropped -Original Message- From: Jan Kiszka [mailto:jan.kis...@web.de] Sent: Sunday, June 17, 2012 11:25 PM To: Anthony Liguori Cc: Michael S. Tsirkin; 'qemu-devel@nongnu.org'; Ma, Stephen B. S

[Qemu-devel] [PATCH 2/2] vexpress: Add NOR1 Flash support

2012-07-18 Thread 402jagan
From: Jagan <402ja...@gmail.com> This patch adds support for NOR1 flash (Bank #2) on vexpress-a9 platform. It is 64MB CFI01 compliant flash. Tested on stable u-boot version through Linux. Signed-off-by: Jagan <402ja...@gmail.com> --- hw/vexpress.c | 10 +- 1 files changed, 9 insertion

[Qemu-devel] [PATCH 1/2] vexpress: Add NOR0 Flash support

2012-07-18 Thread 402jagan
From: Jagan <402ja...@gmail.com> This patch adds support for NOR0 flash (Bank #1) on vexpress-a9 platform. It is 64MB CFI01 compliant flash. Tested on stable u-boot version through Linux. Signed-off-by: Jagan <402ja...@gmail.com> --- hw/vexpress.c | 17 - 1 files changed, 16 i

[Qemu-devel] [PATCH 0/2] vexpress-a9: NOR flash support

2012-07-18 Thread 402jagan
From: Jagan <402ja...@gmail.com> These patches are added a support for NOR flash on vexpress-a9 both in Bank #1 and Bank #2. Well tested on u-boot stable tree with Linux. Jagan (2): vexpress: Add NOR0 Flash support vexpress: Add NOR1 Flash support hw/vexpress.c | 27 ++

Re: [Qemu-devel] [RFC v9 23/27] virtio-blk: Stub out SCSI commands

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:50PM +0100, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi Why? > --- > hw/virtio-blk.c | 25 + > 1 file changed, 17 insertions(+), 8 deletions(-) > > diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c > index 51807b5..8734029 100644

Re: [Qemu-devel] [RFC v9 22/27] virtio-blk: Fix request merging

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:49PM +0100, Stefan Hajnoczi wrote: > Khoa Huynh discovered that request merging is broken. > The merged iocb is not updated to reflect the total number of iovecs and > the offset is also outdated. > > This patch fixes request merging. > > Signed-off-by: Stefan Hajno

Re: [Qemu-devel] [RFC v9 12/27] virtio-blk: Add workaround for BUG_ON() dependency in virtio_ring.h

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:39PM +0100, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > hw/dataplane/vring.h |5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/dataplane/vring.h b/hw/dataplane/vring.h > index 3eab4b4..44ef4a9 100644 > --- a/hw/dataplane/vring.h

Re: [Qemu-devel] [RFC v9 11/27] virtio-blk: Indirect vring and flush support

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:38PM +0100, Stefan Hajnoczi wrote: > RHEL6 and other new guest kernels use indirect vring descriptors to > increase the number of requests that can be batched. This fundamentally > changes vring from a scheme that requires fixed resources to something > more dynamic (

[Qemu-devel] [PATCH 6/9] qapi: add qapi-schema-errors.json

2012-07-18 Thread Luiz Capitulino
This is the main error file, where all errors are defined and from where error macros and whatnot will be automatically generated. It contains all errors classes currently defined in qerror.[ch]. Signed-off-by: Luiz Capitulino --- qapi-schema-errors.json | 616 ++

Re: [Qemu-devel] [PATCH v4] Fixes related to processing of qemu's -numa option

2012-07-18 Thread Vinod, Chegu
Thanks Eduardo ! Hi Anthony, If you are ok with this patch...could you pl pull these changes into upstream (or) suggest who I should talk to get these changes in ? Thanks! Vinod -Original Message- From: Eduardo Habkost [mailto:ehabk...@redhat.com] Sent: Wednesday, July 18, 2012 10:15

[Qemu-devel] [PATCH 5/9] qapi: qapi.py: allow the "'" character be escaped

2012-07-18 Thread Luiz Capitulino
A future commit will add a new qapi script which escapes that character. Signed-off-by: Luiz Capitulino --- scripts/qapi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index e062336..9aa518f 100644 --- a/scripts/qapi.py +++ b/scripts/q

[Qemu-devel] [PATCH 8/9] qerror: switch to qapi generated error macros and table

2012-07-18 Thread Luiz Capitulino
Previous commits added qapi infrastructure to automatically generate qerror macros and the qerror table from qapi-schema-errors.json. This commit drops the current error macros from qerror.h and the error table from qerror.c and use the generated ones instead. Please, note that qapi-error.c is ac

Re: [Qemu-devel] [RFC v9 06/27] virtio-blk: Take PCI memory range into account

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:33PM +0100, Stefan Hajnoczi wrote: > Support >4 GB physical memory accesses. > > Signed-off-by: Stefan Hajnoczi Need some sane APIs, this is just too scary. > --- > hw/virtio-blk.c |7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/hw/virtio-blk.c

Re: [Qemu-devel] [RFC v9 11/27] virtio-blk: Indirect vring and flush support

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:38PM +0100, Stefan Hajnoczi wrote: > RHEL6 and other new guest kernels use indirect vring descriptors to > increase the number of requests that can be batched. This fundamentally > changes vring from a scheme that requires fixed resources to something > more dynamic (

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-18 Thread Amos Kong
- Original Message - > On Wed, 18 Jul 2012 20:56:54 +0800 > Amos Kong wrote: > > > >> +} KeyDef; > > >> + > > >> +static const KeyDef key_defs[] = { > > > > > > We can't have an array defined in a header file because it will > > > be defined in > > > each .c file that includes it. > > > >

[Qemu-devel] [PATCH 3/9] qerror: rename QERR_QMP_EXTRA_MEMBER

2012-07-18 Thread Luiz Capitulino
The error class name is QMPExtraInputObjectMember, not QMPExtraMember. Rename the QERR_QMP_EXTRA_MEMBER macro to QERR_QMP_EXTRA_INPUT_OBJECT_MEMBER to reflect that, so that future error macro generation generates the expected macro name. Signed-off-by: Luiz Capitulino --- monitor.c

[Qemu-devel] [PATCH V4] exynos4210: add Exynos4210 i2c implementation

2012-07-18 Thread Igor Mitsyanko
Create 9 exynos4210 i2c interfaces. Signed-off-by: Igor Mitsyanko Reviewed-by: Andreas Färber --- Previous versions of this patch were sent to mailing list within a "Exynos: i2c, gpio and touchscreen support for NURI board" patchset some time ago. V4 is merely a rabased version of V3. Change

[Qemu-devel] [PATCH 9/9] scripts: update check-qerror.sh

2012-07-18 Thread Luiz Capitulino
The qerror.h file doesn't contain the macros anymore, the script should check qapi-schema-errors.json instead. Signed-off-by: Luiz Capitulino --- scripts/check-qerror.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/check-qerror.sh b/scripts/check-qerror.sh in

[Qemu-devel] [PATCH 7/9] qapi: add qapi-errors.py

2012-07-18 Thread Luiz Capitulino
This script generates two files from qapi-schema-errors.json: o qapi-errors.h: contains error macro definitions, eg. QERR_BASE_NOT_FOUND, corresponds to most of today's qerror.h o qapi-errors.c: contains the error table that currently exists in qerror.c The script is not used

[Qemu-devel] [PATCH v6 2/3] Force driftfix=none on previous machines

2012-07-18 Thread Crístian Viana
The current value for the -rtc driftfix option is 'none'. This patch makes sure that the old machines configuration will work the same way even after that option changes its default value. Signed-off-by: Crístian Viana --- hw/pc_piix.c |4 1 file changed, 4 insertions(+) diff --git a/h

[Qemu-devel] [PATCH v6 3/3] Change driftfix default value to slew

2012-07-18 Thread Crístian Viana
Windows 2008+ is very sensitive to missed ticks. The RTC is used by default as the time source. If driftfix is not enabled, Windows is prone to blue screening. Signed-off-by: Crístian Viana --- hw/mc146818rtc.c |2 +- vl.c | 11 ++- 2 files changed, 11 insertions(+), 2

[Qemu-devel] [PATCH v6 1/3] Check if GlobalProperty exists before registering

2012-07-18 Thread Crístian Viana
If a GlobalProperty has already been registered, it won't have its value overwritten. This is done to enforce that the properties specified in the command line will "win" over the ones specified by the machine properties, if set with the parameter "-M". Signed-off-by: Crístian Viana --- Changes

[Qemu-devel] [PATCH 4/9] qerror: rename QERR_PROPERTY_VALUE_NOT_POWER_OF_2

2012-07-18 Thread Luiz Capitulino
The error class name is PropertyValueNotPowerOf2, not PropertyValueNotPowerOf_2. Rename the QERR_PROPERTY_VALUE_NOT_POWER_OF_2 macro to QERR_PROPERTY_VALUE_NOT_POWER_OF2 to reflect that, so that future error macro generation generates the expected macro name. Signed-off-by: Luiz Capitulino ---

[Qemu-devel] [PATCH 2/9] qerror: rename QERR_SOCK_CONNECT_IN_PROGRESS

2012-07-18 Thread Luiz Capitulino
The error class name is SockConnectInprogress, not SockConnectInProgress. Rename the QERR_SOCK_CONNECT_IN_PROGRESS macro to QERR_SOCK_CONNECT_INPROGRESS to reflect that, so that future error macro generation generates the expected macro name. Signed-off-by: Luiz Capitulino --- migration-tcp.c |

[Qemu-devel] [PATCH 1/9] qerror: rename QERR_SOCKET_* macros

2012-07-18 Thread Luiz Capitulino
The socket error classes call a socket 'Sock', like in SockConnectFailed, but the error macros call a socket SOCKET, like in QERR_SOCKET_CONNECT_FAILED. This will cause problems when the error macros creation get automated, because the macro name will be derived from the error class name. Avoid t

[Qemu-devel] [PATCH 0/9]: qapi: generate qerrors from qapi-schema-errors.json

2012-07-18 Thread Luiz Capitulino
This series moves all qerrors we have today to qapi-schema-errors.json and generate the error macros and table from it. With this series, one doesn't have to manually add an error macro and the matching table entry anymore. He or she just have to add the new error to qapi-schema-errors.json. Ther

Re: [Qemu-devel] [PATCH v4 0/5] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-07-18 Thread Paolo Bonzini
Il 18/07/2012 15:19, Wanpeng Li ha scritto: > [CCing ML] > > This series aggressively refactors the PC machine initialization to be more > modelled and less ad-hoc. The highlights of this series are: > > 1) Things like -m and -bios-name are now device model properties > > 2) The i440fx and piix

[Qemu-devel] [PATCH resend] tests: Makefile: include dependency files

2012-07-18 Thread Eduardo Habkost
Otherwise 'make check' won't recompile files that need to be recompiled because of header changes. To reproduce the bug, run: $ make check # succeeds $ echo B0RKED > hw/mc146818rtc_regs.h $ make check # is supposed to try to rebuild tests/rtc-test.o and fail Signed-off-by: Eduardo Habkost

Re: [Qemu-devel] qemu in full emulation on win32

2012-07-18 Thread Peter Maydell
On 18 July 2012 17:29, Stefan Weil wrote: > Am 18.07.2012 10:01, schrieb Peter Maydell: >> I think this struct should use QEMU_PACKED, which will >> ensure that it is packed to GCC rules rather than MS >> rules. >> >> We also seem to have let a pile of new uses of attribute((packed)) >> slip in in

Re: [Qemu-devel] [PATCH v4] Fixes related to processing of qemu's -numa option

2012-07-18 Thread Eduardo Habkost
On Mon, Jul 16, 2012 at 09:31:30PM -0700, Chegu Vinod wrote: > Changes since v3: >- using bitmap_set() instead of set_bit() in numa_add() routine. >- removed call to bitmak_zero() since bitmap_new() also zeros' the bitmap. >- Rebased to the latest qemu. Tested-by: Eduardo Habkost Revi

Re: [Qemu-devel] [PATCH] Use macro QEMU_PACKED for new packed structures

2012-07-18 Thread Peter Maydell
On 18 July 2012 17:42, Stefan Weil wrote: > Am 18.07.2012 18:33, schrieb Peter Maydell: >> On 18 July 2012 17:12, Stefan Weil wrote: >>> Since commit 541dc0d47f10973c241e9955afc2aefc96adec51, >>> some new packed structures were added without using QEMU_PACKED. >>> >>> QEMU_PACKED is needed for co

Re: [Qemu-devel] [PATCH] Use macro QEMU_PACKED for new packed structures

2012-07-18 Thread Stefan Weil
Am 18.07.2012 18:33, schrieb Peter Maydell: On 18 July 2012 17:12, Stefan Weil wrote: Since commit 541dc0d47f10973c241e9955afc2aefc96adec51, some new packed structures were added without using QEMU_PACKED. QEMU_PACKED is needed for compilations with MinGW. For other platforms nothing changes.

[Qemu-devel] [PATCH] configure: Support system emulation with large memory on w32 hosts

2012-07-18 Thread Stefan Weil
32-bit applications on Windows normally only get virtual memory in the lower 2 GiB address space. Because of memory fragmentation, VirtualAlloc() usually won't get 1 GiB of contiguous virtual memory in that address space. Therefore running system emulations with 1 GiB or more RAM will abort with a

Re: [Qemu-devel] qemu in full emulation on win32

2012-07-18 Thread Stefan Weil
Am 18.07.2012 08:30, schrieb Alexey Kardashevskiy: Hi! Found 2 problems while I was debugging qemu/ppc64-softmmu/qemu-system-ppc64.exe WindowsXP SP3 Pro, 32bit, i686-pc-mingw32-gcc (GCC) 4.5.2. 1. The size of the following is 7 bytes on linux and 8 bytes on Windows: struct { uint32_t hi;

Re: [Qemu-devel] [PATCH] Use macro QEMU_PACKED for new packed structures

2012-07-18 Thread Peter Maydell
On 18 July 2012 17:12, Stefan Weil wrote: > Since commit 541dc0d47f10973c241e9955afc2aefc96adec51, > some new packed structures were added without using QEMU_PACKED. > > QEMU_PACKED is needed for compilations with MinGW. > For other platforms nothing changes. > > The code was fixed using this comm

Re: [Qemu-devel] qemu in full emulation on win32

2012-07-18 Thread Stefan Weil
Am 18.07.2012 10:01, schrieb Peter Maydell: On 18 July 2012 07:30, Alexey Kardashevskiy wrote: 1. The size of the following is 7 bytes on linux and 8 bytes on Windows: struct { uint32_t hi; uint64_t child; uint64_t parent; uint64_t size; } __attribute__((packed)) ranges[];

Re: [Qemu-devel] [PATCH v4 5/5] merge pc_piix.c to pc.c

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 09:19:05PM +0800, Wanpeng Li wrote: > [CCing ML] > > From: Anthony Liguori > > Signed-off-by: Anthony Liguori > Signed-off-by: Wanpeng Li Yes, it was a bad idea to split to begin with, but the machine compatibility code IMO is better kept somewhere separate, if for no

[Qemu-devel] [PATCH] Use macro QEMU_PACKED for new packed structures

2012-07-18 Thread Stefan Weil
Since commit 541dc0d47f10973c241e9955afc2aefc96adec51, some new packed structures were added without using QEMU_PACKED. QEMU_PACKED is needed for compilations with MinGW. For other platforms nothing changes. The code was fixed using this command: git grep -la '__attribute__ ((packed))'|xargs

[Qemu-devel] [RFC v9 01/27] virtio-blk: Remove virtqueue request handling code

2012-07-18 Thread Stefan Hajnoczi
Start with a clean slate, a virtio-blk device that supports virtio lifecycle operations and configuration but doesn't do any actual I/O. The I/O is going to happen in a separate optimized data plane thread. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c | 496 +--

[Qemu-devel] [RFC v9 10/27] virtio-blk: Stop data plane thread cleanly

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- hw/dataplane/event-poll.h | 79 --- hw/dataplane/ioq.h| 65 +-- hw/dataplane/vring.h |6 +- hw/virtio-blk.c | 154 +++-- 4 files changed, 243 insertions(+

[Qemu-devel] [RFC v9 04/27] virtio-blk: Map vring

2012-07-18 Thread Stefan Hajnoczi
Map the vring to host memory so it can be accessed without the overhead of the QEMU memory functions. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c | 44 1 file changed, 44 insertions(+) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index f60

[Qemu-devel] [RFC v9 07/27] virtio-blk: Put dataplane code into its own directory

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- hw/dataplane/event-poll.h | 79 +++ hw/dataplane/vring.h | 191 + hw/virtio-blk.c | 149 --- 3 files changed, 304 insertions(+), 115 deletions(-) crea

[Qemu-devel] [RFC v9 08/27] virtio-blk: Read requests from the vring

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- hw/dataplane/vring.h |8 +-- hw/virtio-blk.c | 62 ++ 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/hw/dataplane/vring.h b/hw/dataplane/vring.h index 7099a99..b07d4f6 100644 --- a/

[Qemu-devel] [RFC v9 12/27] virtio-blk: Add workaround for BUG_ON() dependency in virtio_ring.h

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- hw/dataplane/vring.h |5 + 1 file changed, 5 insertions(+) diff --git a/hw/dataplane/vring.h b/hw/dataplane/vring.h index 3eab4b4..44ef4a9 100644 --- a/hw/dataplane/vring.h +++ b/hw/dataplane/vring.h @@ -1,6 +1,11 @@ #ifndef VRING_H #define VRING_H

[Qemu-devel] [RFC v9 23/27] virtio-blk: Stub out SCSI commands

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 51807b5..8734029 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -215,14 +215,8 @@ static void process_

[Qemu-devel] [RFC v9 18/27] virtio-blk: Call ioctl() directly instead of irqfd

2012-07-18 Thread Stefan Hajnoczi
Optimize for the MSI-X enabled and vector unmasked case where it is possible to issue the KVM ioctl() directly instead of using irqfd. This patch introduces a new virtio binding function which tries to notify in a thread-safe way. If this is not possible, the function returns false. Virtio block

Re: [Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:27PM +0100, Stefan Hajnoczi wrote: > This series implements a dedicated thread for virtio-blk processing using > Linux > AIO for raw image files only. It is based on qemu-kvm.git a0bc8c3 and > somewhat > old but I wanted to share it on the list since it has been men

Re: [Qemu-devel] [PATCH 09/11] configure: Fix compile warning in utimensat/futimens test

2012-07-18 Thread Stefan Weil
Am 18.07.2012 16:10, schrieb Peter Maydell: Fix compile warning in the utimensat/futimens test ("implicit declaration of function 'utimensat'", ditto futimens) by adding a missing include. Signed-off-by: Peter Maydell --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-)

[Qemu-devel] [RFC v9 11/27] virtio-blk: Indirect vring and flush support

2012-07-18 Thread Stefan Hajnoczi
RHEL6 and other new guest kernels use indirect vring descriptors to increase the number of requests that can be batched. This fundamentally changes vring from a scheme that requires fixed resources to something more dynamic (although there is still an absolute maximum number of descriptors). Cope

Re: [Qemu-devel] [PATCH 07/11] configure: Fix compile warning in PNG test

2012-07-18 Thread Stefan Weil
Am 18.07.2012 16:10, schrieb Peter Maydell: Fix compile warning (variable 'png_ptr' set but not used) in the PNG detection test code. Signed-off-by: Peter Maydell --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index aced52e..7843

[Qemu-devel] [RFC v9 21/27] virtio-blk: Add basic request merging

2012-07-18 Thread Stefan Hajnoczi
This commit adds an I/O scheduler that sorts requests and merges adjacent requests if they have the same operation type (read/write). The code is ugly and not very well factored but it does merge successfully. --- hw/dataplane/ioq.h |3 +- hw/dataplane/iosched.h | 51 +---

Re: [Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:27PM +0100, Stefan Hajnoczi wrote: > This series implements a dedicated thread for virtio-blk processing using > Linux > AIO for raw image files only. It is based on qemu-kvm.git a0bc8c3 and > somewhat > old but I wanted to share it on the list since it has been men

[Qemu-devel] [RFC v9 09/27] virtio-blk: Add Linux AIO queue

2012-07-18 Thread Stefan Hajnoczi
Requests read from the vring will be placed in a queue where they can be merged as necessary. Once all requests have been read from the vring, the queue can be submitted. Signed-off-by: Stefan Hajnoczi --- hw/dataplane/ioq.h | 104 hw/virtio

Re: [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[]

2012-07-18 Thread Alexander Graf
On 07/18/2012 05:40 PM, Stefan Weil wrote: Am 18.07.2012 10:22, schrieb Alexey Kardashevskiy: By default mingw-gcc is trying to pack structures the way to preserve binary compatibility with MS Visual C what leads to incorrect and unexpected padding in the PCI bus ranges property of the sPAPR PHB

[Qemu-devel] [RFC v9 06/27] virtio-blk: Take PCI memory range into account

2012-07-18 Thread Stefan Hajnoczi
Support >4 GB physical memory accesses. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index abd9386..99654f1 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -64,6 +64,13 @@ static VirtIOBlo

Re: [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[]

2012-07-18 Thread Stefan Weil
Am 18.07.2012 10:22, schrieb Alexey Kardashevskiy: By default mingw-gcc is trying to pack structures the way to preserve binary compatibility with MS Visual C what leads to incorrect and unexpected padding in the PCI bus ranges property of the sPAPR PHB. The patch replaces __attribute__((packed)

Re: [Qemu-devel] [RFC v9 18/27] virtio-blk: Call ioctl() directly instead of irqfd

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 04:07:45PM +0100, Stefan Hajnoczi wrote: > Optimize for the MSI-X enabled and vector unmasked case where it is > possible to issue the KVM ioctl() directly instead of using irqfd. Why? Is an ioctl faster? > This patch introduces a new virtio binding function which tries to

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Daniel P. Berrange
On Wed, Jul 18, 2012 at 02:58:46PM +0100, Daniel P. Berrange wrote: > On Wed, Jul 18, 2012 at 04:51:03PM +0800, Wenchao Xia wrote: > > Hi, following is API draft, prototypes were taken from qemu/block.h, > > and the API prefix is changed frpm bdrv to qbdrvs, to declare related > > object is Block

[Qemu-devel] [Bug 1026176] [NEW] unable to boot squashfs through mtd device

2012-07-18 Thread Vincent de RIBOU
Public bug reported: Hi, I have built latest qemu archive qemu-1.1.1 to be sure of up to date source code. I have then built buildroot squashfs image, which can be used correctly with cmdline like: qemu-system-i386 -m 64 -k fr -boot c -kernel images/bzImage -drive if=ide,file=images/rootfs.squ

[Qemu-devel] [RFC v9 05/27] virtio-blk: Do cheapest possible memory mapping

2012-07-18 Thread Stefan Hajnoczi
Instead of using QEMU memory access functions, grab the host address of guest physical address zero and simply add to this base address. This not only simplifies vring mapping but will also make virtqueue element access cheap by avoiding QEMU memory access functions in the I/O code path. Signed-o

[Qemu-devel] [RFC v9 15/27] notifier: Add a function to set the notifier

2012-07-18 Thread Stefan Hajnoczi
Although past users only needed to test and clear event notifiers, it is useful to be able to set them too. Signed-off-by: Stefan Hajnoczi --- event_notifier.c |7 +++ event_notifier.h |1 + 2 files changed, 8 insertions(+) diff --git a/event_notifier.c b/event_notifier.c index 0b82

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Kevin Wolf
Am 18.07.2012 11:03, schrieb Paolo Bonzini: > Let's get things right, and only have open/close: > > int qbdrvs_open(BlockDriverState **bs, const char *filename, int flags, > const char *format_name); > void qbdrvs_close(BlockDriverState *bs); What is flags? Are we really happy wi

[Qemu-devel] [RFC v9 25/27] msix: fix irqchip breakage in msix_try_notify_from_thread()

2012-07-18 Thread Stefan Hajnoczi
Commit bd8b215bce453706c3951460cc7e6627ccb90314 removed #ifdef KVM_CAP_IRQCHIP from hw/msix.c after it turned out is not included since msix.o is built in libhw64/. Do the same for msix_try_notify_from_thread() since we do not have access to here and hence KVM_CAP_IRQCHIP is not defined. Signed

[Qemu-devel] [RFC v9 14/27] virtio-blk: Use pthreads instead of qemu-thread

2012-07-18 Thread Stefan Hajnoczi
Using qemu-thread.h seemed like a nice idea but it has two limitations: 1. QEMU needs to be built with --enable-io-thread 2. qemu-kvm doesn't build with --enable-io-thread For now just copy the pthread_create() code straight into virtio-blk.c. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c

[Qemu-devel] [RFC v9 03/27] virtio-blk: Data plane thread event loop

2012-07-18 Thread Stefan Hajnoczi
Add a simple event handling loop based on epoll(2). The data plane thread now receives virtqueue notify and Linux AIO completion events. The data plane thread currently does not shut down. Either it needs to be a detached thread or have clean shutdown support. Most of the data plane start/stop

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Kevin Wolf
Am 18.07.2012 16:12, schrieb Daniel P. Berrange: > On Wed, Jul 18, 2012 at 04:02:15PM +0200, Paolo Bonzini wrote: >> Il 18/07/2012 15:58, Daniel P. Berrange ha scritto: >>> How is error reporting dealt with >> >> These APIs just return errno values. > > Which has led to somewhat unhelpful error re

[Qemu-devel] [RFC v9 27/27] virtio-blk: add EVENT_IDX support to dataplane

2012-07-18 Thread Stefan Hajnoczi
This patch adds support for the VIRTIO_RING_F_EVENT_IDX feature for interrupt mitigation. virtio-blk doesn't do anything fancy with it so we may not see a performance improvement. This patch will allow newer guest kernels to run successfully. Signed-off-by: Stefan Hajnoczi --- hw/dataplane/vri

Re: [Qemu-devel] [PATCH] msi/msix: added API to set MSI message address and data

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 11:17:12PM +1000, Alexey Kardashevskiy wrote: > On 18/07/12 22:43, Michael S. Tsirkin wrote: > > On Thu, Jun 21, 2012 at 09:39:10PM +1000, Alexey Kardashevskiy wrote: > >> Added (msi|msix)_set_message() functions. > >> > >> Currently msi_notify()/msix_notify() write to these

[Qemu-devel] [RFC v9 13/27] virtio-blk: Increase max requests for indirect vring

2012-07-18 Thread Stefan Hajnoczi
With indirect vring descriptors, one can no longer assume that the maximum number of requests is VRING_MAX / 2 (outhdr and inhdr). Now a single indirect descriptor can contain the outhdr and inhdr so max requests becomes VRING_MAX. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c |4 +++-

[Qemu-devel] [RFC v9 16/27] virtio-blk: Kick data plane thread using event notifier set

2012-07-18 Thread Stefan Hajnoczi
--- hw/virtio-blk.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 1616be5..d75c187 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -339,8 +339,7 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)

[Qemu-devel] [PATCH 07/11] configure: Fix compile warning in PNG test

2012-07-18 Thread Peter Maydell
Fix compile warning (variable 'png_ptr' set but not used) in the PNG detection test code. Signed-off-by: Peter Maydell --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index aced52e..784325a 100755 --- a/configure +++ b/configure @@ -1

[Qemu-devel] [RFC v9 19/27] virtio-blk: Disable guest->host notifies while processing vring

2012-07-18 Thread Stefan Hajnoczi
--- hw/dataplane/vring.h | 28 +++- hw/virtio-blk.c | 47 +++ 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/hw/dataplane/vring.h b/hw/dataplane/vring.h index 44ef4a9..cdd4d4a 100644 --- a/hw/dataplane/v

[Qemu-devel] [PATCH 10/11] configure: -I\$(SRC_PATH) goes in QEMU_INCLUDES not QEMU_CFLAGS

2012-07-18 Thread Peter Maydell
If the smartcard configure check passes, add '-I\$(SRC_PATH)/libcacard' to QEMU_INCLUDES, not QEMU_CFLAGS. Otherwise the unexpanded SRC_PATH will cause a warning in every following configure test. Signed-off-by: Peter Maydell --- configure |5 +++-- 1 files changed, 3 insertions(+), 2 deleti

[Qemu-devel] [RFC v9 22/27] virtio-blk: Fix request merging

2012-07-18 Thread Stefan Hajnoczi
Khoa Huynh discovered that request merging is broken. The merged iocb is not updated to reflect the total number of iovecs and the offset is also outdated. This patch fixes request merging. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c | 10 +++--- 1 file changed, 7 insertions(+), 3

[Qemu-devel] [RFC v9 17/27] virtio-blk: Use guest notifier to raise interrupts

2012-07-18 Thread Stefan Hajnoczi
The data plane thread isn't allowed to call virtio_irq() directly because that function is not thread-safe. Use the guest notifier just like virtio-net to handle IRQs. When MSI-X is in use and the vector is unmasked, the guest notifier directly sets the IRQ inside the host kernel. If the vector

[Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-18 Thread Stefan Hajnoczi
This series implements a dedicated thread for virtio-blk processing using Linux AIO for raw image files only. It is based on qemu-kvm.git a0bc8c3 and somewhat old but I wanted to share it on the list since it has been mentioned on mailing lists and IRC recently. These patches can be used for benc

[Qemu-devel] [RFC v9 24/27] virtio-blk: fix incorrect length

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 8734029..cff2298 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -131,7 +131,7 @@ static void complete_one_request(VirtIOBlockReq

[Qemu-devel] [RFC v9 26/27] msix: use upstream kvm_irqchip_set_irq()

2012-07-18 Thread Stefan Hajnoczi
Commit 9507e305ec54062fccc88fcf6fccf1898a7e7141 changed the kvm_set_irq() function to kvm_irqchip_set_irq(). Signed-off-by: Stefan Hajnoczi --- hw/msix.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/msix.c b/hw/msix.c index 0ed1013..373017a 100644 --- a/hw/msix.c +++

[Qemu-devel] [RFC v9 20/27] virtio-blk: Add ioscheduler to detect mergable requests

2012-07-18 Thread Stefan Hajnoczi
--- hw/dataplane/iosched.h | 78 hw/virtio-blk.c|5 2 files changed, 83 insertions(+) create mode 100644 hw/dataplane/iosched.h diff --git a/hw/dataplane/iosched.h b/hw/dataplane/iosched.h new file mode 100644 index 000..12e

[Qemu-devel] [RFC v9 02/27] virtio-blk: Set up host notifier for data plane

2012-07-18 Thread Stefan Hajnoczi
Set up the virtqueue notify ioeventfd that the data plane will monitor. Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c | 37 + 1 file changed, 37 insertions(+) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index a627427..0389294 100644 --- a/hw/virtio-

Re: [Qemu-devel] Can't Build i386-bsd-user on Freebsd

2012-07-18 Thread Wei-Ren Chen
CC'ed to Blue, since he is bsd-user maintainer as MAINTAINER said. On Mon, Jul 16, 2012 at 07:07:38PM -0700, Paramjot Oberoi wrote: > Hey all, > > I'm having trouble building user mode BSD emulation on FreeBSD. I've tried > 1.0.1, 1.1.1, and stable from GIT. I build by doing a: "./configure > -

[Qemu-devel] [PATCH 02/11] configure: Fix build with ALSA audio driver

2012-07-18 Thread Peter Maydell
From: Stefan Weil Since commit 417c9d72d48275d19c60861896efd4962d21aca2, all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. Here a build breakage for ALSA (configure --audio-drv-list=alsa) is fixed. Signed-off-by: Stefan Weil Re

[Qemu-devel] [PATCH 01/11] configure: Don't run configure tests with -Werror enabled

2012-07-18 Thread Peter Maydell
Don't run configure tests with -Werror in the compiler flags. The idea of -Werror is that it makes problems very obvious to developers, so they get fixed quickly. However, when running configure tests, failures due to -Werror are far from obvious -- they simply result in the test quietly failing wh

Re: [Qemu-devel] [PATCH] improve scripts/make-release

2012-07-18 Thread Eric Blake
On 07/18/2012 08:31 AM, Gerd Hoffmann wrote: > 'make dist' creates a tarball for the current checkout. > 'make qemu-${version}.tar.bz2' creates a tarball for git tag v${version}. > > Signed-off-by: Gerd Hoffmann > --- > Makefile |5 ++--- > scripts/make-release |8 +++- >

  1   2   >