Re: [Qemu-devel] [PATCH 4/4] vhost-scsi: add an ioctl interface to get target id

2015-01-26 Thread Gonglei
On 2015/1/26 20:16, Paolo Bonzini wrote: On 26/01/2015 13:13, Gonglei wrote: That's okay, alternatively you could add a boot_tpgt argument that defaults to 1 (is it correct that 0 is not a valid tpgt?). No, 0 is the minimize valid value. :) Paolo, where do you think we should add a

[Qemu-devel] [RFC] optimization for qcow2 cache get/put

2015-01-26 Thread Zhang Haoyu
Hi, all Regarding too large qcow2 image, e.g., 2TB, so long disruption happened when performing snapshot, which was caused by cache update and IO wait. perf top data shown as below, PerfTop:2554 irqs/sec kernel: 0.4% exact: 0.0% [4000Hz cycles], (target_pid: 34294)

Re: [Qemu-devel] [PATCH v2 00/14] block: Remove growable, add blk_new_open()

2015-01-26 Thread Stefano Stabellini
On Thu, 22 Jan 2015, Max Reitz wrote: This series removes the growable field from the BlockDriverState object. Its use was to clamp guest requests against the limits of the BDS; however, this can now be done more easily by moving those checks into the BlockBackend functions. In a future

Re: [Qemu-devel] [PULL 0/1] Xen tree 2015-01-26

2015-01-26 Thread Peter Maydell
On 26 January 2015 at 12:00, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: The following changes since commit b3a4755a67a52aa7297eb8927b482d09dabdefec: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150122-1' into staging (2015-01-22 12:14:19 +) are

[Qemu-devel] [PATCH v3 2/2] target-arm: Add checks that cpreg raw accesses are handled

2015-01-26 Thread Peter Maydell
Add assertion checking when cpreg structures are registered that they either forbid raw-access attempts or at least make an attempt at handling them. Also add an assert in the raw-accessor-of-last-resort, to avoid silently doing a read or write from offset zero, which is actually AArch32 CPU

Re: [Qemu-devel] [PATCH v2 00/14] block: Remove growable, add blk_new_open()

2015-01-26 Thread Max Reitz
On 2015-01-26 at 07:18, Stefano Stabellini wrote: On Thu, 22 Jan 2015, Max Reitz wrote: This series removes the growable field from the BlockDriverState object. Its use was to clamp guest requests against the limits of the BDS; however, this can now be done more easily by moving those checks

Re: [Qemu-devel] [PATCH 05/11] target-arm: Use correct mmu_idx for unprivileged loads and stores

2015-01-26 Thread Greg Bellows
On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: The MMU index to use for unprivileged loads and stores is more complicated than we currently implement: * for A64, it should be if at EL1, access as if EL0; otherwise access at current EL * for A32/T32, it

[Qemu-devel] [PATCH v3 1/2] target-arm: Split NO_MIGRATE into ALIAS and NO_RAW

2015-01-26 Thread Peter Maydell
We currently mark ARM coprocessor/system register definitions with the flag ARM_CP_NO_MIGRATE for two different reasons: 1) register is an alias on to state that's also visible via some other register, and that other register is the one responsible for migrating the state 2) register is not

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other

2015-01-26 Thread Chen Gang S
On 1/26/15 06:10, Peter Maydell wrote: On 25 January 2015 at 21:59, Chen Gang S gang.c...@sunrus.com.cn wrote: On 1/25/15 20:49, Peter Maydell wrote: Are you claiming that you've reviewed *all* the code in this file for mismatched lock/unlock calls? If so, it would be nice to say so

[Qemu-devel] [PATCH v3 0/2] target-arm: fix broken sync of sysregs between QEMU and KVM 32

2015-01-26 Thread Peter Maydell
This patchset fixes a regression in the synchronization of system registers between QEMU and KVM for 32-bit ARM hosts. The most obvious effect of the bug is that trying to access memory via the gdbstub doesn't work, because gdbstub thinks the MMU is off and doesn't get the virt-to-phys

[Qemu-devel] [PATCH 1/2] disas/libvixl: Update to upstream VIXL 1.7

2015-01-26 Thread Peter Maydell
Update our copy of libvixl to upstream's 1.7 release. This includes upstream's fix for the issue we had a local patch for in commit 94cc44a9e. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- disas/libvixl/README | 2 +- disas/libvixl/a64/assembler-a64.h | 290

[Qemu-devel] [PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt

2015-01-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com In order to support to assign a boot order for vhost-scsi device, we should get the tpgt for user level (such as Qemu). and at present, we only support the minimum tpgt can boot. Signed-off-by: Gonglei arei.gong...@huawei.com Signed-off-by: Bo Su

[Qemu-devel] [PATCH] target-ppc: Use right page size with hash table lookup

2015-01-26 Thread Aneesh Kumar K.V
We look at two sizes specified in ISA (4K, 64K). If not found matching, we consider it 16MB. Without this patch we would fail to lookup address above 16MB range. Below 16MB happened to work before because the kernel have a liner mapping and we always looked up hash for 0xc000. The

Re: [Qemu-devel] [PATCH 1/2] hw/ppc/spapr.c Set default boot order

2015-01-26 Thread Markus Armbruster
Dinar Valeev dval...@suse.de writes: On 01/26/2015 10:11 AM, Markus Armbruster wrote: dval...@suse.de writes: From: Dinar Valeev dval...@suse.com In order to use -boot once=X option we need to have default list where restore to on reset. Really? What happens without this patch? qemu

Re: [Qemu-devel] [PULL v2 00/19] i386, KVM, misc changes for 2015-01-26

2015-01-26 Thread Peter Maydell
On 26 January 2015 at 11:46, Paolo Bonzini pbonz...@redhat.com wrote: The following changes since commit a46b3aaf6bb038d4f6f192a84df204f10929e75c: Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20150123' into staging (2015-01-23 13:24:17 +) are available in the git

[Qemu-devel] [PATCH 2/2] disas/arm-a64.cc: Tell libvixl correct code addresses

2015-01-26 Thread Peter Maydell
From 1.7, libvixl supports giving correct target addresses when disassembling relative branches in code which doesn't reside at what the guest CPU would think its execution address is. Use the new MapCodeAddress() API to tell libvixl where the code is from the guest CPU's point of view so it can

[Qemu-devel] [PATCH 0/2] disas/libvixl: Update to VIXL 1.7

2015-01-26 Thread Peter Maydell
This patchseries brings our copy of libvixl up to upstream's 1.7 release. Patch 1 is the usual straight copy of upstream's files into our tree (note that this includes a fix for the compile warnings we previously dealt with locally in commit 94cc44a9e5). Patch 2 uses a new-in-1.7 feature to

Re: [Qemu-devel] [question] incremental backup a running vm

2015-01-26 Thread Zhang Haoyu
On 2015-01-26 19:29:03, Paolo Bonzini wrote: On 26/01/2015 12:13, Zhang Haoyu wrote: Thanks, Paolo, but too many internal snapshots were saved by customers, switching to external snapshot mechanism has significant impaction on subsequent upgrade. In that case, patches are welcome. :)

[Qemu-devel] [PATCH v3 03/14] blockdev: Use blk_new_open() in blockdev_init()

2015-01-26 Thread Max Reitz
Due to different error propagation, this breaks tests 051 and 087; fix their output. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 92 +- tests/qemu-iotests/051.out | 60 +++---

[Qemu-devel] [PATCH v3 08/14] qemu-nbd: Use blk_new_open() in main()

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- qemu-nbd.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index d222512..fdc9590 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -386,7 +386,6 @@ int main(int argc, char **argv) {

Re: [Qemu-devel] [PATCH 2/2] target-openrisc: Add l.lwa/l.swa support

2015-01-26 Thread Christian Svensson
Hi Jia. On Mon, Jan 26, 2015 at 9:50 AM, Jia Liu pro...@gmail.com wrote: Is it a new instruction new added into OpenRISC? Yes. Please see the latest architecture specification for details. It should be blank lines in here in [patch 1/2]. Care to elaborate why?

[Qemu-devel] [PATCH v2 2/4] target-tricore: Add instructions of RR2 opcode format

2015-01-26 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- target-tricore/translate.c | 37 + 1 file changed, 37 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c index 804d181..8f9679e 100644 ---

[Qemu-devel] [Bug 1368815] Change abandoned on cinder (master)

2015-01-26 Thread OpenStack Infra
Change abandoned by Mike Perez (thin...@gmail.com) on branch: master Review: https://review.openstack.org/143575 Reason: 1 month, no update. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1368815

[Qemu-devel] [PATCH 12/50] block: Move I/O status and error actions into BB

2015-01-26 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 --- block.c| 125 - block/backup.c

[Qemu-devel] [PATCH 22/50] blockdev: Check BB validity in drive-backup TA

2015-01-26 Thread Max Reitz
In the drive-backup transaction, call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/blockdev.c

[Qemu-devel] [PATCH 31/50] block: Add blk_insert_bs()

2015-01-26 Thread Max Reitz
This function associates the given BlockDriverState with the given BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- block/block-backend.c | 16 include/sysemu/block-backend.h | 1 + 2 files changed, 17 insertions(+) diff --git a/block/block-backend.c

[Qemu-devel] [PATCH 37/50] block: Add blk_remove_bs()

2015-01-26 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 --- block/block-backend.c | 22 +- include/sysemu/block-backend.h | 1 + 2 files

[Qemu-devel] [PATCH 40/50] blockdev: Add blockdev-remove-medium

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 25 + qapi/block-core.json | 13 + qmp-commands.hx | 43 +++ 3 files changed, 81 insertions(+) diff --git a/blockdev.c b/blockdev.c index

[Qemu-devel] [PATCH 42/50] blockdev: Implement eject with basic operations

2015-01-26 Thread Max Reitz
Implement 'eject' by calling blockdev-open-tray and blockdev-remove-medium. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index e4588b3..0b204eb 100644 --- a/blockdev.c +++

[Qemu-devel] [PATCH] target-mips: ll and lld cause AdEL exception for unaligned address

2015-01-26 Thread Leon Alrae
Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/op_helper.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index ea7d95f..73a8e45 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@

[Qemu-devel] [PATCH 48/50] hmp: Add read-only option to change command

2015-01-26 Thread Max Reitz
Expose the new read-only option of 'blockdev-change-medium' for the 'change' HMP command. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- hmp-commands.hx | 20 +--- hmp.c | 21 - 2 files changed, 37

[Qemu-devel] [PATCH v3 11/14] qemu-io: Use BlockBackend

2015-01-26 Thread Max Reitz
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 functions internal to the block

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

2015-01-26 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 06/50] block: Add blk_is_available()

2015-01-26 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 07/50] block: Make bdrv_is_inserted() recursive

2015-01-26 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 --- block.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 4a5f8fc..aff7682

[Qemu-devel] [PATCH 27/50] blockdev: Check BB validity in blockdev-backup

2015-01-26 Thread Max Reitz
Call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 9476c72..e335d06

[Qemu-devel] [PATCH 10/50] block: Remove wr_highest_offset from BlockAcctStats

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

[Qemu-devel] [PATCH 18/50] block: Respect empty BB in bdrv_query_info()

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- block/qapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 9a44d40..db42a6e 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -282,12 +282,12 @@ static void bdrv_query_info(BlockBackend *blk,

[Qemu-devel] [PATCH 26/50] blockdev: Check BB validity in drive-backup

2015-01-26 Thread Max Reitz
Call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend (instead of calling bdrv_is_inserted() after bdrv_find()). Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

[Qemu-devel] [PATCH 34/50] blockdev: Do not create BDS for empty drive

2015-01-26 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 30/50] blockdev: Check BB validity in change-backing-file

2015-01-26 Thread Max Reitz
Call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 4bd52b8..7f4470f

Re: [Qemu-devel] [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE

2015-01-26 Thread Eric Blake
On 01/26/2015 01:48 AM, Javier Celaya wrote: Sorry, I forgot to patch the command-line help. Hope it helps. Recently, SPICE included the lz4 compression algorithm. This patch adds a command line option to select it. How is libvirt going to introspect whether the command line supports

[Qemu-devel] [PATCH 46/50] hmp: Use blockdev-change-medium for change command

2015-01-26 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 v3 09/14] qemu-io: Use blk_new_open() in openfile()

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- qemu-io.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 91a445a..81f8f64 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -39,7 +39,6 @@ static ReadLineState

[Qemu-devel] [PATCH v3 05/14] qemu-img: Use blk_new_open() in img_open()

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 4e9a7f5..be1953d 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -291,32 +291,24 @@ static BlockBackend *img_open(const

[Qemu-devel] [PATCH v3 12/14] block: Clamp BlockBackend requests

2015-01-26 Thread Max Reitz
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 --- block/block-backend.c | 152 ++ 1 file

Re: [Qemu-devel] [PATCH 05/11] target-arm: Use correct mmu_idx for unprivileged loads and stores

2015-01-26 Thread Peter Maydell
On 26 January 2015 at 14:40, Greg Bellows greg.bell...@linaro.org wrote: On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: The MMU index to use for unprivileged loads and stores is more complicated than we currently implement: * for A64, it should be if at EL1,

[Qemu-devel] [PATCH 1/2] vl.c: Fix error messages when parsing maxmem parameters

2015-01-26 Thread Peter Krempa
Produce more human readable error messages and fix few spelling mistakes. Also remove a redundant check for the max memory size. Signed-off-by: Peter Krempa pkre...@redhat.com --- vl.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/vl.c b/vl.c index

[Qemu-devel] [PATCH 13/50] block: Add BlockBackendRootState

2015-01-26 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 | 26 ++ include/block/block_int.h |

[Qemu-devel] [PATCH 14/50] block: Make some BB functions fall back to BBRS

2015-01-26 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 23/50] blockdev: Catch NULL BDS in block_set_io_throttle

2015-01-26 Thread Max Reitz
Split bdrv_find() into blk_by_name() and blk_bs() to separate the no medium inserted case from the device not found case. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c

[Qemu-devel] [PATCH 05/50] block: Fix BB AIOCB AioContext without BDS

2015-01-26 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 47/50] blockdev: Add read-only option to blockdev-change-medium

2015-01-26 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 v3 06/14] qemu-img: Use blk_new_open() in img_rebase()

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img.c | 57 - 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index be1953d..0b23c87 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2430,7 +2430,6 @@

[Qemu-devel] [PATCH v3 00/14] block: Remove growable, add blk_new_open()

2015-01-26 Thread Max Reitz
This series removes the growable field from the BlockDriverState object. Its use was to clamp guest requests against the limits of the BDS; however, this can now be done more easily by moving those checks into the BlockBackend functions. In a future series, growable may be reintroduced (maybe

[Qemu-devel] [PATCH v2 4/4] target-tricore: Add instructions of RRR opcode format

2015-01-26 Thread Bastian Koppelmann
Add microcode generator function gen_cond_sub. Add helper functions: * ixmax/ixmin: search for the max/min value and its related index in a vector of 16-bit values. * pack: dack two data registers into an IEEE-754 single precision floating point format

Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append()

2015-01-26 Thread Andrew Jones
On Mon, Jan 26, 2015 at 04:09:20PM +0100, Igor Mammedov wrote: On Mon, 26 Jan 2015 10:57:21 +0100 Igor Mammedov imamm...@redhat.com wrote: On Sat, 24 Jan 2015 18:33:50 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jan 23, 2015 at 06:56:20PM +0100, Igor Mammedov wrote:

[Qemu-devel] [PATCH 2/2] pc: memory: Validate alignment of maxram_size to page size

2015-01-26 Thread Peter Krempa
If the maxram_size is not aligned and dimm devices were added on the command line qemu would terminate with a rather unhelpful message: ERROR:hw/mem/pc-dimm.c:150:pc_dimm_get_free_addr: assertion failed: (QEMU_ALIGN_UP(address_space_size, align) == address_space_size) In case no dimm device was

Re: [Qemu-devel] [PATCH 1/2] hw/ppc/spapr.c Set default boot order

2015-01-26 Thread Alexander Graf
On 01/26/2015 01:57 PM, Dinar Valeev wrote: On 01/26/2015 01:37 PM, Markus Armbruster wrote: Dinar Valeev dval...@suse.de writes: On 01/26/2015 10:11 AM, Markus Armbruster wrote: dval...@suse.de writes: From: Dinar Valeev dval...@suse.com In order to use -boot once=X option we need to

[Qemu-devel] [PATCH 0/2] pc: Fix startup with memory hotplug enabled

2015-01-26 Thread Peter Krempa
Tweak error messages to make sense and add check to verify that maxmem_size is properly aligned right away rather than just crashing afterwards. Peter Krempa (2): vl.c: Fix error messages when parsing maxmem parameters pc: memory: Validate alignment of maxram_size to page size hw/i386/pc.c

Re: [Qemu-devel] [PATCH v2 0/4] target-arm: ARM64: Adding EL1 AARCH32 guest support

2015-01-26 Thread Greg Bellows
On Mon, Jan 26, 2015 at 5:03 AM, Christoffer Dall christoffer.d...@linaro.org wrote: On Wed, Jan 21, 2015 at 12:49:49PM -0600, Greg Bellows wrote: Added support for running an AArch32 guest on a AArch64 KVM host. Support has only been added to the QEMU machvirt machine. The addition of

[Qemu-devel] [PATCH 32/50] blockdev: Check BB validity in eject and change

2015-01-26 Thread Max Reitz
Both commands will be reimplemented in a follow-up to this patch so this does not need to be nice, it just has to work. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/blockdev.c

[Qemu-devel] [PATCH 19/50] blockdev: Use BlockBackend for blockdev-backup TA

2015-01-26 Thread Max Reitz
When preparing a blockdev-backup transaction, the BlockBackend should be used because there may be no medium associated to the BB (which would make bdrv_find() fail, whereas blk_by_name() does not). This does not make a real difference because blockdev-backup will fail without a medium anyway;

[Qemu-devel] [PATCH 49/50] iotests: More options for VM.add_drive()

2015-01-26 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 --- tests/qemu-iotests/iotests.py | 9 ++--- 1 file

[Qemu-devel] [PATCH v2 1/1] dataplane: endianness-aware accesses

2015-01-26 Thread Cornelia Huck
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 device - upcoming support for the virtio-1

[Qemu-devel] [PATCH v2 0/1] dataplane vs. endianness

2015-01-26 Thread Cornelia Huck
Stefan: Here's v2 of my endianness patch for dataplane, with the extraneous vdev argument dropped from get_desc(). I orginally planned to send my virtio-1 patchset as well, but I haven't found the time for it; therefore, I think this should be applied independently. David: I take it your r-b

[Qemu-devel] [PATCH v3 10/14] qemu-io: Remove growable option

2015-01-26 Thread Max Reitz
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 not given and to directly access the

[Qemu-devel] [PATCH v3 04/14] block/xen: Use blk_new_open() in blk_connect()

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- hw/block/xen_disk.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 21842a0..1b0257c 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@

[Qemu-devel] [PATCH v3 13/14] block: Remove growable from BDS

2015-01-26 Thread Max Reitz
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 Reitz mre...@redhat.com --- block.c

[Qemu-devel] [PATCH v3 02/14] block: Add blk_new_open()

2015-01-26 Thread Max Reitz
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 parameter, blk_new_open() does not

[Qemu-devel] [PATCH 09/50] block: Move guest_block_size into BlockBackend

2015-01-26 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 --- block.c | 7 --- block/block-backend.c | 7 +--

[Qemu-devel] [PATCH 20/50] blockdev: Check blk_is_available() in sn-del-int-sync

2015-01-26 Thread Max Reitz
Check whether the BlockBackend is actually available at the start of snapshot-delete-internal-sync. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index ae1137f..858d181

[Qemu-devel] [PATCH 36/50] blockdev: Allow more options for BB-less BDS tree

2015-01-26 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 | 156

[Qemu-devel] [PATCH 15/50] block: Fail requests to empty BlockBackend

2015-01-26 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 45/50] qmp: Introduce blockdev-change-medium

2015-01-26 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 28/50] blockdev: Check BB validity in drive-mirror

2015-01-26 Thread Max Reitz
Call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index e335d06..4e12061

[Qemu-devel] [PATCH 43/50] blockdev: Implement change with basic operations

2015-01-26 Thread Max Reitz
Implement 'change' on block devices by calling blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium (a variation of that which does not need a node-name) and blockdev-close-tray. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 191

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

2015-01-26 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 48 qapi/block-core.json | 21 + qmp-commands.hx | 37 + 3 files changed, 106 insertions(+) diff --git a/blockdev.c

[Qemu-devel] [PATCH v2 1/2] target-s390x: Mark check_privileged() as !CONFIG_USER_ONLY

2015-01-26 Thread Peter Maydell
The function check_privileged() is only used in the softmmu configs; wrap it in an #ifndef CONFIG_USER_ONLY to avoid clang warnings on the linux-user builds. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Stefan Weil s...@weilnetz.de Message-id:

[Qemu-devel] [PATCH] target-mips: use CP0EnLo_XI instead of magic number

2015-01-26 Thread Leon Alrae
Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 635192c..77d89be 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@

[Qemu-devel] [PATCH v3 07/14] qemu-img: Use BlockBackend as far as possible

2015-01-26 Thread Max Reitz
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 because they really do operate on the

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other

2015-01-26 Thread Peter Maydell
On 26 January 2015 at 14:59, Chen Gang S gang.c...@sunrus.com.cn wrote: On 1/26/15 06:10, Peter Maydell wrote: I would just like the commit message to be clear about the scope of the work the patch covers. If the patch is just Fix mismatched lock/unlock calls in IPC struct conversion functions

[Qemu-devel] [PATCH v3 01/14] block: Lift some BDS functions to the BlockBackend

2015-01-26 Thread Max Reitz
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_discard() - bdrv_load_vmstate() - bdrv_save_vmstate() Signed-off-by: Max Reitz mre...@redhat.com ---

[Qemu-devel] [PATCH v2 1/4] target-tricore: target-tricore: Add instructions of RR1 opcode format, that have 0x93 as first opcode

2015-01-26 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- v1 - v2: - now uses 3 helper functions (gen_mul_q, gen_mul_q_16, gen_mulr_q) to remove repetition. - now uses 64 arithmetic instead of emulating it. - now uses arithmetic shift, instead of normal shift + sign

[Qemu-devel] [PATCH v2 3/4] target-tricore: Add instructions of RRPW opcode format

2015-01-26 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann kbast...@mail.uni-paderborn.de --- v1 - v2: - optimize OPC2_32_RRPW_EXTR by using only two shifts, instead of four. - OPC1_32_RRPW_DEXTR now has r1 == r2 as a special case. target-tricore/translate.c | 70 ++ 1

[Qemu-devel] [PATCH v2 0/4] TriCore add instructions of RR1, RR2, RRPW and RRR opcode format

2015-01-26 Thread Bastian Koppelmann
Hi, this is a rather short patchset, that only implements instructions of four formats. There will be another patchset, which has a few bugfixes. Cheers, Bastian v1 - v2: - Add 3 helper functions (gen_mul_q, gen_mul_q_16, gen_mulr_q) to remove repetition. - gen_mul_q now uses 64

Re: [Qemu-devel] [PATCH 2/2] hw/ppc/spapr Add qemu_register_boot_set for SPAPR

2015-01-26 Thread Alexander Graf
On 01/26/2015 11:49 AM, Dinar Valeev wrote: On 01/24/2015 12:04 AM, Alexander Graf wrote: On 23.01.15 23:51, dval...@suse.de wrote: From: Dinar Valeev dval...@suse.com In order to have -boot once=d functioning, it is required to have qemu_register_boot_set qemu-system-ppc64 -enable-kvm

Re: [Qemu-devel] [PATCH v3 00/14] block: Remove growable, add blk_new_open()

2015-01-26 Thread Stefano Stabellini
On Mon, 26 Jan 2015, Max Reitz wrote: This series removes the growable field from the BlockDriverState object. Its use was to clamp guest requests against the limits of the BDS; however, this can now be done more easily by moving those checks into the BlockBackend functions. In a future

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

2015-01-26 Thread Max Reitz
This series reworks a lot regarding BlockBackend and media. It is essentially a v3 to the blockdev: Add blockdev-change-medium with read-only option series (which is in fact a part of this series), but of course does a lot more. Basically, this series allows empty BlockBackends, that is BBs

[Qemu-devel] [PATCH 02/50] iotests: Only create BB if necessary

2015-01-26 Thread Max Reitz
Tests 071 and 081 test giving references in blockdev-add. It is not necessary to create a BlockBackend here, so omit it. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/071 | 50 ++ tests/qemu-iotests/071.out | 12 +++

[Qemu-devel] [PATCH 08/50] block/quorum: Implement bdrv_is_inserted()

2015-01-26 Thread Max Reitz
bdrv_is_inserted() should be invoked recursively on the children of quorum. Signed-off-by: Max Reitz mre...@redhat.com --- block/quorum.c | 16 1 file changed, 16 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index 437b122..7811c4a 100644 --- a/block/quorum.c +++

[Qemu-devel] [PATCH 11/50] block: Move BlockAcctStats into BlockBackend

2015-01-26 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 --- block.c | 11 ---

[Qemu-devel] [PATCH 21/50] blockdev: Check BB validity in internal snapshot TA

2015-01-26 Thread Max Reitz
Call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 858d181..012c603

[Qemu-devel] [PATCH 16/50] block: Prepare remaining BB functions for NULL BDS

2015-01-26 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 17/50] block: Respect empty BB in bdrv_lookup_bs()

2015-01-26 Thread Max Reitz
blk_by_name() may return a BlockBackend for which blk_bs() returns NULL. In this case, an error should be returned (instead of just returning NULL without modifying *errp). Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block.c

[Qemu-devel] [PATCH 35/50] blockdev: Pull out blockdev option extraction

2015-01-26 Thread Max Reitz
Extract some of the blockdev option extraction code from blockdev_init() into an 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 | 201

[Qemu-devel] [PATCH v3 14/14] block: Keep bdrv_check*_request()'s return value

2015-01-26 Thread Max Reitz
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 --- block.c | 35 --- 1 file changed, 24 insertions(+),

Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append()

2015-01-26 Thread Igor Mammedov
On Mon, 26 Jan 2015 10:57:21 +0100 Igor Mammedov imamm...@redhat.com wrote: On Sat, 24 Jan 2015 18:33:50 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jan 23, 2015 at 06:56:20PM +0100, Igor Mammedov wrote: On Fri, 23 Jan 2015 15:55:11 +0200 Michael S. Tsirkin m...@redhat.com

[Qemu-devel] [PATCH] target-mips: fix detection of the end of the page during translation

2015-01-26 Thread Leon Alrae
The test is supposed to terminate TB if the end of the page is reached. However, with current implementation it may never succeed for microMIPS or mips16. Reported-by: Richard Henderson r...@twiddle.net Signed-off-by: Leon Alrae leon.al...@imgtec.com --- target-mips/translate.c | 5 - 1 file

[Qemu-devel] [PATCH 29/50] blockdev: Check BB validity in find_block_job()

2015-01-26 Thread Max Reitz
Call blk_is_available() before using blk_bs() to obtain the root BlockDriverState behind the BlockBackend. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index

  1   2   3   4   >