[Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-05 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com If errors happen for middle items of channel_list, qmp_query_spice_channels() returns NULL, and the variable cur_item going out of scope leaks the storage it points to. The flag is a compatibility thing for older spice-server versions. Meanwhile our minimum

Re: [Qemu-devel] [PATCH] qmp: extend QMP to provide read/write access to physical memory

2014-12-05 Thread Markus Armbruster
Bryan D. Payne bdpa...@acm.org writes: Can you explain again why the existing commands to read guest memory (from the top of my head: dump-guest-memory, memsave, pmemsave) are insufficient? How does your solution improve on them? What exactly can it do what these commands can't? What

Re: [Qemu-devel] [PATCH v4 26/26] iotests: Add test for different refcount widths

2014-12-05 Thread Max Reitz
On 2014-12-04 at 20:10, Eric Blake wrote: On 12/04/2014 02:51 AM, Max Reitz wrote: Side note: Now that we can produce MUCH smaller images where the reftable can easily require enough contiguous clusters to require the creation of at least one refblock that cannot be self-referential, it would

Re: [Qemu-devel] [PATCH v2 3/3] iotests: Fix test 039

2014-12-05 Thread Max Reitz
On 2014-12-05 at 08:08, Fam Zheng wrote: On Thu, 12/04 15:49, Max Reitz wrote: Test 039 used qemu-io -c abort for simulating a qemu crash; however, abort() generally results in a core dump and ulimit -c 0 is no reliable way of preventing that. Use abort -S 9 instead to have it crash without a

Re: [Qemu-devel] [PATCH v4 1/3] qmp: Add command 'blockdev-backup'

2014-12-05 Thread Max Reitz
On 2014-12-05 at 07:12, Fam Zheng wrote: On Thu, 12/04 14:43, Max Reitz wrote: +if (!bs) { +error_set(errp, QERR_DEVICE_NOT_FOUND, device); +return; +} + +target_bs = bdrv_find(target); +if (!target_bs) { +error_set(errp, QERR_DEVICE_NOT_FOUND, target); +

Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name

2014-12-05 Thread Kevin Wolf
Am 04.12.2014 um 20:44 hat Eric Blake geschrieben: On 12/04/2014 08:56 AM, Markus Armbruster wrote: @device is a sub-optimal name for this single parameter. Either we accept that and move on, or we deprecate it in favor of a new parameter with a better name. I guess the better name

[Qemu-devel] [PATCH 0/2] s390/pci: add 2 more features

2014-12-05 Thread Frank Blaschka
Coni, Alex, Christian, here are 2 more s390/pci features on top of the base pci support. Thx! Frank Frank Blaschka (2): s390/pci: add error event support s390/pci: implement stpcifc instruction hw/s390x/s390-pci-bus.c | 50 ++-- hw/s390x/s390-pci-bus.h | 36 +++-

[Qemu-devel] [PATCH 1/2] s390/pci: add error event support

2014-12-05 Thread Frank Blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch adds support to generate s390 pci error events Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- hw/s390x/s390-pci-bus.c | 50 +--- hw/s390x/s390-pci-bus.h | 35 +++-

[Qemu-devel] [PATCH 2/2] s390/pci: implement stpcifc instruction

2014-12-05 Thread Frank Blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements the last remaining s390 pci instruction to query the function information block. Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- hw/s390x/s390-pci-bus.h | 1 + hw/s390x/s390-pci-inst.c | 64

Re: [Qemu-devel] [PATCH v4 2/3] block: Add blockdev-backup to transaction

2014-12-05 Thread Max Reitz
On 2014-12-05 at 07:37, Fam Zheng wrote: On Thu, 12/04 14:59, Max Reitz wrote: On 2014-12-04 at 03:29, Fam Zheng wrote: Also add version info for other transaction types. Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 81

[Qemu-devel] [PATCH v2] i386: fix icount processing for repz instructions

2014-12-05 Thread Pavel Dovgalyuk
TCG generates optimized code for i386 repz instructions in single step mode. It means that when ecx becomes 0, execution of the string instruction breaks immediately without an additional iteration for ecx==0 (which will only check ecx and set the flags). Omitting this iteration leads to different

Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name

2014-12-05 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 12/04/2014 08:56 AM, Markus Armbruster wrote: @device is a sub-optimal name for this single parameter. Either we accept that and move on, or we deprecate it in favor of a new parameter with a better name. I guess the better name isn't worth that

Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name

2014-12-05 Thread Kevin Wolf
Am 05.12.2014 um 10:34 hat Markus Armbruster geschrieben: Eric Blake ebl...@redhat.com writes: On 12/04/2014 08:56 AM, Markus Armbruster wrote: @device is a sub-optimal name for this single parameter. Either we accept that and move on, or we deprecate it in favor of a new parameter

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed, SIGKILL has the same effect of abruptly crash qemu; without a core dump. Thus, -c abort is not always useful to simulate a qemu-io crash; therefore, this

Re: [Qemu-devel] [PATCH v2 1/1] pci-host: add educational driver

2014-12-05 Thread Jiri Slaby
On 12/05/2014, 10:52 AM, Jiri Slaby wrote: hw/misc/edu.c | 351 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -593,6 +593,11 @@ F: hw/net/opencores_eth.c Devices --- +EDU +M: Jiri Slaby jsl...@suse.cz +S: Maintained +F:

[Qemu-devel] [PATCH v2 1/1] pci-host: add educational driver

2014-12-05 Thread Jiri Slaby
I am using qemu for teaching the Linux kernel at our university. I wrote a simple PCI device that can answer to writes/reads, generate interrupts and perform DMA. As I am dragging it locally over 2 years, I am sending it to you now. Signed-off-by: Jiri Slaby jsl...@suse.cz Cc: Paolo Bonzini

[Qemu-devel] [PATCH v3 1/1] pci-host: add educational driver

2014-12-05 Thread Jiri Slaby
I am using qemu for teaching the Linux kernel at our university. I wrote a simple PCI device that can answer to writes/reads, generate interrupts and perform DMA. As I am dragging it locally over 2 years, I am sending it to you now. Signed-off-by: Jiri Slaby jsl...@suse.cz --- MAINTAINERS

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Max Reitz
On 2014-12-05 at 10:52, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed, SIGKILL has the same effect of abruptly crash qemu; without a core dump. Thus, -c abort is not always useful

[Qemu-devel] [PATCH v2 3/4] blockdev: Add read-only option to blockdev-change-medium

2014-12-05 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 v2 4/4] hmp: Add read-only option to change command

2014-12-05 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 --- hmp-commands.hx | 20 +--- hmp.c | 21 - 2 files changed, 37 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Max Reitz
The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries information about whether it can be written to or not (again, floppy drives). Therefore, it should be possible to change the read-only state of

[Qemu-devel] [PATCH v2 1/4] qmp: Introduce blockdev-change-medium

2014-12-05 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 v2 2/4] hmp: Use blockdev-change-medium for change command

2014-12-05 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 --- hmp.c | 27 +++ 1

Re: [Qemu-devel] question: guest will hang when call system function in migration thread.

2014-12-05 Thread Li Guang
Hi, which version you tested? do you let vm continue to run after migration? can you provide more info? can't reproduce it on latest version. Thanks! On 12/04/2014 11:14 PM, 陈梁 wrote: Hi all guest will hang when call system function in migration thread. The cpu usage of vcpu thread is

[Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Kevin Wolf
Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because PAYLOAD_BLOCK_NOT_PRESENT actually means undefined rather than zeroed according to the spec). This fixes that 'qemu-img

Re: [Qemu-devel] [PATCH v4 REPOST 1/2] Add device listener interface

2014-12-05 Thread Paul Durrant
-Original Message- From: Andreas Färber [mailto:afaer...@suse.de] Sent: 03 December 2014 14:27 To: Stefano Stabellini; Paul Durrant Cc: qemu-devel@nongnu.org; Peter Crosthwaite; Thomas Huth; Michael S. Tsirkin; Markus Armbruster; Christian Borntraeger; Igor Mammedov; Paolo Bonzini

Re: [Qemu-devel] [PATCH v2 1/1] pci-host: add educational driver

2014-12-05 Thread Paolo Bonzini
Hi Jirka, because this is supposed to be a poster of good QEMU practices, the review is going to be a bit picky. Most comments are trivial to apply. +0x20 (RO) : status register, bitwise OR + 0x01 -- computing factorial + Perhaps bit 0 can be read-only, while bit 1 is set/clear by

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 06:34, Pavel Dovgaluk wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 04/12/2014 12:02, Pavel Dovgaluk wrote: Why do you need to do this if !cpu_can_do_io(cpu)? We save number of executed instruction when saving interrupt or exception event. It leads to the call

[Qemu-devel] [PATCH v5 1/2] Add device listener interface

2014-12-05 Thread Paul Durrant
The Xen ioreq-server API, introduced in Xen 4.5, requires that PCI device models explicitly register with Xen for config space accesses. This patch adds a listener interface into qdev-core which can be used by the Xen interface code to monitor for arrival and departure of PCI devices.

[Qemu-devel] [PATCH v5 0/2] Use ioreq-server API

2014-12-05 Thread Paul Durrant
This patch series is v5 of what was originally the single patch Xen: Use the ioreq-server API when available. v2 of the series moved the code that added the PCI bus listener to patch #1 and the remainder of the changes to patch #2. Patch #2 was then re-worked to constrain the #ifdefing to

[Qemu-devel] [PATCH v5 2/2] Xen: Use the ioreq-server API when available

2014-12-05 Thread Paul Durrant
The ioreq-server API added to Xen 4.5 offers better security than the existing Xen/QEMU interface because the shared pages that are used to pass emulation request/results back and forth are removed from the guest's memory space before any requests are serviced. This prevents the guest from mapping

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 05/12/2014 06:34, Pavel Dovgaluk wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 04/12/2014 12:02, Pavel Dovgaluk wrote: Why do you need to do this if !cpu_can_do_io(cpu)? We save number of executed instruction when saving

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Max Reitz
On 2014-12-05 at 11:26, Kevin Wolf wrote: Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because PAYLOAD_BLOCK_NOT_PRESENT actually means undefined rather than zeroed

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Kevin Wolf
Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because PAYLOAD_BLOCK_NOT_PRESENT actually means undefined rather than

Re: [Qemu-devel] [PATCH 0/6] relicense QEMU softfloat from 2b to to 2a

2014-12-05 Thread Peter Maydell
Hi; this is a ping (with some of the less frequent contributors taken off cc), because I'd really like it if we could get this issue dealt with (preferably before a flood of new patches to softfloat arrive after the tree reopens for 2.3), but this patchset needs review (for methodology, of my

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 11:55, Pavel Dovgaluk wrote: And why is can_do_io zero? :) Is the fix to move the place where can_do_io becomes nonzero? can_do_io is set by gen_io_start function. As I understand, it is used to protect determinism in icount mode, because it allows non-deterministic

Re: [Qemu-devel] [PATCH v2 1/1] pci-host: add educational driver

2014-12-05 Thread Jiri Slaby
On 12/05/2014, 11:35 AM, Paolo Bonzini wrote: Hi Jirka, because this is supposed to be a poster of good QEMU practices, the review is going to be a bit picky. Most comments are trivial to apply. Hi, OK :). --- /dev/null +++ b/hw/misc/edu.c @@ -0,0 +1,351 @@ ... +static void

Re: [Qemu-devel] [PATCH v5 1/2] Add device listener interface

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 11:50, Paul Durrant wrote: The Xen ioreq-server API, introduced in Xen 4.5, requires that PCI device models explicitly register with Xen for config space accesses. This patch adds a listener interface into qdev-core which can be used by the Xen interface code to monitor for

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Kevin Wolf
Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because PAYLOAD_BLOCK_NOT_PRESENT actually means undefined rather than

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

2014-12-05 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c|2 ++ block/accounting.c |7 +++ block/qapi.c |2 ++ hmp.c |6 +- include/block/accounting.h |3 +++ qapi/block-core.json |9 -

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

2014-12-05 Thread Peter Lieven
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 --- hw/block/virtio-blk.c |2 +- include/hw/virtio/virtio-blk.h |4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [RFC PATCH V2 0/4] virtio-blk: add multiread support

2014-12-05 Thread Peter Lieven
this series adds the long missing multiread support to virtio-blk. some remarks: - i introduced rd_merged and wr_merged block accounting stats to blockstats as a generic interface which can be set from any driver that will introduce multirequst merging in the future. - the knob to disable

[Qemu-devel] [RFC PATCH V2 4/4] virtio-blk: introduce multiread

2014-12-05 Thread Peter Lieven
this patch finally introduce multiread support to virtio-blk while multiwrite support was there for a long time read support was missing. To achieve this the patch does serveral things which might need futher explaination: - the whole merge and multireq logic is moved from block.c into

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

2014-12-05 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 d0692b1..545580f 100644 --- a/block/block-backend.c +++

Re: [Qemu-devel] [PATCH v2 1/1] pci-host: add educational driver

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 12:45, Jiri Slaby wrote: On 12/05/2014, 11:35 AM, Paolo Bonzini wrote: Hi Jirka, because this is supposed to be a poster of good QEMU practices, the review is going to be a bit picky. Most comments are trivial to apply. Hi, OK :). --- /dev/null +++ b/hw/misc/edu.c @@

Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name

2014-12-05 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 05.12.2014 um 10:34 hat Markus Armbruster geschrieben: Eric Blake ebl...@redhat.com writes: On 12/04/2014 08:56 AM, Markus Armbruster wrote: @device is a sub-optimal name for this single parameter. Either we accept that and move on, or we

Re: [Qemu-devel] Review of monitor commands identifying BDS / BB by name

2014-12-05 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 04.12.2014 um 20:44 hat Eric Blake geschrieben: On 12/04/2014 08:56 AM, Markus Armbruster wrote: @device is a sub-optimal name for this single parameter. Either we accept that and move on, or we deprecate it in favor of a new parameter with a

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: On 2014-12-05 at 10:52, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed, SIGKILL has the same effect of abruptly crash qemu; without a core

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-05 Thread Eric Blake
On 12/05/2014 01:30 AM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com If errors happen for middle items of channel_list, qmp_query_spice_channels() returns NULL, and the variable cur_item going out of scope leaks the storage it points to. The flag is a compatibility

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 05/12/2014 11:55, Pavel Dovgaluk wrote: And why is can_do_io zero? :) Is the fix to move the place where can_do_io becomes nonzero? can_do_io is set by gen_io_start function. As I understand, it is used to protect determinism in

[Qemu-devel] [PATCH] scsi-disk: provide max write same length for block limits VPD page

2014-12-05 Thread Ming Lei
Since QEMU claims to support UNMAP, WRITE SAME and WRITE SAME 16 in the LBP VPD page, it is better to provide max write same length in response for block limits VPD page because: - T10 SBC-3 doesn't describe priority explicitly when all three are enabled - host driver may

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Kevin Wolf
Am 05.12.2014 um 13:23 hat Markus Armbruster geschrieben: Max Reitz mre...@redhat.com writes: On 2014-12-05 at 10:52, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed,

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Max Reitz
On 2014-12-05 at 13:23, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: On 2014-12-05 at 10:52, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: abort() has the sometimes undesirable side-effect of generating a core dump. If that is not needed, SIGKILL has the same

Re: [Qemu-devel] [PATCH v2 1/4] qmp: Introduce blockdev-change-medium

2014-12-05 Thread Eric Blake
On 12/05/2014 03:08 AM, Max Reitz wrote: 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

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Eric Blake
On 12/05/2014 03:08 AM, Max Reitz wrote: The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries information about whether it can be written to or not (again, floppy drives). Therefore, it should be

Re: [Qemu-devel] [PATCH 2/2] s390/pci: implement stpcifc instruction

2014-12-05 Thread Thomas Huth
Hi Frank, On Fri, 5 Dec 2014 10:19:59 +0100 Frank Blaschka blasc...@linux.vnet.ibm.com wrote: From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements the last remaining s390 pci instruction to query the function information block. Signed-off-by: Frank Blaschka

Re: [Qemu-devel] [PATCH v2 1/4] qmp: Introduce blockdev-change-medium

2014-12-05 Thread Max Reitz
On 2014-12-05 at 14:10, Eric Blake wrote: On 12/05/2014 03:08 AM, Max Reitz wrote: 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

Re: [Qemu-devel] [PATCH v2 2/4] hmp: Use blockdev-change-medium for change command

2014-12-05 Thread Eric Blake
On 12/05/2014 03:08 AM, Max Reitz wrote: 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

Re: [Qemu-devel] [PATCH v2 1/4] qmp: Introduce blockdev-change-medium

2014-12-05 Thread Eric Blake
On 12/05/2014 06:18 AM, Max Reitz wrote: Should there be a way to empty a cdrom drive? That is, how do I change a drive from visiting a file to being empty? Doesn't 'eject' work? Oh, good point. More cross-referencing documentation work, then :) At which point, THIS command can keep a

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Max Reitz
On 2014-12-05 at 14:14, Eric Blake wrote: On 12/05/2014 03:08 AM, Max Reitz wrote: The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries information about whether it can be written to or not

Re: [Qemu-devel] [PATCH v2 2/4] hmp: Use blockdev-change-medium for change command

2014-12-05 Thread Max Reitz
On 2014-12-05 at 14:24, Eric Blake wrote: On 12/05/2014 03:08 AM, Max Reitz wrote: 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()).

Re: [Qemu-devel] [PATCH v2 3/4] blockdev: Add read-only option to blockdev-change-medium

2014-12-05 Thread Eric Blake
On 12/05/2014 03:08 AM, Max Reitz wrote: 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

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries information about whether it can be written to or not (again, floppy drives). Therefore, it should be

Re: [Qemu-devel] [PATCH v2 2/4] hmp: Use blockdev-change-medium for change command

2014-12-05 Thread Eric Blake
On 12/05/2014 06:27 AM, Max Reitz wrote: Hmm. Not a problem with this patch (which is just reorganizing control flow), but a possible design issue. The old 'change' QMP command cannot provide the encryption code, hence it cannot succeed when changing to an encrypted media. But now that we

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Max Reitz
On 2014-12-05 at 14:31, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: The 'change' QMP and HMP command allows replacing the medium in drives which support this, e.g. floppy disk drives. For some drives, the medium carries information about whether it can be written to or not

Re: [Qemu-devel] [PATCH v2 4/4] hmp: Add read-only option to change command

2014-12-05 Thread Eric Blake
On 12/05/2014 03:08 AM, Max Reitz wrote: Expose the new read-only option of 'blockdev-change-medium' for the 'change' HMP command. Signed-off-by: Max Reitz mre...@redhat.com --- hmp-commands.hx | 20 +--- hmp.c | 21 - 2 files changed, 37

[Qemu-devel] suggestion for the QEMU advent calendar

2014-12-05 Thread Fabian Greffrath
Hi there, thank you very much for the QEMU advent calender! What a neat idea, I enjoy it very much. I'd like to add one suggestion: GRUB Invaders [1]. This is a multi-boot compliant kernel game that allows to play Space Invaders from within GRUB, i.e. without an operating system. I especially

[Qemu-devel] [PATCH] add missing options in socket_optslist

2014-12-05 Thread James Harper
chardev of type udp allows for specifying of localport and localaddr, but these options are missing in qemu-sockets.c and so an error is reported from socket_dgram when qemu_opt_set() is called against those options. Tested and now correctly allows for setting local address and port of udp

[Qemu-devel] [PATCH] nvme: Fix get/set number of queues feature

2014-12-05 Thread alex
From: Alex Friedman a...@e8storage.com According to the specification, the low 16 bits should contain the number of I/O submission queues, and the high 16 bits should contain the number of I/O completion queues. Signed-off-by: Alex Friedman a...@e8storage.com --- hw/block/nvme.c | 6 -- 1

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Markus Armbruster
Max Reitz mre...@redhat.com writes: On 2014-12-05 at 13:23, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: On 2014-12-05 at 10:52, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: abort() has the sometimes undesirable side-effect of generating a core dump. If

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Eric Blake
On 12/05/2014 06:47 AM, Max Reitz wrote: I'd like to make sure that new commands to control removable media get us closer to a sane set of such commands. Let's consider states and transitions. If we ignore the tray lock for a moment, we have: load

[Qemu-devel] [PATCH 0/2] support migration/save/load on AArch64 CPUs

2014-12-05 Thread Peter Maydell
These patches implement support for migration/save/load on AArch64 CPUs. The first one from Alex (with some mangling from me) just moves the sysreg sync code we have for 32-bit across to 64-bit. The second fills in the gaps in the main CPU vmstate struct. Notes: * currently doing 'from cold'

Re: [Qemu-devel] [PATCH v2 1/3] qemu-io: Add sigraise command

2014-12-05 Thread Eric Blake
On 12/05/2014 06:59 AM, Markus Armbruster wrote: Thus, -c abort is not always useful to simulate a qemu-io crash; therefore, this patch adds a new sigraise command which allows to raise any Unix signal. I'd write allows to raise a signal, since I trust folks that have a need for this

[Qemu-devel] [PATCH 1/2] target-arm/kvm: make reg sync code common between kvm32/64

2014-12-05 Thread Peter Maydell
From: Alex Bennée alex.ben...@linaro.org Before we launch a guest we query KVM for the list of co-processor registers it knows about. This is used to synchronize system register state for the bulk of coprocessor/system registers. Move this code from the 32-bit specific vcpu init function into a

[Qemu-devel] [PATCH 2/2] target-arm: Support save/load for 64 bit CPUs

2014-12-05 Thread Peter Maydell
For migration to work on 64 bit CPUs, we need to include both the 64-bit integer register file and the PSTATE. Everything else is either stored in the same place as existing 32-bit CPU state or handled by the generic sysreg mechanism. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- The

Re: [Qemu-devel] [PATCH v2 0/4] blockdev: Add blockdev-change-medium with read-only option

2014-12-05 Thread Max Reitz
On 2014-12-05 at 15:07, Eric Blake wrote: On 12/05/2014 06:47 AM, Max Reitz wrote: I'd like to make sure that new commands to control removable media get us closer to a sane set of such commands. Let's consider states and transitions. If we ignore the tray lock for a moment, we have:

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Jeff Cody
On Fri, Dec 05, 2014 at 12:49:22PM +0100, Kevin Wolf wrote: Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because

Re: [Qemu-devel] [PATCH] mips: Correctly save/restore the FP flush-to-zero state

2014-12-05 Thread Leon Alrae
On 12/11/2014 18:58, Maciej W. Rozycki wrote: On Wed, 12 Nov 2014, Peter Maydell wrote: @@ -208,12 +206,12 @@ int cpu_load(QEMUFile *f, void *opaque, MIPSCPU *cpu = mips_env_get_cpu(env); int i; -if (version_id 3) { +if (version_id != CPU_SAVE_VERSION) {

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Jeff Cody
On Fri, Dec 05, 2014 at 12:07:19PM +0100, Kevin Wolf wrote: Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: Like for most other image formats, vhdx images read as all zero in qemu after their creation (we're taking advantage from the fact that qemu has just created the image, because

Re: [Qemu-devel] [PATCH v4 2/3] block: Add blockdev-backup to transaction

2014-12-05 Thread Max Reitz
On 2014-12-05 at 10:24, Max Reitz wrote: On 2014-12-05 at 07:37, Fam Zheng wrote: On Thu, 12/04 14:59, Max Reitz wrote: On 2014-12-04 at 03:29, Fam Zheng wrote: Also add version info for other transaction types. Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 81

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

2014-12-05 Thread Eric Blake
On 12/05/2014 04:50 AM, Peter Lieven wrote: Signed-off-by: Peter Lieven p...@kamp.de --- block.c|2 ++ block/accounting.c |7 +++ block/qapi.c |2 ++ hmp.c |6 +- include/block/accounting.h |3 +++

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

2014-12-05 Thread Eric Blake
On 12/05/2014 04:50 AM, 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 --- hw/block/virtio-blk.c |2 +- include/hw/virtio/virtio-blk.h |4 +++- 2 files changed, 4

Re: [Qemu-devel] [PATCH] target-mips: gdbstub: Clean up FPU register handling

2014-12-05 Thread Leon Alrae
On 20/11/2014 11:08, Maciej W. Rozycki wrote: Rewrite the FPU register access parts of `mips_cpu_gdb_read_register' and `mips_cpu_gdb_write_register' for consistency between each other. Signed-off-by: Maciej W. Rozycki ma...@codesourcery.com --- Hi, This is the FPU register handling

Re: [Qemu-devel] [PATCH 0/2] net: Trivial cleanups around g_malloc()

2014-12-05 Thread Eric Blake
On 12/04/2014 06:28 AM, Markus Armbruster wrote: Markus Armbruster (2): net: Fuse g_malloc(); memset() into g_new0() net: Use g_new() friends where that makes obvious sense Reviewed-by: Eric Blake ebl...@redhat.com net/l2tpv3.c | 9 - net/queue.c | 2 +- net/slirp.c | 2

Re: [Qemu-devel] [PATCH 0/4] x86: Trivial cleanups around g_malloc()

2014-12-05 Thread Eric Blake
On 12/04/2014 06:46 AM, Markus Armbruster wrote: Markus Armbruster (4): x86: Drop superfluous conditionals around g_free() x86: Fuse g_malloc(); memset() into g_malloc0() x86: Use g_new() friends where that makes obvious sense x86: Drop some superfluous casts from void *

Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 13:59, Pavel Dovgaluk wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 05/12/2014 11:55, Pavel Dovgaluk wrote: And why is can_do_io zero? :) Is the fix to move the place where can_do_io becomes nonzero? can_do_io is set by gen_io_start function. As I understand,

Re: [Qemu-devel] [PATCH 01/13] target-arm: Add vexpress class and machine types

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:05, Greg Bellows greg.bell...@linaro.org wrote: Adds base Vexpress class and machine objects and infrastructure. This is in preparation for switching to the full QEMU object model. The base vexpress infrastructure is intended to handle common vexpress details.

Re: [Qemu-devel] [PATCH] target-mips: Also apply the CP0.Status mask to MTTC0

2014-12-05 Thread Leon Alrae
On 20/11/2014 11:15, Maciej W. Rozycki wrote: Make CP0.Status writes made with the MTTC0 instruction respect this register's mask just like all the other places. Also preserve the current values of masked out bits. Signed-off-by: Maciej W. Rozycki ma...@codesourcery.com --- Hi, This

Re: [Qemu-devel] [PATCH 04/13] target-arm: Add secure qemu machine option

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:05, Greg Bellows greg.bell...@linaro.org wrote: Added 'secure' qemu boolean option to qemu_machine_opts[]. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- vl.c | 4 1 file changed, 4 insertions(+) diff --git a/vl.c b/vl.c index eb89d62..5d640f7

Re: [Qemu-devel] [PATCH 05/13] target-arm: Add vexpress machine secure property

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:05, Greg Bellows greg.bell...@linaro.org wrote: Add secure Vexpress machine specific property to allow override of the default secure state configuration. By default, when using the QEMU -kernel command line argument, Vexpress machines boot into NS/SVC. When using

Re: [Qemu-devel] [PATCH 09/13] target-arm: Add feature unset function

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:06, Greg Bellows greg.bell...@linaro.org wrote: Add an unset_feature() function to compliment the set_feature() function. This will be used to disable functions after they have been enabled during initialization. Signed-off-by: Greg Bellows greg.bell...@linaro.org

Re: [Qemu-devel] [PATCH] linux-user: Use the 5KEf processor for 64-bit emulation

2014-12-05 Thread Leon Alrae
On 20/11/2014 16:00, Maciej W. Rozycki wrote: Replace the 20Kc original MIPS64 ISA processor used for 64-bit user emulation with the 5KEf processor that implements the MIPS64r2 ISA, complementing the choice of the 24Kf processor for 32-bit emulation. Signed-off-by: Maciej W. Rozycki

Re: [Qemu-devel] [PATCH 10/13] target-arm: Add ARMCPU secure property

2014-12-05 Thread Peter Maydell
On 3 December 2014 at 20:06, Greg Bellows greg.bell...@linaro.org wrote: Added a secure state property to the ARMCPU descriptor. This property indicates whether the ARMCPU is enabled for secure state or not. By default it is disabled at this time. Shouldn't this feature be has_el3 ? It's

[Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-05 Thread Jun Li
Currently, qemu-img can not create qcow2 image format on rbd server. Analysis the code as followings: when create qcow2 format image: qcow2_create2 bdrv_create_file(filename, opts, local_err); -- Here will create a 0 size file(e.g: file1) on rbd server. ... ret = bdrv_pwrite(bs, 0,

Re: [Qemu-devel] [PATCH 04/13] target-arm: Add secure qemu machine option

2014-12-05 Thread Greg Bellows
On 5 December 2014 at 09:18, Peter Maydell peter.mayd...@linaro.org wrote: On 3 December 2014 at 20:05, Greg Bellows greg.bell...@linaro.org wrote: Added 'secure' qemu boolean option to qemu_machine_opts[]. Signed-off-by: Greg Bellows greg.bell...@linaro.org --- vl.c | 4 1

Re: [Qemu-devel] [PATCH 04/13] target-arm: Add secure qemu machine option

2014-12-05 Thread Peter Maydell
On 5 December 2014 at 15:33, Greg Bellows greg.bell...@linaro.org wrote: On 5 December 2014 at 09:18, Peter Maydell peter.mayd...@linaro.org wrote: On 3 December 2014 at 20:05, Greg Bellows greg.bell...@linaro.org wrote: Added 'secure' qemu boolean option to qemu_machine_opts[].

Re: [Qemu-devel] [PATCH 0/4] x86: Trivial cleanups around g_malloc()

2014-12-05 Thread Paolo Bonzini
On 04/12/2014 14:46, Markus Armbruster wrote: Markus Armbruster (4): x86: Drop superfluous conditionals around g_free() x86: Fuse g_malloc(); memset() into g_malloc0() x86: Use g_new() friends where that makes obvious sense x86: Drop some superfluous casts from void *

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

2014-12-05 Thread Eric Blake
On 12/05/2014 04:50 AM, Peter Lieven wrote: this patch finally introduce multiread support to virtio-blk while s/introduce/introduces/ s/virtio-blk while/virtio-blk. While/ multiwrite support was there for a long time read support was missing. s/time/time,/ To achieve this the patch does

Re: [Qemu-devel] [PATCH] nvme: Fix get/set number of queues feature

2014-12-05 Thread Keith Busch
On Fri, 5 Dec 2014, a...@e8storage.com wrote: From: Alex Friedman a...@e8storage.com According to the specification, the low 16 bits should contain the number of I/O submission queues, and the high 16 bits should contain the number of I/O completion queues. Signed-off-by: Alex Friedman

Re: [Qemu-devel] [PATCH] scsi-disk: provide max write same length for block limits VPD page

2014-12-05 Thread Paolo Bonzini
On 05/12/2014 14:00, Ming Lei wrote: Since QEMU claims to support UNMAP, WRITE SAME and WRITE SAME 16 in the LBP VPD page, it is better to provide max write same length in response for block limits VPD page because: - T10 SBC-3 doesn't describe priority explicitly when all three

  1   2   >