Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2012-12-13 Thread Paolo Bonzini
> > > > I think distros that used to ship qemu-kvm should just change > > > > the default just like for the acpi_piix4.c change. > > > > > > Maybe we could provide a --with-qemu-kvm-compat configure flag to > > > them? I like this. > > I think that defeats the purpose of a single binary. > > > >

[Qemu-devel] [PATCH 1/5] pixman: fix version check for PIXMAN_TYPE_BGRA

2012-12-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- qemu-pixman.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-pixman.c b/qemu-pixman.c index e46e180..79e175b 100644 --- a/qemu-pixman.c +++ b/qemu-pixman.c @@ -21,7 +21,7 @@ int qemu_pixman_get_type(int rshift, int gshift, int bshif

[Qemu-devel] [PATCH 5/5] console: clip update rectangle

2012-12-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- console.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/console.h b/console.h index 50a0512..edb1950 100644 --- a/console.h +++ b/console.h @@ -229,6 +229,16 @@ static inline void unregister_displaychangelistener(DisplayState

Re: [Qemu-devel] [PATCH 1/2] pixman: require 0.16.4 as minimum version

2012-12-13 Thread Gerd Hoffmann
Hi, >> If you send me a fix for 6e72719e721a40fe1224701ca10edc1caf0cd708 >> I'll go revert 288fa40736e6eb63132d01aa6dc21ee831b796ae > > 6e72719 is perfectly sane, because it brings consistency into the > file. Now both users of PIXMAN_TYPE_BGRA are guarded by the same > #ifdef. Both users? He

Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed

2012-12-13 Thread Paolo Bonzini
> > We technically should save the addresses and sizes too. It makes > > it a heck of a lot safer then re-reading guest memory since we do some > > validation on the size of the sg elements. > > Not really. > > The guest puts the descriptors in the ring and leaves them there until > the device

Re: [Qemu-devel] [PATCH 1/4] virtio-serial: use uint32_t to count ports

2012-12-13 Thread Rob Landley
Speaking of virtio-serial, is there a way to get virtio serial ports to attach to qemu's stdin/stdout the way other serial ports can (and which is the default with --nographic for conventional serial ports), or do you still have to make a magic char device on the host? I never understood wh

[Qemu-devel] [PATCH 1/2] cutils:change strtosz_suffix_unit function

2012-12-13 Thread liguang
if value to be translated is larger than INT64_MAX, this function will not be convenient for caller to be aware of it, so change a little for this. Signed-off-by: liguang --- cutils.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/cutils.c b/cutils.c index 4f0692f..da

[Qemu-devel] [PATCH 2/2] qemu-img:report size overflow error message

2012-12-13 Thread liguang
qemu-img will complain when qcow or qcow2 size overflow for 64 bits, report the right message in this condition. before change: qemu-img: Invalid image size specified! You may use k, M, G or T suffixes for qemu-img: kilobytes, megabytes, gigabytes and terabytes. after change: qemu-img: Image size

Re: [Qemu-devel] [PATCH 0/3] chardev/spice: fix missing spice mouse after migration

2012-12-13 Thread Amit Shah
On (Thu) 13 Dec 2012 [08:25:08], Anthony Liguori wrote: > Amit Shah writes: > > > On (Wed) 28 Nov 2012 [11:05:37], Alon Levy wrote: > >> Adds a new char device backend callback to check connectedness, implemented > >> for virtio console, and used by spice-char-dev in post migration. > >> > >> Is

Re: [Qemu-devel] [PATCHv2] virtio: verify that all outstanding buffers are flushed

2012-12-13 Thread Rusty Russell
Anthony Liguori writes: > Yes, take a look at the series I sent out that scrubs all of this to > just send the index and the addresses of the element. > > We technically should save the addresses and sizes too. It makes it a > heck of a lot safer then re-reading guest memory since we do some > va

Re: [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-13 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: > >> Anthony Liguori writes: >>> We were memcpy()'ing a structure to the wire :-/ Since savevm really >>> only works on x86 today, lets just declare that this element is sent >>> over the wire as a little endian value in order to fix the bitness.

[Qemu-devel] [PATCH 4/6] openpic: don't crash on a register access without a CPU context

2012-12-13 Thread Scott Wood
If we access a register via the QEMU memory inspection commands (e.g. "xp") rather than from guest code, we won't have a CPU context. Gracefully fail to access the register in that case, rather than crashing. Signed-off-by: Scott Wood --- hw/openpic.c | 16 +++- 1 file changed, 15

[Qemu-devel] [PATCH 2/6] openpic: remove pcsr (CPU sensitivity register)

2012-12-13 Thread Scott Wood
I could not find this register in any spec (FSL, IBM, or OpenPIC) and the code doesn't do anything with it but initialize, save, or restore it. Signed-off-by: Scott Wood --- hw/openpic.c |4 1 file changed, 4 deletions(-) diff --git a/hw/openpic.c b/hw/openpic.c index 7e72c29..57218f3

[Qemu-devel] [PATCH 5/6] openpic: BRR1 is not a CPU-specific register.

2012-12-13 Thread Scott Wood
It's in the address range that normally contains a magic redirection to the CPU-specific region of the curretn CPU, but it isn't actually a per-CPU register. On real hardware BRR1 shows up only at 0x4, not at 0x6 or other non-magic per-CPU areas. Plus, this makes it possible to read the r

Re: [Qemu-devel] new pc-bios/bios.bin breaks freebsd booting

2012-12-13 Thread Brad Smith
On Thu, Dec 13, 2012 at 05:25:50AM -0500, Brad Smith wrote: > On Wed, Dec 12, 2012 at 06:47:58PM +0100, Paolo Bonzini wrote: > > Il 12/12/2012 17:04, Luigi Rizzo ha scritto: > > > I am not sure if it has been reported already but this commit > > > > > > http://git.qemu.org/?p=qemu.git;a=commitdiff

[Qemu-devel] [PATCH 0/6] openpic: first batch of cleanups and minor fixes

2012-12-13 Thread Scott Wood
There'll be more to come, but here's an initial set of cleanups and fixes for openpic. This is based on the ppc-mpic-cleanup branch in git://repo.or.cz/qemu/agraf.git Scott Wood (6): openpic: symbolicize some magic numbers openpic: remove pcsr (CPU sensitivity register) openpic: support lar

[Qemu-devel] [PATCH 3/6] openpic: support large vectors on FSL mpic

2012-12-13 Thread Scott Wood
Previously only the spurious vector was sized appropriately to the openpic model. Also, instances of "IPVP_VECTOR(opp->spve)" were replace with just "opp->spve", as opp->spve is already just a vector and not an IVPR. Signed-off-by: Scott Wood --- hw/openpic.c | 22 ++ 1 fi

[Qemu-devel] [PATCH 1/6] openpic: symbolicize some magic numbers

2012-12-13 Thread Scott Wood
Deefine symbolic names for some register bits, and use some that have already been defined. Also convert some register values from hex to decimal when it improves readability. IPVP_PRIORITY_MASK is corrected from (0x1F << 16) to (0xF << 16), in conjunction with making wider use of the symbolic na

[Qemu-devel] [PATCH 6/6] openpic: s/opp->nb_irqs -1/opp->nb_cpus - 1/

2012-12-13 Thread Scott Wood
"opp->nb_irqs-1" would have been a minor coding style error, but putting in one space but not the other makes it look confusingly like a numeric literal "-1". Signed-off-by: Scott Wood --- hw/openpic.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/openpic.c b/hw/o

Re: [Qemu-devel] Is there anyone kindly help me to create a qemu wiki account?

2012-12-13 Thread Wei-Ren Chen
On Thu, Dec 13, 2012 at 08:22:06PM +0800, Pan Xueshu wrote: > Because it has been disabled to create account on the wiki page. Thanks > very much! From IRC, I guess kwolf already did this for you? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, A

Re: [Qemu-devel] [PATCH v4 1/3] target-i386:define name of breakpoint bit in dr7

2012-12-13 Thread li guang
Hi, any comment on this version? 在 2012-12-10一的 10:22 +0800,liguang写道: > Signed-off-by: liguang > --- > target-i386/cpu.h |7 +++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/target-i386/cpu.h b/target-i386/cpu.h > index 90ef1ff..29245d1 100644 > --- a/target-i3

Re: [Qemu-devel] [PATCH] kvm: do not flush after deleting gsi

2012-12-13 Thread Asias He
Hello Jan, On 12/13/2012 11:34 PM, Jan Kiszka wrote: > On 2012-12-13 05:55, Asias He wrote: >> Hello Michael, >> >> On 12/12/2012 06:48 PM, Michael S. Tsirkin wrote: >>> Deleting a GSI isn't necessary: it is enough >>> to stop using it. Delay flush until an entry is used. >>> >>> Signed-off-by: Mi

Re: [Qemu-devel] [PATCH v2 01/17] error: introduce handle_error

2012-12-13 Thread Eric Blake
On 12/13/2012 08:40 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > error.c | 8 > error.h | 6 ++ > 2 files changed, 14 insertions(+) > > > +/** > + * Print an error object as pretty string to current monitor or on stderr, > then > + * free the errot object. s/er

Re: [Qemu-devel] [PATCH 03/20] block: implement dirty bitmap using HBitmap

2012-12-13 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > This actually uses the dirty bitmap in the block layer, and converts > mirroring to use an HBitmapIter. > > Reviewed-by: Laszlo Ersek (except block/mirror.c parts) > Signed-off-by: Paolo Bonzini > --- > Makefile.objs | 2 +- > block.c| 94

Re: [Qemu-devel] [PATCH v2] tcg: Add TCGV_IS_UNUSED_*

2012-12-13 Thread Andreas Färber
Am 07.12.2012 22:07, schrieb Richard Henderson: > Cc: Aurelien Jarno > Signed-off-by: Richard Henderson Reviewed-by: Andreas Färber Looks fine to me. The only remark I have is that for a use case of mine (writing a new target) I found it helpful to distinguish between tl and i32/i64, which req

Re: [Qemu-devel] [PATCH 2/3] qtest: extend qtest_qmp() to fill in the reply

2012-12-13 Thread Andreas Färber
Am 13.12.2012 23:02, schrieb Jason Baron: > diff --git a/tests/Makefile b/tests/Makefile > index b60f0fb..30a101d 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -74,10 +74,10 @@ tests/test-qmp-input-strict$(EXESUF): > tests/test-qmp-input-strict.o $(test-qapi- > tests/test-qmp-commands

Re: [Qemu-devel] [PATCH 02/20] add hierarchical bitmap data type and test cases

2012-12-13 Thread Eric Blake
On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > HBitmaps provides an array of bits. The bits are stored as usual in an > array of unsigned longs, but HBitmap is also optimized to provide fast > iteration over set bits; going from one bit to the next is O(logB n) > worst case, with B = sizeof(long)

[Qemu-devel] [MIPS Malta] Wrong relative jump in the YAMON print subroutine

2012-12-13 Thread Jakub Jermar
Hello, there appears to be a bug in the hand-written machine code which causes the YAMON print subroutine to jump to a wrong location after printing the first character. In hw/mips_malta.c, line 619, there is: stl_raw(p++, 0x08000205);/* j 814 */ which results

[Qemu-devel] buildbot failure in qemu on default_x86_64_fedora16

2012-12-13 Thread qemu
The Buildbot has detected a new failure on builder default_x86_64_fedora16 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_x86_64_fedora16/builds/461 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_fedor

[Qemu-devel] [Bug 1087114] Re: assertion "QLIST_EMPTY(&bs->tracked_requests)" failed

2012-12-13 Thread Brad Smith
So what is causing this is this commit... c166cb72f1676855816340666c3b618beef4b976 semaphore: implement fallback counting semaphores with mutex+condvar OpenBSD and Darwin do not have sem_timedwait. Implement a fallback for them. If I remove that, since OpenBSD 5.2/-current has sem_timedwait, th

Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2012-12-13 Thread Eduardo Habkost
On Thu, Dec 13, 2012 at 03:35:03PM -0600, Anthony Liguori wrote: > Eduardo Habkost writes: > > > On Thu, Dec 13, 2012 at 09:35:13AM +0100, Paolo Bonzini wrote: > >> Il 12/12/2012 23:39, Marcelo Tosatti ha scritto: > >> > > >> > To allow migration from qemu-kvm-1.2, where cirrus device has 16 >

[Qemu-devel] buildbot failure in qemu on default_x86_64_rhel5

2012-12-13 Thread qemu
The Buildbot has detected a new failure on builder default_x86_64_rhel5 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel5/builds/450 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_rhel5 Buil

[Qemu-devel] [PATCH 3/3] qtest: add migrate-test

2012-12-13 Thread Jason Baron
From: Jason Baron Tests a single 'pc' machine migration on the same host. Currently, the test fail for q35 since the ahci controller doesn't yet migrate. Will add support for q35 once the ahci support is accepted. Would be nice to extend the test matrix to various machine versions, but that requ

Re: [Qemu-devel] [PATCH 1/2] hw: add isa-debug-exit device v3

2012-12-13 Thread Hervé Poussineau
Andreas Färber a écrit : Am 13.12.2012 15:48, schrieb Lucas Meneghel Rodrigues: From: Gerd Hoffmann When present it makes qemu exit on any write. Mapped to port 0x501 by default. Without this patch Anthony doesn't allow me to remove the bochs bios debug ports because his test suite uses this.

[Qemu-devel] [PATCH 0/3] qtest: add migration testing

2012-12-13 Thread Jason Baron
Hi, Add a basic qtest for migration testing. Currently, it just tests a migrate of machine 'pc' on the same host. Would be nice to extend to multiple machine versions, but that requires multiple binaries, which could be done, but is perhaps a bit awkward from qtest? Testing different machine versi

[Qemu-devel] [PATCH 1/3] qtest: Enable creation of multiple qemu instances

2012-12-13 Thread Jason Baron
From: Jason Baron Currently, the qtest harness can only spawn 1 qemu instance at a time because the parent pid is used to create the socket files. Use the child pid instead, so we can remove that limitation. Signed-off-by: Jason Baron --- tests/libqtest.c | 31 +--

[Qemu-devel] [PATCH 2/3] qtest: extend qtest_qmp() to fill in the reply

2012-12-13 Thread Jason Baron
From: Jason Baron Introduce: Add void qtest_qmp_resp(QTestState *s, QString *resp, const char *fmt, ...) which allows a response string to be filled in. Signed-off-by: Jason Baron --- tests/Makefile |6 +++--- tests/libqtest.c | 17 ++--- tests/libqtest.h |4 +++- 3 f

Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2012-12-13 Thread Anthony Liguori
Eduardo Habkost writes: > On Thu, Dec 13, 2012 at 09:35:13AM +0100, Paolo Bonzini wrote: >> Il 12/12/2012 23:39, Marcelo Tosatti ha scritto: >> > >> > To allow migration from qemu-kvm-1.2, where cirrus device has 16 megabytes >> > of RAM. >> > >> > Signed-off-by: Marcelo Tosatti >> >> A simil

Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2012-12-13 Thread Eduardo Habkost
On Thu, Dec 13, 2012 at 09:35:13AM +0100, Paolo Bonzini wrote: > Il 12/12/2012 23:39, Marcelo Tosatti ha scritto: > > > > To allow migration from qemu-kvm-1.2, where cirrus device has 16 megabytes > > of RAM. > > > > Signed-off-by: Marcelo Tosatti > > A similar patch would be needed for all mac

Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2012-12-13 Thread Anthony Liguori
Marcelo Tosatti writes: > To allow migration from qemu-kvm-1.2, where cirrus device has 16 megabytes > of RAM. > > Signed-off-by: Marcelo Tosatti > > diff --git a/hw/pc_piix.c b/hw/pc_piix.c > index 19e342a..ead4b6b 100644 > --- a/hw/pc_piix.c > +++ b/hw/pc_piix.c > @@ -347,6 +347,26 @@ static Q

Re: [Qemu-devel] [PATCH v2] tcg: Add TCGV_IS_UNUSED_*

2012-12-13 Thread Richard Henderson
Ping? r~ On 12/07/2012 01:07 PM, Richard Henderson wrote: > Cc: Aurelien Jarno > Signed-off-by: Richard Henderson > --- > tcg/tcg-op.h | 2 ++ > tcg/tcg.h| 3 +++ > 2 files changed, 5 insertions(+) > > Changes since v1: > * Add tl-sized TCGV_IS_UNUSED to tcg-op.h. > > > r~ > > > di

Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2012-12-13 Thread Marcelo Tosatti
On Thu, Dec 13, 2012 at 09:35:13AM +0100, Paolo Bonzini wrote: > Il 12/12/2012 23:39, Marcelo Tosatti ha scritto: > > > > To allow migration from qemu-kvm-1.2, where cirrus device has 16 megabytes > > of RAM. > > > > Signed-off-by: Marcelo Tosatti > > A similar patch would be needed for all mac

Re: [Qemu-devel] [PULL] pci,net,misc infrastructure

2012-12-13 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > The following changes since commit 1c97e303d4ea80a2691334b0febe87a50660f99d: > > Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2012-12-10 > 08:35:15 -0600) > > are available in the git repository at: > > > git://git.kernel.org/pub/scm/virt/kvm/m

Re: [Qemu-devel] [RFC PATCH] Allow building without graphics support

2012-12-13 Thread Scott Wood
On 12/13/2012 01:16:48 PM, Scott Wood wrote: On 12/13/2012 12:58:19 PM, Stefan Weil wrote: A cross prefix which starts with an absolute path (like in your scenario) justs requires adding `dirname "${cross_prefix}"` to PATH and passing `basename "${cross_prefix%-}" to the pixman configure. Ri

Re: [Qemu-devel] [RFC PATCH] Allow building without graphics support

2012-12-13 Thread Scott Wood
On 12/13/2012 12:58:19 PM, Stefan Weil wrote: Am 13.12.2012 16:53, schrieb Scott Wood: On 12/13/2012 12:31:14 AM, Stefan Weil wrote: Indeed, --cross-prefixdoes not support absolute path names. I assume that the executables in /home/scott/fsl/tc/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/binar

Re: [Qemu-devel] [RFC PATCH] Allow building without graphics support

2012-12-13 Thread Stefan Weil
Am 13.12.2012 16:53, schrieb Scott Wood: On 12/13/2012 12:31:14 AM, Stefan Weil wrote: Am 13.12.2012 01:48, schrieb Scott Wood: It doesn't seem to like my --cross-prefix being a full path rather than being a recognized target pattern: checking host system type... Invalid configuration `/home

Re: [Qemu-devel] [PATCH 1/2] hw: add isa-debug-exit device v5

2012-12-13 Thread Andreas Färber
Am 13.12.2012 18:25, schrieb Lucas Meneghel Rodrigues: > From: Gerd Hoffmann > > When present it makes qemu exit on any write. > Mapped to port 0x501 by default. > > Without this patch Anthony doesn't allow me to > remove the bochs bios debug ports because his > test suite uses this. > > Change

[Qemu-devel] [PATCH 0/2] Add pc-testdev to qemu v7

2012-12-13 Thread Lucas Meneghel Rodrigues
These two patches introduce: 1) A ISA debugexit port device, that when written, causes qemu to exit with the exit code passed as parameter. 2) A port of the existing testdev present on qemu-kvm to qemu I took Gerd's recent patch and modified it to include the access-size property, as well a

[Qemu-devel] [PATCH 1/2] hw: add isa-debug-exit device v5

2012-12-13 Thread Lucas Meneghel Rodrigues
From: Gerd Hoffmann When present it makes qemu exit on any write. Mapped to port 0x501 by default. Without this patch Anthony doesn't allow me to remove the bochs bios debug ports because his test suite uses this. Changes from v4: * Fixed rebase mistake... again. Changes from v3: * Added a s

[Qemu-devel] [PATCH 2/2] hw: Add test device for unittests execution v8

2012-12-13 Thread Lucas Meneghel Rodrigues
Add a test device which supports the kvmctl ioports, so one can run the KVM unittest suite. Intended Usage: qemu-system-x86_64\ -device pc-testdev -serial stdio \ -device isa-debugexit,iobase=0xf4,access-size=4 \ -kernel /path/to/kvm/unittests/msr.flat Where msr.flat is one of the KVM unittests,

[Qemu-devel] [PATCH 04/43] aio: Get rid of qemu_aio_flush()

2012-12-13 Thread Kevin Wolf
There are no remaining users, and new users should probably be using bdrv_drain_all() in the first place. Signed-off-by: Kevin Wolf --- async.c|5 - block/commit.c |2 +- block/mirror.c |2 +- block/stream.c |2 +- main-loop.c|5 - qemu-aio.h |9 ++

[Qemu-devel] [PATCH v2 12/17] savevm: add error parameter to qemu_loadvm_state()

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- migration.c | 8 savevm.c| 39 +++ sysemu.h| 3 ++- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/migration.c b/migration.c index 3ae1db0..4c2d2d3 100644 --- a/migration.c +++ b/migration.c @

[Qemu-devel] [PATCH v2 08/17] savevm: add error parameter to qemu_savevm_state_begin()

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- migration.c | 2 +- savevm.c| 7 +-- sysemu.h| 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/migration.c b/migration.c index 73ce170..bf51a07 100644 --- a/migration.c +++ b/migration.c @@ -451,7 +451,7 @@ void migrate_fd_connect(

[Qemu-devel] [PATCH 2/2] hw: Add test device for unittests execution v7

2012-12-13 Thread Lucas Meneghel Rodrigues
Add a test device which supports the kvmctl ioports, so one can run the KVM unittest suite. Intended Usage: qemu-system-x86_64\ -device pc-testdev -serial stdio \ -device isa-debugexit,iobase=0xf4,access-size=4 \ -kernel /path/to/kvm/unittests/msr.flat Where msr.flat is one of the KVM unittests,

Re: [Qemu-devel] [PATCH 1/2] omap_i2c: Clear SBD bit in STAT register on DATA read

2012-12-13 Thread Peter Maydell
On 13 December 2012 17:04, Andreas Färber wrote: > Am 13.12.2012 15:45, schrieb Peter Maydell: >> On 12 December 2012 06:29, Andreas Färber wrote: >>> After reading a single-byte I2C response such as the tmp105's response >>> to 0x01 0x00, the SBD status bit would not get reset on next read, stil

[Qemu-devel] [PATCH 13/43] block: bdrv_img_create(): add Error ** argument

2012-12-13 Thread Kevin Wolf
From: Luiz Capitulino This commit adds an Error ** argument to bdrv_img_create() and set it appropriately on error. Callers of bdrv_img_create() pass NULL for the new argument and still rely on bdrv_img_create()'s return value. Next commits will change callers to use the Error object instead. S

[Qemu-devel] [PATCH 05/43] block: Factor out bdrv_open_flags

2012-12-13 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c | 35 +-- 1 files changed, 21 insertions(+), 14 deletions(-) diff --git a/block.c b/block.c index c7a1a3c..c4f5566 100644 --- a/block.c +++ b/block.c @@ -634,6 +634,26 @@ void bdrv_disable_copy_on_read(BlockDriverState *bs)

[Qemu-devel] [PATCH 1/2] hw: add isa-debug-exit device v4

2012-12-13 Thread Lucas Meneghel Rodrigues
From: Gerd Hoffmann When present it makes qemu exit on any write. Mapped to port 0x501 by default. Without this patch Anthony doesn't allow me to remove the bochs bios debug ports because his test suite uses this. Changes from v3: * Added a short description * Added a copyright notice * Adde

[Qemu-devel] [PATCH 0/2] Add pc-testdev to qemu v6

2012-12-13 Thread Lucas Meneghel Rodrigues
These two patches introduce: 1) A ISA debugexit port device, that when written, causes qemu to exit with the exit code passed as parameter. 2) A port of the existing testdev present on qemu-kvm to qemu I took Gerd's recent patch and modified it to include the access-size property, as well a

[Qemu-devel] [PATCH 23/43] qemu-option: opt_set(): split it up into more functions

2012-12-13 Thread Kevin Wolf
From: Dong Xu Wang The new functions are opts_accepts_any() and find_desc_by_name(), which are also going to be used by qemu_opts_validate() (see next commit). This also makes opt_set() slightly more readable. Signed-off-by: Luiz Capitulino Signed-off-by: Dong Xu Wang Signed-off-by: Kevin Wol

[Qemu-devel] [PATCH 10/43] raw-posix: inline paio_ioctl into hdev_aio_ioctl

2012-12-13 Thread Kevin Wolf
From: Paolo Bonzini clang now warns about an unused function: CCblock/raw-posix.o block/raw-posix.c:707:26: warning: unused function paio_ioctl [-Wunused-function] static BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd, ^ 1 warning generated. because the

[Qemu-devel] [PATCH v2 17/17] vm-snapshot-save: add force parameter

2012-12-13 Thread Pavel Hrdina
HMP command "savevm" now takes extra optional force parameter to specifi whether replace existing snapshot or not. QMP command "vm-snapshot-save" has also extra optional force parameter and name parameter isn't optional anymore. Signed-off-by: Pavel Hrdina --- hmp-commands.hx | 16

[Qemu-devel] [PATCH 0/2] Add pc-testdev to qemu v6

2012-12-13 Thread Lucas Meneghel Rodrigues
These two patches introduce: 1) A ISA debugexit port device, that when written, causes qemu to exit with the exit code passed as parameter. 2) A port of the existing testdev present on qemu-kvm to qemu I took Gerd's recent patch and modified it to include the access-size property, as well a

[Qemu-devel] [PATCH 28/43] create new function: qemu_opt_set_number

2012-12-13 Thread Kevin Wolf
From: Dong Xu Wang Signed-off-by: Dong Xu Wang Signed-off-by: Kevin Wolf --- qemu-option.c | 22 ++ qemu-option.h |1 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 1303188..94557cf 100644 --- a/qemu-option.c +++

Re: [Qemu-devel] [PATCH 1/2] omap_i2c: Clear SBD bit in STAT register on DATA read

2012-12-13 Thread Andreas Färber
Am 13.12.2012 15:45, schrieb Peter Maydell: > On 12 December 2012 06:29, Andreas Färber wrote: >> After reading a single-byte I2C response such as the tmp105's response >> to 0x01 0x00, the SBD status bit would not get reset on next read, still >> indicating validity of only a single byte. Clear i

[Qemu-devel] [PATCH 32/43] qemu-io: Add AIO debugging commands

2012-12-13 Thread Kevin Wolf
This makes the blkdebug suspend/resume functionality available in qemu-io. Use it like this: $ ./qemu-io blkdebug::/tmp/test.qcow2 qemu-io> break write_aio req_a qemu-io> aio_write 0 4k qemu-io> blkdebug: Suspended request 'req_a' qemu-io> resume req_a blkdebug: Resuming request 'req_a

[Qemu-devel] [PATCH v2 11/17] savevm: add error parameter to qemu_savevm_state()

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- savevm.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/savevm.c b/savevm.c index c17cc7f..71c7df8 100644 --- a/savevm.c +++ b/savevm.c @@ -1787,7 +1787,8 @@ void qemu_savevm_state_cancel(QEMUFile *f) } } -static in

[Qemu-devel] [PATCH 02/43] tests: avoid qemu_aio_flush() in test-thread-pool.c

2012-12-13 Thread Kevin Wolf
From: Stefan Hajnoczi We need to eliminate calls to qemu_aio_flush() since the function is being removed. Most callers will use bdrv_drain_all() instead but test-thread-pool.c is lower level. Since the test uses the global AioContext we can loop on qemu_aio_wait() to wait for aio and bh activit

[Qemu-devel] [PATCH v2 15/17] qapi: Convert delvm

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hmp-commands.hx | 2 +- hmp.c| 10 ++ hmp.h| 1 + qapi-schema.json | 14 ++ qmp-commands.hx | 24 savevm.c | 17 +++-- sysemu.h | 1 - 7 files changed, 53 insertio

[Qemu-devel] [PATCH 41/43] qcow2: Enable dirty flag in qcow2_alloc_cluster_link_l2

2012-12-13 Thread Kevin Wolf
This is closer to where the dirty flag is really needed, and it avoids having checks for special cases related to cluster allocation directly in the writev loop. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c |5 - block/qcow2.c |7 +-- block/qcow2.h |2 +

[Qemu-devel] [PATCH 18/43] block: bdrv_img_create(): drop unused error handling code

2012-12-13 Thread Kevin Wolf
From: Luiz Capitulino Signed-off-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- block.c | 40 +--- block.h |6 +++--- 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/block.c b/block.c index 066bd66..b3faf3a 100644 --- a/block.c +++ b

[Qemu-devel] [PATCH 35/43] atapi: reset cdrom tray statuses on ide_reset

2012-12-13 Thread Kevin Wolf
From: Pavel Hrdina Tray statuses should be also reseted. Some guests may lock the tray and after reset before any kernel is loaded the tray should be unlocked. Also if you reset the real computer the tray is closed. We should do the same in qemu. Signed-off-by: Pavel Hrdina Signed-off-by: Kevi

[Qemu-devel] [PATCH 43/43] qcow2: Factor out handle_dependencies()

2012-12-13 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 70 +--- 1 files changed, 42 insertions(+), 28 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 7a038ac..468ef1b 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-c

[Qemu-devel] [PATCH 06/43] block: Avoid second open for format probing

2012-12-13 Thread Kevin Wolf
This fixes problems that are caused by the additional open/close cycle of the existing format probing, for example related to qemu-nbd without -t option or file descriptor passing. Signed-off-by: Kevin Wolf --- block.c | 66 -- 1 file

[Qemu-devel] [PATCH 12/43] block: simplify default_drive

2012-12-13 Thread Kevin Wolf
From: Christian Borntraeger Markus Armbruster pointed out that there is only one caller to default_drive with IF_DEFAULT as a type. Lets get rid of the block_default_type parameter and adopt the caller to do the right thing (asking the machine struct). Signed-off-by: Christian Borntraeger Revie

Re: [Qemu-devel] [RFC PATCH] Allow building without graphics support

2012-12-13 Thread Gerd Hoffmann
Hi, >> A pretty central data structure in qemu (DisplayState / >> DisplaySurface) carries a pixman image, not some module which can >> easily be made optional. Just look at the tons of #ifdef'ery you >> have to do to get this going. > > His point is that anything related to DisplayState should

[Qemu-devel] [PATCH v2 14/17] qapi: Convert loadvm

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hmp-commands.hx | 4 ++-- hmp.c| 9 hmp.h| 1 + monitor.c| 12 --- qapi-schema.json | 15 + qmp-commands.hx | 25 ++ savevm.c | 65

[Qemu-devel] [PATCH v2 04/17] block: add error parameter to bdrv_snapshot_delete() and related functions

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- block.c| 27 +++ block.h| 4 +++- block/qcow2-snapshot.c | 10 +- block/qcow2.h | 4 +++- block/rbd.c| 6 +- block/sheepdog.c | 4 +++- block_int.h| 4 ++

[Qemu-devel] [PATCH 25/43] qemu-option: qemu_opt_set_bool(): fix code duplication

2012-12-13 Thread Kevin Wolf
From: Dong Xu Wang It will set opt->str in qemu_opt_set_bool, without opt->str, there will be some potential bugs. These are uses of opt->str, and what happens when it isn't set: * qemu_opt_get(): returns NULL, which means "not set". Bug can bite when value isn't the default value. * qemu_o

[Qemu-devel] [PATCH 08/43] block: vpc initialize the uuid footer field

2012-12-13 Thread Kevin Wolf
From: Charles Arnold Initialize the uuid field in the footer with a generated uuid. Signed-off-by: Charles Arnold Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- block/vpc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/block/vpc.c b/block/vpc.c

[Qemu-devel] [PATCH 16/43] qmp: qmp_transaction(): pass Error object to bdrv_img_create()

2012-12-13 Thread Kevin Wolf
From: Luiz Capitulino Signed-off-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- blockdev.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 500f091..6fb3362 100644 --- a/blockdev.c +++ b/blockdev.c @@ -707,6 +707,7 @@ void qm

[Qemu-devel] [PATCH 11/43] Support default block interfaces per QEMUMachine

2012-12-13 Thread Kevin Wolf
From: Christian Borntraeger There are QEMUMachines that have neither IF_IDE nor IF_SCSI as a default/standard interface to their block devices / drives. Therefore, this patch introduces a new field default_block_type per QEMUMachine struct. The prior use_scsi field becomes thereby obsolete and is

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

2012-12-13 Thread Kevin Wolf
The following changes since commit 1c97e303d4ea80a2691334b0febe87a50660f99d: Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2012-12-10 08:35:15 -0600) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Charles Arnold (2): block: vpc ini

[Qemu-devel] [PATCH 37/43] qcow2: Introduce Qcow2COWRegion

2012-12-13 Thread Kevin Wolf
This makes it easier to address the areas for which a COW must be performed. As a nice side effect, the COW code in qcow2_alloc_cluster_link_l2 becomes really trivial. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 85 +++-- block/qcow2.h

[Qemu-devel] [PATCH 34/43] qemu-iotests: Test concurrent cluster allocations

2012-12-13 Thread Kevin Wolf
This adds some first tests for qcow2's dependency handling when two parallel write requests access the same cluster. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/046 | 215 tests/qemu-iotests/046.out | 163 +

[Qemu-devel] [PATCH 39/43] qcow2: Drop l2meta.cluster_offset

2012-12-13 Thread Kevin Wolf
There's no real reason to have an l2meta for normal requests that don't allocate anything. Before we can get rid of it, we must return the host cluster offset in a different way. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 10 ++ block/qcow2.c | 14 +++--- b

[Qemu-devel] [PATCH v2 07/17] block: add error parameter to del_existing_snapshots()

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- savevm.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/savevm.c b/savevm.c index 7ab7c7c..3ee7da5 100644 --- a/savevm.c +++ b/savevm.c @@ -2094,22 +2094,18 @@ static int bdrv_snapshot_find(BlockDriverState *bs, /* * Deletes sna

[Qemu-devel] [PATCH 1/2] hw: add isa-debug-exit device v3

2012-12-13 Thread Lucas Meneghel Rodrigues
From: Gerd Hoffmann When present it makes qemu exit on any write. Mapped to port 0x501 by default. Without this patch Anthony doesn't allow me to remove the bochs bios debug ports because his test suite uses this. Changes from v2: Fixed rebase mistake Changes from v1: Add access_size property

[Qemu-devel] [PATCH 36/43] qcow2: Round QCowL2Meta.offset down to cluster boundary

2012-12-13 Thread Kevin Wolf
The offset within the cluster is already present as n_start and this is what the code uses. QCowL2Meta.offset is only needed at a cluster granularity. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c |4 ++-- block/qcow2.h | 22 ++ 2 files changed, 24 inserti

[Qemu-devel] [PATCH v2 01/17] error: introduce handle_error

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- error.c | 8 error.h | 6 ++ 2 files changed, 14 insertions(+) diff --git a/error.c b/error.c index 128d88c..dd3ab66 100644 --- a/error.c +++ b/error.c @@ -113,3 +113,11 @@ void error_propagate(Error **dst_err, Error *local_err) error_free(lo

[Qemu-devel] [PATCH v2 06/17] block: add error parameter to bdrv_snapshot_find()

2012-12-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- savevm.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/savevm.c b/savevm.c index e57c108..7ab7c7c 100644 --- a/savevm.c +++ b/savevm.c @@ -2061,16 +2061,21 @@ out: return ret; } -static int bdrv_snapshot_

Re: [Qemu-devel] [PATCH 1/2] hw: add isa-debug-exit device v3

2012-12-13 Thread Andreas Färber
Am 13.12.2012 15:48, schrieb Lucas Meneghel Rodrigues: > From: Gerd Hoffmann > > When present it makes qemu exit on any write. > Mapped to port 0x501 by default. > > Without this patch Anthony doesn't allow me to > remove the bochs bios debug ports because his > test suite uses this. > > Change

[Qemu-devel] [PATCH 03/43] block: Improve bdrv_aio_co_cancel_em

2012-12-13 Thread Kevin Wolf
Instead of waiting for all requests to complete, wait just for the specific request that should be cancelled. Signed-off-by: Kevin Wolf --- block.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index c05875f..c7a1a3c 100644 --- a/bl

[Qemu-devel] [PATCH 40/43] qcow2: Allocate l2meta only for cluster allocations

2012-12-13 Thread Kevin Wolf
Even for writes to already allocated clusters, an l2meta is allocated, though it stays effectively unused. After this patch, only allocating requests still have one. Each l2meta now describes an in-flight request that writes to clusters that are not yet hooked up in the L2 table. Signed-off-by: Ke

[Qemu-devel] [PATCH 38/43] qcow2: Allocate l2meta dynamically

2012-12-13 Thread Kevin Wolf
As soon as delayed COW is introduced, the l2meta struct is needed even after completion of the request, so it can't live on the stack. Signed-off-by: Kevin Wolf --- block/qcow2.c | 26 +++--- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/block/qcow2.c b/b

[Qemu-devel] [PATCH 42/43] qcow2: Execute run_dependent_requests() without lock

2012-12-13 Thread Kevin Wolf
There's no reason for run_dependent_requests() to hold s->lock, and a later patch will require that in fact the lock is not held. Also, before this patch, run_dependent_requests() not only does what its name suggests, but also removes the l2meta from the list of in-flight requests. When changing t

[Qemu-devel] [PATCH 07/43] virtio-blk: Remove duplicate property definition

2012-12-13 Thread Kevin Wolf
From: David Gibson For the virtio-blk device (via virtio-pci) the property "config-wce" is defined in two places. First, it's defined from the DEFINE_VIRTIO_BLK_FEATURES macro, second it's defined directly in virtio-pci, just two lines above the call to that macro. The direct definition in virt

[Qemu-devel] Is there anyone kindly help me to create a qemu wiki account?

2012-12-13 Thread Pan Xueshu
Because it has been disabled to create account on the wiki page. Thanks very much! Regards, Xueshu

Re: [Qemu-devel] [PATCH 1/2] pixman: require 0.16.4 as minimum version

2012-12-13 Thread Alexander Graf
On 13.12.2012, at 16:30, Gerd Hoffmann wrote: > Hi, > >> 6e72719e721a40fe1224701ca10edc1caf0cd708 > > It's broken, version is wrong, and I told you. > Seems you sneaked it in nevertheless. It's consistent now with the #ifdef 5 lines above the line that the patch does. > >> You had 2 branche

[Qemu-devel] [PATCH 24/43] qemu-option: qemu_opts_validate(): fix duplicated code

2012-12-13 Thread Kevin Wolf
From: Dong Xu Wang Use opts_accepts_any() and find_desc_by_name(). Signed-off-by: Luiz Capitulino Signed-off-by: Dong Xu Wang Signed-off-by: Kevin Wolf --- qemu-option.c | 14 +++--- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index

  1   2   3   >