Re: [Qemu-devel] [PATCH v2 04/17] crypto: add support for generating initialization vectors

2016-01-20 Thread Fam Zheng
On Wed, 01/20 17:38, Daniel P. Berrange wrote: > +static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen, > +const uint8_t *key, size_t nkey, > +Error **errp) > +{ > +uint8_t *salt; > +size_t nhash; > +QCryptoIVGen

Re: [Qemu-devel] [RFC PATCH] vfio: Add sysfsdev property for pci & platform

2016-01-20 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, January 21, 2016 2:07 AM > > vfio-pci currently requires a host= parameter, which comes in the > form of a PCI address in [domain:] notation. We > expect to find a matching entry in sysfs for that under > /sys/bus/pci/d

Re: [Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2016-01-20 Thread Gerd Hoffmann
On Mi, 2016-01-20 at 19:25 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 20, 2016 at 03:15:04PM -0200, Eduardo Habkost wrote: > > On Wed, Jan 20, 2016 at 01:34:29PM -0200, Eduardo Habkost wrote: > > [...] > > > Considering that we never supported > > > gigabyte_align && max_ram_below_4g > 3G ||

[Qemu-devel] [Bug 1536487] Re: Unable to migrate pc-i440fx-2.4 KVM guest from QEMU 2.5.0 to QEMU 2.4.1

2016-01-20 Thread Michael Chapman
** Description changed: When migrating a pc-i440fc-2.4 KVM guest from QEMU 2.5.0 to QEMU 2.4.1, the target QEMU errors out: - qemu-system-x86_64: error while loading state for instance 0x0 of +   qemu-system-x86_64: error while loading state for instance 0x0 of device 'fw_cfg' This

[Qemu-devel] [Bug 1536487] [NEW] Unable to migrate pc-i440fx-2.4 KVM guest from QEMU 2.5.0 to QEMU 2.4.1

2016-01-20 Thread Michael Chapman
Public bug reported: When migrating a pc-i440fc-2.4 KVM guest from QEMU 2.5.0 to QEMU 2.4.1, the target QEMU errors out: qemu-system-x86_64: error while loading state for instance 0x0 of device 'fw_cfg' This appears to be related to the addition of a DMA interface to fw_cfg last October: ht

Re: [Qemu-devel] [PATCH v9 08/37] qapi: Track all failures between visit_start/stop

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > On 01/20/2016 09:03 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Inside the generated code between visit_start_struct() and >>> visit_end_struct(), we were blindly setting the error into >>> the caller's errp parameter. But a future patch to split >>> visit_en

Re: [Qemu-devel] [PATCH v9 07/37] qapi: Improve generated event use of qapi visitor

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > On 01/20/2016 08:19 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> All other successful clients of visit_start_struct() were paired >>> with an unconditional visit_end_struct(); but the generated >>> code for events was relying on qmp_output_visitor_cleanup() to

Re: [Qemu-devel] [RFC PATCH] vfio: Add sysfsdev property for pci & platform

2016-01-20 Thread P J P
+-- On Wed, 20 Jan 2016, Alex Williamson wrote --+ | > > +error_printf("Warning : Device at %s is known to cause | > > system instability issues during option rom execution. Proceeding | > > anyway since user specified romfile\n", | > > + vdev->vbasedev.name); |

Re: [Qemu-devel] [PATCH v2 03/17] crypto: add support for PBKDF2 algorithm

2016-01-20 Thread Fam Zheng
On Wed, 01/20 17:38, Daniel P. Berrange wrote: > The LUKS data format includes use of PBKDF2 (Password-Based > Key Derivation Function). The Nettle library can provide > an implementation of this, but we don't want code directly > depending on a specific crypto library backend. Introduce > a includ

Re: [Qemu-devel] [PATCH v9 05/37] vl: Improve use of qapi visitor

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > On 01/20/2016 06:43 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Cache the visitor in a local variable instead of repeatedly >>> calling the accessor. Pass NULL for the visit_start_struct() >>> object (which matches the fact that we were already passing 0 >>>

Re: [Qemu-devel] [PATCH v9 02/37] qapi: Avoid use of misnamed DO_UPCAST()

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > On 01/20/2016 03:04 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> The macro DO_UPCAST() is incorrectly named: it converts from a >>> parent class to a derived class (which is a downcast). Better, >>> and more consistent with some of the other qapi visitors, is

Re: [Qemu-devel] [PATCH v9 01/37] qobject: Document more shortcomings in our number handling

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > On 01/20/2016 02:02 AM, Markus Armbruster wrote: > >>> @@ -519,6 +519,8 @@ static QObject *parse_literal(JSONParserContext *ctxt) >>> } >>> case JSON_FLOAT: >>> /* FIXME dependent on locale */ >>> +/* FIXME our lexer matches RFC7159 in forbidding In

Re: [Qemu-devel] [PULL 14/15] qemu-char: add logfile facility to all chardev backends

2016-01-20 Thread Hervé Poussineau
Hi, This patch (commit d0d7708ba29cbcc343364a46bff981e0ff88366f) regresses the following command line: qemu-system-i386 -nodefaults -chardev vc,id=mon0 -mon chardev=mon0 Before: [nothing is print on console] After: QEMU 2.5.50 monitor - type 'help' for more information (qemu) In both cases, a

Re: [Qemu-devel] [PATCH v2 01/17] crypto: ensure qcrypto_hash_digest_len is always defined

2016-01-20 Thread Fam Zheng
On Wed, 01/20 17:38, Daniel P. Berrange wrote: > The qcrypto_hash_digest_len method was accidentally inside > a CONFIG_GNUTLS_HASH block, even though it doesn't depend > on gnutls. Re-arrange it to be unconditionally defined. > > Signed-off-by: Daniel P. Berrange Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v2 02/17] crypto: add cryptographic random byte source

2016-01-20 Thread Fam Zheng
On Wed, 01/20 17:38, Daniel P. Berrange wrote: > +int qcrypto_random_bytes(uint8_t *buf G_GNUC_UNUSED, > + size_t buflen G_GNUC_UNUSED, > + Error **errp) > +{ > +error_setg(errp, "No random byte source provided in this build"); > +return -1;

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-01-20 Thread Xu, Quan
> On January 21, 2016 at 1:08pm, wrote: > On Wed, Jan 20, 2016 at 04:25:15PM -0500, Stefan Berger wrote: > > On 01/20/2016 01:54 PM, Michael S. Tsirkin wrote: > > >On Wed, Jan 20, 2016 at 11:06:45AM -0500, Stefan Berger wrote: > > >>"Michael S. Tsirkin" wrote on 01/20/2016 10:58:02 AM: > > >> > >

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-01-20 Thread Michael S. Tsirkin
On Wed, Jan 20, 2016 at 04:25:15PM -0500, Stefan Berger wrote: > On 01/20/2016 01:54 PM, Michael S. Tsirkin wrote: > >On Wed, Jan 20, 2016 at 11:06:45AM -0500, Stefan Berger wrote: > >>"Michael S. Tsirkin" wrote on 01/20/2016 10:58:02 AM: > >> > >>>From: "Michael S. Tsirkin" > >>>On Wed, Jan 20,

Re: [Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation

2016-01-20 Thread Fam Zheng
On Wed, 01/20 22:12, Roy Shterman wrote: > and nothing happened, can you think of something i'm missing? The "x-data-plane=on" option used to be the temporary flag and has been removed since last release of QEMU. In the command line, the syntax to use dataplane for virtio-blk/scsi is: -object

Re: [Qemu-devel] [PATCH] pseries: Allow TCG h_enter to work with hotplugged memory

2016-01-20 Thread David Gibson
On Thu, Jan 21, 2016 at 12:48:46PM +1100, Alexey Kardashevskiy wrote: > On 01/21/2016 12:41 PM, David Gibson wrote: > >The implementation of the H_ENTER hypercall for PAPR guests needs to > >enforce correct access attributes on the inserted HPTE. This means > >determining if the HPTE's real addres

Re: [Qemu-devel] [PATCH v2 02/13] typedefs: Add BdrvDirtyBitmap

2016-01-20 Thread Fam Zheng
On Wed, 01/20 09:56, Eric Blake wrote: > On 01/19/2016 11:11 PM, Fam Zheng wrote: > > Following patches to refactor and move block dirty bitmap code could use > > this. > > > > Signed-off-by: Fam Zheng > > --- > > include/block/block.h | 3 +-- > > include/qemu/typedefs.h | 1 + > > 2 files ch

Re: [Qemu-devel] [PATCH v9 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-01-20 Thread Wen Congyang
On 01/20/2016 11:43 PM, Alberto Garcia wrote: > On Fri 25 Dec 2015 10:22:55 AM CET, Changlong Xie wrote: >> @@ -875,9 +878,9 @@ static int quorum_open(BlockDriverState *bs, QDict >> *options, int flags, >> ret = -EINVAL; >> goto exit; >> } >> -if (s->num_children < 2) {

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-20 Thread Petros Angelatos
Hi Laurent, > Are there some reasons to not use binfmt_misc when we are able to do > chroot ? > > Moreover binfmt_misc allows to execute binaries that cannot be read, I > think it is not possible with an userspace solution. And binfmt_misc > also allows to use credential and security tokens from t

Re: [Qemu-devel] [PATCH] pseries: Allow TCG h_enter to work with hotplugged memory

2016-01-20 Thread Alexey Kardashevskiy
On 01/21/2016 12:41 PM, David Gibson wrote: The implementation of the H_ENTER hypercall for PAPR guests needs to enforce correct access attributes on the inserted HPTE. This means determining if the HPTE's real address is a regular RAM address (which requires attributes for coherent access) or a

Re: [Qemu-devel] [PATCH v2 00/16] data-driven device registers

2016-01-20 Thread Alistair Francis
+ Fred On Tue, Jan 19, 2016 at 2:34 PM, Alistair Francis wrote: > This patch series is based on Peter C's original register API. His > original cover letter is below. > > I have added a new function memory_region_add_subregion_no_print() which > stops memory regions from being printed by 'info mt

[Qemu-devel] [PATCH] pseries: Allow TCG h_enter to work with hotplugged memory

2016-01-20 Thread David Gibson
The implementation of the H_ENTER hypercall for PAPR guests needs to enforce correct access attributes on the inserted HPTE. This means determining if the HPTE's real address is a regular RAM address (which requires attributes for coherent access) or an IO address (which requires attributes for ca

Re: [Qemu-devel] [PATCH] spapr: Don't create ibm, dynamic-reconfiguration-memory w/o DR LMBs

2016-01-20 Thread David Gibson
On Wed, Jan 20, 2016 at 11:00:39AM +0530, Bharata B Rao wrote: > On Tue, Jan 19, 2016 at 04:00:25PM +1100, David Gibson wrote: > > On Tue, Jan 19, 2016 at 10:09:21AM +0530, Bharata B Rao wrote: > > > If guest doesn't have any dynamically reconfigurable (DR) logical memory > > > blocks (LMB), then w

[Qemu-devel] [PATCH] dimm: Correct type of MemoryHotplugState->base

2016-01-20 Thread David Gibson
The 'base' field of MemoryHotplugState is ram_addr_t, which indicates that it exists in the abstract address space of RAM regions. However, the actual usage of this field indicates that it is a concrete physical address (it's passed as an offset to memory_region_add_subgregion for example). So, c

[Qemu-devel] virtio-scsi/blk dataplane and guest memory allocation

2016-01-20 Thread Roy Shterman
Hi, I have two questions, First, I'm developing for Libiscsi and trying to work with virtio-scsi dataplane or even virtio-blk dataplane and it doesn't works well. I'm working with latest qemu and latest Libiscsi in RedHat 7 libvirt package. my iscsi xml part is : virtio-blk -

[Qemu-devel] [PATCH v3 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Alistair Francis
Update the GIC ID registers (registers above 0xfe0) based on the GIC revision instead of using the sames values for all GIC implementations. Signed-off-by: Alistair Francis Tested-by: Sören Brinkmann --- V3: - Add an assert() V2: - Update array indexing to match new values - Check the maximum

Re: [Qemu-devel] [PATCH v2 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Alistair Francis
On Wed, Jan 20, 2016 at 3:37 PM, Peter Maydell wrote: > On 20 January 2016 at 23:08, Alistair Francis > wrote: >> On Wed, Jan 20, 2016 at 2:48 PM, Peter Maydell >> wrote: >>> On 20 January 2016 at 22:42, Alistair Francis >>> wrote: Update the GIC ID registers (registers above 0xfe0) based

Re: [Qemu-devel] [PATCH v4 10/12] fdc: rework pick_geometry

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > This one is the crazy one. > > fd_revalidate currently uses pick_geometry to tell if the diskette > geometry has changed upon an eject/insert event, but it won't allow us > to insert a 1.44MB diskette into a 2.88MB drive. This is inflexible. > > The new

Re: [Qemu-devel] [PATCH v2 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Peter Maydell
On 20 January 2016 at 23:08, Alistair Francis wrote: > On Wed, Jan 20, 2016 at 2:48 PM, Peter Maydell > wrote: >> On 20 January 2016 at 22:42, Alistair Francis >> wrote: >>> Update the GIC ID registers (registers above 0xfe0) based on the GIC >>> revision instead of using the sames values for a

Re: [Qemu-devel] [PATCH] linux-user: add option to intercept execve() syscalls

2016-01-20 Thread Laurent Vivier
Hi Petros, Le 18/01/2016 05:33, Petros Angelatos a écrit : > From: Petros Angelatos > > In order for one to use QEMU user mode emulation under a chroot, it is > required to use binfmt_misc. This can be avoided by QEMU never doing a > raw execve() to the host system. Are there some reasons to no

Re: [Qemu-devel] [PATCH v2 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Alistair Francis
On Wed, Jan 20, 2016 at 2:48 PM, Peter Maydell wrote: > On 20 January 2016 at 22:42, Alistair Francis > wrote: >> Update the GIC ID registers (registers above 0xfe0) based on the GIC >> revision instead of using the sames values for all GIC implementations. >> >> Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH v4 09/12] fdc: add physical disk sizes

2016-01-20 Thread John Snow
On 01/20/2016 05:48 PM, Eric Blake wrote: > On 01/19/2016 11:51 PM, John Snow wrote: >> 2.88MB capable drives can accept 1.44MB floppies, >> for instance. To rework the pick_geometry function, >> we need to know if our current drive can even accept >> the type of disks we're considering. >> >> NB

Re: [Qemu-devel] [PATCH v4 08/12] fdc: add drive type option

2016-01-20 Thread John Snow
On 01/20/2016 05:43 PM, Eric Blake wrote: > On 01/19/2016 11:51 PM, John Snow wrote: >> This patch adds a new explicit Floppy Drive Type option. The existing >> behavior in QEMU is to automatically guess a drive type based on the >> media inserted, or if a diskette is not present, arbitrarily ass

Re: [Qemu-devel] [PATCH v2 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Peter Maydell
On 20 January 2016 at 22:42, Alistair Francis wrote: > Update the GIC ID registers (registers above 0xfe0) based on the GIC > revision instead of using the sames values for all GIC implementations. > > Signed-off-by: Alistair Francis > Tested-by: Sören Brinkmann > --- > V2: > - Update array ind

Re: [Qemu-devel] [PATCH v4 09/12] fdc: add physical disk sizes

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > 2.88MB capable drives can accept 1.44MB floppies, > for instance. To rework the pick_geometry function, > we need to know if our current drive can even accept > the type of disks we're considering. > > NB: This allows us to distinguish between all of the

[Qemu-devel] [PATCH v2 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Alistair Francis
Update the GIC ID registers (registers above 0xfe0) based on the GIC revision instead of using the sames values for all GIC implementations. Signed-off-by: Alistair Francis Tested-by: Sören Brinkmann --- V2: - Update array indexing to match new values - Check the maximum value of offset as wel

Re: [Qemu-devel] [PATCH v4 08/12] fdc: add drive type option

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > This patch adds a new explicit Floppy Drive Type option. The existing > behavior in QEMU is to automatically guess a drive type based on the > media inserted, or if a diskette is not present, arbitrarily assign one. > > This behavior can be described as "

Re: [Qemu-devel] [PATCH v4 07/12] fdc: Add fallback option

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > Currently, QEMU chooses a drive type automatically based on the inserted > media. If there is no disk inserted, it chooses a 1.44MB drive type. > > Change this behavior to be configurable, but leave it defaulted to 1.44. > > This is not earnestly intende

Re: [Qemu-devel] [PATCH v4 06/12] fdc: add pick_drive

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > Split apart pick_geometry by creating a pick_drive routine that will only > ever called during device bring-up instead of relying on pick_geometry to > be used in both cases. > > With this change, the drive field is changed to be 'write once'. It is > not

Re: [Qemu-devel] [PATCH v1 1/1] arm_gic: Update ID registers based on revision

2016-01-20 Thread Alistair Francis
On Tue, Jan 19, 2016 at 12:48 AM, Peter Maydell wrote: > On 19 January 2016 at 01:33, Alistair Francis > wrote: >> Update the GIC ID registers (registers above 0xfe0) based on the GIC >> revision instead of using the sames values for all GIC implementations. >> >> Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH v9 18/37] qapi: Drop unused error argument for list and implicit struct

2016-01-20 Thread Eric Blake
On 01/20/2016 12:03 PM, Markus Armbruster wrote: > Eric Blake writes: > >> No backend was setting an error when ending the visit of a list >> or implicit struct. > > That's a lie: qmp_input_end_list() does. But it shouldn't, as you > explain below. Rephrase the commit message? I'm not sure wh

Re: [Qemu-devel] [PATCH 08/13] block: Support meta dirty bitmap

2016-01-20 Thread John Snow
On 01/20/2016 01:07 AM, Fam Zheng wrote: > On Thu, 01/07 14:30, John Snow wrote: >>> +void bdrv_release_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap) >>> +{ >>> +assert(bitmap->meta); >>> +hbitmap_free(bitmap->meta); >> >> This leaves a dangling pointer inside the Hbitmap, no? > > Yes, will

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-01-20 Thread Stefan Berger
On 01/20/2016 01:54 PM, Michael S. Tsirkin wrote: On Wed, Jan 20, 2016 at 11:06:45AM -0500, Stefan Berger wrote: "Michael S. Tsirkin" wrote on 01/20/2016 10:58:02 AM: From: "Michael S. Tsirkin" On Wed, Jan 20, 2016 at 10:36:41AM -0500, Stefan Berger wrote: "Michael S. Tsirkin" wrote on 01/

Re: [Qemu-devel] [PATCH v4 05/12] fdc: Throw an assertion on misconfigured fd_formats table

2016-01-20 Thread John Snow
On 01/20/2016 04:23 PM, Eric Blake wrote: > On 01/19/2016 11:51 PM, John Snow wrote: >> pick_geometry is a convoluted function that makes it difficult to tell >> at a glance what QEMU's current behavior for choosing a floppy drive >> type is when it can't quite identify the diskette. >> >> If dri

Re: [Qemu-devel] [PATCH v4 05/12] fdc: Throw an assertion on misconfigured fd_formats table

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > pick_geometry is a convoluted function that makes it difficult to tell > at a glance what QEMU's current behavior for choosing a floppy drive > type is when it can't quite identify the diskette. > > If drive type is NONE, it considers all drive types in t

Re: [Qemu-devel] [PATCH v7] spec: add qcow2 bitmaps extension specification

2016-01-20 Thread John Snow
On 01/20/2016 07:34 AM, Vladimir Sementsov-Ogievskiy wrote: > On 19.01.2016 20:48, Kevin Wolf wrote: >> Am 11.01.2016 um 14:05 hat Vladimir Sementsov-Ogievskiy geschrieben: >>> The new feature for qcow2: storing bitmaps. >>> >>> This patch adds new header extension to qcow2 - Bitmaps Extension. I

Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup

2016-01-20 Thread Paolo Bonzini
On 20/01/2016 15:52, Roman Kagan wrote: > I think Paolo wanted to be compatible not only with the de facto > implementation in Windows Hyper-V guests, but also with the Linux driver > which followed the buggy spec and thought 0x to be invalid. 0x is not invalid; it means it is va

Re: [Qemu-devel] [PATCH v1 4/5] kvm/x86: Hyper-V VMBus hypercall userspace exit

2016-01-20 Thread Paolo Bonzini
On 20/01/2016 18:31, 'Roman Kagan' wrote: > On Wed, Jan 20, 2016 at 06:02:25PM +0100, Paolo Bonzini wrote: >> >> >> On 20/01/2016 16:20, 'Roman Kagan' wrote: > So we should not add a new exit >>> Why? VCPU exit codes are not a scarse resource. >> >> Indeed, but grouping makes things easier t

Re: [Qemu-devel] [PATCH v9 16/37] qapi: Swap 'name' in visit_* callbacks to match public API

2016-01-20 Thread Eric Blake
On 01/20/2016 11:55 AM, Markus Armbruster wrote: > Eric Blake writes: > >> As explained in the previous patches, matching argument order of >> 'name, &value' to JSON's "name":value makes sense. However, >> while the last two patches were easy with Coccinelle, I ended up >> doing this one all by

Re: [Qemu-devel] [PATCH v4 04/12] fdc: add disk field

2016-01-20 Thread John Snow
On 01/20/2016 03:35 PM, Eric Blake wrote: > On 01/19/2016 11:51 PM, John Snow wrote: >> Currently, 'drive' is used both to represent the current diskette >> type as well as the current drive type. >> >> This patch adds a 'disk' field that is updated explicitly to match >> the type of the disk. >>

Re: [Qemu-devel] [PATCH v9 15/37] qom: Swap 'name' next to visitor in ObjectPropertyAccessor

2016-01-20 Thread Eric Blake
On 01/20/2016 11:49 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Similar to the previous patch, it's nice to have all functions >> in the tree that involve a visitor and a name for conversion to >> or from QAPI to consistently stick the 'name' parameter next >> to the Visitor parameter.

Re: [Qemu-devel] [PATCH v4 03/12] fdc: add drive type qapi enum

2016-01-20 Thread John Snow
On 01/20/2016 03:33 PM, Eric Blake wrote: > On 01/19/2016 11:51 PM, John Snow wrote: >> Change the floppy drive type to a QAPI enum type, to allow us to >> specify the floppy drive type from the CLI in a forthcoming patch. >> >> Signed-off-by: John Snow >> --- >> hw/block/fdc.c | 80 >>

Re: [Qemu-devel] [PATCH v4 04/12] fdc: add disk field

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > Currently, 'drive' is used both to represent the current diskette > type as well as the current drive type. > > This patch adds a 'disk' field that is updated explicitly to match > the type of the disk. > > As of this patch, disk and drive are always the

Re: [Qemu-devel] [PATCH v4 03/12] fdc: add drive type qapi enum

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > Change the floppy drive type to a QAPI enum type, to allow us to > specify the floppy drive type from the CLI in a forthcoming patch. > > Signed-off-by: John Snow > --- > hw/block/fdc.c | 80 > +-

Re: [Qemu-devel] [PATCH v2 00/19] ISA DMA controllers cleanup (i8257, i82374)

2016-01-20 Thread Hervé Poussineau
Ping. Hervé Le 10/01/2016 16:24, Hervé Poussineau a écrit : Hi, This patchset is a cleanup of the i8257/i82374 ISA DMA controllers. Global DMA_* functions will be obsoleted and then deleted, and ISA devices will not be tied anymore to i8257 DMA device implementation. This paves the way to fi

Re: [Qemu-devel] [PATCH v4 02/12] fdc: reduce number of pick_geometry arguments

2016-01-20 Thread Eric Blake
On 01/19/2016 11:51 PM, John Snow wrote: > Modify this function to operate directly on FDrive objects instead of > unpacking and passing all of those parameters manually. Reduces the > complexity in the caller and reduces the number of args to just one. > > Signed-off-by: John Snow > --- > hw/bl

Re: [Qemu-devel] [PATCH v2 4/4] block/qapi: Emit tray_open only if there is a tray

2016-01-20 Thread Eric Blake
On 01/20/2016 11:29 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block/qapi.c | 2 +- > qapi/block-core.json | 4 ++-- > tests/qemu-iotests/067.out | 4 > 3 files changed, 3 insertions(+), 7 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake red

Re: [Qemu-devel] [PATCH v2 2/4] blockdev: Fix 'change' for slot devices

2016-01-20 Thread Eric Blake
On 01/20/2016 11:29 AM, Max Reitz wrote: > 'change' and related operations did not work when used on guest devices > featuring removable media but no actual tray, because > blk_dev_is_tray_open() always returned false for them and the > blockdev-{insert,remove}-medium commands required it to return

Re: [Qemu-devel] [PATCH v5 0/4] Extend TPM support with a QEMU-external TPM

2016-01-20 Thread Stefan Berger
Stefan Berger/Watson/IBM wrote on 01/20/2016 02:51:58 PM: > "Daniel P. Berrange" wrote on 01/20/2016 10:42:09 AM: > > > > > On Wed, Jan 20, 2016 at 10:23:50AM -0500, Stefan Berger wrote: > > > "Daniel P. Berrange" wrote on 01/20/2016 09:58:39 > > > AM: > > > > > > > > > > Subject: Re: [Qe

Re: [Qemu-devel] [PATCH v9 12/37] qapi: Don't cast Enum* to int*

2016-01-20 Thread Eric Blake
On 01/20/2016 11:08 AM, Markus Armbruster wrote: > Eric Blake writes: > >> C compilers are allowed to represent enums as a smaller type >> than int, if all enum values fit in the smaller type. There >> are even compiler flags that force the use of this smaller >> representation, and using them c

Re: [Qemu-devel] [PATCH v5 0/4] Extend TPM support with a QEMU-external TPM

2016-01-20 Thread Stefan Berger
"Daniel P. Berrange" wrote on 01/20/2016 10:42:09 AM: > > On Wed, Jan 20, 2016 at 10:23:50AM -0500, Stefan Berger wrote: > > "Daniel P. Berrange" wrote on 01/20/2016 09:58:39 > > AM: > > > > > > > Subject: Re: [Qemu-devel] [PATCH v5 0/4] Extend TPM support with a > > > QEMU-external TPM >

Re: [Qemu-devel] [Qemu-block] [PATCH v4 00/12] fdc: fix 2.88mb floppy diskette support

2016-01-20 Thread Denis V. Lunev
On 01/20/2016 10:40 PM, John Snow wrote: On 01/20/2016 02:55 AM, Denis V. Lunev wrote: On 01/20/2016 09:51 AM, John Snow wrote: requires: 1448895398-13465-1-git-send-email-ehabk...@redhat.com pc: Add pc-*-2.6 machine classes Yes, it's been broken for ten years. No, it's not a CVE.

Re: [Qemu-devel] [Qemu-block] [PATCH v4 00/12] fdc: fix 2.88mb floppy diskette support

2016-01-20 Thread John Snow
On 01/20/2016 02:55 AM, Denis V. Lunev wrote: > On 01/20/2016 09:51 AM, John Snow wrote: >> requires: 1448895398-13465-1-git-send-email-ehabk...@redhat.com >>pc: Add pc-*-2.6 machine classes >> >> Yes, it's been broken for ten years. >> No, it's not a CVE. >> >> The problem is that QE

Re: [Qemu-devel] [PATCH v1 1/3] target-arm: Apply S2 MMU startlevel table size check to AArch64

2016-01-20 Thread Alex Bennée
Edgar E. Iglesias writes: > From: "Edgar E. Iglesias" > > The S2 starting level table size check applies to both AArch32 > and AArch64. Move it to common code. > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/helper.c | 16 > 1 file changed, 8 insertions(+), 8 deletion

Re: [Qemu-devel] [PATCH v9 18/37] qapi: Drop unused error argument for list and implicit struct

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > No backend was setting an error when ending the visit of a list > or implicit struct. That's a lie: qmp_input_end_list() does. But it shouldn't, as you explain below. Rephrase the commit message? > Make the callers a bit easier to follow by > making t

Re: [Qemu-devel] [PATCH v9 17/37] qapi: Drop unused 'kind' for struct/enum visit

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > visit_start_struct() and visit_type_enum() had a 'kind' argument > that was usually set to either the stringized version of the > corresponding qapi type name, or to NULL (although some clients > didn't even get that right). But nothing ever used the argument. > It's even ha

Re: [Qemu-devel] [PATCH v9 16/37] qapi: Swap 'name' in visit_* callbacks to match public API

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > As explained in the previous patches, matching argument order of > 'name, &value' to JSON's "name":value makes sense. However, > while the last two patches were easy with Coccinelle, I ended up > doing this one all by hand. Now all the visitor callbacks match > the main int

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-01-20 Thread Michael S. Tsirkin
On Wed, Jan 20, 2016 at 11:06:45AM -0500, Stefan Berger wrote: > "Michael S. Tsirkin" wrote on 01/20/2016 10:58:02 AM: > > > From: "Michael S. Tsirkin" > > > > > On Wed, Jan 20, 2016 at 10:36:41AM -0500, Stefan Berger wrote: > > > "Michael S. Tsirkin" wrote on 01/20/2016 10:20:58 AM: > > > > >

Re: [Qemu-devel] [PATCH] sd: limit sd_cmd_type array index 'req.cmd'

2016-01-20 Thread P J P
+-- On Wed, 20 Jan 2016, Peter Maydell wrote --+ | This isn't the only bit of sd.c that assumes that the controller | model hasn't passed it an oversize command number -- | sd_do_command() calls cmd_valid_while_locked() which uses req.cmd | as an index into sd_cmd_class[]. Ah yes; I looked for 'r

[Qemu-devel] [PATCH v2] sd: limit 'req.cmd' while using as an array index

2016-01-20 Thread P J P
From: Prasad J Pandit While processing standard SD commands, the 'req.cmd' value could lead to OOB read when used as an index into 'sd_cmd_type' or 'sd_cmd_class' arrays. Limit 'req.cmd' value to avoid such an access. Reported-by: Qinghao Tang Signed-off-by: Prasad J Pandit --- hw/sd/sd.c | 7

Re: [Qemu-devel] [PATCH v9 15/37] qom: Swap 'name' next to visitor in ObjectPropertyAccessor

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > Similar to the previous patch, it's nice to have all functions > in the tree that involve a visitor and a name for conversion to > or from QAPI to consistently stick the 'name' parameter next > to the Visitor parameter. > > Done by manually changing include/qom/object.h and q

[Qemu-devel] [PATCH v2 4/4] block/qapi: Emit tray_open only if there is a tray

2016-01-20 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qapi.c | 2 +- qapi/block-core.json | 4 ++-- tests/qemu-iotests/067.out | 4 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 58d3975..12a0f25 100644 --- a/block/qapi.c +++ b/block/qapi.c

[Qemu-devel] [PATCH v2 2/4] blockdev: Fix 'change' for slot devices

2016-01-20 Thread Max Reitz
'change' and related operations did not work when used on guest devices featuring removable media but no actual tray, because blk_dev_is_tray_open() always returned false for them and the blockdev-{insert,remove}-medium commands required it to return true. Fix this by making blockdev-{insert,remov

[Qemu-devel] [PATCH v2 3/4] Revert "hw/block/fdc: Implement tray status"

2016-01-20 Thread Max Reitz
This reverts the changes that commit 2e1280e8ff95b3145bc6262accc9d447718e5318 applied to hw/block/fdc.c. That commit changed tests/fdc-test.c, too, because after it, one less TRAY_MOVED event would be emitted when executing 'change' on an empty drive. However, now, no TRAY_MOVED events will be emi

[Qemu-devel] [PATCH v2 0/4] blockdev: Fix 'change' for slot devices

2016-01-20 Thread Max Reitz
The series "BlockBackend and media" intended all block devices with removable media to implement a tray model; if the devices does not have a tray, it should emulate one. While this may make sense from a technical perspective (blockdev-*-tray are guest device controlling operations, invoking blk_d

[Qemu-devel] [PATCH v2 1/4] block: Add blk_dev_has_tray()

2016-01-20 Thread Max Reitz
Pull out the check whether a block device has a tray from blk_dev_is_tray_open() into its own function so both attributes (whether there is a tray vs. whether that tray is open) can be queried independently. Cc: qemu-stable Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto G

Re: [Qemu-devel] [RFC PATCH] vfio: Add sysfsdev property for pci & platform

2016-01-20 Thread Alex Williamson
On Wed, 2016-01-20 at 18:11 +, Daniel P. Berrange wrote: > On Wed, Jan 20, 2016 at 11:06:55AM -0700, Alex Williamson wrote: > > vfio-pci currently requires a host= parameter, which comes in the > > form of a PCI address in [domain:] notation.  We > > expect to find a matching entry in sysfs for

Re: [Qemu-devel] [PATCH v9 14/37] qapi: Swap visit_* arguments for consistent 'name' placement

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > JSON uses "name":value, but many of our visitor interfaces were > called with visit_type_FOO(v, &value, name, errp). This can be > a bit confusing to have to mentally swap the parameter order to > match JSON order. It's particularly bad for visit_start_struct(), > where the

Re: [Qemu-devel] [PATCH v9 11/37] qapi: Consolidate visitor small integer callbacks

2016-01-20 Thread Eric Blake
On 01/20/2016 10:34 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Commit 4e27e819 introduced optional visitor callbacks for all >> sorts of int types, but no visitor has supplied any of the >> callbacks for sizes less than 64 bits. In other words, the >> generic implementation based on

Re: [Qemu-devel] [PATCH] qom, qmp, hmp, qapi: create qom-type-list for class properties

2016-01-20 Thread Daniel P. Berrange
On Wed, Jan 20, 2016 at 12:42:38PM +0300, Valentin Rakush wrote: > This patch adds support for qom-type-list command that supposed to list > object class properties. Will use this functionality further to implement > x86_64 cpu properties. > > Additionally object_class_property_iterator_init fun

Re: [Qemu-devel] [RFC PATCH] vfio: Add sysfsdev property for pci & platform

2016-01-20 Thread Daniel P. Berrange
On Wed, Jan 20, 2016 at 11:06:55AM -0700, Alex Williamson wrote: > vfio-pci currently requires a host= parameter, which comes in the > form of a PCI address in [domain:] notation. We > expect to find a matching entry in sysfs for that under > /sys/bus/pci/devices/. vfio-platform takes a similar a

Re: [Qemu-devel] [PATCH v9 10/37] qapi: Make all visitors supply uint64 callbacks

2016-01-20 Thread Eric Blake
On 01/20/2016 10:29 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Our qapi visitor contract supports multiple integer visitors, >> but left the type_uint64 visitor as optional (falling back on >> type_int64); it also marks the type_size visitor as optional >> (falling back on type_uint64

Re: [Qemu-devel] [PATCH v9 12/37] qapi: Don't cast Enum* to int*

2016-01-20 Thread Markus Armbruster
Eric Blake writes: > C compilers are allowed to represent enums as a smaller type > than int, if all enum values fit in the smaller type. There > are even compiler flags that force the use of this smaller > representation, and using them changes the ABI of a binary. Suggest "although using them

[Qemu-devel] [RFC PATCH] vfio: Add sysfsdev property for pci & platform

2016-01-20 Thread Alex Williamson
vfio-pci currently requires a host= parameter, which comes in the form of a PCI address in [domain:] notation. We expect to find a matching entry in sysfs for that under /sys/bus/pci/devices/. vfio-platform takes a similar approach, but defines the host= parameter to be a string, which can be mat

Re: [Qemu-devel] [PATCH v1 00/22] Convert migration to QIOChannel & support TLS

2016-01-20 Thread Daniel P. Berrange
ping, any thoughts on this series. This native encryption is pretty important to the openstack community, along with NBD encryption, so I'd like to try and get it ready in time for 2.6. Regards, Daniel On Tue, Jan 12, 2016 at 11:43:54AM +, Daniel P. Berrange wrote: > This is a formal posting

Re: [Qemu-devel] [PATCH] target-arm: Implement FPEXC32_EL2 system register

2016-01-20 Thread Sergey Fedorov
On 18.01.2016 19:05, Peter Maydell wrote: > Oops, got the qemu-arm email address wrong... > > On 18 January 2016 at 15:53, Peter Maydell wrote: >> The AArch64 FPEXC32_EL2 system register is visible at EL2 and EL3, >> and allows those exception levels to read and write the FPEXC >> register for a l

[Qemu-devel] [PATCH v2 04/17] crypto: add support for generating initialization vectors

2016-01-20 Thread Daniel P. Berrange
There are a number of different algorithms that can be used to generate initialization vectors for disk encryption. This introduces a simple internal QCryptoBlockIV object to provide a consistent internal API to the different algorithms. The initially implemented algorithms are 'plain', 'plain64' a

[Qemu-devel] [PATCH v2 15/17] block: rip out all traces of password prompting

2016-01-20 Thread Daniel P. Berrange
Now that qcow & qcow2 are wired up to get encryption keys via the QCryptoSecret object, nothing is relying on the interactive prompting for passwords. All the code related to password prompting can thus be ripped out. Signed-off-by: Daniel P. Berrange --- hmp.c| 31 --

[Qemu-devel] [PATCH v2 16/17] block: remove all encryption handling APIs

2016-01-20 Thread Daniel P. Berrange
Now that all encryption keys must be provided upfront via the QCryptoSecret API and associated block driver properties there is no need for any explicit encryption handling APIs in the block layer. Encryption can be handled transparently within the block driver. We only retain an API for querying w

[Qemu-devel] [PATCH v2 13/17] qcow: make encrypt_sectors encrypt in place

2016-01-20 Thread Daniel P. Berrange
Instead of requiring separate input/output buffers for encrypting data, change encrypt_sectors() to assume use of a single buffer, encrypting in place. One current caller all uses the same buffer for input/output already and the other two callers are easily converted todo so. Signed-off-by: Daniel

[Qemu-devel] [PATCH v2 06/17] crypto: add block encryption framework

2016-01-20 Thread Daniel P. Berrange
Add a generic framework for support different block encryption formats. Upon instantiating a QCryptoBlock object, it will read the encryption header and extract the encryption keys. It is then possible to call methods to encrypt/decrypt data buffers. There is also a mode whereby it will create/ini

[Qemu-devel] [PATCH v2 09/17] qemu-img/qemu-io: don't prompt for passwords if not required

2016-01-20 Thread Daniel P. Berrange
The qemu-img/qemu-io tools prompt for disk encryption passwords regardless of whether any are actually required. Adding a check on bdrv_key_required() avoids this prompt for disk formats which have been converted to the QCryptoSecret APIs. This is just a temporary hack to ensure the block I/O test

[Qemu-devel] [PATCH v2 12/17] qcow2: convert QCow2 to use QCryptoBlock for encryption

2016-01-20 Thread Daniel P. Berrange
This converts the qcow2 driver to make use of the QCryptoBlock APIs for encrypting image content. As well as continued support for the legacy QCow2 encryption format, the appealing benefit is that it enables support for the LUKS format inside qcow2. With the LUKS format it is neccessary to store t

[Qemu-devel] [PATCH v2 05/17] crypto: add support for anti-forensic split algorithm

2016-01-20 Thread Daniel P. Berrange
The LUKS format specifies an anti-forensic split algorithm which is used to artificially expand the size of the key material on disk. This is an implementation of that algorithm. Signed-off-by: Daniel P. Berrange --- crypto/Makefile.objs| 1 + crypto/afsplit.c| 162

[Qemu-devel] [PATCH v2 14/17] qcow: convert QCow to use QCryptoBlock for encryption

2016-01-20 Thread Daniel P. Berrange
This converts the qcow2 driver to make use of the QCryptoBlock APIs for encrypting image content. This is only wired up to permit use of the legacy QCow encryption format. Users who wish to have the strong LUKS format should switch to qcow2 instead. With this change it is now required to use the Q

[Qemu-devel] [PATCH v2 17/17] block: remove support for legecy AES qcow/qcow2 encryption

2016-01-20 Thread Daniel P. Berrange
Refuse to use images with the legacy AES-CBC encryption format in the system emulators. They are still fully supported in the qemu-img, qemu-io & qemu-nbd tools in order to allow data to be liberated and for compatibility with older QEMU versions. Continued support in these tools is not a notable b

[Qemu-devel] [PATCH v2 11/17] qcow2: make qcow2_encrypt_sectors encrypt in place

2016-01-20 Thread Daniel P. Berrange
Instead of requiring separate input/output buffers for encrypting data, change qcow2_encrypt_sectors() to assume use of a single buffer, encrypting in place. The current callers all used the same buffer for input/output already. Signed-off-by: Daniel P. Berrange --- block/qcow2-cluster.c | 17 ++

  1   2   3   >