Re: [Qemu-devel] [PATCH 11/11] block: declare blockjobs and dataplane friends!

2014-10-04 Thread Max Reitz
On 01.10.2014 19:01, Stefan Hajnoczi wrote: Now that blockjobs use AioContext they are safe for use with dataplane. Unblock them! Signed-off-by: Stefan Hajnoczi --- blockjob.c | 1 + hw/block/dataplane/virtio-blk.c | 5 + 2 files changed, 6 insertions(+) Reviewed-

Re: [Qemu-devel] [PATCH 10/11] block: let commit blockjob run in BDS AioContext

2014-10-04 Thread Max Reitz
On 01.10.2014 19:01, Stefan Hajnoczi wrote: The commit block job must run in the BlockDriverState AioContext so that it works with dataplane. Acquire the AioContext in blockdev.c so starting the block job is safe. One detail here is that the bdrv_drain_all() must be moved inside the aio_context_

Re: [Qemu-devel] [PATCH 09/11] block: let mirror blockjob run in BDS AioContext

2014-10-04 Thread Max Reitz
On 01.10.2014 19:01, Stefan Hajnoczi wrote: The mirror block job must run in the BlockDriverState AioContext so that it works with dataplane. Acquire the AioContext in blockdev.c so starting the block job is safe. Note that to_replace is treated separately from other BlockDriverStates in that i

Re: [Qemu-devel] [PATCH 08/11] block: let stream blockjob run in BDS AioContext

2014-10-04 Thread Max Reitz
On 01.10.2014 19:01, Stefan Hajnoczi wrote: The stream block job must run in the BlockDriverState AioContext so that it works with dataplane. The basics of acquiring the AioContext are easy in blockdev.c. The tricky part is the completion code which drops part of the backing file chain. This m

[Qemu-devel] [PULL 23/23] blockdev-test: Test device_del after drive_del

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster Executed in this order, drive_del and device_del's automatic drive deletion take notoriously tricky special paths. [Fixed "an device" -> "a device" typo as requested by Eric Blake. --Stefan] Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 141226149

[Qemu-devel] [PULL 21/23] blockdev-test: Simplify by using g_assert_cmpstr()

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1412261496-24455-5-git-send-email-arm...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/drive_del-test.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/drive_d

[Qemu-devel] [PULL 22/23] blockdev-test: Factor out some common code into helpers

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1412261496-24455-6-git-send-email-arm...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/drive_del-test.c | 50 +- 1 file changed, 25 insertions(+),

[Qemu-devel] [PULL 20/23] blockdev-test: Clean up bogus drive_add argument

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster The first argument should be a PCI address, which pci-addr=auto isn't. Doesn't really matter, as drive_add ignores its first argument when its second argument has if=none. Clean it up anyway. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 14122614

[Qemu-devel] [PULL 19/23] blockdev-test: Use single rather than double quotes in QMP

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster QMP accepts both single and double quotes. This is the only test using double quotes. They need to be quoted in C strings. Replace them by single quotes. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1412261496-24455-3-git-send-email-arm...@red

[Qemu-devel] [PULL 13/23] q35/ahci: Pick up -cdrom and -hda options

2014-10-04 Thread Stefan Hajnoczi
From: John Snow This patch implements the backend for the Q35 board for us to be able to pick up and use drives defined by the -cdrom, -hda, or -drive if=ide shorthand options. Signed-off-by: John Snow Reviewed-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin Message-id: 1412187569-23452

[Qemu-devel] [PULL 16/23] qapi: Add corrupt field to ImageInfoSpecificQCow2

2014-10-04 Thread Stefan Hajnoczi
From: Max Reitz Just like lazy-refcounts, this field will be present iff the qcow2 compat level is 1.1 (or probably any future revision). As expected, this breaks some tests due to the new field present in qemu-img info output; so fix their output accordingly. Suggested-by: Eric Blake Signed-o

[Qemu-devel] [PULL 10/23] pc/vl: Add units-per-default-bus property

2014-10-04 Thread Stefan Hajnoczi
From: John Snow This patch adds the 'units_per_default_bus' property which allows individual boards to declare their desired index => (bus,unit) mapping for their default HBA, so that boards such as Q35 can specify that its default if_ide HBA, AHCI, only accepts one unit per bus. This property o

[Qemu-devel] [PULL 18/23] drive_del-test: Merge of qdev-monitor-test, blockdev-test

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster Each of qdev-monitor-test and blockdev-test has just one test case, and both are about drive_del. [Extended copyright from 2013 to 2013-2014 as requested by Eric Blake. --Stefan] Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1412261496-24455-2-gi

[Qemu-devel] [PULL 17/23] iotests: qemu-img info output for corrupt image

2014-10-04 Thread Stefan Hajnoczi
From: Max Reitz The "corrupt" entry in the format-specific information section should be "true". Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1412105489-7681-4-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/060 | 3 +++ tests/qemu-i

[Qemu-devel] [PULL 05/23] Modify qemu_opt_rename to realize renaming all items in opts

2014-10-04 Thread Stefan Hajnoczi
From: Jun Li Add realization of rename all items in opts for qemu_opt_rename. e.g: When add bps twice in command line, need to rename all bps to throttling.bps-total. This patch solved following bug: Bug 1145586 - qemu-kvm will give strange hint when add bps twice for a drive ref:https://bugzill

[Qemu-devel] [PULL 12/23] qtest/bios-tables: Correct Q35 command line

2014-10-04 Thread Stefan Hajnoczi
From: John Snow If the Q35 board types are to begin recognizing and decoding syntactic sugar for drive/device declarations, then workarounds found within the qtests suite need to be adjusted to prevent any test failures after the fix. bios-tables-test improperly uses this cli: -drive file=etc,id

[Qemu-devel] [PULL 14/23] util: Emancipate id_wellformed() from QemuOpts

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster IDs have long spread beyond QemuOpts: not everything with an ID necessarily goes through QemuOpts. Commit 9aebf3b is about such a case: block layer names are meant to be well-formed IDs, but some of them don't go through QemuOpts, and thus weren't checked. The commit fix

[Qemu-devel] [PULL 11/23] ide: Update ide_drive_get to be HBA agnostic

2014-10-04 Thread Stefan Hajnoczi
From: John Snow Instead of duplicating the logic for the if_ide (bus,unit) mappings, rely on the blockdev layer for managing those mappings for us, and use the drive_get_by_index call instead. This allows ide_drive_get to work for AHCI HBAs as well, and can be used in the Q35 initialization. La

[Qemu-devel] [PULL 04/23] vmdk: Fix integer overflow in offset calculation

2014-10-04 Thread Stefan Hajnoczi
From: Fam Zheng This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayland Reviewed-by: Max Reitz Signed-off-by: Fam Zheng Message-id: 141143738

[Qemu-devel] [PULL 15/23] iotests: Use _img_info

2014-10-04 Thread Stefan Hajnoczi
From: Max Reitz qemu-img info should only be used directly if the format-specific information or the name of the format is relevant (some tests explicitly test format-specific information; test 082 uses qcow2-specific settings to test the qemu-img interface); otherwise, tests should always use _i

[Qemu-devel] [PULL 06/23] make check-block: Use default cache modes

2014-10-04 Thread Stefan Hajnoczi
From: Kevin Wolf When qemu-iotests only gave a choice between cache=none and cache=writethrough, we picked cache=none because it was the option that would complete the test in finite time. Some tests could only work for one of the two options and would be skipped with cache=none, but that was an

[Qemu-devel] [PULL 02/23] ssh: Don't crash if either host or path is not specified.

2014-10-04 Thread Stefan Hajnoczi
From: "Richard W.M. Jones" $ ./qemu-img create -f qcow2 overlay \ -b 'json: { "file.driver":"ssh", "file.host":"localhost", "file.host_key_check":"no" }' qemu-img: qobject/qdict.c:193: qdict_get_obj: Assertion `obj != ((void *)0)' failed. Aborted A similar cr

[Qemu-devel] [PULL 09/23] blockdev: Allow overriding if_max_dev property

2014-10-04 Thread Stefan Hajnoczi
From: John Snow The if_max_devs table as in the past been an immutable default that controls the mapping of index => (bus,unit) for all boards and all HBAs for each interface type. Since adding this mapping information to the HBA device itself is currently unwieldly from the perspective of retri

[Qemu-devel] [PULL 08/23] blockdev: Orphaned drive search

2014-10-04 Thread Stefan Hajnoczi
From: John Snow When users use command line options like -hda, -cdrom, or even -drive if=ide, it is up to the board initialization routines to pick up these drives and create backing devices for them. Some boards, like Q35, have not been doing this. However, there is no warning explaining why ce

[Qemu-devel] [PULL 07/23] qemu-iotests: Fix supported cache modes for 052

2014-10-04 Thread Stefan Hajnoczi
From: Kevin Wolf The requirement for this test case is really "no O_DIRECT", because the temporary snapshot for BDRV_O_SNAPSHOT is created in /tmp, which often is a tmpfs. Commit f210a83c ('qemu-iotests: Add _default_cache_mode and _supported_cache_modes') turned the restriction into writethroug

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

2014-10-04 Thread Stefan Hajnoczi
The following changes since commit b00a0ddb31a393b8386d30a9bef4d9bbb249e7ec: Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20141002-1' into staging (2014-10-02 15:01:48 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request

[Qemu-devel] [PULL 03/23] block: Drop superfluous conditionals around qemu_opts_del()

2014-10-04 Thread Stefan Hajnoczi
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1411999675-14533-1-git-send-email-arm...@redhat.com Signed-off-by: Stefan Hajnoczi --- blockdev.c | 4 +--- qemu-img.c | 4 +--- qemu-nbd.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-)

[Qemu-devel] [PULL 01/23] snapshot: fix referencing wrong variable in while loop in do_delvm

2014-10-04 Thread Stefan Hajnoczi
From: Zhang Haoyu The while loop variabal is "bs1", but "bs" is always passed to bdrv_snapshot_delete_by_id_or_name. Broken in commit a89d89d, v1.7.0. Signed-off-by: Zhang Haoyu Reviewed-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- savevm.c | 11 +-- 1 file changed, 5 ins

Re: [Qemu-devel] [PATCH 07/11] block: let backup blockjob run in BDS AioContext

2014-10-04 Thread Max Reitz
On 02.10.2014 17:08, Stefan Hajnoczi wrote: On Wed, Oct 01, 2014 at 09:38:39PM +0200, Max Reitz wrote: On 01.10.2014 19:01, Stefan Hajnoczi wrote: The backup block job must run in the BlockDriverState AioContext so that it works with dataplane. The basics of acquiring the AioContext are easy i

Re: [Qemu-devel] [PATCH 0/6] Improve drive_del test coverage

2014-10-04 Thread Stefan Hajnoczi
On Thu, Oct 02, 2014 at 04:51:30PM +0200, Markus Armbruster wrote: > The meat is in the last patch, the others are just cleanup. > > Markus Armbruster (6): > drive_del-test: Merge of qdev-monitor-test, blockdev-test > blockdev-test: Use single rather than double quotes in QMP > blockdev-test

Re: [Qemu-devel] [PATCH v4 38/47] Add assertion to check migration_dirty_pages

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > I've seen it go negative once during dev, it shouldn't > happen. You can move it earlier, perhaps even as patch 1, since it does not have any dependency on postcopy and can go in at any time. Paolo

Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +mis->postcopy_ram_state); > +if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) { > +/* > + * Where a migration had postcopy enabled (and thus went to advise) > + * but managed to comp

Re: [Qemu-devel] is x-data-plane considered "stable" ?

2014-10-04 Thread Stefan Hajnoczi
On Fri, Oct 03, 2014 at 05:33:00PM +0200, Paolo Bonzini wrote: > Il 03/10/2014 16:26, Alexandre DERUMIER ha scritto: > > Hi Paolo, > > > > do you you think it'll be possible to use block jobs with dataplane ? > > > > Or is it technically impossible ? > > I think Stefan has posted patches for tha

Re: [Qemu-devel] [PATCH 0/3] qcow2/qapi: Add "corrupt" to ImageInfoSpecificQCow2

2014-10-04 Thread Stefan Hajnoczi
On Tue, Sep 30, 2014 at 09:31:26PM +0200, Max Reitz wrote: > This series adds a field corresponding to the "corrupt" flag to > ImageInfoSpecificQCow2. This breaks several qemu-iotests which directly > invoke qemu-img info instead of using _img_info. Patch 1 tries to > minimize the necessary output

Re: [Qemu-devel] [PATCH v4 16/47] Return path: Source handling of return path

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +/* Source side RP state */ > +struct MigrationRetPathState { > +uint32_t latest_ack; > +QemuThreadrp_thread; > +bool error; Should the QemuFile be in here? > +}; > + Also please do not abbrev words, an

Re: [Qemu-devel] [PATCH v4 08/47] socket shutdown

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +#ifndef WIN32 > +if (rd) { > +how = SHUT_RD; > +} > + > +if (wr) { > +how = rd ? SHUT_RDWR : SHUT_WR; > +} > + > +#else > +/* Untested */ > +if (rd) { > +how = SD_RECEIVE; > +} > + >

Re: [Qemu-devel] [PATCH v4 14/47] Return path: Control commands

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > QEMU_VM_CMD_INVALID = 0, /* Must be 0 */ > +QEMU_VM_CMD_OPENRP,/* Tell the dest to open the Return path */ OPEN_RETURN_PATH? > +QEMU_VM_CMD_REQACK,/* Request an ACK on the RP */ SEND_ACK or ACK_REQUEST

Re: [Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the post-copy queue

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +/* > + * Don't break host-page chunks up with queue items > + * so only unqueue if, > + * a) The last item came from the queue anyway > + * b) The last sent item was the last target-page in

Re: [Qemu-devel] [PATCH v4 46/47] postcopy: Wire up loadvm_postcopy_ram_handle_{run, end} commands

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +bool one_message = false; > +/* This looks good, but it's possible that the device loading in the > + * main thread hasn't finished yet, and so we might not be in 'RUN' > + * state yet. > + * TO

Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +mis->postcopy_ram_state); > +if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) { > +/* > + * Where a migration had postcopy enabled (and thus went to advise) > + * but managed to comp

Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > +/* These are ORable flags */ ... make them an "enum". > +const int LOADVM_EXITCODE_QUITLOOP = 1; > +const int LOADVM_EXITCODE_QUITPARENT = 2; LOADVM_QUIT_ALL, LOADVM_QUIT respectively? > +const int LOADVM_EXITCODE_KEEP

Re: [Qemu-devel] [PATCH v4 32/47] postcopy: ram_enable_notify to switch on userfault

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > +static int postcopy_ram_sensitise_area(const char *block_name, void > *host_addr, > + ram_addr_t offset, ram_addr_t length, > + void *opaque) Weird name, an

Re: [Qemu-devel] [PATCH] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm

2014-10-04 Thread Alex Bligh
Sorry that was v5 - git send-email fumble fingers as git-publish doesn't seem to work well with single patches. Alex On 4 Oct 2014, at 17:37, Alex Bligh wrote: > Add a machine type pc-1.0-qemu-kvm for live migrate compatibility > with qemu-kvm version 1.0. > > This patch adds inbound migrate c

[Qemu-devel] [PATCH] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm

2014-10-04 Thread Alex Bligh
Add a machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm version 1.0. This patch adds inbound migrate capability from qemu-kvm version 1.0. The main ideas are those set out in Cole Robinson's patch here: http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migration-fro

Re: [Qemu-devel] [PATCH v4] Add machine parameter qemu-kvm-migration for live migrate compatibility with qemu-kvm

2014-10-04 Thread Alex Bligh
Michael, I'm about to post a nice simple v5 of this, but there are a couple of your comments I am NOT addressing: >> >> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c >> index b72b34e..3c9da23 100644 >> --- a/hw/acpi/piix4.c >> +++ b/hw/acpi/piix4.c >> @@ -200,12 +200,26 @@ static const VMStateD

Re: [Qemu-devel] [PATCH v4 33/47] Postcopy: Postcopy startup in migration thread

2014-10-04 Thread Paolo Bonzini
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > From: "Dr. David Alan Gilbert" > > Rework the migration thread to setup and start postcopy. > > Signed-off-by: Dr. David Alan Gilbert > --- > include/migration/migration.h | 3 + > migration.c | 201 >

Re: [Qemu-devel] [PATCH 5/6] qemu-char: Add reconnecting to client sockets

2014-10-04 Thread Paolo Bonzini
Il 04/10/2014 05:24, Corey Minyard ha scritto: >> > Can you please add a follow-up patch that only prints this message once >> > per reconnect? Otherwise a server that shuts down can spam logs forever. > Yes, not a problem. I always wonder the best way to handle something > like that, but you are

[Qemu-devel] Fullscreen Bug with GTK

2014-10-04 Thread Cedric Sodhi
Hello, we're setting up a cluster of Fedora boxes at my company. Qemu is added because some partners may need or expect a fully functional Windows environment. Everyone who expects Windows or might be irritated by seeing anything else should remain oblivious to the fact that it's running a VM. So i