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

2014-12-05 Thread arei.gonglei
From: Gonglei 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 spice version requiremen

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

2014-12-05 Thread Markus Armbruster
"Bryan D. Payne" 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 exactly

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 bett

[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 +++- hw

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

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

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

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

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 --- blockdev.c | 81 qapi-schem

[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 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 much >> tr

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 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 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 patch adds a

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 > +S: Maintained > +F: hw/pci

[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 Cc: Paolo Bonzini --- MAINTAINERS

[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 --- MAINTAINERS | 5 +

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 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 qem

[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 --- hmp-commands.hx | 20 +--- hmp.c | 21 - 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/hmp-commands.hx b/hmp-comm

[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 blo

[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 --- blockdev.c| 7 --- inclu

[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 --- hmp.c | 27 +++ 1 file changed, 15 i

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 c

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 > Bon

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

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 le

[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. Signed-off-b

[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 xen_co

[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 instructi

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 accordin

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 reimp

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-determi

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 --- block.c|2 ++ block/accounting.c |7 +++ block/qapi.c |2 ++ hmp.c |6 +- include/block/accounting.h |3 +++ qapi/block-core.json |9 - qmp-commands.hx

[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 --- hw/block/virtio-blk.c |2 +- include/hw/virtio/virtio-blk.h |4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/

[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 virtio

[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 --- 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 +++ b/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/h

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

2014-12-05 Thread Markus Armbruster
Kevin Wolf writes: > Am 05.12.2014 um 10:34 hat Markus Armbruster geschrieben: >> Eric Blake 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 i

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

2014-12-05 Thread Markus Armbruster
Kevin Wolf 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 b

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

2014-12-05 Thread Markus Armbruster
Max Reitz writes: > On 2014-12-05 at 10:52, Markus Armbruster wrote: >> Max Reitz 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 a

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 > > 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

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

[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 writes: > > > On 2014-12-05 at 10:52, Markus Armbruster wrote: > >> Max Reitz writes: > >> > >>> abort() has the sometimes undesirable side-effect of generating a core > >>> dump. If that is not needed, SIGKILL has the same ef

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 writes: On 2014-12-05 at 10:52, Markus Armbruster wrote: Max Reitz 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; with

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 Reit

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

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 wrote: > From: Frank Blaschka > > This patch implements the last remaining s390 pci instruction > to query the function information block. > > Signed-off-by: Frank Blaschka > --- > hw/s390x/s390-pci-bus.h | 1 + > hw/s390x/s390

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 qmp_blockdev_change_m

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 > --- > hmp.c

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 kee

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 (again,

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()). Signe

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 w

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

2014-12-05 Thread Markus Armbruster
Max Reitz 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 possible to chang

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 tha

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 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

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 > --- > hmp-commands.hx | 20 +--- > hmp.c | 21 - > 2 files changed, 37 insertions(+)

[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 rec

[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 con

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

2014-12-05 Thread alex
From: Alex Friedman 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 --- hw/block/nvme.c | 6 -- 1 file changed, 4 insertions(+), 2 delet

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

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

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: >> >>

[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' inco

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 >

[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 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 common routine and cal

[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 --- The pstate save/load is a lit

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, becau

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_VERSIO

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, becau

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 --- 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 > --- > block.c|2 ++ > block/accounting.c |7 +++ > block/qapi.c |2 ++ > hmp.c |6 +- > include/block/accounting.h |3 +++ > qapi/

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 > --- > hw/block/virtio-blk.c |2 +- > include/hw/virtio/virtio-blk.h |4 +++- > 2 files changed, 4 insertions(

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 > --- > Hi, > > This is the FPU register handling cleanup previousl

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 > > net/l2tpv3.c | 9 - > net/queue.c | 2 +- > net/slirp.c | 2 +- > 3 fil

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 * Review

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

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 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. > > Signed-off-by: Greg Bell

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 > --- > Hi, > > This should be obvio

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 wrote: > Added 'secure' qemu boolean option to qemu_machine_opts[]. > > Signed-off-by: Greg Bellows > --- > vl.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/vl.c b/vl.c > index eb89d62..5d640f7 100644 > --- a/vl.c > +++ b/vl.c > @@ -387,

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 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 > the QEMU -bios comma

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 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 Reviewed-by: Peter Maydell -- PMM

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 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 the configurable

[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, heade

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 wrote: > On 3 December 2014 at 20:05, Greg Bellows wrote: > > Added 'secure' qemu boolean option to qemu_machine_opts[]. > > > > Signed-off-by: Greg Bellows > > --- > > vl.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/vl.c b/vl.

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 wrote: > > > On 5 December 2014 at 09:18, Peter Maydell wrote: >> >> On 3 December 2014 at 20:05, Greg Bellows wrote: >> > Added 'secure' qemu boolean option to qemu_machine_opts[]. >> > >> > Signed-off-by: Greg Bellows >> > --- >> > vl.c | 4 >> >

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 * > > hw

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 do

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 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 Good catch, thanks for

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 thre

  1   2   >