Re: [Qemu-devel] [PATCH v2 3/4] block: New bdrv_add_key(), convert monitor to use it

2015-01-30 Thread Max Reitz
On 2015-01-29 at 04:37, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- block.c | 29 + blockdev.c| 24 ++-- include/block/block.h | 1 +

Re: [Qemu-devel] [PATCH v2 3/7] softfloat: Convert `*_default_nan' variables into inline functions

2015-01-30 Thread Maciej W. Rozycki
On Fri, 30 Jan 2015, Leon Alrae wrote: @@ -760,6 +760,6 @@ static inline int float128_is_any_nan(fl /* | The pattern for a default generated quadruple-precision NaN.

Re: [Qemu-devel] [PATCH v2 00/17] ide: rerror and werror support for IDE and AHCI

2015-01-30 Thread John Snow
On 01/30/2015 04:38 AM, Paolo Bonzini wrote: On 30/01/2015 01:44, John Snow wrote: Post-holiday bump that this is sitting out there, awaiting love. If this gets merged, we should be able to enable Q35 migration soon, which would be nice. Not sure how valuable my opinion is as the author

[Qemu-devel] [PULL 02/11] rcu: add rcutorture

2015-01-30 Thread Paolo Bonzini
rcutorture is the unit test for rcu. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- tests/Makefile | 7 +- tests/rcutorture.c | 448 + 2 files changed, 454 insertions(+), 1 deletion(-) create

Re: [Qemu-devel] [PATCH 5/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-30 Thread Denis V. Lunev
On 30/01/15 18:42, Max Reitz wrote: On 2015-01-30 at 10:41, Denis V. Lunev wrote: On 30/01/15 17:58, Max Reitz wrote: On 2015-01-30 at 03:42, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do

Re: [Qemu-devel] [PATCH 5/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-30 Thread Denis V. Lunev
On 30/01/15 17:58, Max Reitz wrote: On 2015-01-30 at 03:42, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do not need to care about the hole to make sure that there is no data in the file under

Re: [Qemu-devel] [PATCH 5/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-30 Thread Max Reitz
On 2015-01-30 at 10:41, Denis V. Lunev wrote: On 30/01/15 17:58, Max Reitz wrote: On 2015-01-30 at 03:42, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do not need to care about the hole to make

Re: [Qemu-devel] [PATCH v2 2/4] blockdev: Eliminate silly QERR_BLOCK_JOB_NOT_ACTIVE macro

2015-01-30 Thread Max Reitz
On 2015-01-29 at 04:36, Markus Armbruster wrote: From: Markus Armbruster arm...@pond.sub.org Intentional? The QERR_ macros are leftovers from the days of rich error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has

Re: [Qemu-devel] [PATCH v7 5/5] qemu-iotests: Add 093 for IO throttling

2015-01-30 Thread Max Reitz
On 2015-01-29 at 21:49, Fam Zheng wrote: 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

[Qemu-devel] vm live storage migration approach.

2015-01-30 Thread Yaodong Yang
Hi all, I'm investigating the current schemes for the VM live storage migration in QEMU system. I have the following questions: 1. What is the functionality of drive_mirror in QEMU? Is it designed as a VM live storage migration approach? 2. What's the difference between drive_mirror and

[Qemu-devel] [PULL 06/11] memory: protect current_map by RCU

2015-01-30 Thread Paolo Bonzini
Replace the flat_view_mutex with RCU, avoiding futex contention for dataplane on large systems and many iothreads. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/exec/memory.h | 5 + memory.c | 54

[Qemu-devel] [PULL 03/11] rcu: allow nesting of rcu_read_lock/rcu_read_unlock

2015-01-30 Thread Paolo Bonzini
Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/rcu.h | 15 ++- tests/rcutorture.c | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index cfef36e..da043f2 100644 ---

[Qemu-devel] [PULL 11/11] configure: Default to enable module build

2015-01-30 Thread Paolo Bonzini
From: Fam Zheng f...@redhat.com We have module build support around for a while, but also had it bitrot several times. It probably makes sense to enable it by default so that people can notice and use it. Add --disable-modules as a counterpart to --enable-modules, which is now turned on by

Re: [Qemu-devel] [PATCH v2 3/7] softfloat: Convert `*_default_nan' variables into inline functions

2015-01-30 Thread Peter Maydell
On 30 January 2015 at 16:02, Maciej W. Rozycki ma...@linux-mips.org wrote: Hmm, so perhaps my idea for a later improvement: Eventually we might want to move the new inline functions into a separate header to be included from softfloat.h instead of softfloat.c, but let's make changes one

Re: [Qemu-devel] [PATCH v3 4/4] virtio-blk: introduce multiread

2015-01-30 Thread Max Reitz
On 2015-01-30 at 09:33, Peter Lieven wrote: this patch finally introduces multiread support to virtio-blk. While multiwrite support was there for a long time, read support was missing. The complete merge logic is moved into virtio-blk.c which has been the only user of request merging ever

Re: [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed

2015-01-30 Thread Kevin Wolf
Am 29.01.2015 um 17:25 hat Kashyap Chamarthy geschrieben: A simple reproducer below. Export a disk image over NBD (I realize port 10809 is default, thought I'd explicitly mention anyhow): $ qemu-nbd --f qcow2 -p10809 \ /var/lib/libvirt/images/cirros-0.3.3-x86_64-disk.img -t

[Qemu-devel] [PULL 07/11] memory: avoid ref/unref in memory_region_find

2015-01-30 Thread Paolo Bonzini
Do the entire lookup under RCU, which avoids atomic operations in flatview_ref and flatview_unref. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- memory.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/memory.c

[Qemu-devel] [PULL 08/11] cpu-exec: simplify align_clocks

2015-01-30 Thread Paolo Bonzini
sc-diff_clk is already equal to sleep_delay (split in a second and a nanosecond part). If you subtract sleep_delay - rem_delay, the result is exactly rem_delay. Cc: Sebastian Tanase sebastian.tan...@openwide.fr Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpu-exec.c | 3 +-- 1 file

[Qemu-devel] [PULL 05/11] memory: remove assertion on memory_region_destroy

2015-01-30 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com Now that memory_region_destroy can be called from an RCU callback, checking the BQL-protected global memory_region_transaction_depth does not make much sense. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Reviewed-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [PATCH v3 3/4] block-backend: expose bs-bl.max_transfer_length

2015-01-30 Thread Max Reitz
On 2015-01-30 at 09:33, Peter Lieven wrote: Signed-off-by: Peter Lieven p...@kamp.de --- block/block-backend.c | 5 + include/sysemu/block-backend.h | 1 + 2 files changed, 6 insertions(+) Reviewed-by: Max Reitz mre...@redhat.com

Re: [Qemu-devel] [PATCH v2 4/4] block: Eliminate silly QERR_ macros used for encryption keys

2015-01-30 Thread Max Reitz
On 2015-01-29 at 04:37, Markus Armbruster wrote: The QERR_ macros are leftovers from the days of rich error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean up QERR_DEVICE_ENCRYPTED and

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-30 Thread John Snow
On 01/30/2015 09:32 AM, Kevin Wolf wrote: Am 21.01.2015 um 10:34 hat Markus Armbruster geschrieben: I'm afraid I forgot much of the discussion we had before the break, and only now it's coming back, slowly. Quoting myself on naming parameters identifying nodes[*]: John Snow pointed out

Re: [Qemu-devel] [PATCH v3 3/4] arm: Add PCIe host bridge in virt machine

2015-01-30 Thread Peter Maydell
On 29 January 2015 at 15:06, Alexander Graf ag...@suse.de wrote: Now that we have a working generic PCIe host bridge driver, we can plug it into ARM's virt machine to always have PCIe available to normal ARM VMs. -/* 0x1000 .. 0x4000 reserved for PCI */ +/* PCIe region layout:

[Qemu-devel] [PULL 01/11] rcu: add rcu library

2015-01-30 Thread Paolo Bonzini
This includes a (mangled) copy of the liburcu code. The main changes are: 1) removing dependencies on many other header files in liburcu; 2) removing for simplicity the tentative busy waiting in synchronize_rcu, which has limited performance effects; 3) replacing futexes in synchronize_rcu with

[Qemu-devel] [PULL 09/11] cpu-exec: simplify init_delay_params

2015-01-30 Thread Paolo Bonzini
With the introduction of QEMU_CLOCK_VIRTUAL_RT, the computation of sc-diff_clk can be simplified nicely: qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + cpu_get_clock_offset() = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) -

[Qemu-devel] [PULL 10/11] scsi: Fix scsi_req_cancel_async for no aiocb req

2015-01-30 Thread Paolo Bonzini
From: Fam Zheng f...@redhat.com scsi_req_cancel_complete is responsible for releasing the request, so we shouldn't skip it in any case. This doesn't affect the only existing caller, virtio-scsi, but is useful for other devices once they use it. Suggested-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH v3 1/4] block: add accounting for merged requests

2015-01-30 Thread Max Reitz
On 2015-01-30 at 09:32, Peter Lieven wrote: Signed-off-by: Peter Lieven p...@kamp.de Reviewed-by: Eric Blake ebl...@redhat.com --- block.c| 2 ++ block/accounting.c | 7 +++ block/qapi.c | 2 ++ hmp.c | 6 +-

Re: [Qemu-devel] [PATCH v3 2/4] hw/virtio-blk: add a constant for max number of merged requests

2015-01-30 Thread Max Reitz
On 2015-01-30 at 09:33, Peter Lieven wrote: As it was not obvious (at least for me) where the 32 comes from; add a constant for it. Signed-off-by: Peter Lieven p...@kamp.de Reviewed-by: Eric Blake ebl...@redhat.com --- hw/block/virtio-blk.c | 2 +- include/hw/virtio/virtio-blk.h | 4

Re: [Qemu-devel] [PATCH 0/2] ATAPI migration fix/hack

2015-01-30 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: Oops, forgot to include Kevin and Stefan on cc for this. Ping; John R-b'd the two patches: https://lists.gnu.org/archive/html/qemu-devel/2014-12/msg01133.html http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg01956.html although

[Qemu-devel] [PULL 04/11] rcu: add call_rcu

2015-01-30 Thread Paolo Bonzini
Asynchronous callbacks provided by call_rcu are particularly important for QEMU, because the BQL makes it hard to use synchronize_rcu. In addition, the current RCU implementation is not particularly friendly to multiple concurrent synchronize_rcu callers, making call_rcu even more important.

[Qemu-devel] [PULL 00/11] RCU, scsi, modules, icount changes for 2015-01-30

2015-01-30 Thread Paolo Bonzini
The following changes since commit 83761b9244ad2ed39d3cfabe8a0e901ab906f7bf: Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20150127' into staging (2015-01-27 22:25:56 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for

[Qemu-devel] [PATCH 1/6] vmport.c: Fix vmport_cmd_ram_size

2015-01-30 Thread Don Slutz
Based on https://sites.google.com/site/chitchatvmback/backdoor and testing on ESXi, this should be in MB not bytes. Signed-off-by: Don Slutz dsl...@verizon.com --- hw/misc/vmport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c index

[Qemu-devel] [PATCH 0/6] Add limited support of VMware's hyper-call rpc

2015-01-30 Thread Don Slutz
The support included is enough to allow VMware tools to install in a guest and provide guestinfo support. guestinfo support is provided by what is known as VMware RPC support. One of the better on-line references is: https://sites.google.com/site/chitchatvmback/backdoor As a place to get more

Re: [Qemu-devel] [PATCH v3 4/4] virtio-blk: introduce multiread

2015-01-30 Thread Kevin Wolf
Am 30.01.2015 um 22:05 hat Peter Lieven geschrieben: Am 30.01.2015 um 18:16 schrieb Max Reitz: On 2015-01-30 at 09:33, Peter Lieven wrote: this patch finally introduces multiread support to virtio-blk. While multiwrite support was there for a long time, read support was missing. The

Re: [Qemu-devel] [PATCH v3 4/4] virtio-blk: introduce multiread

2015-01-30 Thread Max Reitz
On 2015-01-30 at 16:05, Peter Lieven wrote: Am 30.01.2015 um 18:16 schrieb Max Reitz: On 2015-01-30 at 09:33, Peter Lieven wrote: this patch finally introduces multiread support to virtio-blk. While multiwrite support was there for a long time, read support was missing. The complete merge

Re: [Qemu-devel] [PATCH 4/6] vmport_rpc: Add QMP access to vmport_rpc object.

2015-01-30 Thread Eric Blake
On 01/30/2015 02:06 PM, Don Slutz wrote: This adds two new inject commands: inject-vmport-reboot inject-vmport-halt And three guest info commands: vmport-guestinfo-set vmport-guestinfo-get query-vmport-guestinfo More details in qmp-commands.hx Signed-off-by: Don Slutz

Re: [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed

2015-01-30 Thread Kashyap Chamarthy
On Fri, Jan 30, 2015 at 02:32:25PM -0500, Max Reitz wrote: On 2015-01-30 at 13:41, Kashyap Chamarthy wrote: On Fri, Jan 30, 2015 at 06:15:21PM +0100, Kevin Wolf wrote: Am 29.01.2015 um 17:25 hat Kashyap Chamarthy geschrieben: [. . .] Copying Stefan because he's the master of AIO contexts and

[Qemu-devel] [PATCH 1/2] kvm_stat: Define RESET ioctl number for PPC

2015-01-30 Thread Wei Huang
This patch defines the RESET ioctl number for PPC architecture. Without it, the reset() function of Event class can potentionally cause exception on PPC. Signed-off-by: Wei Huang w...@redhat.com --- scripts/kvm/kvm_stat | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kvm/kvm_stat

[Qemu-devel] [PATCH 2/2] kvm_stat: Add kvm_exit reasons for aarch64

2015-01-30 Thread Wei Huang
This patch defines the list of kvm_exit reasons for aarch64. This list is based on the Exception Class (EC) field of HSR register. With this patch users can trace the execution of guest VMs better. A sample output from command kvm_stat -1 -t is shown as the following: ... kvm_exit(WATCHPT_HYP)

Re: [Qemu-devel] [PATCH 1/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-01-30 Thread Denis V. Lunev
On 29/01/15 16:49, Denis V. Lunev wrote: On 29/01/15 16:18, Kevin Wolf wrote: Am 29.01.2015 um 11:50 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096);

[Qemu-devel] [PATCH 09/19] qtest/ahci: Demagic ahci tests.

2015-01-30 Thread John Snow
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 it is worth in a test suite to

[Qemu-devel] [PATCH] integrator/cp: Wire up MMC card detection

2015-01-30 Thread Jan Kiszka
This allows to use MMC emulation with the Integrator/CP model. Well, mostly. There seems to be timing issues with Linux so that the card is not always detected (but most of the time). Note that the read-only pin is intentionally left unconnected because the PIC model could deliver it incorrectly

[Qemu-devel] [PATCH 2/6] vmport_rpc: Add the object vmport_rpc

2015-01-30 Thread Don Slutz
This is the 1st part of Add limited support of VMware's hyper-call rpc. This patch uses existing infrastructure used by vmmouse.c (provided by vmport.c) to handle the VMware backdoor command 30. One of the better on-line references is: https://sites.google.com/site/chitchatvmback/backdoor More

[Qemu-devel] [PATCH 6/6] MAINTAINERS: add VMware port

2015-01-30 Thread Don Slutz
Signed-off-by: Don Slutz dsl...@verizon.com --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fd335a4..b60ee6a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -741,6 +741,13 @@ S: Maintained F: hw/net/vmxnet* F: hw/scsi/vmw_pvscsi*

[Qemu-devel] [PATCH 3/6] vmport_rpc: Add limited support of VMware's hyper-call rpc

2015-01-30 Thread Don Slutz
The support included is enough to allow VMware tools to install in a guest and provide guestinfo support. guestinfo support is provided by what is known as VMware RPC support. If the guest is running VMware tools, then the build version of the tools is also available via the property

[Qemu-devel] [PATCH 5/6] vmport: Add VMware all ring hack

2015-01-30 Thread Don Slutz
This is done by adding a new machine property vmware-port-ring3 that needs to be enabled to have any effect. It only effects accel=tcg mode. It is needed if you want to use VMware tools in accel=tcg mode. Signed-off-by: Don Slutz dsl...@verizon.com (cherry picked from commit

Re: [Qemu-devel] [PATCH v3 4/4] virtio-blk: introduce multiread

2015-01-30 Thread Peter Lieven
Am 30.01.2015 um 18:16 schrieb Max Reitz: On 2015-01-30 at 09:33, Peter Lieven wrote: this patch finally introduces multiread support to virtio-blk. While multiwrite support was there for a long time, read support was missing. The complete merge logic is moved into virtio-blk.c which has

[Qemu-devel] [PATCH 4/6] vmport_rpc: Add QMP access to vmport_rpc object.

2015-01-30 Thread Don Slutz
This adds two new inject commands: inject-vmport-reboot inject-vmport-halt And three guest info commands: vmport-guestinfo-set vmport-guestinfo-get query-vmport-guestinfo More details in qmp-commands.hx Signed-off-by: Don Slutz dsl...@verizon.com --- hw/misc/vmport_rpc.c | 275

Re: [Qemu-devel] [PATCH RESEND 03/50] hw/block/fdc: Implement tray status

2015-01-30 Thread John Snow
On 01/27/2015 02:45 PM, Max Reitz wrote: 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

[Qemu-devel] value of VIRTQUEUE_MAX_SIZE

2015-01-30 Thread Peter Lieven
Hi, Just wondering if VIRTQUEUE_MAX_SIZE in include/hw/virtio/virtio.h should not be equal to IOV_MAX instead of the hardcoded 1024? Thanks, Peter

Re: [Qemu-devel] [PATCH 7/8] qmp: print dirty bitmap

2015-01-30 Thread Eric Blake
On 01/30/2015 02:06 AM, Vladimir Sementsov-Ogievskiy wrote: is it better to add qmp_query_dirty_bitmap with underlying bdrv_query_dirty_bitmap, or to modify (add dirty regions information) existing qmp_query_block/qmp_query_dirty_bitmapS? [please don't top-post on technical lists] Extending

Re: [Qemu-devel] [PATCH v11 00/13] block: Incremental backup series

2015-01-30 Thread John Snow
On 01/30/2015 05:24 AM, Vladimir Sementsov-Ogievskiy wrote: About added functions for BdrvDirtyBitmap: some functions has needless BlockDriverState* parameter, and others - doesn't: with needless *bs: bdrv_dirty_bitmap_make_anon bdrv_dirty_bitmap_granularity bdrv_clear_dirty_bitmap without

Re: [Qemu-devel] [PATCH 14/21] blockdev: Remove blk_hide_on_behalf_of_do_drive_del()

2015-01-30 Thread Eric Blake
On 01/26/2015 12:27 PM, Max Reitz wrote: This function first removed the BlockBackend from the blk_backends list and cleared its name so it would no longer be found by blk_name(); since blk_next() now iterates through monitor_block_backends (which the BB is removed from in do_drive_del()),

Re: [Qemu-devel] [PATCH 15/21] block: Make bdrv_drain_one() public

2015-01-30 Thread Eric Blake
On 01/26/2015 12:27 PM, Max Reitz wrote: We will need it in block/block-backend.c. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 2 +- include/block/block_int.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake ebl...@redhat.com

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-30 Thread Kevin Wolf
Am 30.01.2015 um 18:04 hat John Snow geschrieben: On 01/30/2015 09:32 AM, Kevin Wolf wrote: Am 21.01.2015 um 10:34 hat Markus Armbruster geschrieben: I'm afraid I forgot much of the discussion we had before the break, and only now it's coming back, slowly. Quoting myself on naming

[Qemu-devel] [PATCH 10/19] libqos/ahci: Add ide cmd properties

2015-01-30 Thread John Snow
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. The Invalid Command Sentinel here that caps the

[Qemu-devel] [PATCH 11/19] libqos/ahci: add ahci command functions

2015-01-30 Thread John Snow
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 DMA buffer is. ahci_command_commit -

Re: [Qemu-devel] [PATCH 1/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-01-30 Thread Denis V. Lunev
On 30/01/15 22:48, Kevin Wolf wrote: Am 30.01.2015 um 19:39 hat Denis V. Lunev geschrieben: On 29/01/15 16:49, Denis V. Lunev wrote: On 29/01/15 16:18, Kevin Wolf wrote: Am 29.01.2015 um 11:50 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT

Re: [Qemu-devel] [PATCH v2] net: cadence_gem: Set initial MAC address

2015-01-30 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 9:48 PM, Sebastian Huber sebastian.hu...@embedded-brains.de wrote: Set initial MAC address to the one specified by the command line. Signed-off-by: Sebastian Huber sebastian.hu...@embedded-brains.de Reviewed-by: Jason Wang jasow...@redhat.com v2: Remove superfluous

[Qemu-devel] [PATCH 06/19] libqos/ahci: Add ahci_port_check_interrupts helper

2015-01-30 Thread John Snow
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 register is now empty.

Re: [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed

2015-01-30 Thread Kashyap Chamarthy
On Fri, Jan 30, 2015 at 06:15:21PM +0100, Kevin Wolf wrote: Am 29.01.2015 um 17:25 hat Kashyap Chamarthy geschrieben: $ qemu-system-x86_64 \ -nographic \ -nodefconfig\ -nodefaults \ -m 2048

Re: [Qemu-devel] vm live storage migration approach.

2015-01-30 Thread Stefan Hajnoczi
On Fri, Jan 30, 2015 at 8:13 PM, Yaodong Yang yaodong.ya...@gmail.com wrote: An follow up questions. Suppose I have a running VM with two virtual disks, I would like to migrate the vm from host A to host B. Both host A and host B have their own isolated storage devices. Is there anyway to

[Qemu-devel] Virtual timer (future) status

2015-01-30 Thread Stefano Angeleri
Hi, I need to syncronize the simulation time of QEMU with another tool. In order to do so I'd need to know in advance at least a rough estimation of how much the virtual timer will progress upon executing the next block of instruction(s) (QEMU_CLOCK_VIRTUAL_RT/QEMU_CLOCK_VIRTUAL) in qemu/cpus.c

[Qemu-devel] Pci device example

2015-01-30 Thread rku slov
Hi, I've created for fun a pci dummy device in Qemu and the associated linux driver. Some friends wanted to know how I had done it so I did a write up. If this can be of any use to someone who want to create his own device I would be glad. Also, if there are some error or some things implemented

[Qemu-devel] [PATCH 01/19] libqos/ahci: Add ahci_port_select helper

2015-01-30 Thread John Snow
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 --- tests/ahci-test.c | 19 ++- tests/libqos/ahci.c | 27 +++ tests/libqos/ahci.h | 1 + 3 files changed, 30 insertions(+), 17

[Qemu-devel] [PATCH 07/19] libqos/ahci: Add port_check_nonbusy helper

2015-01-30 Thread John Snow
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 --- tests/ahci-test.c | 1 + tests/libqos/ahci.c | 18 ++ tests/libqos/ahci.h | 1 + 3 files changed, 20

[Qemu-devel] [PATCH 00/19] qtest/ahci: add dma test

2015-01-30 Thread John Snow
Add a simple DMA r/w test to ahci-test. Oh, and for the first 18 patches, refactor everything into helpers so that each ahci_test isn't a thousand lines long. This patch depends upon the ahci test preliminary refactoring series upstream, which shuffled a lot of libqos and malloc facilities to

Re: [Qemu-devel] [PATCH 1/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-01-30 Thread Kevin Wolf
Am 30.01.2015 um 19:39 hat Denis V. Lunev geschrieben: On 29/01/15 16:49, Denis V. Lunev wrote: On 29/01/15 16:18, Kevin Wolf wrote: Am 29.01.2015 um 11:50 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0;

Re: [Qemu-devel] New IOREQ type -- IOREQ_TYPE_VMWARE_PORT

2015-01-30 Thread Don Slutz
On 01/30/15 05:23, Paul Durrant wrote: -Original Message- From: Don Slutz [mailto:dsl...@verizon.com] Sent: 29 January 2015 19:41 To: Paul Durrant; Don Slutz; qemu-devel@nongnu.org; Stefano Stabellini Cc: Peter Maydell; Olaf Hering; Alexey Kardashevskiy; Stefan Weil; Michael Tokarev;

[Qemu-devel] [PATCH 12/19] libqos/ahci: add ahci command verify

2015-01-30 Thread John Snow
Helps to verify that a command completed successfully. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 16 ++-- tests/libqos/ahci.c | 12 tests/libqos/ahci.h | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/ahci-test.c

[Qemu-devel] [PATCH 02/19] libqos/ahci: Add ahci_port_clear helper

2015-01-30 Thread John Snow
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 --- tests/ahci-test.c | 9 ++---

[Qemu-devel] [PATCH 03/19] qtest/ahci: rename 'Command' to 'CommandHeader'

2015-01-30 Thread John Snow
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 it. In addition, rename the b1 and

[Qemu-devel] [PATCH 13/19] libqos/ahci: add ahci command size setters

2015-01-30 Thread John Snow
Adds setters for size, prd_size and both via set_sizes. Signed-off-by: John Snow js...@redhat.com --- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h | 5 + 2 files changed, 27 insertions(+) diff --git a/tests/libqos/ahci.c b/tests/libqos/ahci.c index 594c821..3375d54

[Qemu-devel] [PATCH 15/19] libqos/ahci: add ahci_io

2015-01-30 Thread John Snow
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 buffer, and for a write, the data

[Qemu-devel] [PATCH] qemu-sockets: Fix buffer overflow in inet_parse()

2015-01-30 Thread Kevin Wolf
The size of the stack allocated host[] array didn't account for the terminating '\0' byte that sscanf() writes. Fix the array size. Signed-off-by: Kevin Wolf kw...@redhat.com --- util/qemu-sockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-sockets.c

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix buffer overflow in inet_parse()

2015-01-30 Thread John Snow
On 01/30/2015 02:37 PM, Kevin Wolf wrote: The size of the stack allocated host[] array didn't account for the terminating '\0' byte that sscanf() writes. Fix the array size. Signed-off-by: Kevin Wolf kw...@redhat.com --- util/qemu-sockets.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] vm live storage migration approach.

2015-01-30 Thread Yaodong Yang
Thank you Stefan! Now I understand the workflow. -Yaodong On Fri, Jan 30, 2015 at 2:37 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Jan 30, 2015 at 8:13 PM, Yaodong Yang yaodong.ya...@gmail.com wrote: An follow up questions. Suppose I have a running VM with two virtual disks, I

[Qemu-devel] [PATCH 16/19] libqos/ahci: Add ahci_clean_mem

2015-01-30 Thread John Snow
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 allocator. Signed-off-by: John Snow

[Qemu-devel] [PATCH 14/19] libqos/ahci: Add ahci_guest_io

2015-01-30 Thread John Snow
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 --- tests/libqos/ahci.c | 15 +++ tests/libqos/ahci.h | 2 ++ 2 files changed,

[Qemu-devel] [PATCH 08/19] libqos/ahci: Add cmd response sanity check helpers

2015-01-30 Thread John Snow
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 support the PIO sanity check, a new

Re: [Qemu-devel] [PATCH 13/21] blockdev: Add list of monitor-owned BlockBackends

2015-01-30 Thread Eric Blake
On 01/26/2015 12:27 PM, Max Reitz wrote: The monitor does hold references to some BlockBackends so it should have a list of those BBs; blk_backends is a different list, as it contains references to all BBs (after a follow-up patch, that is), and that should not be changed because we do need

[Qemu-devel] [PATCH 05/19] libqos/ahci: Add ahci_port_check_error helper

2015-01-30 Thread John Snow
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 --- tests/ahci-test.c | 8 +--- tests/libqos/ahci.c | 22 ++ tests/libqos/ahci.h | 1 + 3 files

[Qemu-devel] [PATCH 04/19] libqos/ahci: Add command header helpers

2015-01-30 Thread John Snow
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 or retrieve an AHCI command

[Qemu-devel] [PATCH 17/19] qtest/ahci: Add a macro bootup routine

2015-01-30 Thread John Snow
Add a routine that can be used to engage the AHCI device at a not-granular level so that bringing up the functionality of the HBA is easy in future tests that are not concerned with testing the bring-up process. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 19

[Qemu-devel] [PATCH 19/19] qtest/ahci: Adding simple dma read-write test

2015-01-30 Thread John Snow
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. Signed-off-by: John Snow js...@redhat.com --- tests/ahci-test.c | 52 1 file changed,

[Qemu-devel] [PATCH 18/19] qtest/ahci: Assert sector size in identify test

2015-01-30 Thread John Snow
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 will always be 512 bytes.

Re: [Qemu-devel] QEMU segfault: Booting an overlay with backing_file over NBD: nbd.c:nbd_receive_request():L756: read failed

2015-01-30 Thread Max Reitz
On 2015-01-30 at 13:41, Kashyap Chamarthy wrote: On Fri, Jan 30, 2015 at 06:15:21PM +0100, Kevin Wolf wrote: Am 29.01.2015 um 17:25 hat Kashyap Chamarthy geschrieben: $ qemu-system-x86_64 \ -nographic \ -nodefconfig\

Re: [Qemu-devel] vm live storage migration approach.

2015-01-30 Thread Yaodong Yang
An follow up questions. Suppose I have a running VM with two virtual disks, I would like to migrate the vm from host A to host B. Both host A and host B have their own isolated storage devices. Is there anyway to migrate the vm's memory, two virtual disk images and other states together from host

[Qemu-devel] [PATCH] vfio-pci: unparent BAR subregions

2015-01-30 Thread Alex Williamson
Commit d8d95814609e replaced a number of memory_region_destroy() calls with object_unparent() calls. The logic appears to be that subregions need to be unparented, but the base region is destroyed with the device object. Doing hotplug testing with vfio-pci I occasionally get a segfault from

Re: [Qemu-devel] [Xen-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough

2015-01-30 Thread Xu, Quan
-Original Message- From: xen-devel-boun...@lists.xen.org [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Wei Liu Sent: Friday, January 30, 2015 8:26 PM To: Chen, Tiejun Cc: Wei Liu; ian.campb...@citrix.com; m...@redhat.com; Ian Jackson; qemu-devel@nongnu.org;

Re: [Qemu-devel] [RFC PATCH v1 10/13] cpus, spapr: reclaim allocated vCPU objects

2015-01-30 Thread David Gibson
On Fri, Jan 30, 2015 at 01:53:47PM +0530, Bharata B Rao wrote: On Thu, Jan 29, 2015 at 12:48:39PM +1100, David Gibson wrote: On Thu, Jan 08, 2015 at 11:40:17AM +0530, Bharata B Rao wrote: From: Gu Zheng guz.f...@cn.fujitsu.com This needs a commit message, it's not at all clear from the

[Qemu-devel] [PATCH 0/2] xen_pt: fix two Coverity defects

2015-01-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Gonglei (2): xen-pt: fix Negative array index read xen-pt: fix Out-of-bounds read hw/xen/xen_pt_config_init.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) -- 1.7.12.4

[Qemu-devel] [PATCH 1/2] xen-pt: fix Negative array index read

2015-01-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Coverity spot: Function xen_pt_bar_offset_to_index() may returns a negative number (-1) value index, which as an index to array d-io_regions. Let's directly and simply pass index as an argument to xen_pt_bar_reg_parse(). Signed-off-by: Gonglei

[Qemu-devel] [PATCH 2/2] xen-pt: fix Out-of-bounds read

2015-01-30 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com The array length of s-real_device.io_regions[] is PCI_NUM_REGIONS - 1. Add a check, just make Coverity happy. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/xen/xen_pt_config_init.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [Qemu-devel] [PATCH RFC v6 18/20] virtio: support revision-specific features

2015-01-30 Thread Cornelia Huck
On Wed, 7 Jan 2015 21:10:07 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jan 07, 2015 at 05:22:32PM +0100, Cornelia Huck wrote: On Sun, 28 Dec 2014 10:32:06 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:20PM +0100, Cornelia Huck wrote:

Re: [Qemu-devel] [PATCH RFC v6 19/20] virtio-blk: revision specific feature bits

2015-01-30 Thread Cornelia Huck
On Wed, 7 Jan 2015 21:11:44 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jan 07, 2015 at 05:29:49PM +0100, Cornelia Huck wrote: On Sun, 28 Dec 2014 12:24:46 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:21PM +0100, Cornelia Huck wrote:

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-30 Thread Kevin Wolf
Am 21.01.2015 um 10:34 hat Markus Armbruster geschrieben: I'm afraid I forgot much of the discussion we had before the break, and only now it's coming back, slowly. Quoting myself on naming parameters identifying nodes[*]: John Snow pointed out to me that we still haven't spelled out

[Qemu-devel] [PATCH v3 3/4] block-backend: expose bs-bl.max_transfer_length

2015-01-30 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/block-backend.c | 5 + include/sysemu/block-backend.h | 1 + 2 files changed, 6 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index d00c129..c28e240 100644 --- a/block/block-backend.c +++

[Qemu-devel] [PATCH v3 1/4] block: add accounting for merged requests

2015-01-30 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de Reviewed-by: Eric Blake ebl...@redhat.com --- block.c| 2 ++ block/accounting.c | 7 +++ block/qapi.c | 2 ++ hmp.c | 6 +- include/block/accounting.h | 3 +++ qapi/block-core.json

Re: [Qemu-devel] [PATCH v2 3/7] softfloat: Convert `*_default_nan' variables into inline functions

2015-01-30 Thread Leon Alrae
On 12/12/2014 19:34, Maciej W. Rozycki wrote: Mechanically replace `*_default_nan' variables with inline functions and convert references accordingly. Use `__inline__' rather than `inline' so that the latter does not cause the definitions to become static as a result of macro expansion,

  1   2   3   >