[Qemu-devel] [PULL v2 01/65] nbd: Drop BDS backpointer

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Before this patch, the opaque pointer in an NBD BDS points to a BDRVNBDState, which contains an NbdClientSession object, which in turn contains a pointer to the BDS. This pointer may become invalid due to bdrv_swap(), so drop it, and instead pass the BDS directly

[Qemu-devel] [PULL v2 08/65] libqos: add alloc_init_flags

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Allow a generic interface to alloc_init_flags, not just through pc_alloc_init_flags. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id: 1421698563-6977-6-git-send-email-js...@redhat.com Signed-off-by: Stefan

[Qemu-devel] [PULL v2 35/65] libqos/ahci: add ahci_io

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com ahci_io is a wrapper around ahci_guest_io that takes a pointer to host memory instead, and will create a guest memory buffer and copy the data to/from as needed and as appropriate for a read/write command, such that after a read, the guest data will be in a host

[Qemu-devel] [PULL v2 43/65] qemu-io: Account IO by aio_read and aio_write

2015-02-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com This will enable accounting of aio requests issued from qemu-io aio read/write commands. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Message-id: 1422586186-9925-2-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PULL v2 51/65] block: Add blk_new_open()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com blk_new_with_bs() creates a BlockBackend with an empty BlockDriverState attached to it. Empty BDSs are not nice, therefore add an alternative function which combines blk_new_with_bs() with bdrv_open(). Note: In contrast to bdrv_open() which takes a BlockDriver

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Machine menu patch for Mac OS X

2015-02-16 Thread Kevin Wolf
Am 16.02.2015 um 17:12 hat Programmingkid geschrieben: On Feb 16, 2015, at 10:42 AM, Kevin Wolf wrote: Am 16.02.2015 um 16:31 hat Programmingkid geschrieben: On Feb 16, 2015, at 5:08 AM, Kevin Wolf wrote: Am 14.02.2015 um 03:28 hat Peter Maydell geschrieben: On 14 February 2015

Re: [Qemu-devel] [PATCH 2/3] pci: split shpc_cleanup and shpc_free

2015-02-16 Thread Michael S. Tsirkin
On Fri, Feb 13, 2015 at 03:57:10PM +0100, Paolo Bonzini wrote: object_unparent should not be called until the parent device is going to be destroyed. Only remove the capability and do memory_region_del_subregion at unrealize time. Freeing the data structures is left in shpc_free, to be

[Qemu-devel] [PATCH v2 1/4] virtio-pci: add flags to enable/disable legacy/modern

2015-02-16 Thread Gerd Hoffmann
Add VIRTIO_PCI_FLAG_DISABLE_LEGACY and VIRTIO_PCI_FLAG_DISABLE_MODERN for VirtIOPCIProxy-flags. Also add properties for them. They can be used to disable modern (virtio 1.0) or legacy (virtio 0.9) modes. By default both are advertized and the guest driver can choose. Signed-off-by: Gerd

[Qemu-devel] [PULL v2 17/65] qtest/ahci: Bookmark FB and CLB pointers

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Instead of re-querying the AHCI device for the FB and CLB buffers, save the pointer we gave to the device during initialization and reference these values instead. [Peter Maydell peter.mayd...@linaro.org reported the following clang compiler warnings:

[Qemu-devel] [PULL v2 52/65] block: Add Error parameter to bdrv_find_protocol()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com The argument given to bdrv_find_protocol() is just a file name, which makes it difficult for the caller to reconstruct what protocol bdrv_find_protocol() was hoping to find. This patch adds an Error parameter to that function to solve this issue. Suggested-by:

[Qemu-devel] [PULL v2 46/65] qemu-iotests: Allow caller to disable underscore convertion for qmp

2015-02-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com QMP command block_set_io_throttle expects underscores in parameters instead of dashes: {iops,bps}_{rd,wr,max}. Add optional argument conv_keys (defaults to True, backward compatible), it will be used in IO throttling test case. Reviewed-by: Benoit Canet

[Qemu-devel] [PULL v2 54/65] blockdev: Use blk_new_open() in blockdev_init()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Due to different error propagation, this breaks tests 051 and 087; fix their output. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Message-id: 1423162705-32065-6-git-send-email-mre...@redhat.com Signed-off-by: Stefan

[Qemu-devel] [PULL v2 39/65] nbd: fix the co_queue multi-adding bug

2015-02-16 Thread Stefan Hajnoczi
From: Bin Wu wu.wu...@huawei.com When we tested the VM migartion between different hosts with NBD devices, we found if we sent a cancel command after the drive_mirror was just started, a coroutine re-enter error would occur. The stack was as follow: (gdb) bt 00) 0x7fdfc744d885 in raise ()

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Machine menu patch for Mac OS X

2015-02-16 Thread Programmingkid
On Feb 16, 2015, at 10:42 AM, Kevin Wolf wrote: Am 16.02.2015 um 16:31 hat Programmingkid geschrieben: On Feb 16, 2015, at 5:08 AM, Kevin Wolf wrote: Am 14.02.2015 um 03:28 hat Peter Maydell geschrieben: On 14 February 2015 at 01:43, Programmingkid programmingk...@gmail.com wrote:

[Qemu-devel] [PULL v2 57/65] qemu-img: Use blk_new_open() in img_rebase()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Message-id: 1423162705-32065-9-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- qemu-img.c | 49

Re: [Qemu-devel] [PATCH v2 02/17] include: import virtio headers from linux 4.0

2015-02-16 Thread Michael S. Tsirkin
On Mon, Feb 16, 2015 at 05:03:16PM +0100, Thomas Huth wrote: On Sun, 15 Feb 2015 12:38:37 +0100 Michael S. Tsirkin m...@redhat.com wrote: Add files imported from linux-next (what will become linux 4.0) using scripts/update-linux-headers.sh Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 42/65] qtest: Fix deadloop by running main loop AIO context's timers

2015-02-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com qemu_clock_run_timers() only takes care of main_loop_tlg, we shouldn't forget aio timer list groups. Currently, the qemu_clock_deadline_ns_all (a few lines above) counts all the timergroups of this clock type, including aio tlg, but we don't fire them, so they are

Re: [Qemu-devel] [PATCH 0/3] pci: fix memory region lifecycle issues, document the rules

2015-02-16 Thread Michael S. Tsirkin
On Fri, Feb 13, 2015 at 03:57:08PM +0100, Paolo Bonzini wrote: While these patches were originally in part 3 of the RCU patches, it turns out that the semantics they enforce are already important now (reported by Alex Williamson and Matthew Rosato), so here they are! Patch 1 fixes a

[Qemu-devel] [PULL v2 15/65] libqos/ahci: Functional register helpers

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Introduce a set of static inline register helpers that are intended to replace the current set of macros with more functional versions that are better suited to inclusion in libqos than porcelain macros. As a stopgap measure before eliminating the porcelain

[Qemu-devel] [PULL v2 22/65] qtest/ahci: rename 'Command' to 'CommandHeader'

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com The structure name is a bit of a misnomer; the structure currently named command is actually the commandheader. A future patch in this series will add an actual Command structure, so we'll rename it now before the rest of the functions in this series try to use

[Qemu-devel] [PULL v2 60/65] qemu-io: Use blk_new_open() in openfile()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Message-id: 1423162705-32065-12-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- qemu-io.c | 30 -- 1 file

[Qemu-devel] [PULL v2 59/65] qemu-nbd: Use blk_new_open() in main()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com Message-id: 1423162705-32065-11-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- qemu-nbd.c | 25 + 1 file changed,

[Qemu-devel] [PULL v2 49/65] iotests: Add test for qemu-img convert to NBD

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Message-id: 1423666727-20777-3-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- tests/qemu-iotests/123 | 62

[Qemu-devel] [PULL v2 27/65] libqos/ahci: Add cmd response sanity check helpers

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com This patch adds a few helpers to help sanity-check the response of the AHCI device after a command. ahci_d2h_check_sanity inspects the D2H Register FIS, ahci_pio_check_sanity inspects the PIO Setup FIS, and ahci_cmd_check_sanity inspects the command header. To

[Qemu-devel] [PULL v2 65/65] block: Keep bdrv_check*_request()'s return value

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Do not throw away the value returned by bdrv_check_request() and bdrv_check_byte_request(). Fix up some coding style issues in the proximity of the affected hunks. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by:

[Qemu-devel] [PATCH v2 4/4] virtio-pci: make modern bar 64bit prefetchable

2015-02-16 Thread Gerd Hoffmann
Modern bar is made prefetchable. In case it is configured to use one of the bars 0, 2, or 4 (which by default is the case) it is also configured as 64bit region. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/virtio/virtio-pci.c | 12 +--- 1 file changed, 9 insertions(+), 3

[Qemu-devel] [PULL v2 03/65] iotests: Add test for drive-mirror with NBD target

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com When the drive-mirror block job is completed, it will call bdrv_swap() on the source and the target BDS; this should obviously not result in a segmentation fault. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH 1/3] pcie: remove mmconfig memory leak and wrap mmconfig update with transaction

2015-02-16 Thread Michael S. Tsirkin
On Fri, Feb 13, 2015 at 03:57:09PM +0100, Paolo Bonzini wrote: This memory leak was introduced inadvertently by omitting object_unparent. A better fix is to use the new memory_region_set_size instead of destroying and recreating the MMIO region on the fly. Also, ensure that unmapping and

[Qemu-devel] [PULL v2 12/65] qtest/ahci: finalize AHCIQState consolidation

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Move barsize, ahci_fingerprint and capabilities registers into the AHCIQState object, removing global ahci-related state from the ahci-test.c file. More churn, less globals. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com

[Qemu-devel] [PULL v2 10/65] libqos: add pc specific interface

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Create an operations structure so that the libqos interface can be architecture agnostic, and create a pc-specific interface to functions like qtest_boot. Move the libqos object in the Makefile from being ahci-test only to being linked with all tests that utilize

[Qemu-devel] [PULL v2 26/65] libqos/ahci: Add port_check_nonbusy helper

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com A simple helper that asserts a given port is not busy processing any commands via the TFD, Command Issue and SACT registers. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id:

[Qemu-devel] [PULL v2 14/65] qtest/ahci: remove guest_malloc global

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Make helper routines rely on the earmarked guest allocator object with AHCIQState/QOSSTate instead. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id: 1421698563-6977-12-git-send-email-js...@redhat.com

[Qemu-devel] [PULL v2 18/65] libqos/ahci: create libqos/ahci.c

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com With global state removed, code responsible for booting up, verifying, and initializing the AHCI HBA is extracted and inserted into libqos/ahci.c, which would allow for other qtests in the future to quickly grab a meaningfully initialized reference to an AHCI HBA.

[Qemu-devel] [PULL v2 40/65] savevm: Improve error message for blocked migration

2015-02-16 Thread Stefan Hajnoczi
From: Kevin Wolf kw...@redhat.com If an internal snapshot can't be saved because migration is blocked (most commonly probably because of AHCI), we had a really bad error message: $ echo -e savevm foo\nquit | qemu -M q35 /tmp/test.qcow2 -monitor stdio QEMU 2.2.50 monitor - type 'help' for more

[Qemu-devel] [PULL v2 29/65] qtest/ahci: add ahci_write_fis

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to guest memory, handling endianness as-needed. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com

[Qemu-devel] [PULL v2 55/65] block/xen: Use blk_new_open() in blk_connect()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com As part of the required changes, this fixes a bug where specifying an invalid driver would result in the block layer probing the image format; now it will result in an error, unless unset is specified as the driver name. Fixing this would require further work on

[Qemu-devel] [PULL v2 47/65] qemu-iotests: Add 093 for IO throttling

2015-02-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com This case utilizes qemu-io command aio_{read,write} -q to verify the effectiveness of IO throttling options. It's implemented by driving the vm timer from qtest protocol, so the throttling timers are signaled with determinied time duration. Then we verify the

Re: [Qemu-devel] [PATCH v2 15/17] scripts: add arch specific standard-headers

2015-02-16 Thread Michael S. Tsirkin
On Mon, Feb 16, 2015 at 04:56:39PM +0100, Thomas Huth wrote: On Sun, 15 Feb 2015 12:39:25 +0100 Michael S. Tsirkin m...@redhat.com wrote: Move virtio header copying logic to a function, use that to copy arch specific virtio headers. Signed-off-by: Michael S. Tsirkin m...@redhat.com

[Qemu-devel] [PATCH v2 2/4] virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smaller

2015-02-16 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 6c0c650..cd7c777 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -975,7 +975,7 @@

[Qemu-devel] [PULL v2 06/65] libqos: create libqos.c

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com The intent of this file is to serve as a misc. utilities file to be shared amongst tests that are utilizing libqos facilities. In a later patch, migration test helpers will be added to libqos.c that will allow simplified testing of migration cases where libqos is

[Qemu-devel] [PULL v2 30/65] libqos/ahci: Add ide cmd properties

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Add a structure that defines some properties of various IDE commands. These will be used to simplify the interface to the libqos AHCI calls, lessening the redundancy of specifying and respecifying properties of commands to various helper functions. Reviewed-by:

[Qemu-devel] [PULL v2 11/65] qtest/ahci: Store hba_base in AHCIQState

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Store the HBA memory base address in the new state object, to simplify function prototypes and encourage a more functional testing style. This causes a lot of churn, but this patch is as simplified as I could get it to be. This patch is therefore fairly

[Qemu-devel] [PULL v2 04/65] libqos: Split apart pc_alloc_init

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Move the list-specific initialization over into malloc.c, to keep all of the list implementation details within the same file. The allocation and freeing of these structures are now both back within the same layer. Signed-off-by: John Snow js...@redhat.com

[Qemu-devel] [PULL v2 37/65] qtest/ahci: Assert sector size in identify test

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com A minor sanity check to assert that the sector size is 512. The current block layer code deeply assumes that the IDE sector size will be 512 bytes, so we carry forward that assumption here. This is useful for the DMA tests, which currently assume that a sector

[Qemu-devel] [PULL v2 20/65] libqos/ahci: Add ahci_port_select helper

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id: 1423158090-25580-2-git-send-email-js...@redhat.com Signed-off-by: Stefan

[Qemu-devel] [PULL v2 61/65] qemu-io: Remove growable option

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Remove growable option from the open command and from the qemu-io command line. qemu-io is about to be converted to BlockBackend which will make sure that no request exceeds the image size, so the only way to keep growable would be to use BlockBackend if it is

[Qemu-devel] [PULL v2 32/65] libqos/ahci: add ahci command verify

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Helps to verify that a command completed successfully. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id: 1423158090-25580-14-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com ---

[Qemu-devel] [PULL v2 45/65] qemu-iotests: Add VM method qtest() to iotests.py

2015-02-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com This will allow test cases to run command in qtest protocol. It's write-only for now. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Message-id: 1422586186-9925-4-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PULL v2 19/65] dataplane: endianness-aware accesses

2015-02-16 Thread Stefan Hajnoczi
From: Cornelia Huck cornelia.h...@de.ibm.com The vring.c code currently assumes that guest and host endianness match, which is not true for a number of cases: - emulating targets with a different endianness than the host - bi-endian targets, where the correct endianness depends on the virtio

[Qemu-devel] [PULL v2 41/65] block: vmdk - fixed sizeof() error

2015-02-16 Thread Stefan Hajnoczi
From: Jeff Cody jc...@redhat.com The size compared should be PATH_MAX, rather than sizeof(char *). Reported-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Jeff Cody jc...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Message-id:

[Qemu-devel] [PULL v2 23/65] libqos/ahci: Add command header helpers

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Adds command header helper functions: -ahci_command_header_set -ahci_command_header_get, -ahci_command_destroy, and -ahci_cmd_pick These helpers help to quickly manage the command header information in the AHCI device. ahci_command_header_set and get will store

[Qemu-devel] [PULL v2 16/65] qtest/ahci: remove getter/setter macros

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com These macros were a bad idea: They relied upon certain arguments being present locally with a specific name. With the endgoal being to factor out AHCI helper functions outside of the test file itself, these have to be replaced by more explicit helper

[Qemu-devel] [PULL v2 56/65] qemu-img: Use blk_new_open() in img_open()

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Message-id: 1423162705-32065-8-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- qemu-img.c | 20 ++-- 1 file changed, 6

[Qemu-devel] [PULL v2 58/65] qemu-img: Use BlockBackend as far as possible

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Although qemu-img already creates BlockBackends, it does not do accesses to the images through them. This patch converts all of the bdrv_* calls for which this is currently possible to blk_* calls. Most of the remaining calls will probably stay bdrv_* calls

Re: [Qemu-devel] slow speed for virtio-scsi since qemu 2.2

2015-02-16 Thread Andreas Färber
Am 16.02.2015 um 16:41 schrieb Stefan Priebe - Profihost AG: Am 16.02.2015 um 15:49 schrieb Paolo Bonzini pbonz...@redhat.com: On 16/02/2015 15:47, Stefan Priebe - Profihost AG wrote: Could it be that this is a results of compiling qemu with --enable-debug to get debugging symbols? Yes.

[Qemu-devel] [PULL v2 36/65] libqos/ahci: Add ahci_clean_mem

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Clean up guest memory being used in ahci_clean_mem, to be called during ahci_shutdown. With all guest memory leaks removed, add an option to the allocator to throw an assertion if a leak occurs. This test adds some sanity to both the AHCI library and the

[Qemu-devel] [PULL v2 63/65] block: Clamp BlockBackend requests

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com BlockBackend is used as the interface between the block layer and guest devices. It should therefore assure that all requests are clamped to the image size. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Reviewed-by: Kevin

Re: [Qemu-devel] slow speed for virtio-scsi since qemu 2.2

2015-02-16 Thread Paolo Bonzini
On 16/02/2015 16:41, Stefan Priebe - Profihost AG wrote: Yes, just do nothing (--enable-debug-info is the default; --enable-debug enables debug info _and_ turns off optimization). If I do not enable-debug dh_strip does not extract any debugging symbols. Then you need --disable-strip too.

[Qemu-devel] [PATCH v2 0/4] virtio-pci: a few proxy tweaks

2015-02-16 Thread Gerd Hoffmann
Hi, A few patches for virtio, applying cleanly on top of mst's virtio-1.0 branch. cheers, Gerd Gerd Hoffmann (4): virtio-pci: add flags to enable/disable legacy/modern virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smaller virtio-pci: make pci bars configurable virtio-pci: make

Re: [Qemu-devel] [PATCH 1/6 v2] target-tilegx: Firstly add to qemu with minimized features

2015-02-16 Thread Richard Henderson
On 02/16/2015 05:49 AM, Chen Gang S wrote: +#define TILEGX_R_PC 55 /* LR register, pc pointer */ No, register 55 is the link register, not the PC. I.e. it is only special in that it receives the return address from the JAL instructions. +typedef struct CPUTLState { +uint64_t regs[56];

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Machine menu patch for Mac OS X

2015-02-16 Thread Programmingkid
On Feb 16, 2015, at 11:22 AM, Kevin Wolf wrote: Am 16.02.2015 um 17:12 hat Programmingkid geschrieben: On Feb 16, 2015, at 10:42 AM, Kevin Wolf wrote: Am 16.02.2015 um 16:31 hat Programmingkid geschrieben: On Feb 16, 2015, at 5:08 AM, Kevin Wolf wrote: Am 14.02.2015 um 03:28 hat

Re: [Qemu-devel] Enum String Generator

2015-02-16 Thread John Snow
On 02/14/2015 09:37 PM, Fam Zheng wrote: On Fri, 02/13 19:33, John Snow wrote: Just a stupid question: We don't have a macro facility in the current codebase that generates both an enum and string table / lookup function simultaneously, do we? Some things really do just wind up looking

[Qemu-devel] [PULL v2 05/65] qtest/ahci: Create ahci.h

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Extract defines and other information to ahci.h, to be shared with other tests if they so please. At the very least, reduce clutter in the test file itself. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id:

[Qemu-devel] [PULL v2 07/65] libqos: add qtest_vboot

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Add a va_list variant of the qtest_boot function. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id: 1421698563-6977-5-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com ---

[Qemu-devel] [PULL v2 02/65] iotests: Add wait functionality to _cleanup_qemu

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com The qemu process does not always need to be killed, just waiting for it can be fine, too. This introduces a way to do so. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id:

[Qemu-devel] [PULL v2 13/65] qtest/ahci: remove pcibus global

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Rely on the PCI Device's bus pointer instead. One less global to worry about. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id: 1421698563-6977-11-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PULL v2 33/65] libqos/ahci: add ahci command size setters

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Adds setters for size, prd_size and both via set_sizes. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: John Snow js...@redhat.com Message-id: 1423158090-25580-15-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com

[Qemu-devel] [PULL v2 48/65] qemu-img: Fix qemu-img convert -n

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com If -n is specified, it does not matter whether the output format and protocol support image creation; building the creation options should simply be skipped. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Message-id:

[Qemu-devel] [PULL v2 21/65] libqos/ahci: Add ahci_port_clear helper

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Add a helper that assists in clearing out potentially old error and FIS information from an AHCI port's data structures. This ensures we always start with a blank slate for interrupt and FIS receipt information. Signed-off-by: John Snow js...@redhat.com

[Qemu-devel] [PULL v2 53/65] iotests: Add test for driver=qcow2, format=qcow2

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com While specifying a different driver and format is obviously invalid, specifying the same driver once through driver and once through format is invalid as well. Add a test for it. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake

[Qemu-devel] [PULL v2 34/65] libqos/ahci: Add ahci_guest_io

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com ahci_guest_io is a shorthand function that will, in one shot, execute a data command on the guest to the specified guest buffer location, in the requested amount. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id:

Re: [Qemu-devel] [PATCH v2 02/17] include: import virtio headers from linux 4.0

2015-02-16 Thread Thomas Huth
On Sun, 15 Feb 2015 12:38:37 +0100 Michael S. Tsirkin m...@redhat.com wrote: Add files imported from linux-next (what will become linux 4.0) using scripts/update-linux-headers.sh Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/standard-headers/sys/if_ether.h | 1 +

[Qemu-devel] [PATCH v2 3/4] virtio-pci: make pci bars configurable

2015-02-16 Thread Gerd Hoffmann
Add msix_bar and modern_mem_bar fields to VirtIOPCIProxy. They can be used to configure which pci regions are used for the virtio 1.0 memory bar and the msix bar. For legacy/transitional devices the legacy bar is region 0 and the msix bar is region 1. Only the modern bar can be configured, and

[Qemu-devel] [PULL v2 09/65] libqos: Update QGuestAllocator to be opaque

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com To avoid the architecture-specific implementations of the generic qtest allocator having to know about fields within the allocator, add a page_size setter method for users or arch specializations to use. The allocator will assume a default page_size for general

[Qemu-devel] [PULL v2 24/65] libqos/ahci: Add ahci_port_check_error helper

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com ahci_port_check_error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow js...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Message-id:

[Qemu-devel] [PULL v2 31/65] libqos/ahci: add ahci command functions

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com This patch adds the AHCICommand structure, and a set of functions to operate on the structure. ahci_command_create - Initialize and create a new AHCICommand in memory ahci_command_free - Destroy this object. ahci_command_set_buffer - Set where the guest memory

[Qemu-devel] [PULL v2 44/65] qtest: Add scripts/qtest.py

2015-02-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com This adds scripts/qtest.py as a python library for qtest protocol. This is a skeleton with a basic cmd method to execute a command, reading and parsing of qtest output could be added later on demand. Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v2 15/17] scripts: add arch specific standard-headers

2015-02-16 Thread Thomas Huth
On Sun, 15 Feb 2015 12:39:25 +0100 Michael S. Tsirkin m...@redhat.com wrote: Move virtio header copying logic to a function, use that to copy arch specific virtio headers. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- scripts/update-linux-headers.sh | 56

[Qemu-devel] [PULL v2 64/65] block: Remove growable from BDS

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Now that request clamping is done in the BlockBackend, the growable field can be removed from the BlockDriverState. All BDSs are now treated as being growable (that is, they are allowed to grow; they are not necessarily actually able to). Signed-off-by: Max

[Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names

2015-02-16 Thread Dr. David Alan Gilbert (git)
From: Dr. David Alan Gilbert dgilb...@redhat.com It looks like the dtrace trace code gets upset if you have trace names with __ in, which the migration/rdma.c code does. Rename the functions and the associated traces. Fixes: 733252deb8b7d37beacda5976c2769e18642b2fa Signed-off-by: Dr. David

Re: [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names

2015-02-16 Thread Paolo Bonzini
On 16/02/2015 17:58, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com It looks like the dtrace trace code gets upset if you have trace names with __ in, which the migration/rdma.c code does. Rename the functions and the associated traces. Fixes:

[Qemu-devel] [PULL v2 00/65] Block patches

2015-02-16 Thread Stefan Hajnoczi
The following changes since commit cd2d5541271f1934345d8ca42f5fafff1744eee7: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150212' into staging (2015-02-13 11:44:50 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for

[Qemu-devel] [PULL v2 25/65] libqos/ahci: Add ahci_port_check_interrupts helper

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com A helper that compares a given port's current interrupts and checks them against a supplied list of expected interrupt bits, and throws an error if they do not match. The helper then resets the requested interrupts on this port, and asserts that the interrupt

[Qemu-devel] [PULL v2 28/65] qtest/ahci: Demagic ahci tests.

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Add human-readable command names and other miscellaneous #defines to help make the code more readable. Some of these definitions are not yet used in this current series, but for convenience and sanity they have been lumped together here, as it's more trouble than

[Qemu-devel] [PULL v2 38/65] qtest/ahci: Adding simple dma read-write test

2015-02-16 Thread Stefan Hajnoczi
From: John Snow js...@redhat.com Adds a test case for AHCI wherein we write a 4K block of a changing pattern to sector 0, then read back that 4K and compare the transmit and receive buffers. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: John Snow js...@redhat.com Message-id:

[Qemu-devel] [PULL v2 62/65] qemu-io: Use BlockBackend

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com qemu-io should behave like a guest, therefore it should use BlockBackend to access the block layer. There are a couple of places where that is infeasible: First, the bdrv_debug_* functions could theoretically be mirrored in the BlockBackend, but since these are

[Qemu-devel] [PULL v2 50/65] block: Lift some BDS functions to the BlockBackend

2015-02-16 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Create the blk_* counterparts for the following bdrv_* functions (which make sense to call on the BlockBackend level): - bdrv_co_write_zeroes() - bdrv_write_compressed() - bdrv_truncate() - bdrv_nb_sectors() - bdrv_discard() - bdrv_load_vmstate() -

Re: [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names

2015-02-16 Thread Andreas Färber
Am 16.02.2015 um 17:58 schrieb Dr. David Alan Gilbert (git): From: Dr. David Alan Gilbert dgilb...@redhat.com It looks like the dtrace trace code gets upset if you have trace names with __ in, which the migration/rdma.c code does. Rename the functions and the associated traces. Fixes:

[Qemu-devel] [PULL 06/21] vhost-scsi: set the bootable value of channel/target/lun

2015-02-16 Thread Paolo Bonzini
From: Gonglei arei.gong...@huawei.com At present, the target is valued boot_tpgt, In addition, channel and lun both are 0 for bootable vhost-scsi device. Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Bo Su su...@huawei.com Acked-by: Michael S. Tsirkin m...@redhat.com

[Qemu-devel] [PULL 11/21] pci: split shpc_cleanup and shpc_free

2015-02-16 Thread Paolo Bonzini
object_unparent should not be called until the parent device is going to be destroyed. Only remove the capability and do memory_region_del_subregion at unrealize time. Freeing the data structures is left in shpc_free, to be called from the instance_finalize callback. Acked-by: Michael S.

[Qemu-devel] [PULL 18/21] exec: protect mru_block with RCU

2015-02-16 Thread Paolo Bonzini
Hence, freeing a RAMBlock has to be switched to call_rcu. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 52 +++--- include/exec/cpu-all.h | 2 ++ 2 files changed, 39 insertions(+),

[Qemu-devel] [PULL 12/21] docs: clarify memory region lifecycle

2015-02-16 Thread Paolo Bonzini
Now that objects actually obey the rules, document them. Reviewed-by: Matthew Rosato mjros...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- docs/memory.txt | 74 - 1 file changed, 58 insertions(+), 16 deletions(-)

[Qemu-devel] [PULL 16/21] rcu: introduce RCU-enabled QLIST

2015-02-16 Thread Paolo Bonzini
From: Mike Day ncm...@ncultra.org Add RCU-enabled variants on the existing bsd DQ facility. Each operation has the same interface as the existing (non-RCU) version. Also, each operation is implemented as macro. Using the RCU-enabled QLIST, existing QLIST users will be able to convert to RCU

Re: [Qemu-devel] [PATCH v13 08/17] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-02-16 Thread Max Reitz
On 2015-02-13 at 17:08, John Snow wrote: For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top sync mode. Signed-off-by: Fam Zheng

[Qemu-devel] [PULL 09/21] memory: keep the owner of the AddressSpace alive until do_address_space_destroy

2015-02-16 Thread Paolo Bonzini
This fixes a use-after-free if do_address_space_destroy is executed too late. Reviewed-by: Michael Roth mdr...@linux.vnet.ibm.com Tested-by: Michael Roth mdr...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- memory.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v3] blkdebug: fix once rule

2015-02-16 Thread Max Reitz
On 2015-02-06 at 16:26, John Snow wrote: Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an active list of rules to be used for the forthcoming action, provided

Re: [Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type

2015-02-16 Thread John Snow
On 02/16/2015 02:49 PM, Max Reitz wrote: On 2015-02-13 at 17:08, John Snow wrote: We treat this field with a variety of different types everywhere in the code. Now it's just uint32_t. Signed-off-by: John Snow js...@redhat.com --- block.c | 11 ++- block/mirror.c

Re: [Qemu-devel] [PATCH v13 04/17] block: Introduce bdrv_dirty_bitmap_granularity()

2015-02-16 Thread Max Reitz
On 2015-02-13 at 17:08, John Snow wrote: This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Small adjustments are made to ensure that granularity (in bytes) is handled consistently as a uint32_t throughout the code. This

Re: [Qemu-devel] [PATCH v13 15/17] iotests: add simple incremental backup case

2015-02-16 Thread Max Reitz
On 2015-02-13 at 17:08, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/112 | 122 + tests/qemu-iotests/112.out | 4 +- 2 files changed, 124 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz

[Qemu-devel] [PULL 10/21] pcie: remove mmconfig memory leak and wrap mmconfig update with transaction

2015-02-16 Thread Paolo Bonzini
This memory leak was introduced inadvertently by omitting object_unparent. A better fix is to use the new memory_region_set_size instead of destroying and recreating the MMIO region on the fly. Also, ensure that unmapping and remapping the region is done atomically. Acked-by: Michael S. Tsirkin

  1   2   3   4   5   >