[Qemu-devel] [PATCH 22/38] memory: Provide separate handling of unassigned io ports accesses

2013-09-25 Thread Michael Roth
From: Jan Kiszka Accesses to unassigned io ports shall return -1 on read and be ignored on write. Ensure these properties via dedicated ops, decoupling us from the memory core's handling of unassigned accesses. Cc: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini (

[Qemu-devel] [PATCH 20/38] usb: parallelize usb3 streams

2013-09-25 Thread Michael Roth
From: Gerd Hoffmann usb3 bulk endpoints with streams are implicitly pipelined now, so the requests will actually be processed in parallel. Also allow them to complete out-of-order. Fixes stalls in the uas driver. Cc: qemu-sta...@nongnu.org Signed-off-by: Gerd Hoffmann (cherry picked from comm

[Qemu-devel] [PATCH 04/38] rdma: silly ipv6 bugfix

2013-09-25 Thread Michael Roth
From: "Michael R. Hines" My bad - but it's very important for us to warn the user that IPv6 is broken on RoCE in linux right now, until linux releases a fixed version. Signed-off-by: Michael R. Hines Signed-off-by: Michael Tokarev (cherry picked from commit c89aa2f1851b08c3efa8a1070c0a6b9a36e1

[Qemu-devel] [PATCH 31/38] pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN

2013-09-25 Thread Michael Roth
From: Aurelien Jarno Now that the memory subsystem is propagating the endianness correctly, the pcnet-pci device should have its I/O ports and MMIO memory marked as LITTLE_ENDIAN, as PCI devices are little endian. This makes the pcnet-pci NIC to work again on big endian MIPS Malta (default NIC).

[Qemu-devel] [PATCH 24/38] exec: check offset_within_address_space for register subpage

2013-09-25 Thread Michael Roth
From: Hu Tao If offset_within_address_space falls in a page, then we register a subpage. So check offset_within_address_space rather than offset_within_region. Cc: qemu-sta...@nongnu.org Cc: Paolo Bonzini Cc: Richard Henderson Cc: "Andreas Färber" Cc: Peter Maydell Cc: Blue Swirl Signed-off

[Qemu-devel] [PATCH 33/38] kvmvapic: Catch invalid ROM size

2013-09-25 Thread Michael Roth
From: Jan Kiszka If not caught early, a zero-length ROM will cause a NULL-pointer access later on in patch_hypercalls when allocating a zero-length ROM copy and trying to read from it. CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini (cherry picked from commit

[Qemu-devel] [PATCH 13/38] block: expect errors from bdrv_co_is_allocated

2013-09-25 Thread Michael Roth
From: Paolo Bonzini Some bdrv_is_allocated callers do not expect errors, but the fallback in qcow2.c might make other callers trip on assertion failures or infinite loops. Fix the callers to always look for errors. Cc: qemu-sta...@nongnu.org Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 29/38] pc_q35: Initialize Xen.

2013-09-25 Thread Michael Roth
From: Anthony PERARD Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini Acked-by: Michael S. Tsirkin (cherry picked from commit 254c12825f93f405658ca3366cd34f8a8ad23511) Signed-off-by: Michael Roth --- hw/i386/pc_q35.c |5 + 1 file changed, 5 insertions(+) diff --git a

[Qemu-devel] [PATCH 08/38] pc: fix regression for 64 bit PCI memory

2013-09-25 Thread Michael Roth
From: "Michael S. Tsirkin" commit 398489018183d613306ab022653552247d93919f pc: limit 64 bit hole to 2G by default introduced a way for management to control the window allocated to the 64 bit PCI hole. This is useful, but existing management tools do not know how to set this property. As a

[Qemu-devel] [PATCH 27/38] qxl: fix local renderer

2013-09-25 Thread Michael Roth
From: Gerd Hoffmann The local spice renderer assumes the primary surface is located at the start of the "ram" bar. This used to be a requirement in qxl hardware revision 1. In revision 2+ this is relaxed. Nevertheless guest drivers continued to use the traditional location, for historical and

Re: [Qemu-devel] [PATCH 32/32] PPC: Ignore writes to L2CR

2013-09-25 Thread Alexander Graf
On 06.09.2013, at 14:54, Julio Guerra wrote: > 2013/6/30 Alexander Graf : >> The L2CR register contains a number of bits that either impose configuration >> which we can't deal with or mean "something is in progress until the bit is >> 0 again". >> >> Since we don't model the former and we do wa

[Qemu-devel] [PATCH 34/38] kvmvapic: Enter inactive state on hardware reset

2013-09-25 Thread Michael Roth
From: Jan Kiszka ROM layout may change after reset of devices are hotplugged, so we have to pick up the physical address again when the ROM is initialized. This is best achieved by resetting the state to INACTIVE. CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Michael S. Tsirkin
On Wed, Sep 25, 2013 at 03:02:35PM +0200, Gerd Hoffmann wrote: > On Mi, 2013-09-25 at 15:59 +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 25, 2013 at 02:48:52PM +0200, Gerd Hoffmann wrote: > > > On Mi, 2013-09-25 at 14:22 +0300, Michael S. Tsirkin wrote: > > > > This code can also be found here:

[Qemu-devel] [Bug 1230232] [NEW] mac99 does not find mac os x 10.4 dvd

2013-09-25 Thread Gino Badouri
Public bug reported: Hi there, I've compiled qemu 1.6.0 and ripped my Mac OS X 10.4 dvd to iso format. Now I'm trying to get qemu to boot the dvd and install the OS with: qemu-system-ppc64 -M mac99 -m 256 -cdrom ./tiger.iso -boot d -sdl -display sdl -net nic -net user -prom-env 'boot-args=-v' -c

[Qemu-devel] [PATCH 18/38] exec: always use MADV_DONTFORK

2013-09-25 Thread Michael Roth
From: Andrea Arcangeli MADV_DONTFORK prevents fork to fail with -ENOMEM if the default overcommit heuristics decides there's too much anonymous virtual memory allocated. If the KVM secondary MMU is synchronized with MMU notifiers or not, doesn't make a difference in that regard. Secondly it's al

[Qemu-devel] [PATCH 32/38] chardev: fix pty_chr_timer

2013-09-25 Thread Michael Roth
From: Gerd Hoffmann pty_chr_timer first calls pty_chr_update_read_handler(), then clears timer_tag (because it is a one-shot timer). This is the wrong order though. pty_chr_update_read_handler might re-arm time timer, and the new timer_tag gets overwitten in that case. This leads to crashes w

[Qemu-devel] [PATCH 37/38] blockdev: do not default cache.no-flush to true

2013-09-25 Thread Michael Roth
From: Paolo Bonzini That's why all my VMs were so fast lately. :) This changed in 1.6.0 by mistake in patch 29c4e2b (blockdev: Split up 'cache' option, 2013-07-18). Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi (cherry picked from commit 1df6fa4bc6754a

[Qemu-devel] [PATCH 19/38] xhci: reset port when disabling slot

2013-09-25 Thread Michael Roth
From: Gerd Hoffmann Cc: qemu-sta...@nongnu.org Signed-off-by: Gerd Hoffmann (cherry picked from commit 5c67dd7b4884979a2613a4702ac1ab68b0e6a16e) Signed-off-by: Michael Roth --- hw/usb/hcd-xhci.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Michael S. Tsirkin
On Wed, Sep 25, 2013 at 03:59:48PM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 25, 2013 at 02:48:52PM +0200, Gerd Hoffmann wrote: > > On Mi, 2013-09-25 at 14:22 +0300, Michael S. Tsirkin wrote: > > > This code can also be found here: > > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi

[Qemu-devel] [PATCH 38/38] virtio-blk: do not relay a previous driver's WCE configuration to the current

2013-09-25 Thread Michael Roth
From: Paolo Bonzini The following sequence happens: - the SeaBIOS virtio-blk driver does not support the WCE feature, which causes QEMU to disable writeback caching - the Linux virtio-blk driver resets the device, finds WCE is available but writeback caching is disabled; tells block layer to not

[Qemu-devel] [PATCH 21/38] w32: Fix access to host devices (regression)

2013-09-25 Thread Michael Roth
From: Stefan Weil QEMU failed to open host devices like \\.\PhysicalDrive0 (first hard disk) since some time (commit 8a79380b8ef1b02d2abd705dd026a18863b09020?). Those devices use hdev_open which did not use the latest API for options. This resulted in a fatal runtime error: Block protocol 'ho

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Gerd Hoffmann
On Mi, 2013-09-25 at 15:59 +0300, Michael S. Tsirkin wrote: > On Wed, Sep 25, 2013 at 02:48:52PM +0200, Gerd Hoffmann wrote: > > On Mi, 2013-09-25 at 14:22 +0300, Michael S. Tsirkin wrote: > > > This code can also be found here: > > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi > > > >

[Qemu-devel] [PATCH 25/38] ne2000: mark I/O as LITTLE_ENDIAN

2013-09-25 Thread Michael Roth
From: Aurelien Jarno Now that the memory subsystem is propagating the endianness correctly, the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as PCI devices are little endian. This makes the ne2000 NIC to work again on PowerPC. Cc: qemu-sta...@nongnu.org Cc: Stefan Hajnoczi

Re: [Qemu-devel] ChrEMU - Virtualization in the Browser

2013-09-25 Thread Peter Maydell
On 25 September 2013 17:59, Stefan Hajnoczi wrote: > On Mon, Sep 23, 2013 at 01:48:12PM -0500, Anthony Liguori wrote: >> I'm pretty sure coroutines would provide difficult to port too. > > The gthread backend should work since it doesn't use stack-switching. ...except that the gthread backend doe

[Qemu-devel] [PATCH 28/38] pc: Initializing ram_memory under Xen.

2013-09-25 Thread Michael Roth
From: Anthony PERARD Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini Acked-by: Michael S. Tsirkin CC: qemu-sta...@nongnu.org (cherry picked from commit 04d7bad8a4fb23e6d9af9d06ce3ddc28a251d94d) Signed-off-by: Michael Roth --- hw/i386/pc_piix.c|2 +- include/hw/xen/xe

[Qemu-devel] [PATCH 30/38] qapi-types.py: Fix enum struct sizes on i686

2013-09-25 Thread Michael Roth
From: Cole Robinson Unlike other list types, enum wasn't adding any padding, which caused a mismatch between the generated struct size and GenericList struct size. More details in a678e26cbe89f7a27cbce794c2c2784571ee9d21 This crashed qemu if calling qmp query-tpm-types for example, which upsets

[Qemu-devel] [PATCH 36/38] tci: Fix qemu-alpha on 32 bit hosts (wrong assertions)

2013-09-25 Thread Michael Roth
From: Stefan Weil Debian busybox-static for alpha has a load address of 0x00012000 which is mapped to 0x2000 for 32 bit hosts. qemu-alpha uses the TCG opcodes qemu_ld32, qemu_ld64, qemu_st32 and qemu_st64 which all raise the assertion (taddr == host_addr). Remove all asserti

[Qemu-devel] [PATCH 35/38] kvmvapic: Clear also physical ROM address when entering INACTIVE state

2013-09-25 Thread Michael Roth
From: Jan Kiszka To avoid misinterpreting INACTIVE after migration as old qemu-kvm's STANDBY, also clear rom_state_paddr when going back to this state. CC: qemu-sta...@nongnu.org Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini (cherry picked from commit 4357930b8a7d2fcff2d8121ec51811742

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Gerd Hoffmann
Hi, > This code can also be found here: > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi Crashes on coreboot with -M q35: qemu-system-x86_64: /home/kraxel/projects/qemu/hw/i386/acpi-build.c:965: acpi_build_update: Assertion `mcfg_size' failed. I'll go send a coreboot rom with separat

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Gerd Hoffmann
> > > > [root@fedora ~]# cat /proc/ioports > > > > [ ... ] > > > > afe0-afe3 : ACPI GPE0_BLK > > > > b010-b015 : ACPI CPU throttle > > > > b100-b10f : :00:01.3 > > > > b100-b107 : piix4_smbus > > > > e400-e43f : :00:01.3 > > > > e400-e403 : ACPI PM1a_EVT_BLK > > > > e

Re: [Qemu-devel] [PATCH 1/2] block: clean up bdrv_drain_all() throttling comments

2013-09-25 Thread Alex Bligh
On 25 Sep 2013, at 13:15, Stefan Hajnoczi wrote: > Since cc0681c45430a1f1a4c2d06e9499b7775afc9a18 ("block: Enable the new > throttling code in the block layer.") bdrv_drain_all() no longer spins. > The code used to look as follows: > > do { > busy = qemu_aio_wait(); > > /* FIXME: We

Re: [Qemu-devel] [PATCH 2/2] aio: make aio_poll(ctx, true) block with no fds

2013-09-25 Thread Alex Bligh
On 25 Sep 2013, at 13:15, Stefan Hajnoczi wrote: > This patch drops a special case where aio_poll(ctx, true) returns false > instead of blocking if no file descriptors are waiting on I/O. Now it > is possible to block in aio_poll() to wait for aio_notify(). > > This change eliminates busy waiti

[Qemu-devel] [PATCH 26/38] ehci: save device pointer in EHCIState

2013-09-25 Thread Michael Roth
From: Gerd Hoffmann We'll need a pointer to the actual pci/sysbus device, stick a pointer to it into the EHCIState struct. https://bugzilla.redhat.com/show_bug.cgi?id=1005495 Signed-off-by: Gerd Hoffmann (cherry picked from commit adbecc89731cf3e0ae656d50ea9fa58c589c4bdc) Signed-off-by: Micha

Re: [Qemu-devel] [PATCH 32/32] PPC: Ignore writes to L2CR

2013-09-25 Thread Julio Guerra
2013/9/25 Alexander Graf : > > On 06.09.2013, at 14:54, Julio Guerra wrote: > >> 2013/6/30 Alexander Graf : >>> The L2CR register contains a number of bits that either impose configuration >>> which we can't deal with or mean "something is in progress until the bit is >>> 0 again". >>> >>> Since we

Re: [Qemu-devel] [PATCH 11/38] xhci: fix endpoint interval calculation

2013-09-25 Thread Gerd Hoffmann
On Mi, 2013-09-25 at 07:57 -0500, Michael Roth wrote: > From: Gerd Hoffmann > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > (cherry picked from commit ca7162782a293f525633e5816470498dd86a51cf) Also needed: 4d7a81c06f5f17e019a2d3a18300500bd64f6f40 cheers, Gerd

[Qemu-devel] [PATCH 14/38] target-i386: fix disassembly with PAE=1, PG=0

2013-09-25 Thread Michael Roth
From: Paolo Bonzini CR4.PAE=1 will not enable paging if CR0.PG=0, but the "if" chain in x86_cpu_get_phys_page_debug says otherwise. Check CR0.PG before everything else. Fixes "-d in_asm" for a code section at the beginning of OVMF. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH] PPC: Fix L2CR write accesses

2013-09-25 Thread Alexander Graf
Commit 2345f1c01 was supposed to render L2CR writes into noops. Instead, it made them illegal instruction traps which apparently didn't confuse XNU, but can easily confuse other OSs. Fix it up by actually doing nothing when we write to L2CR. Reported-by: Julio Guerra Signed-off-by: Alexander Gra

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 1.6.1, freeze on 2013-09-30

2013-09-25 Thread Cole Robinson
On 09/25/2013 08:57 AM, Michael Roth wrote: > Hi everyone, > > The following new patches are queued for QEMU stable v1.6.1: > > https://github.com/mdroth/qemu/commits/stable-1.6-staging > Here are some other patches we are carrying in Fedora. I don't think they are appropriate for stable, but j

Re: [Qemu-devel] [PATCH] rbd: avoid qemu_rbd_snap_list() memory leak when no snapshots

2013-09-25 Thread Stefan Hajnoczi
On Wed, Sep 25, 2013 at 10:06:11AM +0200, Kevin Wolf wrote: > Am 25.09.2013 um 02:28 hat Michael Roth geschrieben: > > Quoting Stefan Hajnoczi (2013-08-14 07:13:52) > > > When there are no snapshots qemu_rbd_snap_list() returns 0 and the > > > snapshot table pointer is NULL. Don't forget to free t

[Qemu-devel] [PATCH 07/38] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial

2013-09-25 Thread Michael Roth
From: Markus Armbruster scsi_bus_legacy_add_drive() creates either a scsi-disk or a scsi-generic device. It sets property "serial" to argument serial unless null. Crashes with scsi-generic, because it doesn't have such the property. Only usb_msd_initfn_storage() passes non-null serial. Reprod

[Qemu-devel] [PATCH v2] rbd: avoid qemu_rbd_snap_list() memory leaks

2013-09-25 Thread Stefan Hajnoczi
When there are no snapshots qemu_rbd_snap_list() returns 0 and the snapshot table pointer is NULL. Don't forget to free the snaps buffer we allocated for librbd rbd_snap_list(). When the function succeeds don't forget to free the snaps buffer after calling rbd_snap_list_end(). Cc: qemu-sta...@no

Re: [Qemu-devel] ChrEMU - Virtualization in the Browser

2013-09-25 Thread Stefan Hajnoczi
On Wed, Sep 25, 2013 at 3:10 PM, Peter Maydell wrote: > On 25 September 2013 17:59, Stefan Hajnoczi wrote: >> On Mon, Sep 23, 2013 at 01:48:12PM -0500, Anthony Liguori wrote: >>> I'm pretty sure coroutines would provide difficult to port too. >> >> The gthread backend should work since it doesn't

[Qemu-devel] [PATCH 10/38] virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table

2013-09-25 Thread Michael Roth
From: yinyin virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. /* loop over the indirect descriptor table */ indirect = 1; max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc); num_bufs = i = 0; desc_pa = vring_desc

[Qemu-devel] [PATCH 17/38] virtio_pci: fix level interrupts with irqfd

2013-09-25 Thread Michael Roth
From: "Michael S. Tsirkin" commit 62c96360ae7f2c7a8b029277fbb7cb082fdef7fd virtio-pci: fix level interrupts only helps systems without irqfd: on systems with irqfd support we passed in flag requesting irqfd even when msix is disabled. As a result, for level interrupts we didn't install an fd

[Qemu-devel] [PATCH 09/38] pseries: Fix stalls on hypervisor virtual console

2013-09-25 Thread Michael Roth
From: Anton Blanchard A number of users are reporting stalls when using the pseries hypervisor virtual console. A simple test case is to paste 15 or 17 characters at a time into the console. Pasting 15 characters at a time works fine but pasting 17 characters hangs for a random amount of time. O

[Qemu-devel] [PATCH 12/38] Revert "usb-hub: report status changes only once"

2013-09-25 Thread Michael Roth
From: Gerd Hoffmann This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with the xhci host controller. No

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Gerd Hoffmann
On Mi, 2013-09-25 at 15:12 +0200, Gerd Hoffmann wrote: > Hi, > > > This code can also be found here: > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi > > Crashes on coreboot with -M q35: > > qemu-system-x86_64: /home/kraxel/projects/qemu/hw/i386/acpi-build.c:965: > acpi_build_update

[Qemu-devel] [PATCH] Add infrastructure to forbid external snapshot

2013-09-25 Thread Benoît Canet
This paves the way for the quorum block driver to be merged. Benoît Canet (1): block: Add bdrv_forbid_ext_snapshots. block.c | 27 +++ block/blkdebug.c | 2 ++ block/blkverify.c | 2 ++ block/bochs.c | 2 ++ block/cloop.

[Qemu-devel] [PATCH] block: Add bdrv_forbid_ext_snapshots.

2013-09-25 Thread Benoît Canet
Drivers having a bs->file where set to recurse the call to their child. Protocol and drivers designed to be on the bottom of the stack where set to allow snapshots. Future protocols like quorum where creating snapshots does not make sense without block filters will be set to forbid snapshots. Sig

Re: [Qemu-devel] [PATCH v2] rbd: avoid qemu_rbd_snap_list() memory leaks

2013-09-25 Thread Kevin Wolf
Am 25.09.2013 um 16:00 hat Stefan Hajnoczi geschrieben: > When there are no snapshots qemu_rbd_snap_list() returns 0 and the > snapshot table pointer is NULL. Don't forget to free the snaps buffer > we allocated for librbd rbd_snap_list(). > > When the function succeeds don't forget to free the s

[Qemu-devel] [PATCH 1/8] migration-local: add pipe protocol for QEMUFileOps

2013-09-25 Thread Lei Li
This patch adds QEMUFileOps with pipe protocol, will be used to transmit RAM for localhost migration. The source process would put buffer, correspondingly the destination process would get buffer. The read side of the pipe file descriptor would be passed to destination process via SCM_RIGHTS. Sign

[Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-09-25 Thread Lei Li
This RFC patch series tries to introduce a mechanism using side channel pipe for RAM via SCM_RIGHTS with unix domain socket protocol migration. This side channel will be used for the page flipping by vmsplice, which will be the internal mechanism for localhost migration that we are trying to add.

[Qemu-devel] [PATCH 2/8] migration-loca: add qemu_fopen_pipe()

2013-09-25 Thread Lei Li
Add qemu_fopen_pipe() to open QEMUFileOps pipe_write_ops and pipe_read_ops introduced for pipe protocol. Signed-off-by: Lei Li --- include/migration/qemu-file.h |2 ++ migration-local.c | 20 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/i

[Qemu-devel] [PATCH 7/8] migration-unix: side channel support on unix outgoing

2013-09-25 Thread Lei Li
This patch adds side channel support on the outgoing of unix migration. It will create a pipe and pass the read pipe fd to destination process by send_pipefd(). If the pipe fd was passed successfully, the qemu_fopen_pipe will be called with write mode to send RAM to the write pipe fd. Signed-off-

[Qemu-devel] [PATCH 4/8] migration-local: add recv_pipefd()

2013-09-25 Thread Lei Li
This patch adds recv_pipefd() to receive the pipe file descriptor that passed by source process. Signed-off-by: Lei Li --- include/migration/qemu-file.h |1 + migration-local.c | 56 + 2 files changed, 57 insertions(+), 0 deletions(-) di

[Qemu-devel] [PATCH 3/8] migration-local: add send_pipefd()

2013-09-25 Thread Lei Li
This patch adds send_pipefd() to pass the pipe file descriptor to destination process. Signed-off-by: Lei Li --- include/migration/qemu-file.h |1 + migration-local.c | 57 + 2 files changed, 58 insertions(+), 0 deletions(-) diff --git a

[Qemu-devel] [PATCH 8/8] migration-unix: side channel support on unix incoming

2013-09-25 Thread Lei Li
Add side channel support on incoming part of unix migration to enable localhost migration with page flipping approach. If there is a pipe available by checking recv_pipefd(), it will fetch the pipe file descriptor and open it by qemu_fopen_pipe() with read mode for the pipe protocol introduced. Si

[Qemu-devel] [PATCH 6/8] migration: add migrate_unix_page_flipping()

2013-09-25 Thread Lei Li
Add migrate_unix_page_flipping() to check if MIGRATION_CAPABILITY_UNIX_PAGE_FLIPPING is enabled. Signed-off-by: Lei Li --- include/migration/migration.h |3 +++ migration.c |9 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/migration

[Qemu-devel] [PATCH 0/3] qcow2: Small error path fixes for l2_allocate

2013-09-25 Thread Max Reitz
Errors in l2_allocate should always go down the error path. If this path is taken, the newly allocated L2 cluster is abandoned and should thus be freed. The L2 table on the other hand should only be put back into the cache if it was taken from it before. Max Reitz (3): qcow2: Don't put invalid L

[Qemu-devel] [PATCH 1/3] qcow2: Don't put invalid L2 table into cache

2013-09-25 Thread Max Reitz
In l2_allocate, the fail path is executed if qcow2_cache_flush fails. However, the L2 table has not yet been fetched from the L2 table cache. The qcow2_cache_put in the fail path therefore basically gives an undefined argument as the L2 table address (in this case). Signed-off-by: Max Reitz ---

[Qemu-devel] [PATCH 2/3] qcow2: Free allocated L2 cluster on error

2013-09-25 Thread Max Reitz
If an error occurs in l2_allocate, the allocated (but unused) L2 cluster should be freed. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 4 1 file changed, 4 insertions(+) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index f6d47c9..1c3d3fc 100644 --- a/block/qcow2-clust

[Qemu-devel] [PATCH 3/3] qcow2: Always use error path in l2_allocate

2013-09-25 Thread Max Reitz
Just returning -errno in some cases prevents trace_qcow2_l2_allocate_done from being executed (and, in one case, also the unused allocated L2 table from being freed). Always going down the error path fixes this. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 5 +++-- 1 file changed, 3 inse

[Qemu-devel] [PATCH resend] sdl: Reverse support for video mode setting

2013-09-25 Thread Lei Li
Currently, If the setting of video mode failed, qemu will exit. It should go back to the previous setting if the new screen resolution failed. This patch fixes LP#1216368, add support to revert to existing surface for the failure of video mode setting. Reported-by: Sascha Krissler Signed-off-by:

Re: [Qemu-devel] Hibernate and qemu-nbd

2013-09-25 Thread Mark Trumpold
Hello Wouter, Thank you for your input. I replayed the test as follows: -> qemu-nbd -p 2000 -persist /root/qemu/q1.img & -> nbd-client localhost 2000 /dev/nbd0 -> echo reboot >/sys/power/disk -> echo disk >/sys/power/state The "reboot" is a handy way to test, as it goes through the comp

Re: [Qemu-devel] [PATCH v5 00/23] qemu: generate acpi tables for the guest

2013-09-25 Thread Michael S. Tsirkin
On Wed, Sep 25, 2013 at 04:15:03PM +0200, Gerd Hoffmann wrote: > On Mi, 2013-09-25 at 15:12 +0200, Gerd Hoffmann wrote: > > Hi, > > > > > This code can also be found here: > > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi > > > > Crashes on coreboot with -M q35: > > > > qemu-system

Re: [Qemu-devel] [PATCH 2/3] qcow2: Free allocated L2 cluster on error

2013-09-25 Thread Benoît Canet
Le Wednesday 25 Sep 2013 à 16:37:19 (+0200), Max Reitz a écrit : > If an error occurs in l2_allocate, the allocated (but unused) L2 cluster > should be freed. > > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/block/qcow2-clus

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/7] Stage 1 VSX Support

2013-09-25 Thread Alexander Graf
On 24.09.2013, at 16:52, Tom Musta wrote: > This patch sequence provides the first release of support for the > Vector Scalar Extension (VSX) instructions that were introduced > in PowerISA V2.06. > > Initially, three instructions are supported (lxvd2x, stxvd2x and > xxpermdi) -- these are requi

Re: [Qemu-devel] [PATCH] spapr: increase temporary fdt buffer size

2013-09-25 Thread Alexander Graf
On 24.09.2013, at 12:05, mike wrote: > On 09/24/2013 01:59 PM, Alexey Kardashevskiy wrote: >> At the moment the size of the buffer is set to 64K which is >> enough for approximately 150 VCPUs which is not the limit. >> >> This increases the buffer up to 256K which allows having >> a tree for app

Re: [Qemu-devel] [PATCH 3/3] qcow2: Always use error path in l2_allocate

2013-09-25 Thread Benoît Canet
Le Wednesday 25 Sep 2013 à 16:37:20 (+0200), Max Reitz a écrit : > Just returning -errno in some cases prevents > trace_qcow2_l2_allocate_done from being executed (and, in one case, also > the unused allocated L2 table from being freed). Always going down the > error path fixes this. > > Signed-of

Re: [Qemu-devel] [PATCH 1/3] qcow2: Don't put invalid L2 table into cache

2013-09-25 Thread Benoît Canet
Le Wednesday 25 Sep 2013 à 16:37:18 (+0200), Max Reitz a écrit : > In l2_allocate, the fail path is executed if qcow2_cache_flush fails. > However, the L2 table has not yet been fetched from the L2 table cache. > The qcow2_cache_put in the fail path therefore basically gives an > undefined argument

Re: [Qemu-devel] [PATCH] spapr: increase temporary fdt buffer size

2013-09-25 Thread Alexander Graf
On 24.09.2013, at 07:59, Alexey Kardashevskiy wrote: > At the moment the size of the buffer is set to 64K which is > enough for approximately 150 VCPUs which is not the limit. > > This increases the buffer up to 256K which allows having > a tree for approximately 600 VCPUs which is way beyond th

[Qemu-devel] [PATCH 5/8] QAPI: introduce magration capability unix_page_flipping

2013-09-25 Thread Lei Li
Introduce unix_page_flipping to MigrationCapability for localhost migration. Signed-off-by: Lei Li --- qapi-schema.json |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 145eca8..f63dab4 100644 --- a/qapi-schema.json +++ b/q

Re: [Qemu-devel] [PULL 00/17] s390 patches

2013-09-25 Thread Alexander Graf
On 24.09.2013, at 09:27, Christian Borntraeger wrote: > The following changes since commit 6c2679fc19560699679200fb42ab4659bcbe7f79: > > Merge remote-tracking branch 'kiszka/queues/slirp' into staging (2013-09-17 > 10:01:24 -0500) > > are available in the git repository at: > > > git://git

Re: [Qemu-devel] [PATCH 4/5] block: cow - used QEMU_PACKED for on-disk structures

2013-09-25 Thread Jeff Cody
On Fri, Sep 20, 2013 at 08:23:54AM +0200, Markus Armbruster wrote: > Jeff Cody writes: > > > On Thu, Sep 19, 2013 at 12:01:24PM -0700, Richard Henderson wrote: > >> On 09/19/2013 11:43 AM, Jeff Cody wrote: > >> > cow_header_v2 is read and written directly from the image file > >> > with bdrv_prea

Re: [Qemu-devel] [PATCH 0/8 RFC] migration: Introduce side channel for RAM

2013-09-25 Thread Paolo Bonzini
Il 25/09/2013 16:32, Lei Li ha scritto: > This RFC patch series tries to introduce a mechanism using side > channel pipe for RAM via SCM_RIGHTS with unix domain socket > protocol migration. > > This side channel will be used for the page flipping by vmsplice, > which will be the internal mechanism

Re: [Qemu-devel] [PATCH 3/3] Add ARM registers definitions in Monitor commands

2013-09-25 Thread Fabien Chouteau
On 09/25/2013 01:53 AM, Peter Maydell wrote: > > No, I really don't want to see another target #ifdef ladder, please. > Put a 'static const MonitorDef *monitor_defs;' into CPUClass, > and initialize it in each target's class init function, please. > (You'll need to move the appropriate sections of

Re: [Qemu-devel] [PATCH -V4 1/4] target-ppc: Update slb array with correct index values.

2013-09-25 Thread Aneesh Kumar K.V
Hi Alex, Any update on this ? -aneesh "Aneesh Kumar K.V" writes: > From: "Aneesh Kumar K.V" > > Without this, a value of rb=0 and rs=0 results in replacing the 0th > index. This can be observed when using gdb remote debugging support. > > (gdb) x/10i do_fork >0xc0085330 :

[Qemu-devel] [PATCH] qcow2: count_contiguous_clusters and compression

2013-09-25 Thread Max Reitz
The function is not intended to be used on compressed clusters and will not work correctly, if used anyway, since L2E_OFFSET_MASK is not the right mask for determining the offset of compressed clusters. Therefore, assert that the first cluster is not compressed and always include the compression fl

[Qemu-devel] [PATCH] qcow2: Assert against currently impossible overflow

2013-09-25 Thread Max Reitz
If qcow2_alloc_cluster_link_l2 is called with a QCowL2Meta describing a request crossing L2 boundaries, a buffer overflow will occur. This is impossible right now since such requests are never generated (every request is shortened to L2 boundaries before) and probably also completely unintended (co

Re: [Qemu-devel] [PATCH 3/3] Add ARM registers definitions in Monitor commands

2013-09-25 Thread Peter Maydell
On 26 September 2013 00:38, Fabien Chouteau wrote: > On 09/25/2013 01:53 AM, Peter Maydell wrote: >> >> No, I really don't want to see another target #ifdef ladder, please. >> Put a 'static const MonitorDef *monitor_defs;' into CPUClass, >> and initialize it in each target's class init function, p

Re: [Qemu-devel] [PATCH v5 0/5] bugs fix for hpet

2013-09-25 Thread Paolo Bonzini
Il 25/09/2013 08:27, liu ping fan ha scritto: > Hi, is hpet orphan? Or who can help me to merge this patch-set if my > patch is fine. Anthony, Michael? Paolo > Thanks. > > On Thu, Sep 12, 2013 at 11:25 AM, Liu Ping Fan wrote: >> v5: >> use stand compat property to fix hpet intcap on pc-q35,

[Qemu-devel] [PATCH v2 0/4] block: use QEMU_PACKED for on-disk structures

2013-09-25 Thread Jeff Cody
v2 changes: Dropped the "cow" format patch. This means "cow" is non-portable, but it keeps behavior the same on x86_64. (Richard Henderson) Moved QEMU_PACKED to after the struct definition closing brace, to keep it more stylistically in-line with other QEMU_PACKED useage (Kevin Wolf) Original de

[Qemu-devel] [PATCH v2 1/4] block: vdi - use QEMU_PACKED for on-disk structures

2013-09-25 Thread Jeff Cody
The header struct VdiHeader is an on-disk structure for the image format, and as such should be packed. Signed-off-by: Jeff Cody --- block/vdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index dcbc27c..b6ec002 100644 --- a/block/vdi.c +++ b/blo

[Qemu-devel] [PATCH v2 2/4] block: vpc - use QEMU_PACKED for on-disk structures

2013-09-25 Thread Jeff Cody
The VHD footer and header structs (vhd_footer and vhd_dyndisk_header) are on-disk structures for the image format, and as such should be packed. Go ahead and make these typedefs as well, with the preferred QEMU naming convention, so that the packed attribute is used consistently with the struct.

[Qemu-devel] [PATCH v2 3/4] block: qcow2 - used QEMU_PACKED for on-disk structures

2013-09-25 Thread Jeff Cody
QCowHeader and QCowExtension are structs that reside in the on-disk image format, and are read and written directly via bdrv_pread()/write(), and as such should be packed to avoid any unintentional struct padding. Signed-off-by: Jeff Cody --- block/qcow2.c | 2 +- block/qcow2.h | 2 +- 2 files c

[Qemu-devel] [PATCH v2 4/4] block: qed - use QEMU_PACKED for on-disk structures

2013-09-25 Thread Jeff Cody
QEDHeader is read, and written, directly from on-disk images via bdrv_pread()/write(). To avoid any unintentional padding, these structs should be packed. Signed-off-by: Jeff Cody --- block/qed.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qed.h b/block/qed.h index

Re: [Qemu-devel] [Xen-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.

2013-09-25 Thread Pasi Kärkkäinen
On Sun, Jul 28, 2013 at 05:56:01PM +0100, Frediano Ziglio wrote: >2013/7/23 Gerd Hoffmann <[1]kra...@redhat.com> > > Â Hi, > > Tested-by: Fabio Fantoni <[2]fabio.fant...@m2r.biz> > > > > I tested it for a long time with spice on xen (because qxl will be > fully >

[Qemu-devel] [PULL 04/21] tcg-ppc: Avoid code for nop move

2013-09-25 Thread Richard Henderson
While these are rare from code that's been through the optimizer, it's not uncommon within the tcg backend. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index 24a8621..

[Qemu-devel] [PULL 01/21] configure: Allow command-line configure for ppc32

2013-09-25 Thread Richard Henderson
Similar to manually selecting i386 for an x86_64 host. Signed-off-by: Richard Henderson --- configure | 8 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 05e16da..ef4d9bf 100755 --- a/configure +++ b/configure @@ -981,6 +981,14 @@ for opt do done case "$cp

[Qemu-devel] [PULL 05/21] tcg-ppc: Cleanup tcg_out_qemu_ld/st_slow_path

2013-09-25 Thread Richard Henderson
Coding style fixes. Use TCGReg enumeration values instead of raw numbers. Don't needlessly pull the whole TCGLabelQemuLdst struct into local variables. Less conditional compilation. No functional changes. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 147 ---

[Qemu-devel] [PULL 02/21] tcg-ppc: fix qemu_ld/qemu_st for AIX ABI

2013-09-25 Thread Richard Henderson
From: Paolo Bonzini For the AIX ABI, the function pointer and small area pointer need to be loaded in the trampoline. The trampoline instead is called with a normal BL instruction. Signed-off-by: Paolo Bonzini Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 17 +

[Qemu-devel] [PULL 00/21] TCG ppc and ppc64 updates

2013-09-25 Thread Richard Henderson
This is a pull for both the ppc and ppc64 updates that have been previously posted. Paolo has re-checked the ppc32 portions. Unfortunately, all mail to malc bounces, so this is unlikely to get any further review. Please pull. r~ The following changes since commit f828a4c8faa118e0ebab3e353ac68

[Qemu-devel] [PULL 03/21] tcg-ppc: use new return-argument ld/st helpers

2013-09-25 Thread Richard Henderson
From: Paolo Bonzini These use a 32-bit load-of-immediate to save a mflr+addi+mtlr sequence. Tested with a Windows 98 guest (pretty much the most recent thing I could run on my PPC machine) and kvm-unit-tests's sieve.flat. The speed up for sieve.flat is as high as 10% for qemu-system-i386, 25% (n

[Qemu-devel] [PULL 06/21] tcg-ppc: Use conditional branch and link to slow path

2013-09-25 Thread Richard Henderson
Saves one insn per slow path. Note that we can no longer use a tail call into the store helper. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index a5f1f9

[Qemu-devel] [PULL 08/21] tcg-ppc64: Reformat tcg-target.c

2013-09-25 Thread Richard Henderson
Whitespace and brace changes only. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 478 - 1 file changed, 239 insertions(+), 239 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0bd1e0c..b554b00 100644

[Qemu-devel] [PULL 09/21] tcg-ppc64: More use of TAI and SAI helper macros

2013-09-25 Thread Richard Henderson
Finish conversion of all memory operations. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 41 - 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index b554b00..114e23d 100644 --

[Qemu-devel] [PULL 20/21] tcg-ppc64: Add _noaddr functions for emitting forward branches

2013-09-25 Thread Richard Henderson
... rather than open-coding this stuff through the file. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 2076299..c225c8e 100644 ---

[Qemu-devel] [PULL 07/21] tcg-ppc: Fix and cleanup tcg_out_tlb_check

2013-09-25 Thread Richard Henderson
The fix is that sparc has so many mmu modes that the last one overflowed the 16-bit signed offset we assumed would fit. Handle this, and check the new assumption at compile time. Load the tlb addend earlier for the fast path. Remove the explicit address + addend and make use of index addressing.

[Qemu-devel] [PULL 11/21] tcg-ppc64: Use tcg_out64

2013-09-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 848029f..27a955b 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -997,9 +997,6 @@ static v

Re: [Qemu-devel] [PATCH v2 0/4] block: use QEMU_PACKED for on-disk structures

2013-09-25 Thread Richard Henderson
On 09/25/2013 09:08 AM, Jeff Cody wrote: > Jeff Cody (4): > block: vdi - use QEMU_PACKED for on-disk structures > block: vpc - use QEMU_PACKED for on-disk structures > block: qcow2 - used QEMU_PACKED for on-disk structures > block: qed - use QEMU_PACKED for on-disk structures Reviewed-by:

<    1   2   3   4   >