Re: [Qemu-devel] [PATCH v5 2/5] acpi: move generic aml building helpers into dedictated file

2015-01-27 Thread Michael S. Tsirkin
On Wed, Jan 21, 2015 at 09:09:10AM +, Igor Mammedov wrote: the will be later used for composing AML primitives and all that could be reused later for ARM machines as well. Signed-off-by: Igor Mammedov imamm...@redhat.com OK so the only thing holding this up is really that you have

Re: [Qemu-devel] [PATCH] block: Simplify a few g_try_malloc() error checks

2015-01-27 Thread Paolo Bonzini
On 27/01/2015 13:25, Markus Armbruster wrote: Unlike malloc(), g_try_malloc() friends return a null pointer only on failure, never for a zero size. Simplify tests for failure accordingly. This helps Coverity see returned null pointers can't be dereferenced. Also makes the code easier to

Re: [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper

2015-01-27 Thread Claudio Fontana
Hello Igor, On 22.01.2015 15:50, Igor Mammedov wrote: Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/acpi-build-utils.c | 8 include/hw/acpi/acpi-build-utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/acpi-build-utils.c

[Qemu-devel] [PULL 05/16] acpi-test: update expected DSDT

2015-01-27 Thread Michael S. Tsirkin
Previous patch pc: acpi: fix WindowsXP BSOD when memory hotplug is enabled changed DSDT, update expected test files. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- tests/acpi-test-data/pc/DSDT | Bin 3592 - 3621 bytes tests/acpi-test-data/q35/DSDT | Bin 8182 - 8211 bytes

[Qemu-devel] [PATCH] block: fix off-by-one error in qcow and qcow2

2015-01-27 Thread Jeff Cody
This fixes an off-by-one error introduced in 9a29e18. Both qcow and qcow2 need to make sure to leave room for string terminator '\0' for the backing file, so the max length of the non-terminated string is either 1023 or PATH_MAX - 1. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: Jeff

Re: [Qemu-devel] [PATCH v2 0/8] qemu: guest agent: implement guest-exec command for Linux

2015-01-27 Thread Denis V. Lunev
On 31/12/14 16:06, Denis V. Lunev wrote: hese patches for guest-agent add the functionality to execute commands on a guest UNIX machine. These patches add the following interfaces: guest-pipe-open guest-exec guest-exec-status With these interfaces it's possible to: * Open an anonymous pipe

[Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-27 Thread Denis V. Lunev
fallocate() works fine and could handle properly with arbitrary size requests. There is no sense to reduce the amount of space to fallocate. The bigger is the size, the better is the performance as the amount of journal updates is reduced. Signed-off-by: Denis V. Lunev d...@openvz.org CC: Kevin

Re: [Qemu-devel] [PATCH v2 1/4] pci: Split pcie_host_mmcfg_map()

2015-01-27 Thread Peter Maydell
On 21 January 2015 at 16:18, Alexander Graf ag...@suse.de wrote: The mmcfg space is a memory region that allows access to PCI config space in the PCIe world. To maintain abstraction layers, I would like to expose the mmcfg space as a sysbus mmio region rather than have it mapped straight into

Re: [Qemu-devel] [PATCH v5 1/3] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2015-01-27 Thread Jun Li
On Thu, 01/22 14:14, Max Reitz wrote: On 2015-01-19 at 08:16, Jun Li wrote: On Thu, 01/15 13:47, Max Reitz wrote: On 2015-01-03 at 07:23, Jun Li wrote: On Fri, 11/21 11:56, Max Reitz wrote: So, as for what I think we do need to do when shrinking (and keep in mind: The offset given to

Re: [Qemu-devel] [PATCH] block: Simplify a few g_try_malloc() error checks

2015-01-27 Thread Kevin Wolf
Am 27.01.2015 um 14:42 hat Markus Armbruster geschrieben: Paolo Bonzini pbonz...@redhat.com writes: On 27/01/2015 13:25, Markus Armbruster wrote: Unlike malloc(), g_try_malloc() friends return a null pointer only on failure, never for a zero size. Simplify tests for failure

Re: [Qemu-devel] [PATCH] block: fix off-by-one error in qcow and qcow2

2015-01-27 Thread Kevin Wolf
Am 27.01.2015 um 14:33 hat Jeff Cody geschrieben: This fixes an off-by-one error introduced in 9a29e18. Both qcow and qcow2 need to make sure to leave room for string terminator '\0' for the backing file, so the max length of the non-terminated string is either 1023 or PATH_MAX - 1.

[Qemu-devel] [PULL 12/16] smbios: Fix dimm size calculation when RAM is multiple of 16GB

2015-01-27 Thread Michael S. Tsirkin
From: Eduardo Habkost ehabk...@redhat.com The Memory Device size calculation logic is broken when the RAM size is a multiple of 16GB, making the size of the last entry be 0 instead of 16GB. Fix the logic to handle that case correctly. Signed-off-by: Eduardo Habkost ehabk...@redhat.com

Re: [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper

2015-01-27 Thread Michael S. Tsirkin
On Tue, Jan 27, 2015 at 02:26:34PM +0100, Claudio Fontana wrote: Hello Igor, On 22.01.2015 15:50, Igor Mammedov wrote: Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/acpi-build-utils.c | 8 include/hw/acpi/acpi-build-utils.h | 1 + 2 files changed, 9

Re: [Qemu-devel] [PATCH] block: Simplify a few g_try_malloc() error checks

2015-01-27 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: On 27/01/2015 13:25, Markus Armbruster wrote: Unlike malloc(), g_try_malloc() friends return a null pointer only on failure, never for a zero size. Simplify tests for failure accordingly. This helps Coverity see returned null pointers can't be

[Qemu-devel] [Bug 897750] Re: libvirt/kvm problem with disk attach/detach/reattach on running virt

2015-01-27 Thread Stefan Bader
Serge, Scott, somehow I think we all left here in a confused state and I do not think we still have the problem (at least not Trusty). From my last comment it seems I did not even find something that I could change for Precise. For now I would unassign myself and maybe this report should be closed

[Qemu-devel] [PULL 09/16] virtio: fix feature bit checks

2015-01-27 Thread Michael S. Tsirkin
From: Cornelia Huck cornelia.h...@de.ibm.com Several places check against the feature bit number instead of against the feature bit. Fix them. Cc: qemu-sta...@nongnu.org Reported-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Reviewed-by: Michael

[Qemu-devel] [PATCH 1/7] block/raw-posix: create translate_err helper to merge errno values

2015-01-27 Thread Denis V. Lunev
actually the code if (ret == -ENODEV || ret == -ENOSYS || ret == -EOPNOTSUPP || ret == -ENOTTY) { ret = -ENOTSUP; } is present twice and will be added a couple more times. Create helper for this. Signed-off-by: Denis V. Lunev d...@openvz.org CC: Kevin Wolf kw...@redhat.com

[Qemu-devel] [PATCH 3/7] block/raw-posix: refactor handle_aiocb_write_zeroes a bit

2015-01-27 Thread Denis V. Lunev
move code dealing with a block device to a separate function. This will allow to implement additional processing for ordinary files. Pls note, that xfs_code has been moved before checking for s-has_write_zeroes as xfs_write_zeroes does not touch this flag inside. This makes code a bit more

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

2015-01-27 Thread Denis V. Lunev
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 this offset (pre-condition to fallocate(0) to work). We could simply call fallocate(0).

[Qemu-devel] [PULL 00/16] pci, pc, virtio fixes and cleanups

2015-01-27 Thread Michael S. Tsirkin
The following changes since commit 1e42c353469cb58ca4f3b450eea4211af7d0b147: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20150116' into staging (2015-01-16 12:06:41 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[Qemu-devel] [PULL 11/16] bios-linker-loader: move source to common location

2015-01-27 Thread Michael S. Tsirkin
There are plans to use bios linker by MIPS, ARM. It's only used by ACPI ATM, so put it in hw/acpi and make it depend on CONFIG_ACPI. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/{i386 = acpi}/bios-linker-loader.c | 0 hw/acpi/Makefile.objs | 1 +

Re: [Qemu-devel] Qemu with GDB - Query

2015-01-27 Thread Maciej W. Rozycki
On Sat, 24 Jan 2015, manish tiwari wrote: I am new to QEMU and trying to attach gdb with qemu on powepc host. I have tried below options qemu-system-ppc -enable-kvm -nographic -m 512 -M ppce500 -cpu e500mc -gdb tcp::1234 -s -S -kernel uImage -initrd rootfs.ext2.gz -append root=/dev/ram

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

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: 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 ---

Re: [Qemu-devel] [PATCH 04/11] target-arm: Define correct mmu_idx values and pass them in TB flags

2015-01-27 Thread Peter Maydell
On 23 January 2015 at 18:20, Peter Maydell peter.mayd...@linaro.org wrote: +/* Determine the current mmu_idx to use for normal loads/stores */ static inline int cpu_mmu_index (CPUARMState *env) { -return arm_current_el(env); +int el = arm_current_el(env); + +if (el 3

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

2015-01-27 Thread Max Reitz
On 2015-01-27 at 14:37, John Priddy wrote: I think I mistakenly got put on the CC list for this. Can the next replyer please remove j...@redhat.com? Thanks. Oh, sorry, I meant to CC a different John for whom I had no alias yet. I am sorry for the spam. :-/ Max

[Qemu-devel] [PATCH RESEND 06/50] block: Add blk_is_available()

2015-01-27 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 RESEND 04/50] hw/usb-storage: Check whether BB is inserted

2015-01-27 Thread Max Reitz
Only call bdrv_key_required() on the BlockDriverState if the BlockBackend has an inserted medium. Signed-off-by: Max Reitz mre...@redhat.com --- hw/usb/dev-storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index

[Qemu-devel] [PATCH RESEND 41/50] blockdev: Add blockdev-insert-medium

2015-01-27 Thread Max Reitz
And a helper function for that which directly takes a pointer to the BDS to be inserted instead of its node-name (which will be used for implementing 'change' using blockdev-insert-medium). Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 43

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

2015-01-27 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 RESEND 38/50] blockdev: Add blockdev-open-tray

2015-01-27 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 RESEND 44/50] block: Inquire tray state before tray-moved events

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

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

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, 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] [PATCH RESEND 12/50] block: Move I/O status and error actions into BB

2015-01-27 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 RESEND 50/50] iotests: Add test for change-related QMP commands

2015-01-27 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/118 | 649 + tests/qemu-iotests/118.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 655 insertions(+) create mode 100755 tests/qemu-iotests/118 create mode 100644

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Peter Maydell
On 27 January 2015 at 17:57, Greg Bellows greg.bell...@linaro.org wrote: On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: +/* Return the exception level which controls this address translation regime */ +static inline uint32_t regime_el(CPUARMState *env,

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

2015-01-27 Thread Eric Blake
On 01/26/2015 08:31 AM, Peter Krempa wrote: 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) ==

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

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

2015-01-27 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 RESEND 11/50] block: Move BlockAcctStats into BlockBackend

2015-01-27 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 RESEND 09/50] block: Move guest_block_size into BlockBackend

2015-01-27 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 RESEND 25/50] blockdev: Check BB validity in block-commit

2015-01-27 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 74d26a6..431afcd

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Greg Bellows
On Tue, Jan 27, 2015 at 12:12 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 27 January 2015 at 17:57, Greg Bellows greg.bell...@linaro.org wrote: On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell peter.mayd...@linaro.org wrote: +/* Return the exception level which controls this

[Qemu-devel] [PATCH RESEND 30/50] blockdev: Check BB validity in change-backing-file

2015-01-27 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] [PATCH 10/50] block: Remove wr_highest_offset from BlockAcctStats

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: 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

[Qemu-devel] [PATCH RESEND 33/50] blockdev: Respect NULL BDS in do_drive_del()

2015-01-27 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index f3091df..f82b20c 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2019,7 +2019,6 @@ int do_drive_del(Monitor *mon, const QDict

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Peter Maydell
On 27 January 2015 at 19:49, Greg Bellows greg.bell...@linaro.org wrote: On Tue, Jan 27, 2015 at 12:12 PM, Peter Maydell peter.mayd...@linaro.org wrote: g_assert_not_reached(), but it didn't seem worth cluttering the switch with a bunch of extra labels just to assert that they weren't

Re: [Qemu-devel] [PATCH V2 4/4] target-arm: Add missing SP_ELx register definition

2015-01-27 Thread Greg Bellows
On Tue, Jan 27, 2015 at 1:03 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 23 January 2015 at 16:17, Greg Bellows greg.bell...@linaro.org wrote: Added CP register definitions for SP_EL1 and SP_EL2. Signed-off-by: Greg Bellows greg.bell...@linaro.org Reviewed-by: Peter Maydell

Re: [Qemu-devel] [PATCH 0/6] linux-user: Fix various clang warnings

2015-01-27 Thread Peter Maydell
Ping^2 ? thanks -- PMM On 21 January 2015 at 10:23, Riku Voipio riku.voi...@iki.fi wrote: Hi, On Tue, Jan 20, 2015 at 02:54:20PM +, Peter Maydell wrote: Ping! I've just updated my linux-user-for-upstream tree. I'll get it reviewed/tested tonight. thanks -- PMM On 8 January 2015

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

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: 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

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

2015-01-27 Thread Max Reitz
** This is a resend due to me messing up John's CC in the first thread. Sorry for the superfluous mails, but I feel like it's better to bother you all with the same mails again than to keep bothering innocent people. ** This series reworks a lot regarding BlockBackend and media. It is essentially

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

2015-01-27 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 RESEND 29/50] blockdev: Check BB validity in find_block_job()

2015-01-27 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

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

2015-01-27 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 RESEND 32/50] blockdev: Check BB validity in eject and change

2015-01-27 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 RESEND 46/50] hmp: Use blockdev-change-medium for change command

2015-01-27 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 ---

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

2015-01-27 Thread Eric Blake
On 01/26/2015 08:31 AM, Peter Krempa wrote: 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

Re: [Qemu-devel] [PATCH 01/50] blockdev: Allow creation of BDS trees without BB

2015-01-27 Thread Max Reitz
On 2015-01-27 at 13:22, Eric Blake wrote: On 01/26/2015 09:02 AM, Max Reitz wrote: If the id field is missing from the options given to blockdev-add, just omit the BlockBackend and create the BlockDriverState tree alone. Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c

Re: [Qemu-devel] [PATCH v1 2/2] target_arm: Parameterise the irq lines for armv7m_init

2015-01-27 Thread Peter Maydell
On 24 January 2015 at 08:02, Alistair Francis alistai...@gmail.com wrote: This patch allows the board to specifiy the number of NVIC interrupt lines when using armv7m_init. Signed-off-by: Alistair Francis alistai...@gmail.com Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com ---

Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available()

2015-01-27 Thread Max Reitz
On 2015-01-27 at 14:15, Eric Blake wrote: On 01/26/2015 09:02 AM, Max Reitz wrote: 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

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

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: 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

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

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

2015-01-27 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

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

2015-01-27 Thread Max Reitz
Please do not reply to this thread any more; refer to the RESEND thread instead (I messed up John's CC). If you have to reply to this thread, please replace j...@redhat.com by js...@redhat.com. Sorry for the inconvience, everyone. Max

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

2015-01-27 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

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

2015-01-27 Thread Max Reitz
On 2015-01-27 at 15:01, Eric Blake wrote: On 01/26/2015 09:02 AM, Max Reitz wrote: 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

[Qemu-devel] [PATCH RESEND 39/50] blockdev: Add blockdev-close-tray

2015-01-27 Thread Max Reitz
Signed-off-by: Max Reitz mre...@redhat.com --- blockdev.c | 22 ++ qapi/block-core.json | 14 ++ qmp-commands.hx | 33 + 3 files changed, 69 insertions(+) diff --git a/blockdev.c b/blockdev.c index a0b9f17..d6a3fdf

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

2015-01-27 Thread Max Reitz
On 2015-01-27 at 13:19, Denis V. Lunev wrote: On 27/01/15 20:57, Max Reitz wrote: On 2015-01-27 at 08:51, 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 v1 1/2] target_arm: Remove memory region init from armv7m_init

2015-01-27 Thread Peter Maydell
On 24 January 2015 at 08:02, Alistair Francis alistai...@gmail.com wrote: This patch moves the memory region init code from the armv7m_init function to the stellaris_init function Signed-off-by: Alistair Francis alistai...@gmail.com Reviewed-by: Peter Crosthwaite peter.crosthwa...@xilinx.com

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

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: 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 ++

Re: [Qemu-devel] [RFC v3 0/2] Add Generic PCI host device update

2015-01-27 Thread Peter Maydell
On 14 January 2015 at 10:16, Alvise Rigo a.r...@virtualopensystems.com wrote: This is just an update to address the comments received on v2. This patch series is based on the previous work [1] and [2] by Rob Herring. This is a stand alone work, but I will not hesitate to split the patches in a

Re: [Qemu-devel] [PATCH 04/50] hw/usb-storage: Check whether BB is inserted

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: Only call bdrv_key_required() on the BlockDriverState if the BlockBackend has an inserted medium. Signed-off-by: Max Reitz mre...@redhat.com --- hw/usb/dev-storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake

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

2015-01-27 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 RESEND 35/50] blockdev: Pull out blockdev option extraction

2015-01-27 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

Re: [Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-27 Thread Max Reitz
On 2015-01-27 at 08:51, Denis V. Lunev wrote: fallocate() works fine and could handle properly with arbitrary size requests. Maybe could properly handle arbitrary size requests (or ...arbitrarily sized requests)? There is no sense to reduce the amount of space to fallocate. The bigger is

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

2015-01-27 Thread Denis V. Lunev
On 27/01/15 20:57, Max Reitz wrote: On 2015-01-27 at 08:51, 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 6/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-27 Thread Denis V. Lunev
On 27/01/15 21:24, Max Reitz wrote: On 2015-01-27 at 13:19, Denis V. Lunev wrote: On 27/01/15 20:57, Max Reitz wrote: On 2015-01-27 at 08:51, 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 V2 4/4] target-arm: Add missing SP_ELx register definition

2015-01-27 Thread Peter Maydell
On 23 January 2015 at 16:17, Greg Bellows greg.bell...@linaro.org wrote: Added CP register definitions for SP_EL1 and SP_EL2. Signed-off-by: Greg Bellows greg.bell...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- v1 - v2 - Remove unnecessary accessfn for SP_EL1/2 -

Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available()

2015-01-27 Thread Eric Blake
On 01/26/2015 09:02 AM, Max Reitz wrote: 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.

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

2015-01-27 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 RESEND 10/50] block: Remove wr_highest_offset from BlockAcctStats

2015-01-27 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 RESEND 18/50] block: Respect empty BB in bdrv_query_info()

2015-01-27 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 RESEND 31/50] block: Add blk_insert_bs()

2015-01-27 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 RESEND 03/50] hw/block/fdc: Implement tray status

2015-01-27 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 RESEND 48/50] hmp: Add read-only option to change command

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

2015-01-27 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

Re: [Qemu-devel] [PATCH 2/2] bootdevice: update boot_order in MachineState

2015-01-27 Thread Dinar Valeev
On 01/27/2015 03:51 AM, Gonglei wrote: On 2015/1/27 7:52, dval...@suse.de wrote: From: Dinar Valeev dval...@suse.com on sPAPR we need to update boot_order in MachineState in case it got changed on reset. Signed-off-by: Dinar Valeev dval...@suse.com --- bootdevice.c | 3 +++ 1 file

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

2015-01-27 Thread Claudio Fontana
On 22.01.2015 16:52, Alexander Graf wrote: On 22.01.15 16:28, Claudio Fontana wrote: Hi Alexander, thank you for the respin. I retested with the new mappings on OSv for AArch64, and they show up ok in the guest. Just a couple minor comments below, otherwise I think this is good. On

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

2015-01-27 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: 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

Re: [Qemu-devel] [PATCH 0/4] nbd: iotest fixes and error message improvement

2015-01-27 Thread Paolo Bonzini
On 27/01/2015 03:02, Max Reitz wrote: This series is a follow-up to my previous patch iotests: Specify format for qemu-nbd and as such relies on it. The first three patches of this series fix the qemu-iotests so they once again pass when using NBD. The fourth patch of this series

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

2015-01-27 Thread Peter Maydell
On 27 January 2015 at 09:24, Claudio Fontana claudio.font...@huawei.com wrote: On 22.01.2015 16:52, Alexander Graf wrote: On 22.01.15 16:28, Claudio Fontana wrote: Alex wrote; +for (devfn = 0; devfn = 0x18; devfn+=0x8) { devfn += 0x8 (spaces) Yeah, I had it like that and it looked

Re: [Qemu-devel] [PATCH 2/2] bootdevice: update boot_order in MachineState

2015-01-27 Thread Gonglei
On 2015/1/27 16:57, Dinar Valeev wrote: On 01/27/2015 03:51 AM, Gonglei wrote: On 2015/1/27 7:52, dval...@suse.de wrote: From: Dinar Valeev dval...@suse.com on sPAPR we need to update boot_order in MachineState in case it got changed on reset. Signed-off-by: Dinar Valeev dval...@suse.com

Re: [Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the post-copy queue

2015-01-27 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: On Wed, Jan 14, 2015 at 08:13:27PM +, Dr. David Alan Gilbert wrote: * David Gibson (da...@gibson.dropbear.id.au) wrote: On Fri, Oct 03, 2014 at 06:47:43PM +0100, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH 2/2] bootdevice: update boot_order in MachineState

2015-01-27 Thread Dinar Valeev
On 01/27/2015 10:18 AM, Gonglei wrote: On 2015/1/27 16:57, Dinar Valeev wrote: On 01/27/2015 03:51 AM, Gonglei wrote: On 2015/1/27 7:52, dval...@suse.de wrote: From: Dinar Valeev dval...@suse.com on sPAPR we need to update boot_order in MachineState in case it got changed on reset.

[Qemu-devel] [PATCH v4] sheepdog: selectable object size support

2015-01-27 Thread Teruaki Ishizaki
Previously, qemu block driver of sheepdog used hard-coded VDI object size. This patch enables users to handle block_size_shift value for calculating VDI object size. When you start qemu, you don't need to specify additional command option. But when you create the VDI which doesn't have default

[Qemu-devel] [PATCH] scsi: Fix scsi_req_cancel_async for no aiocb req

2015-01-27 Thread Fam Zheng
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 Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH v2 3/3] pc-dimm: Add Error argument to pc_existing_dimms_capacity

2015-01-27 Thread Igor Mammedov
On Tue, 27 Jan 2015 09:35:02 +0530 Bharata B Rao bhar...@linux.vnet.ibm.com wrote: Now that pc_existing_dimms_capacity() is an API, include Error pointer as an argument and modify the caller appropriately. Suggested-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Bharata B Rao

Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-01-27 Thread Shannon Zhao
On 2015/1/26 18:22, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:12 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: RSDP points to XSDT which in turn points to other tables. Signed-off-by: Shannon Zhao zhaoshengl...@huawei.com --- hw/arm/virt-acpi-build.c | 22

Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table

2015-01-27 Thread Igor Mammedov
On Tue, 27 Jan 2015 17:36:29 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: On 2015/1/26 18:22, Igor Mammedov wrote: On Sat, 24 Jan 2015 17:21:12 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: RSDP points to XSDT which in turn points to other tables. Signed-off-by:

Re: [Qemu-devel] [PATCH v4 43/47] Host page!=target page: Cleanup bitmaps

2015-01-27 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: On Wed, Dec 17, 2014 at 06:21:34PM +, Dr. David Alan Gilbert wrote: * David Gibson (da...@gibson.dropbear.id.au) wrote: On Fri, Oct 03, 2014 at 06:47:49PM +0100, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert

[Qemu-devel] [PATCH RESEND 47/50] blockdev: Add read-only option to blockdev-change-medium

2015-01-27 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

  1   2   3   4   >