Re: [Qemu-devel] [PATCH for-2.4] timer: rename NSEC_PER_SEC due to Mac OS X header clash

2015-07-20 Thread Peter Maydell
On 20 July 2015 at 17:41, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Jul 20, 2015 at 2:02 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 8 July 2015 at 15:10, Stefan Hajnoczi stefa...@redhat.com wrote: Commit e0cf11f31c24cfb17f44ed46c254d84c78e7f6e9 (timer: Use a single

[Qemu-devel] [PULL for-2.4 0/7] Net 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/net-pull-request for you to

[Qemu-devel] [PULL for-2.4 3/7] net/vmxnet3: Fix RX TCP/UDP checksum on partially summed packets

2015-07-20 Thread Stefan Hajnoczi
From: Dana Rubin dana.ru...@ravellosystems.com Convert partially summed packets to be fully checksummed. In case csum offloaded packet, vmxnet3 implementation always passes an RxCompDesc with the Checksum calculated and found correct notification to the OS. This emulates the observed ESXi

[Qemu-devel] [PULL for-2.4 6/7] lan9118: Drop lan9118_can_receive

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com True is the default. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com Message-id: 1435734647-8371-4-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- hw/net/lan9118.c | 6 -- 1 file

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

2015-07-20 Thread Daniel P. Berrange
The current unit test only verify the encryption API, which resulted in us missing a recently introduced bug in the decryption API from commit d3462e3. It was fortunately later discovered fixed by commit bd0959 thanks to the QEMU I/O tests for qcow2 encryption, but we should really detect this

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 alex.ben...@linaro.org 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

[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

[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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- block/quorum.c | 16 1 file changed, 16 insertions(+) diff --git

[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 ebl...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- block.c

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 fred.kon...@greensocs.com This is the async_safe_work introduction bit of the Multithread TCG work. Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). (Currently untested as I

[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: Max

[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 mre...@redhat.com --- blockdev.c | 209

[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 mre...@redhat.com --- block/block-backend.c | 37 +

[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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block/block-backend.c | 22 +-

[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

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 arm...@redhat.com --- scripts/qapi.py | 6

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

2015-07-20 Thread Stefan Hajnoczi
From: Paolo Bonzini pbonz...@redhat.com 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. -

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

2015-07-20 Thread Stefan Hajnoczi
From: Paolo Bonzini pbonz...@redhat.com 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

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 opts

[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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- 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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block.c| 125

[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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Alberto

[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 mre...@redhat.com --- blockdev.c|

[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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- block.c | 7 +++ 1 file changed, 3

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 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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Alberto Garcia be...@igalia.com --- block/block-backend.c | 16

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

2015-07-20 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- 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

[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

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

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com 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 f...@redhat.com Reviewed-by: Stefan Hajnoczi

[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 mre...@redhat.com --- block/raw-posix.c| 217 ++- qapi/block-core.json | 9 +-- 2 files changed, 11 insertions(+), 215 deletions(-) diff --git

[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 mre...@redhat.com

[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 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

[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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com ---

[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 mre...@redhat.com

[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

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

2015-07-20 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- 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

[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

[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

[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 mre...@redhat.com --- 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 mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com ---

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

2015-07-20 Thread Stefan Hajnoczi
From: Paolo Bonzini pbonz...@redhat.com 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(),

[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 mre...@redhat.com --- 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 +++

[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

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 fred.kon...@greensocs.com 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 alex.ben...@linaro.org wrote: Hi, Following this afternoons

[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

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 about 32-bit x86. :) I agree that !x86 is

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 x86. :) I agree

Re: [Qemu-devel] [PATCH for-2.4 2/2] qom: Fix invalid error check in property_get_str()

2015-07-20 Thread Eric Blake
On 07/01/2015 09:47 AM, Markus Armbruster wrote: When a function returns a null pointer on error and only on error, you can do if (!foo(foos, errp)) { ... handle error ... } instead of the more cumbersome Error *err = NULL; if (!foo(foos, err)) {

Re: [Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-20 Thread Stefan Hajnoczi
On Sat, Jul 18, 2015 at 01:44:24AM +0900, Hitoshi Mitake wrote: Current sheepdog driver only serializes create requests in oid unit. This mechanism isn't enough for handling requests to overwrapping area spanning multiple oids, so it can result bugs like below:

Re: [Qemu-devel] [RFC PATCH V3 1/3] cpus: protect queued_work_* with work_mutex.

2015-07-20 Thread Alex Bennée
fred.kon...@greensocs.com writes: From: KONRAD Frederic fred.kon...@greensocs.com This protects queued_work_* used by async_run_on_cpu, run_on_cpu and flush_queued_work with a new lock (work_mutex) to prevent multiple (concurrent) access. Signed-off-by: KONRAD Frederic

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 09/10] qga: added bus type and disk location path

2015-07-20 Thread Denis V. Lunev
On 07/20/2015 06:06 PM, Eric Blake wrote: On 07/06/2015 10:40 PM, Michael Roth wrote: From: Olga Krishtal okrish...@virtuozzo.com According to Microsoft disk location path can be obtained via IOCTL_SCSI_GET_ADDRESS. Unfortunately this ioctl can not be used for all devices. There are certain

Re: [Qemu-devel] [PATCH v2 3/6] block: Extract blockdev part of qmp_drive_mirror

2015-07-20 Thread Max Reitz
On 25.06.2015 05:22, Fam Zheng wrote: This is the part that will be reused by blockdev-mirror. Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 155 - 1 file changed, 92 insertions(+), 63 deletions(-) As you probably know

Re: [Qemu-devel] [PATCH for-2.4] tests: Fix broken targets check-report-qtest-*

2015-07-20 Thread John Snow
On 07/18/2015 10:54 AM, Stefan Weil wrote: 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'

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

2015-07-20 Thread Stefan Hajnoczi
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 functions, by returning 0 if all receiving ports return 0.

[Qemu-devel] [PULL for-2.4 4/7] musicpal: Drop eth_can_receive

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com True is the default. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com Message-id: 1435734647-8371-2-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- hw/arm/musicpal.c | 6 -- 1 file

[Qemu-devel] [PULL for-2.4 7/7] net: Flush queued packets when guest resumes

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com Since commit 6e99c63 net/socket: Drop net_socket_can_send and friends, net queues need to be explicitly flushed after qemu_can_send_packet() returns false, because the netdev side will disable the polling of fd. This fixes the case of cont after stop (or

[Qemu-devel] [PULL for-2.4 1/7] socket: pass correct size in net_socket_send()

2015-07-20 Thread Stefan Hajnoczi
From: Jason Wang jasow...@redhat.com We should pass the size of packet instead of the remaining to qemu_send_packet_async(). Fixes: 6e99c631f116221d169ea53953d91b8aa74d297a (net/socket: Drop net_socket_can_send) Signed-off-by: Jason Wang jasow...@redhat.com Reviewed-by: Fam Zheng

[Qemu-devel] [PULL for-2.4 2/7] net/vmxnet3: Refactor 'vmxnet_rx_pkt_attach_data'

2015-07-20 Thread Stefan Hajnoczi
From: Shmulik Ladkani shmulik.ladk...@ravellosystems.com Separate RX packet protocol parsing out of 'vmxnet_rx_pkt_attach_data'. Signed-off-by: Shmulik Ladkani shmulik.ladk...@ravellosystems.com Message-id: 1436864116-19154-2-git-send-email-shmulik.ladk...@ravellosystems.com Signed-off-by:

Re: [Qemu-devel] [PATCH v2 5/6] qmp: Add blockdev-mirror command

2015-07-20 Thread Max Reitz
On 25.06.2015 05:22, Fam Zheng wrote: This will start a mirror job from a named device to another named device, its relation with drive-mirror is similar with blockdev-backup to drive-backup. In blockdev-mirror, the target node should be prepared by blockdev-add, which will be responsible for

Re: [Qemu-devel] [PULL 0/1] Block layer patches for 2.4.0-rc2

2015-07-20 Thread Peter Maydell
On 20 July 2015 at 15:54, Kevin Wolf kw...@redhat.com wrote: The following changes since commit 71358470eec668f5dc53def25e585ce250cea9bf: Merge remote-tracking branch 'remotes/amit-virtio-rng/tags/vrng-2.4' into staging (2015-07-17 15:22:45 +0100) are available in the git repository at:

Re: [Qemu-devel] [PATCH 1/1] virtio-mmio: return the max queue num of virtio-mmio with initial value

2015-07-20 Thread Wei Huang
On 07/20/2015 06:07 AM, Peter Maydell wrote: On 16 July 2015 at 19:38, Wei Huang w...@redhat.com wrote: Recently we found that virtio-console devices consumes lots AArch64 guest memory, roughly 1GB with 8 devices. After debugging, it turns out that lots of factors contribute to this problem:

Re: [Qemu-devel] [PATCH v2] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-20 Thread Programmingkid
On Jul 20, 2015, at 8:46 AM, Laurent Vivier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/07/2015 12:48, Stefan Hajnoczi wrote: On Fri, Jul 17, 2015 at 03:24:34PM -0400, Programmingkid wrote: On Jul 17, 2015, at 9:41 AM, Stefan Hajnoczi wrote: On Thu, Jul 16, 2015 at

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx-dispatching is dead, all hail ctx-notify_me

2015-07-20 Thread Stefan Hajnoczi
On Sat, Jul 18, 2015 at 10:21:28PM +0200, Paolo Bonzini wrote: The change from v2 is very small, notify_me is decremented as soon as ppoll returns. Paolo v1-v2 Split some changes to the tests to a separate patch Fix commit message [Laszlo] Clarify do...while loop

[Qemu-devel] Summary MTTCG related patch sets

2015-07-20 Thread Alex Bennée
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 a full working MTTCG can be as low as

Re: [Qemu-devel] [PATCH 0/3] hw/net: Drop unnecessary .can_receive functions

2015-07-20 Thread Stefan Hajnoczi
On Wed, Jul 01, 2015 at 03:10:44PM +0800, Fam Zheng wrote: These are all repeating the default, and since we're cleaning up .can_receive, let's get these out of the way. Fam Fam Zheng (3): musicpal: Drop eth_can_receive etraxfs_eth: Drop eth_can_receive lan9118: Drop

Re: [Qemu-devel] [PATCH] xen: Drop net_rx_ok

2015-07-20 Thread Stefan Hajnoczi
On Thu, Jul 02, 2015 at 01:39:16PM +0100, Stefan Hajnoczi wrote: On Tue, Jun 30, 2015 at 10:42:37AM +0800, Fam Zheng wrote: This is necessary because once we return false from .can_receive, we need to flush the queue when the .can_receive conditions become true again, (for example when more

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 complicated

Re: [Qemu-devel] [PATCH v2 1/6] block: Add blocker on mirror target

2015-07-20 Thread Max Reitz
On 25.06.2015 05:22, Fam Zheng wrote: In block/backup.c, we already check and add blocker on the target bs, which is necessary so that it won't be intervened with other operations. In block/mirror.c we should also protect the mirror target bs, because it could have a node-name (drive-mirror ...

Re: [Qemu-devel] [PATCH RFC v2 01/47] qapi: Clarify docs on including the same file multiple times

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: It's idempotent. Signed-off-by: Markus Armbruster arm...@redhat.com --- docs/qapi-code-gen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake ebl...@redhat.com -- Eric Blake eblake redhat com

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

2015-07-20 Thread 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 this point, you must wait for guest to

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 fred.kon...@greensocs.com 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.)

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

2015-07-20 Thread Mark Burton
Huge thanks Alex, really good summary Cheers Mark. On 20 Jul 2015, at 18:17, Alex Bennée alex.ben...@linaro.org 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

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

2015-07-20 Thread Stefan Hajnoczi
On Mon, Jul 20, 2015 at 07:27:11AM +0200, Paolo Bonzini wrote: event_notifier_test_and_clear must be called before processing events. Otherwise, an aio_poll could eat the notification before the main I/O thread invokes ppoll(). The main I/O thread then never wakes up. This is an example of

Re: [Qemu-devel] [PATCH RFC v2 02/47] qapi: Clean up cgen() and mcgen()

2015-07-20 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: Commit 05dfb26 added eatspace stripping to mcgen(). Move it to cgen(), just in case somebody gets tempted to use cgen() directly instead of via mcgen(). cgen() indents blank lines. No such lines get generated right now, but fix it anyway.

Re: [Qemu-devel] [PATCH v2 for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-20 Thread Stefan Hajnoczi
On Wed, Jul 15, 2015 at 06:19:01PM +0800, Fam Zheng wrote: v2: Don't use BH in patches 6 and 12. [Jason] Add Stefan's reviewed-by in all others. Drop trace point in patch 8 and move function body upward. [Michael] Since a90a742 tap: Drop tap_can_send, all nics that returns false from

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

2015-07-20 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com True is the default. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com Message-id: 1435734647-8371-3-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- hw/net/etraxfs_eth.c | 6 -- 1 file

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 fred.kon...@greensocs.com 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

Re: [Qemu-devel] Poor disk I/O performance

2015-07-20 Thread Gleb Stepanov
Also, i want to say that qcow2 that was mounted on nb0 is placed on /dev/sda. Kind regards, Gleb Stepanov.

Re: [Qemu-devel] [PATCH] qemu-common.h: Document cutils.c string functions

2015-07-20 Thread Eric Blake
On 07/19/2015 02:34 PM, Peter Maydell wrote: Add documentation comments for various utility string functions which we have implemented in util/cutils.c: pstrcpy() strpadcpy() pstrcat() strstart() stristart() qemu_strnlen() qemu_strsep() Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH for-2.4] tests: Fix broken targets check-report-qtest-*

2015-07-20 Thread John Snow
On 07/18/2015 10:54 AM, Stefan Weil wrote: 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'

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,

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

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] crypto: extend unit tests to cover decryption too

2015-07-20 Thread Peter Maydell
On 20 July 2015 at 21:57, Eric Blake ebl...@redhat.com 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

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 ebl...@redhat.com 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

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()'s

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

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

2015-07-20 Thread John Snow
From: Stefan Fritsch s...@sfritsch.de 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.

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 mar...@redhat.com Thanks! Applied to the NUMA queue. -- Eduardo

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

2015-07-20 Thread John Snow
From: Stefan Hajnoczi stefa...@redhat.com 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.

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 ehabk...@redhat.com wrote: On Thu, Jul 16, 2015 at 11:02:14PM +0200, Igor Mammedov wrote: On Thu, 16 Jul 2015 17:39:17 -0300

[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

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 lock_iothread

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 ehabk...@redhat.com 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 ehabk...@redhat.com wrote:

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

2015-07-20 Thread Stefan Hajnoczi
On Mon, Jul 20, 2015 at 7:37 PM, Max Reitz mre...@redhat.com 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) ---

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

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

2015-07-20 Thread Lin Ma
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 (qemu) device_add virtio-gpu-pci,id=gpu0 Duplicate ID 'gpu0' for device Try help device_add for more

<    1   2   3   >