Re: [Qemu-devel] [PATCH] linux-user: Avoid compilation error with --disable-guest-base

2015-07-20 Thread Richard Henderson
On 07/01/2015 07:21 PM, Laurent Vivier wrote: Le 01/07/2015 15:15, Aurelien Jarno a écrit : On 2015-07-01 01:58, Laurent Vivier wrote: Le 30/06/2015 19:20, Peter Maydell a écrit : On 30 June 2015 at 18:13, Laurent Vivier wrote: Le 30/06/2015 18:45, Peter Maydell a écrit : On 30 June 2

Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-20 Thread Paolo Bonzini
On 21/07/2015 03:19, Fam Zheng wrote: > > Yes, that would work. I am not sure how complex it would be. You would also > > need > > a solution for the GSource and one (probably similar to aio-posix) for your > > epoll implementation. With ctx->notified at least you can encapsulate it in > > aio_n

Re: [Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend

2015-07-20 Thread Richard Henderson
On 07/21/2015 07:33 AM, Benjamin Herrenschmidt wrote: On Tue, 2015-07-21 at 07:27 +0100, Richard Henderson wrote: On 07/21/2015 06:19 AM, Benjamin Herrenschmidt wrote: +/* Clear the non-page, non-alignment bits from the address */ if (TCG_TARGET_REG_BITS == 32 || TARGET_LONG_BITS ==

Re: [Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend

2015-07-20 Thread Benjamin Herrenschmidt
On Tue, 2015-07-21 at 07:27 +0100, Richard Henderson wrote: > On 07/21/2015 06:19 AM, Benjamin Herrenschmidt wrote: > > +/* Clear the non-page, non-alignment bits from the address */ > > if (TCG_TARGET_REG_BITS == 32 || TARGET_LONG_BITS == 32) { > > +/* We don't support unaligned

Re: [Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend

2015-07-20 Thread Richard Henderson
On 07/21/2015 06:19 AM, Benjamin Herrenschmidt wrote: +/* Clear the non-page, non-alignment bits from the address */ if (TCG_TARGET_REG_BITS == 32 || TARGET_LONG_BITS == 32) { +/* We don't support unaligned accesses on 32-bits, preserve + * the bottom bits and thus trigg

Re: [Qemu-devel] [PATCH v7 20/42] Modify save_live_pending for postcopy

2015-07-20 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:33], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Modify save_live_pending to return separate postcopiable and > non-postcopiable counts. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah Amit

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-20 Thread Jan Kiszka
On 2015-07-20 17:01, Stefan Hajnoczi wrote: > On Mon, Jul 20, 2015 at 2:12 PM, Vasiliy Tolstov wrote: >> 2015-07-20 14:55 GMT+03:00 zhanghailiang : >>> Agreed, besides, it is seemed that slirp is not supporting ipv6, we also >>> have to supplement it. >> >> >> patch for ipv6 slirp support some tim

Re: [Qemu-devel] [PATCH v7 19/42] MIG_CMD_PACKAGED: Send a packaged chunk of migration stream

2015-07-20 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:32], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > MIG_CMD_PACKAGED is a migration command that wraps a chunk of migration > stream inside a package whose length can be determined purely by reading > its header. The destination guarantees th

Re: [Qemu-devel] [RFC PATCH] Fix hotplug/hotunplug issue about virtio 1.0 devices

2015-07-20 Thread Lin Ma
在 2015年07月20日 23:36, Michael S. Tsirkin 写道: On Mon, Jul 20, 2015 at 11:14:58PM +0800, Lin Ma wrote: Hi Michael and Gerd, I found an hotplug/hotunplug issue about virtio 1.0 devices and trying to fix it. The bug description is: (qemu) device_add virtio-gpu-pci,id=gpu0 (qemu) device_del gpu0 At

[Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend

2015-07-20 Thread Benjamin Herrenschmidt
Currently, we get to the slow path for any unaligned access in the backend, because we effectively preserve the bottom address bits below the alignment requirement when comparing with the TLB entry, so any non-0 bit there will cause the compare to fail. For the same number of instructions, we can

Re: [Qemu-devel] [PATCH] spapr: add dumpdtb support

2015-07-20 Thread David Gibson
On Mon, Jul 20, 2015 at 03:19:24PM +0200, Andrew Jones wrote: > dumpdtb (-machine dumpdtb=) allows one to inspect the generated > device tree of machine types that generate device trees. This is > useful for a) seeing what's there b) debugging/testing device tree > generator patches. It can be used

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] ignore bdrv_flush operation when no qcow2 cache item is dirty

2015-07-20 Thread Qingshu Chen
I've made a mistake on the series. Following is the new patch: >From ef1079b422eef40a802ca13e249795005efa441d Mon Sep 17 00:00:00 2001 From: Qingshu Chen <1150163...@qq.com> Date: Tue, 21 Jul 2015 09:46:08 +0800 Subject: [PATCH] ignore bdrv_flush operation when no qcow2 cache item is dirty Signed-

Re: [Qemu-devel] [PATCH] No change in userland tools after resizing qcow2 image

2015-07-20 Thread 김태하
> On 07/19/2015 05:24 AM, Taeha Kim wrote: > > Hello, > > > > > > There is no change in userland tools after resizing qcow2 image except > > file utility. > > > > For example when resize qcow2 image, the "file" utility is detectable > > increased size. > > However, the "ls", “stat”, and “du” utilit

Re: [Qemu-devel] [PATCH RFC v2 13/47] tests/qapi-schema: Restore test case for flat union base bug

2015-07-20 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Test case added in commit 2fc0043, and messed up in commit 5223070. > > Signed-off-by: Markus Armbruster > --- > tests/qapi-schema/qapi-schema-test.json | 5 +++-- > tests/qapi-schema/qapi-schema-test.out | 8 > 2 files changed, 7 inse

Re: [Qemu-devel] [PATCH RFC v2 12/47] tests/qapi-schema: Document events with with base don't work

2015-07-20 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > When event FOO's 'data' is a struct with a base, we consider only the > struct's direct members, and ignore its base. The generated > qapi_event_send_foo() doesn't take arguments for base members. > > No such events currently exist in the QMP sch

Re: [Qemu-devel] [PATCH RFC v2 11/47] tests/qapi-schema: Document alternate's enum lacks visit function

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > We generate a declaration, but no definition. > > The QMP schema has two: Qcow2OverlapChecks and BlockdevRef. Neither > visit_type_Qcow2OverlapChecksKind() nor visit_type_BlockdevRefKind() > is actually used. > > Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH RFC v2 10/47] qapi-visit: Fix two name arguments passed to visitors

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > The generated code passes mangled schema names to visit_type_enum() > and union's visit_start_struct(). Fix it to pass the names > unadulterated, like we do everywhere else. > > Only qapi-schema-test.json actually has names where this makes a > d

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-20 Thread zhanghailiang
On 2015/7/20 23:01, Stefan Hajnoczi wrote: On Mon, Jul 20, 2015 at 2:12 PM, Vasiliy Tolstov wrote: 2015-07-20 14:55 GMT+03:00 zhanghailiang : Agreed, besides, it is seemed that slirp is not supporting ipv6, we also have to supplement it. patch for ipv6 slirp support some times ago sended to

Re: [Qemu-devel] [PATCH v2] net-hub: Drop can_receive

2015-07-20 Thread Fam Zheng
On Mon, 07/20 18:07, Stefan Hajnoczi wrote: > On Tue, Jul 07, 2015 at 05:41:56PM +0800, Fam Zheng wrote: > > On Tue, 07/07 09:37, Stefan Hajnoczi wrote: > > > On Tue, Jul 07, 2015 at 02:30:30PM +0800, Fam Zheng wrote: > > > > This moves the semantics from net_hub_port_can_receive to receive > > > >

Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-20 Thread Fam Zheng
On Mon, 07/20 08:42, Paolo Bonzini wrote: > > > > I'm looking at optimizing it but I don't fully understand the relationship > > > between aio_prepare and WaitForMultipleObjects. Do they get the same set > > > of > > > events? > > > > After some reading I think WaitForMultipleObjects is for even

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > The struct generated for a flat union is weird: the members of its > base are at the end, except for the union tag, which is renamed to > 'kind' and put at the beginning. > > Change to put all base members at the beginning, unadulterated. Not >

Re: [Qemu-devel] [PATCH RFC v2 09/47] qapi-visit: Replace list implicit_structs by set

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > Use set because that's what it is. While there, rename to > implicit_structs_seen. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi-visit.py | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > Reviewed-by: Eric Blake (

Re: [Qemu-devel] [PATCH RFC v2 08/47] qapi-visit: Fix generated code when schema has forward refs

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > The visit_type_implicit_FOO() are generated on demand, right before > their first use. Used by visit_type_STRUCT_fields() when STRUCT has > base FOO, and by visit_type_UNION() when flat UNION has member a FOO. > > If the schema defines FOO after

Re: [Qemu-devel] [PATCH] crypto: extend unit tests to cover decryption too

2015-07-20 Thread Eric Blake
On 07/20/2015 03:37 PM, Peter Maydell wrote: > On 20 July 2015 at 21:57, Eric Blake wrote: >> On 07/20/2015 11:28 AM, Daniel P. Berrange wrote: >>> The current unit test only verify the encryption API, which >> >> grammatical mismatch; you want either: >> tests only verify >> test only verifies >>

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-20 Thread Laszlo Ersek
On 07/20/15 23:19, Gabriel L. Somlo wrote: > The code to build nested ksets (represending sub-sub-directories of > /sys/firmware/fw_cfg/...) and cleaning them up on exit doesn't promise > to be *too* horrible or bulky, but as I was getting ready to start > writing it, I realized that, in theory, n

Re: [Qemu-devel] [PATCH] crypto: extend unit tests to cover decryption too

2015-07-20 Thread Peter Maydell
On 20 July 2015 at 21:57, Eric Blake wrote: > On 07/20/2015 11:28 AM, Daniel P. Berrange wrote: >> The current unit test only verify the encryption API, which > > grammatical mismatch; you want either: > tests only verify > test only verifies > >> resulted in us missing a recently introduced bug i

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-20 Thread Gabriel L. Somlo
New working version of fw_cfg sysfs module enclosed at the end of this mail, featuring: - probing for the appropriate fw_cfg port/address for the architecture we're on. It's either that, or preprocessor #ifdef voodoo to try only the right access method matching

Re: [Qemu-devel] [PATCH RFC v2 06/47] qapi: Drop unused and useless parameters and variables

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > gen_sync_call()'s parameter indent is useless: gen_sync_call() uses it > only as optional argument for push_indent() and pop_indent(), their > default is four, and gen_sync_call()'s only caller passes four. > > gen_visitor_input_containers_decl()'

Re: [Qemu-devel] [PATCH] crypto: extend unit tests to cover decryption too

2015-07-20 Thread Eric Blake
On 07/20/2015 11:28 AM, Daniel P. Berrange wrote: > The current unit test only verify the encryption API, which grammatical mismatch; you want either: tests only verify test only verifies > resulted in us missing a recently introduced bug in the > decryption API from commit d3462e3. It was fortun

Re: [Qemu-devel] [PATCH v2] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-20 Thread Eduardo Habkost
On Mon, Jul 20, 2015 at 11:17:40PM +0300, Marcel Apfelbaum wrote: > Reviewed-by: Marcel Apfelbaum Thanks! Applied to the NUMA queue. -- Eduardo

Re: [Qemu-devel] [PATCH v2] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-20 Thread Marcel Apfelbaum
On 07/20/2015 11:15 PM, Eduardo Habkost wrote: This fixes the following crash, introduced by commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6: $ gdb --args qemu-system-x86_64 -machine pc,mem-merge=off -object memory-backend-ram,id=ram-node0,size=1024 [...] Program received signal SIGABR

[Qemu-devel] [PATCH v2] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-20 Thread Eduardo Habkost
This fixes the following crash, introduced by commit 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6: $ gdb --args qemu-system-x86_64 -machine pc,mem-merge=off -object memory-backend-ram,id=ram-node0,size=1024 [...] Program received signal SIGABRT, Aborted. (gdb) bt #0 0x7253b8c7 in r

Re: [Qemu-devel] qemu-iotests 134 broken?

2015-07-20 Thread Stefan Hajnoczi
On Mon, Jul 20, 2015 at 7:37 PM, Max Reitz wrote: > On 20.07.2015 20:03, Stefan Hajnoczi wrote: >> >> I'm getting the following failure on qemu.git/master. Is anyone already >> working on this? >> >> 134 5s ... - output mismatch (see 134.out.bad) >> --- /home/stefanha/qemu/tests/qemu-iotests/134.

Re: [Qemu-devel] [PATCH] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-20 Thread Marcel Apfelbaum
On 07/20/2015 11:03 PM, Eduardo Habkost wrote: On Mon, Jul 20, 2015 at 09:06:28AM +0200, Igor Mammedov wrote: On Fri, 17 Jul 2015 17:33:55 -0300 Eduardo Habkost wrote: On Thu, Jul 16, 2015 at 11:02:14PM +0200, Igor Mammedov wrote: On Thu, 16 Jul 2015 17:39:17 -0300 Eduardo Habkost wrote:

Re: [Qemu-devel] [PATCH] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-20 Thread Eduardo Habkost
On Mon, Jul 20, 2015 at 09:06:28AM +0200, Igor Mammedov wrote: > On Fri, 17 Jul 2015 17:33:55 -0300 > Eduardo Habkost wrote: > > > On Thu, Jul 16, 2015 at 11:02:14PM +0200, Igor Mammedov wrote: > > > On Thu, 16 Jul 2015 17:39:17 -0300 > > > Eduardo Habkost wrote: > > > > > > > This fixes the fo

Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-20 Thread Paolo Bonzini
On 20/07/2015 18:36, Stefan Hajnoczi wrote: >> > >> >i/o thread vcpu thread worker thread >> >- >> >lock_iothread >> >notify_me = 1 >> >... >> >unlock_iothread >> >

Re: [Qemu-devel] qemu-iotests 134 broken?

2015-07-20 Thread Max Reitz
On 20.07.2015 20:03, Stefan Hajnoczi wrote: I'm getting the following failure on qemu.git/master. Is anyone already working on this? 134 5s ... - output mismatch (see 134.out.bad) --- /home/stefanha/qemu/tests/qemu-iotests/134.out 2015-07-10 11:45:40.491395644 +0100 +++ 134.out.bad 2015-0

[Qemu-devel] [PULL 2/3] ahci: Force ICC bits in PxCMD to zero

2015-07-20 Thread John Snow
From: Stefan Fritsch The AHCI spec requires that the HBA sets the ICC bits to zero after the ICC change is done. Since we don't do any ICC change, force the bits to zero all the time. This fixes delays with some OSs (e.g. OpenBSD) waiting for the ICC bits to change to 0. Signed-off-by: Stefan F

[Qemu-devel] [PULL 1/3] qtest/ide: add another short PRDT test flavor

2015-07-20 Thread John Snow
From: Stefan Hajnoczi The existing short PRDT test case does not transfer any data because the first PRD is less than 1 sector. This patch adds another short PRDT test case where the first sector can be read but the PRDT is still smaller than the requested number of sectors. This exercises a di

Re: [Qemu-devel] selecting VIRTIO_INPUT and VIRTIO_VGA

2015-07-20 Thread Laszlo Ersek
Cc'ing Alex On 07/13/15 12:15, Paolo Bonzini wrote: > > > On 13/07/2015 09:32, Gerd Hoffmann wrote: >>> and virtio-vga is only compiled on 64-bit Intel? >> >> There is virtio-gpu-pci ... >> >> Any specific reason why we need vga compatibility on !x86? > > I was actually thinking about 32-bit x8

Re: [Qemu-devel] selecting VIRTIO_INPUT and VIRTIO_VGA

2015-07-20 Thread Laszlo Ersek
On 07/13/15 13:49, Paolo Bonzini wrote: > > > On 13/07/2015 13:45, Gerd Hoffmann wrote: and virtio-vga is only compiled on 64-bit Intel? >> >> There is virtio-gpu-pci ... >> >> Any specific reason why we need vga compatibility on !x86? I was actually thinking ab

[Qemu-devel] [PULL 3/3] tests: Fix broken targets check-report-qtest-*

2015-07-20 Thread John Snow
From: Stefan Weil They need QTEST_QEMU_IMG. Without it, the tests raise an assertion: $ make -C bin check-report-qtest-i386.xml make: Entering directory 'bin' GTESTER check-report-qtest-i386.xml blkdebug: Suspended request 'A' blkdebug: Resuming request 'A' ahci-test: tests/libqos/libqos.c:162:

Re: [Qemu-devel] Summary MTTCG related patch sets

2015-07-20 Thread alvise rigo
On Mon, Jul 20, 2015 at 8:01 PM, Frederic Konrad wrote: > On 20/07/2015 19:41, alvise rigo wrote: >> >> Hi Alex, >> >> Thank you for this summary. >> Some comments below. >> >> On Mon, Jul 20, 2015 at 6:17 PM, Alex Bennée >> wrote: >>> >>> Hi, >>> >>> Following this afternoons call I thought I'd

[Qemu-devel] [PULL 0/3] Ide patches

2015-07-20 Thread John Snow
The following changes since commit dcc8a3ab632d0f11a1bf3b08381cf0f93e616b9f: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-07-20 16:01:31 +0100) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-request for you to f

[Qemu-devel] [PULL for-2.4 0/4] Block patches

2015-07-20 Thread Stefan Hajnoczi
The following changes since commit f73ca7363440240b7ee5ee7f7ddb1c64751efb54: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-07-20 13:25:28 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you to f

[Qemu-devel] [PULL for-2.4 1/4] mirror: Speed up bitmap initial scanning

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng Limiting to sectors_per_chunk for each bdrv_is_allocated_above is slow, because the underlying protocol driver would issue much more queries than necessary. We should coalesce the query. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-id: <1436413678-7114-4-git-se

[Qemu-devel] [PULL for-2.4 3/4] aio-win32: reorganize polling loop

2015-07-20 Thread Stefan Hajnoczi
From: Paolo Bonzini Preparatory bugfixes and tweaks to the loop before the next patch: - disable dispatch optimization during aio_prepare. This fixes a bug. - do not modify "blocking" until after the first WaitForMultipleObjects call. This is needed in the next patch. - change the loop to do

[Qemu-devel] [PULL for-2.4 2/4] tests: remove irrelevant assertions from test-aio

2015-07-20 Thread Stefan Hajnoczi
From: Paolo Bonzini In these tests, the purpose of the initial calls to aio_poll and g_main_context_iteration is simply to put the AioContext in a known state; the return value of the function does not really matter. The next patch will change those return values; change the assertions to a whil

Re: [Qemu-devel] [PATCH RFC v2 05/47] qapi: Reject -p arguments that break qapi-event.py

2015-07-20 Thread Eric Blake
On 07/20/2015 11:57 AM, Eric Blake wrote: > 'qemu' is unusual for accepting -single-dash-long-opts; I don't think > python getopts does the same by default. Or to rephrase, qemu acts as though it uses GNU getopt_long_only() (some programs like gcc do likewise), but MOST programs that take long opt

[Qemu-devel] qemu-iotests 134 broken?

2015-07-20 Thread Stefan Hajnoczi
I'm getting the following failure on qemu.git/master. Is anyone already working on this? 134 5s ... - output mismatch (see 134.out.bad) --- /home/stefanha/qemu/tests/qemu-iotests/134.out 2015-07-10 11:45:40.491395644 +0100 +++ 134.out.bad 2015-07-20 19:01:23.953969973 +0100 @@ -31,6 +31,7 @

Re: [Qemu-devel] Summary MTTCG related patch sets

2015-07-20 Thread Frederic Konrad
On 20/07/2015 19:41, alvise rigo wrote: Hi Alex, Thank you for this summary. Some comments below. On Mon, Jul 20, 2015 at 6:17 PM, Alex Bennée wrote: Hi, Following this afternoons call I thought I'd summarise the state of the various patch series and their relative dependencies. We re-stated

[Qemu-devel] [PATCH v4 31/38] blockdev: Implement change with basic operations

2015-07-20 Thread Max Reitz
Implement 'change' on block devices by calling blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium (a variation of that which does not need a node-name) and blockdev-close-tray. Signed-off-by: Max Reitz --- blockdev.c | 187 ++---

[Qemu-devel] [PATCH v4 38/38] iotests: Add test for change-related QMP commands

2015-07-20 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/118 | 638 + tests/qemu-iotests/118.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 644 insertions(+) create mode 100755 tests/qemu-iotests/118 create mode

[Qemu-devel] [PATCH v4 30/38] blockdev: Implement eject with basic operations

2015-07-20 Thread Max Reitz
Implement 'eject' by calling blockdev-open-tray and blockdev-remove-medium. Signed-off-by: Max Reitz --- blockdev.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index a80d0e2..0a4a761 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1952,16

[Qemu-devel] [PULL for-2.4 4/4] AioContext: fix broken ctx->dispatching optimization

2015-07-20 Thread Stefan Hajnoczi
From: Paolo Bonzini This patch rewrites the ctx->dispatching optimization, which was the cause of some mysterious hangs that could be reproduced on aarch64 KVM only. The hangs were indirectly caused by aio_poll() and in particular by flash memory updates's call to blk_write(), which invokes aio_p

Re: [Qemu-devel] [PATCH RFC v2 05/47] qapi: Reject -p arguments that break qapi-event.py

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > qapi-event.py breaks when you ask for a funny prefix like '@'. > Protect it. Only possible from the command line (not triggered by our makefiles); but doesn't hurt. > > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 6 ++ > 1 f

[Qemu-devel] [PATCH v4 32/38] block: Inquire tray state before tray-moved events

2015-07-20 Thread Max Reitz
blk_dev_change_media_cb() is called for all potential tray movements; however, it is possible to request closing the tray but nothing actually happening (on a floppy disk drive without a medium). Thus, the actual tray status should be inquired before sending a tray-moved event (and an event should

[Qemu-devel] [PATCH v4 27/38] blockdev: Add blockdev-close-tray

2015-07-20 Thread Max Reitz
Signed-off-by: Max Reitz --- blockdev.c | 23 +++ qapi/block-core.json | 16 qmp-commands.hx | 35 +++ 3 files changed, 74 insertions(+) diff --git a/blockdev.c b/blockdev.c index 265b7a9..7af6a71 100644 --- a/bl

[Qemu-devel] [PATCH v4 19/38] block: Prepare remaining BB functions for NULL BDS

2015-07-20 Thread Max Reitz
There are several BlockBackend functions which, in theory, cannot fail. This patch makes them cope with the BlockDriverState pointer being NULL by making them fall back to some default action like ignoring the value in setters and returning the default in getters. Signed-off-by: Max Reitz Reviewe

[Qemu-devel] [PATCH v4 24/38] blockdev: Allow more options for BB-less BDS tree

2015-07-20 Thread Max Reitz
Most of the options which blockdev_init() parses for both the BlockBackend and the root BDS are valid for just the root BDS as well (e.g. read-only). This patch allows specifying these options even if not creating a BlockBackend. Signed-off-by: Max Reitz --- blockdev.c | 160

[Qemu-devel] [PATCH v4 37/38] iotests: More options for VM.add_drive()

2015-07-20 Thread Max Reitz
This patch allows specifying the interface to be used for the drive, and makes specifying a path optional (if the path is None, the "file" option will be omitted, thus creating an empty drive). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/iotests.py | 9 ++--- 1 f

[Qemu-devel] [PATCH v4 35/38] blockdev: read-only-mode for blockdev-change-medium

2015-07-20 Thread Max Reitz
Add an option to qmp_blockdev_change_medium() which allows changing the read-only status of the block device whose medium is changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the drive. Some users may

[Qemu-devel] [PATCH v4 25/38] block: Add blk_remove_bs()

2015-07-20 Thread Max Reitz
This function removes the BlockDriverState associated with the given BlockBackend from that BB and sets the BDS pointer in the BB to NULL. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/block-backend.c | 22 +- include/sysemu/block-backend.h | 1 + 2 fi

[Qemu-devel] [PATCH v4 21/38] block: Prepare for NULL BDS

2015-07-20 Thread Max Reitz
blk_bs() will not necessarily return a non-NULL value any more (unless blk_is_available() is true or it can be assumed to otherwise, e.g. because it is called immediately after a successful blk_new_with_bs() or blk_new_open()). Signed-off-by: Max Reitz --- block.c | 5 ++ block/qap

[Qemu-devel] [PATCH v4 28/38] blockdev: Add blockdev-remove-medium

2015-07-20 Thread Max Reitz
Signed-off-by: Max Reitz --- blockdev.c | 30 ++ qapi/block-core.json | 15 +++ qmp-commands.hx | 45 + 3 files changed, 90 insertions(+) diff --git a/blockdev.c b/blockdev.c index 7af6a71..481760a

[Qemu-devel] [PATCH v4 22/38] blockdev: Do not create BDS for empty drive

2015-07-20 Thread Max Reitz
Do not use "rudimentary" BDSs for empty drives any longer (for freshly created drives). With this change, bdrv_close_all() has no effect on empty drives (whose media were not changed) any longer. This breaks some test outputs, fix them. After a follow-up patch, empty drives will generally use a N

[Qemu-devel] [PATCH v4 16/38] block: Add BlockBackendRootState

2015-07-20 Thread Max Reitz
This structure will store some of the state of the root BDS if the BDS tree is removed, so that state can be restored once a new BDS tree is inserted. Signed-off-by: Max Reitz --- block/block-backend.c | 37 + include/block/block_int.h | 10 +

[Qemu-devel] [PATCH v4 36/38] hmp: Add read-only-mode option to change command

2015-07-20 Thread Max Reitz
Expose the new read-only-mode option of 'blockdev-change-medium' for the 'change' HMP command. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- hmp-commands.hx | 20 +--- hmp.c | 22 +- 2 files changed, 38 insertions(+), 4 deletions(-) diff --g

[Qemu-devel] [PATCH v4 26/38] blockdev: Add blockdev-open-tray

2015-07-20 Thread Max Reitz
Signed-off-by: Max Reitz --- blockdev.c | 49 + qapi/block-core.json | 23 +++ qmp-commands.hx | 39 +++ 3 files changed, 111 insertions(+) diff --git a/blockdev.c b/blockdev.c

[Qemu-devel] [PATCH v4 13/38] block: Remove wr_highest_sector from BlockAcctStats

2015-07-20 Thread Max Reitz
BlockAcctStats contains statistics about the data transferred from and to the device; wr_highest_sector does not fit in with the rest. Furthermore, those statistics are supposed to be specific for a certain device and not necessarily for a BDS (see the comment above bdrv_get_stats()); on the other

[Qemu-devel] [PATCH v4 20/38] block: Add blk_insert_bs()

2015-07-20 Thread Max Reitz
This function associates the given BlockDriverState with the given BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block/block-backend.c | 16 include/sysemu/block-backend.h | 1 + 2 files changed, 17 insertions(+) diff

Re: [Qemu-devel] Summary MTTCG related patch sets

2015-07-20 Thread Frederic Konrad
On 20/07/2015 18:17, Alex Bennée wrote: Hi, Following this afternoons call I thought I'd summarise the state of the various patch series and their relative dependencies. We re-stated the aim should be to get what is up-streamable through the review process and heading for merge so the delta for

[Qemu-devel] [PATCH v4 23/38] blockdev: Pull out blockdev option extraction

2015-07-20 Thread Max Reitz
Extract some of the blockdev option extraction code from blockdev_init() into its own function. This simplifies blockdev_init() and will allow reusing the code in a different function added in a follow-up patch. Signed-off-by: Max Reitz --- blockdev.c | 209 +-

[Qemu-devel] [PATCH v4 09/38] hw/block/fdc: Implement tray status

2015-07-20 Thread Max Reitz
The tray of an FDD is open iff there is no medium inserted (there are only two states for an FDD: "medium inserted" or "no medium inserted"). This results in the tray being reported as open if qemu has been started with the default floppy drive, which breaks some tests. Fix them. Signed-off-by: M

[Qemu-devel] [PATCH v4 18/38] block: Fail requests to empty BlockBackend

2015-07-20 Thread Max Reitz
If there is no BlockDriverState in a BlockBackend or if the tray of the guest device is open, fail all requests (where that is possible) with -ENOMEDIUM. The reason the status of the guest device is taken into account is because once the guest device's tray is opened, any request on the same Block

[Qemu-devel] [PATCH v4 34/38] hmp: Use blockdev-change-medium for change command

2015-07-20 Thread Max Reitz
Use separate code paths for the two overloaded functions of the 'change' HMP command, and invoke the 'blockdev-change-medium' QMP command if used on a block device (by calling qmp_blockdev_change_medium()). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- hmp.c | 27 +++-

[Qemu-devel] [PATCH v4 17/38] block: Make some BB functions fall back to BBRS

2015-07-20 Thread Max Reitz
If there is no BDS tree attached to a BlockBackend, functions that can do so should fall back to the BlockBackendRootState structure (which are blk_is_read_only() and blk_get_flags(), because the read-only status and the "open flags" are part of the BBRS). Signed-off-by: Max Reitz Reviewed-by: Er

[Qemu-devel] [PATCH v4 10/38] hw/usb-storage: Check whether BB is inserted

2015-07-20 Thread Max Reitz
Only call bdrv_add_key() on the BlockDriverState if it is not NULL. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- hw/usb/dev-storage.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/hw/usb/dev-storage.c b/

[Qemu-devel] [PATCH v4 14/38] block: Move BlockAcctStats into BlockBackend

2015-07-20 Thread Max Reitz
As the comment above bdrv_get_stats() says, BlockAcctStats is something which belongs to the device instead of each BlockDriverState. This patch therefore moves it into the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c

[Qemu-devel] [PATCH v4 15/38] block: Move I/O status and error actions into BB

2015-07-20 Thread Max Reitz
These options are only relevant for the user of a whole BDS tree (like a guest device or a block job) and should thus be moved into the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block.c| 125 - block/backup

[Qemu-devel] [PATCH v4 33/38] qmp: Introduce blockdev-change-medium

2015-07-20 Thread Max Reitz
Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz --- blockdev.c| 7 --- inclu

[Qemu-devel] [PATCH v4 06/38] block: Make bdrv_is_inserted() recursive

2015-07-20 Thread Max Reitz
If bdrv_is_inserted() is called on the top level BDS, it should make sure all nodes in the BDS tree are actually inserted. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH v4 08/38] block: Invoke change media CB before NULLing drv

2015-07-20 Thread Max Reitz
In order to handle host device passthrough, some guest device models may call blk_is_inserted() to check whether the medium is inserted on the host, when checking the guest tray status. This tray status is inquired by blk_dev_change_media_cb(); because bdrv_is_inserted() (invoked by blk_is_inserte

Re: [Qemu-devel] [RFC PATCH V3 0/3] Multithread TCG async_safe_work part.

2015-07-20 Thread Frederic Konrad
On 20/07/2015 19:36, Alex Bennée wrote: fred.kon...@greensocs.com writes: From: KONRAD Frederic This is the async_safe_work introduction bit of the Multithread TCG work. Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). (Currently untested as I need to rebase MTTCG firs

[Qemu-devel] [PATCH v4 04/38] block: Make bdrv_is_inserted() return a bool

2015-07-20 Thread Max Reitz
Make bdrv_is_inserted(), blk_is_inserted(), and the callback BlockDriver.bdrv_is_inserted() return a bool. Suggested-by: Eric Blake Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c| 12 +++- block/block-backend.c

[Qemu-devel] [PATCH v4 03/38] iotests: Only create BB if necessary

2015-07-20 Thread Max Reitz
Tests 071 and 081 test giving references in blockdev-add. It is not necessary to create a BlockBackend here, so omit it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- tests/qemu-iotests/071 | 50 ++ tests/qemu-i

[Qemu-devel] [PATCH v4 29/38] blockdev: Add blockdev-insert-medium

2015-07-20 Thread Max Reitz
And a helper function for that, which directly takes a pointer to the BDS to be inserted instead of its node-name (which will be used for implementing 'change' using blockdev-insert-medium). Signed-off-by: Max Reitz --- blockdev.c | 48

[Qemu-devel] [PATCH v4 12/38] block: Move guest_block_size into BlockBackend

2015-07-20 Thread Max Reitz
guest_block_size is a guest device property so it should be moved into the interface between block layer and guest devices, which is the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c | 7 --- block/block-backend.c

[Qemu-devel] [PATCH v4 05/38] block: Add blk_is_available()

2015-07-20 Thread Max Reitz
blk_is_available() returns true iff the BDS is inserted (which means blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the tray of the guest device is closed. blk_is_inserted() is changed to return true only if blk_bs() is not NULL. Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v4 01/38] block: Remove host floppy support

2015-07-20 Thread Max Reitz
It has been deprecated as of 2.3, so we can now remove it. Signed-off-by: Max Reitz --- block/raw-posix.c| 217 ++- qapi/block-core.json | 9 +-- 2 files changed, 11 insertions(+), 215 deletions(-) diff --git a/block/raw-posix.c b/block/raw-

[Qemu-devel] [PATCH v4 11/38] block: Fix BB AIOCB AioContext without BDS

2015-07-20 Thread Max Reitz
Fix the BlockBackend's AIOCB AioContext for aborting AIO in case there is no BDS. If there is no implementation of AIOCBInfo::get_aio_context() the AioContext is derived from the BDS the AIOCB belongs to. If that BDS is NULL (because it has been removed from the BB) this will not work. This patch

[Qemu-devel] [PATCH v4 07/38] block/quorum: Implement bdrv_is_inserted()

2015-07-20 Thread Max Reitz
bdrv_is_inserted() should be invoked recursively on the children of quorum. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block/quorum.c | 16 1 file changed, 16 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 4e66221..b7a4c

[Qemu-devel] [PATCH v4 00/38] blockdev: BlockBackend and media

2015-07-20 Thread Max Reitz
First of all: Thank you, Eric and Berto, for reviewing v3! And thank you, Fam, for at least having a peek at it and being confident enough to base a series of your own on it. :-) This series reworks a lot regarding BlockBackend and media. Basically, it allows empty BlockBackends, that is BBs witho

[Qemu-devel] [PATCH v4 02/38] blockdev: Allow creation of BDS trees without BB

2015-07-20 Thread Max Reitz
If the "id" field is missing from the options given to blockdev-add, just omit the BlockBackend and create the BlockDriverState tree alone. However, if "id" is missing, "node-name" must be specified; otherwise, the BDS tree would no longer be accessible. Many BDS options which are not parsed by b

Re: [Qemu-devel] [PATCH RFC v2 04/47] qapi-event: Clean up how name of enum QAPIEvent is made

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > Use c_name() instead of ad hoc code. Doesn't upcase the -p prefix, > which is an improvement in my book. Unbreaks prefix containing '.', > but other funny characters remain broken. To be fixed next. > > Signed-off-by: Markus Armbruster > --- >

Re: [Qemu-devel] Summary MTTCG related patch sets

2015-07-20 Thread alvise rigo
Hi Alex, Thank you for this summary. Some comments below. On Mon, Jul 20, 2015 at 6:17 PM, Alex Bennée wrote: > > Hi, > > Following this afternoons call I thought I'd summarise the state of the > various patch series and their relative dependencies. We re-stated the > aim should be to get what i

Re: [Qemu-devel] [RFC PATCH V3 0/3] Multithread TCG async_safe_work part.

2015-07-20 Thread Alex Bennée
fred.kon...@greensocs.com writes: > From: KONRAD Frederic > > This is the async_safe_work introduction bit of the Multithread TCG work. > Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). > > (Currently untested as I need to rebase MTTCG first.) > > It can be cloned here: >

Re: [Qemu-devel] [PATCH RFC v2 03/47] qapi: Simplify guardname()

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > The guards around built-in declarations lose their _H. It never made > much sense anyway. Correct - the _H tail on the guard for the overall file makes sense (when the overall file ends in .h), but for an unrelated use in the middle of the file,

Re: [Qemu-devel] [PATCH] vfio/pci: Cleanup vfio_early_setup_msix() error path

2015-07-20 Thread Laszlo Ersek
On 07/20/15 18:41, Alex Williamson wrote: > With the addition of the Chelsio quirk we have an error path out of > vfio_early_setup_msix() that doesn't free the allocated VFIOMSIXInfo > struct. This doesn't introduce a leak as it still gets freed in the > vfio_put_device() path, but it's complicate

[Qemu-devel] [PULL for-2.4 5/7] etraxfs_eth: Drop eth_can_receive

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng True is the default. Signed-off-by: Fam Zheng Reviewed-by: Jason Wang Message-id: 1435734647-8371-3-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/net/etraxfs_eth.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/net/etraxfs_eth.c b/hw/net/et

  1   2   3   >