Re: [Qemu-devel] [PATCH for-1.4 07/19] target-sparc: Fix debug output for DEBUG_MMU

2013-02-15 Thread Edgar E. Iglesias
Cleanup patch is ok with me. Acked-by: Edgar E. Iglesias --- Sent from my phone On Feb 15, 2013 12:24 AM, "Andreas Färber" wrote: > > Am 14.02.2013 22:42, schrieb Blue Swirl: > > On Thu, Feb 14, 2013 at 3:46 PM, Andreas Färber wrote: > >> Am 27.01.2013 14:32, schrieb Andreas Färber: > >>> Signe

[Qemu-devel] [PATCH V19 02/10] build: hide symbols in *.lo

2013-02-15 Thread Wenchao Xia
This patch will hide all symbols except those marked with QEMU_DLL_PUBLIC in .lo files. Because vsclient linked some function in qemu, so export them as well. All symbols in libcacard.syms are marked as public. Signed-off-by: Wenchao Xia --- configure | 18 +

[Qemu-devel] [PATCH V19 05/10] libqblock: build: add packaging support

2013-02-15 Thread Wenchao Xia
Now libqblock can be packaged and installed by "sudo make install-libqblock'. Signed-off-by: Wenchao Xia --- libqblock/Makefile | 34 +- libqblock/libqblock.pc.in | 13 + 2 files changed, 42 insertions(+), 5 deletions(-) create mode 1

[Qemu-devel] [PATCH V19 04/10] libqblock: build: add rule for libqblock.la

2013-02-15 Thread Wenchao Xia
Now libqblock.la can be built with neccessary object files, and can be automatically cleaned by make clean in root directory. make libqblock-clean also clean it. -fvisibility=hidden was used to hide symbols, and a special macro was introduced to export symbols that marked as public. Signed-off-b

[Qemu-devel] [PATCH V19 03/10] libqblock: build: add configure support

2013-02-15 Thread Wenchao Xia
Rule for libqblock.la will be included if it is enabled, and will be added to 'all' to be automatically built. Only support Linux now, to save trouble in building on windows. Signed-off-by: Wenchao Xia --- Makefile |3 +++ configure | 32 +

[Qemu-devel] [PATCH V19 06/10] block: export function path_has_protocol()

2013-02-15 Thread Wenchao Xia
libqblock need to use it. Signed-off-by: Wenchao Xia --- block.c |2 +- include/block/block.h |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 50dab8e..0736cce 100644 --- a/block.c +++ b/block.c @@ -195,7 +195,7 @@ static void

Re: [Qemu-devel] [ANNOUNCE] 1.5 development tree is now open

2013-02-15 Thread Anthony Liguori
Eric Johnson writes: > On 02/15/2013 03:41 PM, Anthony Liguori wrote: >> Happy hacking! >> >> Regards, >> >> Anthony Liguori > > We might want to update the planning section of > http://wiki.qemu.org/Contribute/StartHere to link to 1.4 and 1.5. Thanks for pointing that out. I've fixed it. > >

[Qemu-devel] [PATCH V19 08/10] libqblock: libqblock API implement

2013-02-15 Thread Wenchao Xia
This patch contains implemention for APIs. Basically it is a layer above qemu block general layer now. qb_image_new() will try do init for this library. Signed-off-by: Wenchao Xia --- libqblock/libqblock-error.c | 49 +++ libqblock/libqblock.c | 983 +

[Qemu-devel] [PATCH V19 10/10] libqblock: test: libqblock test example

2013-02-15 Thread Wenchao Xia
In this example, first it will create some qcow2 images, then try get information including backing file relationship, then it will do sync IO on the image. Signed-off-by: Wenchao Xia --- tests/Makefile|2 + tests/check-libqblock-qcow2.c | 385 +

[Qemu-devel] [PATCH V19 07/10] libqblock: libqblock API design and type defines

2013-02-15 Thread Wenchao Xia
Public API design header files: libqblock.h, libqblock-error.h. Public type define header files: libqblock-types.h. Private internal used header files: libqblock-internal. For ABI some reserved bytes are used in structure defines. Macro QEMU_DLL_PUBLIC is used to mark exported function. Importan

[Qemu-devel] [PATCH V19 09/10] libqblock: build: add rules for test case

2013-02-15 Thread Wenchao Xia
Libtool will be used for final link, the rules do nothing if libqblock was disabled. Temp directory was used to store image created in test, which will be deleted in clean. Signed-off-by: Wenchao Xia --- tests/Makefile |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH V19 01/10] build: add command check-clean

2013-02-15 Thread Wenchao Xia
This command will package the clean operations in tests, to make it easy to be extended. Now root Makefile simply calls the command and do not care the details of it any more. Signed-off-by: Wenchao Xia --- Makefile |1 - tests/Makefile |8 +++- 2 files changed, 7 insertions(

[Qemu-devel] [PATCH V19 00/10] libqblock qemu block layer library

2013-02-15 Thread Wenchao Xia
These patches introduce libqblock API, make subdir-libqblock and make check-libqblock could build this library. Functionalities: 1 create a new image. 2 sync access of an image. 3 basic image information retrieving such as backing file. 4 detect if a sector is allocated in an image. Supported

Re: [Qemu-devel] [ANNOUNCE] 1.5 development tree is now open

2013-02-15 Thread Eric Johnson
On 02/15/2013 03:41 PM, Anthony Liguori wrote: Happy hacking! Regards, Anthony Liguori We might want to update the planning section of http://wiki.qemu.org/Contribute/StartHere to link to 1.4 and 1.5. I don't think I have a Wiki account otherwise I would just fix it myself. -Eric

Re: [Qemu-devel] (PAM stuff) reset doesn't work on OVMF + SeaBIOS CSM

2013-02-15 Thread Laszlo Ersek
On 02/15/13 21:57, David Woodhouse wrote: > On Fri, 2013-02-15 at 19:54 +0100, Laszlo Ersek wrote: >> Same infinite loop, alas... >> >> (i) What is your host kernel exactly? > > 3.7.5-201.fc18.x86_64 (booted from EFI on a MacBookPro 8,3). - host CPU: Xeon W3550 (family/model/stepping = 6/26/5) -

[Qemu-devel] [ANNOUNCE] 1.5 development tree is now open

2013-02-15 Thread Anthony Liguori
Happy hacking! Regards, Anthony Liguori

[Qemu-devel] [ANNOUNCE] QEMU 1.4.0 release

2013-02-15 Thread Anthony Liguori
Hi, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 1.4 release! http://wiki.qemu.org/download/qemu-1.4.0.tar.bz2 Even though this was our shortest release cycle in the history of the project, this release contains almost 1400 changesets from 116 unique authors. Ma

Re: [Qemu-devel] [RFC PATCH v2 17/23] qcow2: Move COW and L2 update into own coroutine

2013-02-15 Thread Stefan Hajnoczi
On Wed, Feb 13, 2013 at 02:22:07PM +0100, Kevin Wolf wrote: > +static bool qcow2_drain(BlockDriverState *bs) I don't like this function name. This function is a bool query but normal drain() means flush requests (i.e. do something that modified state). > +{ > +BDRVQcowState *s = bs->opaque;

Re: [Qemu-devel] [Qemu-ppc] [1.4]: 32-bit framebuffer video regression on qemu-system-ppc

2013-02-15 Thread Mark Cave-Ayland
On 15/02/13 13:11, Alexander Graf wrote: Yes, I see the same thing on PPC hosts. So far I assumed it was due to my ancient pixman version, but maybe it's not related to that after all. Does it work with SDL? Yes - it looks as if SDL is fine, and it's just VNC that is broken. A session with

Re: [Qemu-devel] [PATCHv2] iscsi: add iscsi_truncate support

2013-02-15 Thread Paolo Bonzini
Il 15/02/2013 15:35, Peter Lieven ha scritto: > this patch adds iscsi_truncate which effectively allows for online > resizing of iscsi volumes. for this to work you have to resize > the volume on your storage and then call block_resize command > in qemu which will issue a readcapacity16 to update t

[Qemu-devel] [Bug 1126369] Re: qemu-img snapshot -c is unreasonably slow

2013-02-15 Thread Stefan Hajnoczi
Skipping the bdrv_flush() in update_cluster_refcount() gives a huge speed-up from over 3 minutes down to <1 second. I think Kevin already discovered this in the past. Now we need to figure out how to safely perform the updates without flushing after each L2 table refcount increment. -- You rece

Re: [Qemu-devel] Undefined reference to 'ffs' when building for win64

2013-02-15 Thread Jacob Kroon
Hi Stefan, [...] On Fri, Feb 15, 2013 at 10:16 PM, Stefan Weil wrote: > > earlier versions of QEMU provided an implementation of ffs() > because it was needed for w32 compilations without optimisation. > > Later w32 used libiberty.a which provides ffs(). w64 never needed > the ffs() implementati

Re: [Qemu-devel] RFC: handling "backend too fast" in virtio-net

2013-02-15 Thread Luigi Rizzo
On Fri, Feb 15, 2013 at 11:24:29AM +0100, Stefan Hajnoczi wrote: > On Thu, Feb 14, 2013 at 07:21:57PM +0100, Luigi Rizzo wrote: > > CCed Michael Tsirkin > > > virtio-style network devices (where the producer and consumer chase > > each other through a shared memory block) can enter into a > > bad

Re: [Qemu-devel] Undefined reference to 'ffs' when building for win64

2013-02-15 Thread Andreas Färber
Am 15.02.2013 22:16, schrieb Stefan Weil: > Am 15.02.2013 20:40, schrieb Andreas Färber: >> Am 15.02.2013 19:29, schrieb Jacob Kroon: >>> On Fri, Feb 15, 2013 at 7:03 PM, Andreas Färber wrote: Am 06.02.2013 14:12, schrieb Jacob Kroon: > I'm trying to cross-build qemu for win64 on a Fedora

[Qemu-devel] [Bug 1019467] Re: Text mode cursor doesn't blink

2013-02-15 Thread Paolo Bonzini
It is in QEMU 1.2.0. commit 9aa0ff0bf9588f86846d1045662f5d75b91552cb Author: Jan Kiszka Date: Wed Jul 4 19:49:54 2012 +0200 vga: Implement blinking of text cursor Let the text cursor blink at 1.875 Hz, the original VGA cursor frequency. No timer is used, instead we rely on the

[Qemu-devel] [RESEND PATCH v2 0/2] seabios q35: Fix seabios IRQ mapping and setup

2013-02-15 Thread Alex Williamson
This enables interrupts to work pre-boot for assigned devices. I had self nak'd and resent a v2 patch for 2/2, but there were never any comments, so resending the whole series as v2. Thanks, Alex --- Alex Williamson (2): seabios q35: Enable all PIRQn IRQs at startup seabios q35: Ad

[Qemu-devel] [Bug 1079080] Re: ARM instruction "srs" wrong behaviour

2013-02-15 Thread vcesson
You are welcome. Credit info you need: Cesson Vincent Thank you for fixing it! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1079080 Title: ARM instruction "srs" wrong behaviour Status in QEMU:

Re: [Qemu-devel] (PAM stuff) reset doesn't work on OVMF + SeaBIOS CSM

2013-02-15 Thread David Woodhouse
On Fri, 2013-02-15 at 19:54 +0100, Laszlo Ersek wrote: > Same infinite loop, alas... > > (i) What is your host kernel exactly? 3.7.5-201.fc18.x86_64 (booted from EFI on a MacBookPro 8,3). > (ii) And when you say you did a "legacy boot", does that mean you installed > the guest OS as a traditiona

Re: [Qemu-devel] Undefined reference to 'ffs' when building for win64

2013-02-15 Thread Stefan Weil
Am 15.02.2013 20:40, schrieb Andreas Färber: > Am 15.02.2013 19:29, schrieb Jacob Kroon: >> On Fri, Feb 15, 2013 at 7:03 PM, Andreas Färber wrote: >>> Am 06.02.2013 14:12, schrieb Jacob Kroon: I'm trying to cross-build qemu for win64 on a Fedora 18/x86_64 system, using all the necessary

[Qemu-devel] [RESEND PATCH v2 2/2] seabios q35: Add new PCI slot to irq routing function

2013-02-15 Thread Alex Williamson
q35/ich9 doesn't use the same interrupt mapping function as i440fx/piix. PIRQA:D and PIRQE:H are programmed identically, but we start at index 0, not index -1. Slots 25 through 31 are also programmed independently. When running qemu w/o this patch, a device at address 0:6.0 will have its PCI int

[Qemu-devel] [RESEND PATCH v2 1/2] seabios q35: Enable all PIRQn IRQs at startup

2013-02-15 Thread Alex Williamson
We seem to use the IRQEN bit of the PIRQn registers interchangeably to select APIC mode or to disable an IRQ. I can't decide if we're intending to disable the IRQ or select APIC mode here, but in either case it prevents PIC mode assigned devices from working. When seabios writes IRQEN to these re

[Qemu-devel] [PATCH V23 0/7] QEMU Trusted Platform Module (TPM) integration

2013-02-15 Thread Stefan Berger
From: root The following series of patches adds TPM (Trusted Platform Module) support to QEMU. An emulator for the TIS (TPM Interface Spec) interface is added that provides the basis for accessing a 'backend' implementing the actual TPM functionality. The TIS emulator serves as a 'frontend' enabl

[Qemu-devel] [PATCH V23 6/7] Add support for cancelling of a TPM command

2013-02-15 Thread Stefan Berger
This patch adds support for cancelling an executing TPM command. In Linux for example a user can cancel a command through the TPM's sysfs 'cancel' entry using echo "1" > /sysfs/class/misc/tpm0/device/cancel This patch propagates the cancellation of a command inside a VM to the host TPM's sysfs en

[Qemu-devel] [PATCH V23 3/7] Add a debug register

2013-02-15 Thread Stefan Berger
This patch uses the possibility to add a vendor-specific register and adds a debug register useful for dumping the TIS's internal state. This register is only active in a debug build (#define DEBUG_TIS). Signed-off-by: Stefan Berger Reviewed-by: Corey Bryant --- tpm/tpm_tis.c | 70 +

[Qemu-devel] [PATCH V23 1/7] Support for TPM command line options

2013-02-15 Thread Stefan Berger
This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=,id= -device tpm-tis,tpmdev= and ./qemu-... -tpmdev help where the latter works similar to -soundhw ? and shows a list of available TPM backends (for

[Qemu-devel] [PATCH V23 7/7] Introduce --enable-tpm-passthrough configure option

2013-02-15 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Corey Bryant --- configure | 17 + 1 file changed, 17 insertions(+) diff --git a/configure b/configure index b7359aa..b4f0a82 100755 --- a/configure +++ b/configure @@ -227,6 +227,7 @@ seccomp="" glusterfs="" virtio_blk_data_plane=""

Re: [Qemu-devel] [PATCH V23 1/7] Support for TPM command line options

2013-02-15 Thread Corey Bryant
On 02/15/2013 02:39 PM, Stefan Berger wrote: This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=,id= -device tpm-tis,tpmdev= and ./qemu-... -tpmdev help where the latter works similar to -soundhw

[Qemu-devel] [PATCH V23 5/7] Add a TPM Passthrough backend driver implementation

2013-02-15 Thread Stefan Berger
>From Andreas Niederl's original posting with adaptations where necessary: This patch is based of off version 9 of Stefan Berger's patch series "QEMU Trusted Platform Module (TPM) integration" and adds a new backend driver for it. This patch adds a passthrough backend driver for passing command

[Qemu-devel] [PATCH V23 4/7] Build the TPM frontend code

2013-02-15 Thread Stefan Berger
Build the TPM frontend code that has been added so far. Signed-off-by: Stefan Berger Reviewed-by: Corey Bryant --- configure | 11 +++ tpm/Makefile.objs | 1 + 2 files changed, 12 insertions(+) diff --git a/configure b/configure index 8789324..b7359aa 100755 --- a/configure ++

[Qemu-devel] [PATCH V23 2/7] Add TPM (frontend) hardware interface (TPM TIS) to QEMU

2013-02-15 Thread Stefan Berger
This patch adds the main code of the TPM frontend driver, the TPM TIS interface, to QEMU. The code is largely based on the previous implementation for Xen but has been significantly extended to meet the standard's requirements, such as the support for changing of localities and all the functionalit

Re: [Qemu-devel] Undefined reference to 'ffs' when building for win64

2013-02-15 Thread Andreas Färber
Am 15.02.2013 19:29, schrieb Jacob Kroon: > On Fri, Feb 15, 2013 at 7:03 PM, Andreas Färber wrote: >> Am 06.02.2013 14:12, schrieb Jacob Kroon: >>> I'm trying to cross-build qemu for win64 on a Fedora 18/x86_64 system, >>> using all the necessary mingw64 packages from Fedora. Using latest >>> qemu

[Qemu-devel] [PATCH 31/41] qemu-file: check exit status when closing a pipe QEMUFile

2013-02-15 Thread Paolo Bonzini
This is what exec_close does. Move this to the underlying QEMUFile. Signed-off-by: Paolo Bonzini --- migration-exec.c |4 savevm.c |3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index 5dc7313..a2b5f8d 100644 --- a/

[Qemu-devel] [PATCH 23/41] Rename buffered_ to migration_

2013-02-15 Thread Paolo Bonzini
From: Juan Quintela This is consistent once that we have moved everything to migration.c Signed-off-by: Juan Quintela --- migration.c | 32 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/migration.c b/migration.c index 1f6fbdc..bfe6be1 10064

[Qemu-devel] [PATCH 33/41] qemu-file: simplify and export qemu_ftell

2013-02-15 Thread Paolo Bonzini
Force a flush when qemu_ftell is called. This simplifies the buffer magic (it also breaks qemu_ftell for input QEMUFiles, but we never use it). Signed-off-by: Paolo Bonzini --- savevm.c | 20 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/savevm.c b/savev

[Qemu-devel] [Bug 1019467] Re: Text mode cursor doesn't blink

2013-02-15 Thread Javier Donoso
I really need it implemented!! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1019467 Title: Text mode cursor doesn't blink Status in QEMU: New Bug description: Sorry for doing this, but QEMU

[Qemu-devel] [PATCH 41/41] migration: inline migrate_fd_close

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- migration.c | 14 ++ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/migration.c b/migration.c index b32dfc1..8fb2d2e 100644 --- a/migration.c +++ b/migration.c @@ -273,10 +273,10 @@ static void migrate_fd_cleanup(void *opaque)

[Qemu-devel] [PATCH 18/41] block-migration: add lock

2013-02-15 Thread Paolo Bonzini
Some state is shared between the block migration code and its AIO callbacks. Once block migration will run outside the iothread, the block migration code and the AIO callbacks will be able to run concurrently. Protect the critical sections with a separate lock. Do the same for completed_sectors,

[Qemu-devel] [PATCH 28/41] migration: use qemu_file_rate_limit consistently

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- migration.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 3de7cbf..8d35af5 100644 --- a/migration.c +++ b/migration.c @@ -616,7 +616,7 @@ static void *migration_thread(void *opaque) int64_t cur

[Qemu-devel] [PATCH 24/41] qemu-file: make qemu_fflush and qemu_file_set_error private again

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/migration/qemu-file.h |2 -- savevm.c |4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h index 5e0c287..46fc11d 100644 --- a/include/migration/q

[Qemu-devel] [PATCH 20/41] migration: run pending/iterate callbacks out of big lock

2013-02-15 Thread Paolo Bonzini
This makes it possible to do blocking writes directly to the socket, with no buffer in the middle. For RAM, only the migration_bitmap_sync() call needs the iothread lock. For block migration, it is needed by the block layer (including bdrv_drain_all and dirty bitmap access), but because some code

[Qemu-devel] [PATCH 29/41] migration: merge qemu_popen_cmd with qemu_popen

2013-02-15 Thread Paolo Bonzini
There is no reason for outgoing exec migration to do popen manually anymore (the reason used to be that we needed the FILE* to make it non-blocking). Use qemu_popen_cmd. Signed-off-by: Paolo Bonzini --- include/migration/qemu-file.h |1 - migration-exec.c | 10 -- sav

[Qemu-devel] [PATCH 34/41] migration: use QEMUFile for migration channel lifetime

2013-02-15 Thread Paolo Bonzini
As a start, use QEMUFile to store the destination and close it. qemu_get_fd gets a file descriptor that will be used by the write callbacks. Signed-off-by: Paolo Bonzini --- include/migration/migration.h |7 --- migration-exec.c | 21 ++--- migration-fd.c

[Qemu-devel] [PATCH 35/41] migration: use QEMUFile for writing outgoing migration data

2013-02-15 Thread Paolo Bonzini
Second, drop the file descriptor indirection, and write directly to the QEMUFile. Signed-off-by: Paolo Bonzini --- include/migration/migration.h |4 --- migration-exec.c | 12 --- migration-fd.c| 12 --- migration-tcp.c | 12 --

[Qemu-devel] [PATCH 11/41] migration: simplify error handling

2013-02-15 Thread Paolo Bonzini
Always use qemu_file_get_error to detect errors, since that is how QEMUFile itself drops I/O after an error occurs. There is no need to propagate and check return values all the time. Also remove the "complete" member, since we know that it is set (via migrate_fd_cleanup) only when the state chan

[Qemu-devel] [PATCH 04/41] migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*

2013-02-15 Thread Paolo Bonzini
This is useful, because it lets us keep the cancellation callbacks inside the big lock while pushing the others out. Signed-off-by: Paolo Bonzini --- savevm.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/savevm.c b/savevm.c index a8a53ef..4302903 100644

[Qemu-devel] [PATCH 01/41] migration: simplify while loop

2013-02-15 Thread Paolo Bonzini
Unify the goto around the loop, with the exit condition at the end of it. Both can be expressed as "while (ret >= 0)". Signed-off-by: Paolo Bonzini --- migration.c | 11 +-- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/migration.c b/migration.c index b1ebb01..5414060

[Qemu-devel] [PATCH 14/41] migration: cleanup migration (including thread) in the iothread

2013-02-15 Thread Paolo Bonzini
Perform final cleanup in a bottom half, and add joining the thread to the series of cleanup actions. Signed-off-by: Paolo Bonzini --- include/migration/migration.h |1 + migration.c | 37 +++-- 2 files changed, 20 insertions(+), 18 deletion

[Qemu-devel] [PATCH 12/41] migration: do not nest flushing of device data

2013-02-15 Thread Paolo Bonzini
Completion of migration is currently done with a "nested" loop that invokes buffered_flush: migrate_fd_completed is called by buffered_file_thread, which calls migrate_fd_cleanup, which calls buffered_close (via qemu_fclose), which flushes the buffer. Simplify this, by reusing the buffered_flush c

[Qemu-devel] [PATCH 10/41] migration: use qemu_file_set_error

2013-02-15 Thread Paolo Bonzini
Remove the return value of buffered_flush, pass it via the error code of s->file. Once this is done, the error can be retrieved simply via migrate_fd_close's call to qemu_fclose. Signed-off-by: Paolo Bonzini --- migration.c | 22 ++ 1 files changed, 6 insertions(+), 16 del

[Qemu-devel] [PATCH 32/41] qemu-file: add writable socket QEMUFile

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/migration/qemu-file.h |2 +- migration-tcp.c |2 +- migration-unix.c |2 +- savevm.c | 33 +++-- util/osdep.c |6 +- 5 files changed, 39 inse

Re: [Qemu-devel] (PAM stuff) reset doesn't work on OVMF + SeaBIOS CSM

2013-02-15 Thread Laszlo Ersek
On 02/14/13 23:24, David Woodhouse wrote: > On Thu, 2013-02-14 at 21:41 +0100, Laszlo Ersek wrote: >> I noticed that under OVMF + SeaBIOS CSM + your related patches for both, >> reset requested by the guest doesn't work as expected. The behavior is >> an infinite loop, with the following debug frag

[Qemu-devel] [PATCH 39/41] migration: move contents of migration_close to migrate_fd_cleanup

2013-02-15 Thread Paolo Bonzini
With this patch, the migration_file is not needed anymore. Signed-off-by: Paolo Bonzini --- migration.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/migration.c b/migration.c index 7c1671f..c9a5978 100644 --- a/migration.c +++ b/migration.c @@ -271,6

[Qemu-devel] [PATCH 08/41] qemu-file: temporarily expose qemu_file_set_error and qemu_fflush

2013-02-15 Thread Paolo Bonzini
Right now, migration cannot entirely rely on QEMUFile's automatic drop of I/O after an error, because it does its "real" I/O outside the put_buffer callback. To fix this until buffering is gone, expose qemu_file_set_error which we will use in buffered_flush. Similarly, buffered_flush is not a com

Re: [Qemu-devel] [PATCH 4/5] milkymist-softusb: Don't map RAM memory regions in the device itself

2013-02-15 Thread Peter Maydell
On 15 February 2013 16:18, Paolo Bonzini wrote: > Il 15/02/2013 17:17, Peter Maydell ha scritto: >> But these memory regions belong to this device -- we own them and >> they won't go away until the device is destroyed [which is never, >> as it happens, for this device.] More generally, if it's val

[Qemu-devel] [PATCH 22/41] migration: yay, buffering is gone

2013-02-15 Thread Paolo Bonzini
Buffering was needed because blocking writes could take a long time and starve other threads seeking to grab the big QEMU mutex. Now that all writes (except within _complete callbacks) are done outside the big QEMU mutex, we do not need buffering at all. Signed-off-by: Paolo Bonzini --- include

Re: [Qemu-devel] Undefined reference to 'ffs' when building for win64

2013-02-15 Thread Jacob Kroon
Hi Andreas, On Fri, Feb 15, 2013 at 7:03 PM, Andreas Färber wrote: > Hi Jacob, > > Am 06.02.2013 14:12, schrieb Jacob Kroon: >> I'm trying to cross-build qemu for win64 on a Fedora 18/x86_64 system, >> using all the necessary mingw64 packages from Fedora. Using latest >> qemu from git (5f876756c5

[Qemu-devel] [PATCH 06/41] qemu-file: pass errno from qemu_fflush via f->last_error

2013-02-15 Thread Paolo Bonzini
This is done by almost all callers of qemu_fflush, move the code directly to qemu_fflush. Signed-off-by: Paolo Bonzini --- savevm.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/savevm.c b/savevm.c index 4302903..a681177 100644 --- a/savevm.c

[Qemu-devel] [PATCH 09/41] migration: flush all data to fd when buffered_flush is called

2013-02-15 Thread Paolo Bonzini
Including data that resided in the QEMUFile's own buffer. Signed-off-by: Paolo Bonzini --- migration.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 0f3cb5d..609bd7c 100644 --- a/migration.c +++ b/migration.c @@ -525,6 +525,8 @@ static

[Qemu-devel] [PATCH 15/41] block-migration: remove variables that are never read

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block-migration.c | 13 - 1 files changed, 0 insertions(+), 13 deletions(-) diff --git a/block-migration.c b/block-migration.c index e6c917d..e72f322 100644 --- a/block-migration.c +++ b/block-migration.c @@ -50,7 +50,6 @@ typedef struct BlkMigDevSt

[Qemu-devel] [PATCH 21/41] migration: run setup callbacks out of big lock

2013-02-15 Thread Paolo Bonzini
Only the migration_bitmap_sync() call needs the iothread lock. Signed-off-by: Paolo Bonzini --- arch_init.c | 10 ++ block-migration.c |2 ++ include/migration/vmstate.h |2 +- migration.c |2 -- savevm.c|3 +

[Qemu-devel] [PATCH 26/41] migration: detect error before sleeping

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- migration.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index 5e2077e..63ecab5 100644 --- a/migration.c +++ b/migration.c @@ -644,6 +644,10 @@ static void *migration_thread(void *opaque)

[Qemu-devel] [PATCH 05/41] block-migration: remove useless calls to blk_mig_cleanup

2013-02-15 Thread Paolo Bonzini
Now that the cancel callback is called consistently for all errors, we can avoid doing its work in the other callbacks. Signed-off-by: Paolo Bonzini --- block-migration.c | 26 -- 1 files changed, 8 insertions(+), 18 deletions(-) diff --git a/block-migration.c b/block-

Re: [Qemu-devel] Undefined reference to 'ffs' when building for win64

2013-02-15 Thread Andreas Färber
Hi Jacob, Am 06.02.2013 14:12, schrieb Jacob Kroon: > I'm trying to cross-build qemu for win64 on a Fedora 18/x86_64 system, > using all the necessary mingw64 packages from Fedora. Using latest > qemu from git (5f876756c57c15f5e14d4136fc432b74f05f082b), I get an > error when linking "qemu-img.exe"

[Qemu-devel] [PATCH 37/41] migration: small changes around rate-limiting

2013-02-15 Thread Paolo Bonzini
This patch extracts a few small changes from the next patch, which are unrelated to adding generic rate-limiting functionality to QEMUFile. Make migration_set_rate_limit a simple accessor, and use qemu_file_set_rate_limit consistently. Also fix a typo where INT_MAX should have been SIZE_MAX. Sig

[Qemu-devel] [PATCH 02/41] migration: always use vm_stop_force_state

2013-02-15 Thread Paolo Bonzini
vm_stop_force_state does: if (runstate_is_running()) { vm_stop(state); } else { runstate_set(state); } migration.c does: if (runstate_is_running()) { vm_stop(state); } else { vm_stop_force_state(state); } The code run is the same even if w

[Qemu-devel] [PATCH 19/41] migration: reorder SaveVMHandlers members

2013-02-15 Thread Paolo Bonzini
This groups together the callbacks that later will have similar locking rules. Signed-off-by: Paolo Bonzini --- include/migration/vmstate.h |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index f27276c..622

[Qemu-devel] [PATCH 16/41] block-migration: small preparatory changes for locking

2013-02-15 Thread Paolo Bonzini
Some small changes that will simplify the positioning of lock/unlock primitives Signed-off-by: Paolo Bonzini --- block-migration.c | 26 +++--- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/block-migration.c b/block-migration.c index e72f322..fe3c040 10064

[Qemu-devel] [PATCH 13/41] migration: prepare to access s->state outside critical sections

2013-02-15 Thread Paolo Bonzini
Accessing s->state outside the big QEMU lock will simplify a bit the locking/unlocking of the iothread lock. Signed-off-by: Paolo Bonzini --- migration.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/migration.c b/migration.c index b0b5578..a7f619b

[Qemu-devel] [PATCH 17/41] block-migration: document usage of state across threads

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block-migration.c | 23 ++- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/block-migration.c b/block-migration.c index fe3c040..21842b2 100644 --- a/block-migration.c +++ b/block-migration.c @@ -43,18 +43,24 @@ #endif typ

[Qemu-devel] [PATCH 40/41] migration: eliminate s->migration_file

2013-02-15 Thread Paolo Bonzini
The indirection is useless now. Backends can open s->file directly. Signed-off-by: Paolo Bonzini --- include/migration/migration.h |2 - migration-exec.c |4 +- migration-fd.c|2 +- migration-tcp.c |4 +- migration-unix.c |

[Qemu-devel] [PATCH 07/41] migration: use qemu_file_set_error to pass error codes back to qemu_savevm_state

2013-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h |6 +++--- savevm.c| 44 ++-- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 1d9599e..28a9221 100644 ---

[Qemu-devel] [PATCH 36/41] migration: use qemu_ftell to compute bandwidth

2013-02-15 Thread Paolo Bonzini
Prepare for when s->bytes_xfer will be removed. Signed-off-by: Paolo Bonzini --- migration.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/migration.c b/migration.c index 68d47cd..d636c59 100644 --- a/migration.c +++ b/migration.c @@ -575,6 +575,7 @@ static void *mi

[Qemu-devel] [PATCH 30/41] qemu-file: fsync a writable stdio QEMUFile

2013-02-15 Thread Paolo Bonzini
This is what fd_close does. Prepare for switching to a QEMUFile. Signed-off-by: Paolo Bonzini --- savevm.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index d7c2559..261d17a 100644 --- a/savevm.c +++ b/savevm.c @@ -256,6 +256,24

[Qemu-devel] [PATCH 38/41] migration: move rate limiting to QEMUFile

2013-02-15 Thread Paolo Bonzini
Rate limiting is now simply a byte counter; client call qemu_file_rate_limit() manually to determine if they have to exit. So it is possible and simple to move the functionality to QEMUFile. This makes the remaining functionality of s->file redundant; in the next patch we can remove it and write d

[Qemu-devel] [PATCH 25/41] migration: eliminate last_round

2013-02-15 Thread Paolo Bonzini
We will go around the loop exactly once after setting last_round. Eliminate the variable altogether. Signed-off-by: Paolo Bonzini --- migration.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index bfe6be1..5e2077e 100644 --- a/migra

[Qemu-devel] [PATCH 27/41] migration: remove useless qemu_file_get_error check

2013-02-15 Thread Paolo Bonzini
migration_put_buffer is never called if there has been an error. Signed-off-by: Paolo Bonzini --- migration.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index 63ecab5..3de7cbf 100644 --- a/migration.c +++ b/migration.c @@ -512,12 +512,

[Qemu-devel] [PATCH 03/41] migration: move more error handling to migrate_fd_cleanup

2013-02-15 Thread Paolo Bonzini
The next patch will add more cases where qemu_savevm_state_cancel needs to be called; prepare for that already, the function can be called twice with no ill effect. Signed-off-by: Paolo Bonzini --- migration.c | 16 ++-- 1 files changed, 10 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH 00/41] Migration cleanups and latency improvements

2013-02-15 Thread Paolo Bonzini
This series does many of the improvements that the migration thread promised. It removes buffering, lets a large amount of code run outside the big QEMU lock, and removes some duplication between incoming and outgoing migration. Patches 1 to 7 are simple cleanups. Patches 8 to 14 simplify the li

Re: [Qemu-devel] [PATCH for-1.4? qom-cpu-next 1/9] target-s390x: Drop unused cpu_s390x_close() prototype

2013-02-15 Thread Alexander Graf
On 15.02.2013, at 18:44, Andreas Färber wrote: > Alex, > > Am 02.02.2013 12:57, schrieb Andreas Färber: >> It was never implemented. >> >> Signed-off-by: Andreas Färber > > Too late for 1.4 now obviously. ;) > > Do you want to queue this on s390-next (i.e.,do you plan an early pull)? > Or sh

Re: [Qemu-devel] [PATCH for-1.4? qom-cpu-next 1/9] target-s390x: Drop unused cpu_s390x_close() prototype

2013-02-15 Thread Andreas Färber
Alex, Am 02.02.2013 12:57, schrieb Andreas Färber: > It was never implemented. > > Signed-off-by: Andreas Färber Too late for 1.4 now obviously. ;) Do you want to queue this on s390-next (i.e.,do you plan an early pull)? Or should I put it in qom-cpu-next? The remainder of the series is waiti

Re: [Qemu-devel] [PATCH qom-cpu-next] spapr_hcall: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-15 Thread Andreas Färber
Am 15.02.2013 17:44, schrieb Alexander Graf: > > On 15.02.2013, at 16:49, Andreas Färber wrote: > >> The helper functions all access ppc-specific fields only so don't bother >> to change arguments to PowerPCCPU and use env_ptr instead. >> >> No functional change. >> >> Signed-off-by: Andreas Färb

Re: [Qemu-devel] [PATCH qom-cpu-next] ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-15 Thread Andreas Färber
Am 15.02.2013 18:04, schrieb Alexander Graf: > > On 15.02.2013, at 17:58, Andreas Färber wrote: > >> Am 15.02.2013 17:54, schrieb Alexander Graf: >>> >>> On 15.02.2013, at 17:51, Andreas Färber wrote: >>> Potentially env could be NULL whereas cpu would still be valid and correspond to a

Re: [Qemu-devel] [PATCH qom-cpu-next] e500: Replace open-coded loop with qemu_get_cpu()

2013-02-15 Thread Andreas Färber
Am 15.02.2013 17:45, schrieb Alexander Graf: > > On 15.02.2013, at 15:35, Andreas Färber wrote: > >> Am 15.02.2013 15:29, schrieb Alexander Graf: >>> >>> On 15.02.2013, at 15:25, Andreas Färber wrote: >>> Since we still need env for ppc-specific fields, obtain it via the new env_ptr fie

[Qemu-devel] [Bug 1126369] [NEW] qemu-img snapshot -c is unreasonably slow

2013-02-15 Thread Stefan Hajnoczi
Public bug reported: Something fishy is going on with qcow2 internal snapshot creation times. I don't know if this is a regression because I haven't used internal snapshots in the past. QEMU 1.4-rc2: $ qemu-img create -f qcow2 test.qcow2 -o size=50G,preallocation=metadata $ time qemu-img snapshot

[Qemu-devel] fixing qemu busy wait

2013-02-15 Thread Orr Dvory
when debugging with qemu(user mode), qemu waits in infinite loop to read a signal from gdb (when it waits on breakpoint for example). I added sleeps to reduce the cpu usage from 100% to about ~0%. qemu-busy-wait.patch Description: Binary data

Re: [Qemu-devel] [PATCH qom-cpu-next 0/6] QOM CPUState, part 8: CPU_COMMON continued

2013-02-15 Thread Andreas Färber
Am 14.02.2013 18:49, schrieb Andreas Färber: > Am 01.02.2013 13:38, schrieb Andreas Färber: >> Hello, >> >> This series moves more fields from CPU_COMMON / CPU*State to CPUState, >> allowing access from target-independent code. >> >> The final patch in this series will help solve some issues (in pa

Re: [Qemu-devel] [PATCH qom-cpu-next] ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-15 Thread Alexander Graf
On 15.02.2013, at 17:58, Andreas Färber wrote: > Am 15.02.2013 17:54, schrieb Alexander Graf: >> >> On 15.02.2013, at 17:51, Andreas Färber wrote: >> >>> Potentially env could be NULL whereas cpu would still be valid and >>> correspond to a previous env. >>> >>> Wrapping this in qemu_get_cpu()

Re: [Qemu-devel] [PATCH qom-cpu-next] ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-15 Thread Andreas Färber
Am 15.02.2013 17:54, schrieb Alexander Graf: > > On 15.02.2013, at 17:51, Andreas Färber wrote: > >> Potentially env could be NULL whereas cpu would still be valid and >> correspond to a previous env. >> >> Wrapping this in qemu_get_cpu(), env is no longer needed, so simplify >> code that existed

Re: [Qemu-devel] [PATCH qom-cpu-next] e500: Replace open-coded loop with qemu_get_cpu()

2013-02-15 Thread Alexander Graf
On 15.02.2013, at 15:35, Andreas Färber wrote: > Am 15.02.2013 15:29, schrieb Alexander Graf: >> >> On 15.02.2013, at 15:25, Andreas Färber wrote: >> >>> Since we still need env for ppc-specific fields, obtain it via the new >>> env_ptr fields to avoid "cpu" name conflicts between CPUState and

Re: [Qemu-devel] [PATCH qom-cpu-next] ppce500_spin: Replace open-coded CPU loop with qemu_get_cpu()

2013-02-15 Thread Alexander Graf
On 15.02.2013, at 17:51, Andreas Färber wrote: > Potentially env could be NULL whereas cpu would still be valid and > correspond to a previous env. > > Wrapping this in qemu_get_cpu(), env is no longer needed, so simplify > code that existed before 55e5c2850293547203874098f7cec148ffd12dfa. > >

  1   2   >