[Qemu-devel] [PATCH v7 1/2] Implement .hex file loader

2018-05-10 Thread Su Hang
This patch adds Intel Hexadecimal Object File format support to the loader. The file format specification is available here: http://www.piclist.com/techref/fileext/hex/intel.htm The file format is mainly intended for embedded systems and microcontrollers, such as Micro:bit Arduino, ARM, STM32, et

[Qemu-devel] [PATCH v7 2/2] Add QTest testcase for the Intel Hexadecimal Object File Loader.

2018-05-10 Thread Su Hang
'test.hex' file is a bare metal ARM software stored in Hexadecimal Object Format. When it's loaded by QEMU, it will print "Hello world!\n" on console. `pre_store` array in 'hexloader-test.c' file, stores the binary format of 'test.hex' file, which is used to verify correctness. Signed-off-by: Su

[Qemu-devel] [PATCH v7 0/2] Implement Hex file loader and add test case

2018-05-10 Thread Su Hang
These series of patchs implement Intel Hexadecimal File loader and add QTest testcase to verify the correctness of Loader. v1: -- Basic version. v2: -- Replace `do{}while(cond);` block with `for(;;)` block. v3: -- Add two new files information in MAINTAINERS. v4: -- Correct the 'test.h

Re: [Qemu-devel] [PATCH 04/13] qapi: Formalize qcow2 encryption probing

2018-05-10 Thread Daniel P . Berrangé
On Wed, May 09, 2018 at 06:55:21PM +0200, Max Reitz wrote: > Currently, you can give no encryption format for a qcow2 file while > still passing a key-secret. That does not conform to the schema, so > this patch changes the schema to allow it. > > Signed-off-by: Max Reitz > --- > qapi/block-cor

Re: [Qemu-devel] [virtio-dev] [PATCH V2 1/1] virtio-balloon: fix internal stat name array to match Linux kernel

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 03:53:05PM -0400, Thomas Tai wrote: > The Linux kernel commit b4325044 ("virtio_balloon: add array > of stat names") defines an array of stat name strings for consumers > of the virtio interface to use via the virtio_balloon.h header > file, rather than requiring each co

Re: [Qemu-devel] [virtio-dev] [PATCH V2 1/1] virtio-balloon: fix internal stat name array to match Linux kernel

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 03:53:05PM -0400, Thomas Tai wrote: > The Linux kernel commit b4325044 ("virtio_balloon: add array > of stat names") defines an array of stat name strings for consumers > of the virtio interface to use via the virtio_balloon.h header > file, rather than requiring each co

Re: [Qemu-devel] [Qemu-block] Some question about savem/qcow2 incremental snapshot

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 07:54:31PM +0200, Max Reitz wrote: > On 2018-05-09 12:16, Stefan Hajnoczi wrote: > > On Tue, May 08, 2018 at 05:03:09PM +0200, Kevin Wolf wrote: > >> Am 08.05.2018 um 16:41 hat Eric Blake geschrieben: > >>> On 12/25/2017 01:33 AM, He Junyan wrote: > >> 2. Make the nvdimm dev

Re: [Qemu-devel] [PATCH 0/2] xen-hvm: use new resource mapping API

2018-05-10 Thread Paul Durrant
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: 09 May 2018 18:26 > To: Paul Durrant ; qemu-devel@nongnu.org > Cc: xen-de...@lists.xenproject.org; f...@redhat.com > Subject: Re: [Qemu-devel] [PATCH 0/2] xen-hvm: use new resource mapping > API > > On 05/09/2018 11

Re: [Qemu-devel] [PATCH v3 1/9] block: Introduce API for copy offloading

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:07PM +0800, Fam Zheng wrote: Please include a commit description: Introduce the bdrv_co_copy_range() API for copy offloading. Block drivers implementing this API support efficient copy operations that avoid reading each block from the source device and writing

Re: [Qemu-devel] [PATCH v3 4/9] file-posix: Implement bdrv_co_copy_range

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:10PM +0800, Fam Zheng wrote: > +static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd, > + off_t *out_off, size_t len, unsigned int flags) > +{ > +#ifdef __NR_copy_file_range > +return syscall(__NR_copy_file_range, in_fd, in_

Re: [Qemu-devel] [PATCH v3 5/9] iscsi: Query and save device designator when opening

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:11PM +0800, Fam Zheng wrote: > The device designator data returned in INQUIRY command will be useful to > fill in source/target fields during copy offloading. Do this when > connecting to the target and save the data for later use. > > Signed-off-by: Fam Zheng > ---

Re: [Qemu-devel] [PATCH v3 6/9] iscsi: Create and use iscsi_co_wait_for_task

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:12PM +0800, Fam Zheng wrote: > This loop is repeated a growing number times. Make a helper. > > Signed-off-by: Fam Zheng > --- > block/iscsi.c | 54 +- > 1 file changed, 17 insertions(+), 37 deletions(-) Reviewed-

Re: [Qemu-devel] [PATCH v3 7/9] iscsi: Implement copy offloading

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:13PM +0800, Fam Zheng wrote: > +static int iscsi_populate_target_desc(unsigned char *desc, IscsiLun *lun) The return values of these iscsi_populate_*() functions are unused and don't make sense since the caller must already know the size ahead of time. I suggest remo

Re: [Qemu-devel] [PATCH v3 8/9] block-backend: Add blk_co_copy_range

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:14PM +0800, Fam Zheng wrote: > It's a BlockBackend wrapper of the BDS interface. > > Signed-off-by: Fam Zheng > --- > block/block-backend.c | 18 ++ > include/sysemu/block-backend.h | 4 > 2 files changed, 22 insertions(+) Reviewed-by:

Re: [Qemu-devel] [PATCH v3 9/9] qemu-img: Convert with copy offloading

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:15PM +0800, Fam Zheng wrote: > The new blk_co_copy_range interface offers a more efficient way in the > case of network based storage. Make use of it to allow faster convert > operation. > > Since copy offloading cannot do zero detection ('-S') and compression > (-c),

Re: [Qemu-devel] [RFC 13/24] avocado_qemu: Functional test for RHBZ#1431939

2018-05-10 Thread Stefan Hajnoczi
On Mon, May 07, 2018 at 11:03:29AM -0300, Eduardo Habkost wrote: > On Mon, Apr 30, 2018 at 02:02:46PM +0100, Stefan Hajnoczi wrote: > > On Fri, Apr 20, 2018 at 03:19:40PM -0300, Eduardo Habkost wrote: > > > +def test_hotplug_memory_default_policy(self): > > > +""" > > > +Accordi

[Qemu-devel] [PATCH v2 1/3] xen-hvm: create separate function for ioreq server initialization

2018-05-10 Thread Paul Durrant
The code is sufficiently substantial that it improves code readability to put it in a new function called by xen_hvm_init() rather than having it inline. Signed-off-by: Paul Durrant --- Cc: Stefano Stabellini Cc: Anthony Perard --- hw/i386/xen/xen-hvm.c | 76 +++

[Qemu-devel] [PATCH v2 2/3] checkpatch: generalize xen handle matching in the list of types

2018-05-10 Thread Paul Durrant
All the xen stable APIs define handle types of the form: _handle and some define additional handle types of the form: __handle Examples of these are xenforeignmemory_handle and xenforeignmemory_resource_handle. Both of these types will be misparsed by checkpatch if they appear as the first tok

[Qemu-devel] [PATCH v2 0/2] xen-hvm: use new resource mapping API

2018-05-10 Thread Paul Durrant
This series modifies QEMU to use the new guest resource mapping API (available in Xen 4.11+) to map ioreq pages. v2: - Add a patch to checkpatch to avoid misparsing of Xen stable API handles Paul Durrant (3): xen-hvm: create separate function for ioreq server initialization checkpatch: gener

[Qemu-devel] [PATCH v2 3/3] xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages

2018-05-10 Thread Paul Durrant
Xen 4.11 has a new API to directly map guest resources. Among the resources that can be mapped using this API are ioreq pages. This patch modifies QEMU to attempt to use the new API should it exist, falling back to the previous mechanism if it is unavailable. Signed-off-by: Paul Durrant --- Cc:

Re: [Qemu-devel] [PATCH v3 3/9] qcow2: Implement copy offloading

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 10:58:09PM +0800, Fam Zheng wrote: > +static int qcow2_co_copy_range_from(BlockDriverState *bs, > +BdrvChild *src, uint64_t src_offset, > +BdrvChild *dst, uint64_t dst_offset, > +

[Qemu-devel] [PATCH] linux-user: move thunk.c to linux-user/

2018-05-10 Thread Laurent Vivier
thunk.c is part of linux-user and only used by it, so move it to the linux-user directory. Signed-off-by: Laurent Vivier --- Makefile.target | 2 +- linux-user/Makefile.objs | 2 +- thunk.c => linux-user/thunk.c | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename thu

Re: [Qemu-devel] [PATCH] linux-user: move thunk.c to linux-user/

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 10:29, Laurent Vivier wrote: > thunk.c is part of linux-user and only used by it, > so move it to the linux-user directory. > > Signed-off-by: Laurent Vivier > --- > Makefile.target | 2 +- > linux-user/Makefile.objs | 2 +- > thunk.c => linux-user/thunk.c |

[Qemu-devel] [PATCH v3 1/5] fpu/softfloat: int_to_float ensure r fully initialised

2018-05-10 Thread Alex Bennée
Reported by Coverity (CID1390635). We ensure this for uint_to_float later on so we might as well mirror that. Signed-off-by: Alex Bennée --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 70e0c40a1c..3adf6a06e4 100644 -

[Qemu-devel] [PATCH v3 0/5] refactor float-to-float and fix AHP

2018-05-10 Thread Alex Bennée
Hi, Hi, I've not included the test case in the series but you can find it in my TCG fixup branch: https://github.com/stsquad/qemu/blob/testing/tcg-tests-revival-v4/tests/tcg/arm/fcvt.c Some of the ARMv7 versions are commented out as they where not supported until later revs. I do have a buil

[Qemu-devel] [PATCH v3 2/5] fpu/softfloat: re-factor float to float conversions

2018-05-10 Thread Alex Bennée
This allows us to delete a lot of additional boilerplate code which is no longer needed. Currently the ieee flag is ignored (everything is assumed to be ieee). Handling for ARM AHP will be in the next patch. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - pass FloatFmt to f

[Qemu-devel] [PATCH v3 3/5] fpu/softfloat: support ARM Alternative half-precision

2018-05-10 Thread Alex Bennée
For float16 ARM supports an alternative half-precision format which sacrifices the ability to represent NaN/Inf in return for a higher dynamic range. To support this I've added an additional FloatFmt (float16_params_ahp). The new FloatFmt flag (arm_althp) is then used to modify the behaviour of ca

[Qemu-devel] [PATCH v3 5/5] target/arm: squash FZ16 behaviour for conversions

2018-05-10 Thread Alex Bennée
The ARM ARM specifies FZ16 is suppressed for conversions. Rather than pushing this logic into the softfloat code we can simply save the FZ state and temporarily disable it for the softfloat call. Signed-off-by: Alex Bennée --- target/arm/helper.c | 24 1 file changed, 20

[Qemu-devel] [PATCH v3 4/5] target/arm: convert conversion helpers to fpst/ahp_flag

2018-05-10 Thread Alex Bennée
Instead of passing env and leaving it up to the helper to get the right fpstatus we pass it explicitly. There was already a get_fpstatus helper for neon for the 32 bit code. We also add an get_ahp_flag() for passing the state of the alternative FP16 format flag. This leaves scope for later tracking

Re: [Qemu-devel] [PATCH] linux-user: move thunk.c to linux-user/

2018-05-10 Thread Laurent Vivier
Le 10/05/2018 à 11:35, Peter Maydell a écrit : > On 10 May 2018 at 10:29, Laurent Vivier wrote: >> thunk.c is part of linux-user and only used by it, >> so move it to the linux-user directory. >> >> Signed-off-by: Laurent Vivier >> --- >> Makefile.target | 2 +- >> linux-user/Makef

Re: [Qemu-devel] [PATCH v2 0/5] checkpatch: backport UTF-8 fixes and MAINTAINERS check

2018-05-10 Thread Stefan Hajnoczi
On Mon, Apr 30, 2018 at 01:46:46PM +0100, Stefan Hajnoczi wrote: > v2: > * Resolve missing CHK() [Thomas] > * Drop first argument to WARN() to match QEMU function arguments > > This series cherry picks checkpatch UTF-8 fixes and the MAINTAINERS file check > from Linux. Thomas Huth original did

Re: [Qemu-devel] [PATCH v2 1/2] qemu-iotests: reduce chance of races in 185

2018-05-10 Thread Stefan Hajnoczi
On Tue, May 08, 2018 at 09:26:03AM -0500, Eric Blake wrote: > On 05/08/2018 08:54 AM, Stefan Hajnoczi wrote: > > Commit 8565c3ab537e78f3e69977ec2c609dc9417a806e ("qemu-iotests: fix > > 185") identified a race condition in a sub-test. > > > > Similar issues also affect the other sub-tests. If disk

Re: [Qemu-devel] [PATCH v5 2/4] monitor: protect mon->fds with mon_lock

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 12:17:32PM +0800, Peter Xu wrote: > mon->fds were protected by BQL. Now protect it by mon_lock so that it > can even be used in monitor iothread. Only monitor_get_fd() can safely be called from the monitor iothread (oob). The other functions call close(2), which may block

Re: [Qemu-devel] [PATCH v5 3/4] monitor: more comments on lock-free fleids/funcs

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 12:17:33PM +0800, Peter Xu wrote: > Add some explicit comment for both Readline and cpu_set/cpu_get helpers > that they do not need the mon_lock protection. > > Signed-off-by: Peter Xu > --- > monitor.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewe

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add trace-events and qemu-option-trace.texi to tracing section

2018-05-10 Thread Stefan Hajnoczi
On Wed, May 09, 2018 at 06:38:20AM +0200, Thomas Huth wrote: > The "trace-events" and "qemu-option-trace.texi" files in the top directory > are currently "unmaintained" according to scripts/get_maintainer.pl. They > obviously belong to the Tracing section, so add an entry for them there. > > Signe

[Qemu-devel] [Bug 1575607] Re: vm startup failed, qemu returned "kvm run failed Bad address"

2018-05-10 Thread linzhecheng
have resolved it? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1575607 Title: vm startup failed, qemu returned "kvm run failed Bad address" Status in QEMU: New Bug description: create a v

Re: [Qemu-devel] [RFC PATCH V4 3/4] vfio: Add SaveVMHanlders for VFIO device to support live migration

2018-05-10 Thread Juan Quintela
Yulei Zhang wrote: > Instead of using vm state description, add SaveVMHandlers for VFIO > device to support live migration. > > Introduce new Ioctl VFIO_DEVICE_GET_DIRTY_BITMAP to fetch the memory > bitmap that dirtied by vfio device during the iterative precopy stage > to shorten the system downt

Re: [Qemu-devel] [PATCH v3 1/5] fpu/softfloat: int_to_float ensure r fully initialised

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 10:42, Alex Bennée wrote: > Reported by Coverity (CID1390635). We ensure this for uint_to_float > later on so we might as well mirror that. > > Signed-off-by: Alex Bennée > --- > fpu/softfloat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fpu/softfl

Re: [Qemu-devel] [PATCH v3 2/5] fpu/softfloat: re-factor float to float conversions

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 10:42, Alex Bennée wrote: > This allows us to delete a lot of additional boilerplate code which is > no longer needed. Currently the ieee flag is ignored (everything is > assumed to be ieee). Handling for ARM AHP will be in the next patch. > > Signed-off-by: Alex Bennée > Review

Re: [Qemu-devel] [PATCH v3 0/5] refactor float-to-float and fix AHP

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 10:42, Alex Bennée wrote: > Hi, > > Hi, > > I've not included the test case in the series but you can find it in > my TCG fixup branch: > > > https://github.com/stsquad/qemu/blob/testing/tcg-tests-revival-v4/tests/tcg/arm/fcvt.c > > Some of the ARMv7 versions are commented out

Re: [Qemu-devel] [virtio-dev] [PATCH V2 1/1] virtio-balloon: fix internal stat name array to match Linux kernel

2018-05-10 Thread Thomas Tai
On 2018-05-10 04:18 AM, Stefan Hajnoczi wrote: On Wed, May 09, 2018 at 03:53:05PM -0400, Thomas Tai wrote: The Linux kernel commit b4325044 ("virtio_balloon: add array of stat names") defines an array of stat name strings for consumers of the virtio interface to use via the virtio_balloon.

Re: [Qemu-devel] [PATCH] lm32: take BQL before writing IP/IM register

2018-05-10 Thread Alex Bennée
Michael Walle writes: > Writing to these registers may raise an interrupt request. Actually, > this prevents the milkymist board from starting. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Michael Walle Reviewed-by: Alex Bennée > --- > target/lm32/op_helper.c | 4 > 1 file changed,

[Qemu-devel] [PATCH] tcg: Optionally log FPU state in TCG -d cpu logging

2018-05-10 Thread Peter Maydell
Usually the logging of the CPU state produced by -d cpu is sufficient to diagnose problems, but sometimes you want to see the state of the floating point registers as well. We don't want to enable that by default as it adds a lot of extra data to the log; instead, allow it to be optionally enabled

[Qemu-devel] Question about QEMU

2018-05-10 Thread 유원상
Hi, This is Wonsang Ryu. I'm developer working in South Korea. Do you have forum or community for any developer? I want share my issues with other developers. I have some question about QEMU. I am porting an embedded OS for emulator to QEMU. My environment is Host OS : Ubuntu 14.04 64bit Guest OS

Re: [Qemu-devel] [PATCH v3 2/5] fpu/softfloat: re-factor float to float conversions

2018-05-10 Thread Alex Bennée
Peter Maydell writes: > On 10 May 2018 at 10:42, Alex Bennée wrote: >> This allows us to delete a lot of additional boilerplate code which is >> no longer needed. Currently the ieee flag is ignored (everything is >> assumed to be ieee). Handling for ARM AHP will be in the next patch. >> >> Sign

Re: [Qemu-devel] [PATCH v1 0/8] MemoryDevice: introduce and use ResourceHandler

2018-05-10 Thread Igor Mammedov
On Wed, 9 May 2018 16:13:14 +0200 David Hildenbrand wrote: > On 03.05.2018 17:49, David Hildenbrand wrote: > > Hotplug handlers usually have the following tasks: > > 1. Allocate some resources for a new device > > 2. Make the new device visible for the guest > > 3. Notify the guest about the new

[Qemu-devel] [PATCH] qdev: let machine hotplug handler to override bus hotplug handler

2018-05-10 Thread Igor Mammedov
it will allow to return another hotplug handler than the default one for a specific bus based device type. Which is needed to handle non trivial plug/unplug sequences that need the access to resources configured outside of bus where device is attached. That will allow for returned hotplug handler

Re: [Qemu-devel] [PATCH 1/3] nvdimm: fix typo in label-size definition

2018-05-10 Thread Igor Mammedov
On Fri, 27 Apr 2018 15:53:12 -0600 Ross Zwisler wrote: > Signed-off-by: Ross Zwisler > Fixes: commit da6789c27c2e ("nvdimm: add a macro for property "label-size"") > Cc: Haozhong Zhang > Cc: Michael S. Tsirkin > Cc: Stefan Hajnoczi Reviewed-by: Igor Mammedov > --- > hw/mem/nvdimm.c

Re: [Qemu-devel] [PATCH v5 4/6] s390x/vfio: ap: Introduce VFIO AP device

2018-05-10 Thread Tony Krowiak
On 05/09/2018 10:28 AM, Halil Pasic wrote: On 05/08/2018 02:25 PM, Tony Krowiak wrote: Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated m

Re: [Qemu-devel] [PATCH 01/13] qapi: Add default-variant for flat unions

2018-05-10 Thread Eric Blake
On 05/09/2018 11:55 AM, Max Reitz wrote: This patch allows specifying a discriminator that is an optional member of the base struct. In such a case, a default value must be provided that is used when no value is given. Signed-off-by: Max Reitz --- qapi/introspect.json | 8 ++

Re: [Qemu-devel] [PATCH v6 0/3] target/arm: Add a dynamic XML-description of the cp-registers to GDB

2018-05-10 Thread Alex Bennée
Abdallah Bouassida writes: > The previous version: > http://patchwork.ozlabs.org/project/qemu-devel/list/?series=33714 > > Abdallah Bouassida (3): > target/arm: Add "ARM_CP_NO_GDB" as a new bit field for ARMCPRegInfo > type > target/arm: Add "_S" suffix to the secure version of a sysreg

Re: [Qemu-devel] [PATCH 02/13] docs/qapi: Document optional discriminators

2018-05-10 Thread Eric Blake
On 05/09/2018 11:55 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- docs/devel/qapi-code-gen.txt | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) I might have squashed this in with patch 1, but I can live with it separate. @@ -502,6 +502,23 @@ the enum). In

Re: [Qemu-devel] [PATCH 01/13] qapi: Add default-variant for flat unions

2018-05-10 Thread Eric Blake
On 05/10/2018 08:12 AM, Eric Blake wrote: Oh, I just had a thought: +++ b/scripts/qapi/visit.py @@ -40,10 +40,20 @@ def gen_visit_object_members(name, base, members,   if variants: +    if variants.default_tag_value is None: +    ret += mcgen(''' +    %(c_name)s = obj->%(c_n

Re: [Qemu-devel] [PATCH v1 0/8] MemoryDevice: introduce and use ResourceHandler

2018-05-10 Thread David Hildenbrand
On 10.05.2018 15:02, Igor Mammedov wrote: > On Wed, 9 May 2018 16:13:14 +0200 > David Hildenbrand wrote: > >> On 03.05.2018 17:49, David Hildenbrand wrote: >>> Hotplug handlers usually have the following tasks: >>> 1. Allocate some resources for a new device >>> 2. Make the new device visible for

Re: [Qemu-devel] [PATCH v2 1/2] qemu-iotests: reduce chance of races in 185

2018-05-10 Thread Eric Blake
On 05/10/2018 05:05 AM, Stefan Hajnoczi wrote: Add sleep 0.5 to reduce the chance of races. This is not a real fix but appears to reduce spurious failures in practice. Cc: Vladimir Sementsov-Ogievskiy Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/185 | 12 1 file ch

Re: [Qemu-devel] [PATCH v2 2/3] checkpatch: generalize xen handle matching in the list of types

2018-05-10 Thread Eric Blake
On 05/10/2018 04:15 AM, Paul Durrant wrote: All the xen stable APIs define handle types of the form: _handle and some define additional handle types of the form: __handle Maybe worth mentioning that always has a 'xen' prefix, and/or spelling it: xen_handle xen__handle Examples of thes

Re: [Qemu-devel] [PATCH 3/3] nvdimm: platform capabilities command line option

2018-05-10 Thread Igor Mammedov
On Fri, 27 Apr 2018 15:53:14 -0600 Ross Zwisler wrote: > Add a device command line option to allow the user to control the Platform > Capabilities Structure in the virtualized NFIT. > > Signed-off-by: Ross Zwisler > --- > docs/nvdimm.txt | 22 ++ > hw/acpi/nvdimm.c

Re: [Qemu-devel] [PATCH] iscsi: Avoid potential for get_status overflow

2018-05-10 Thread Paolo Bonzini
On 08/05/2018 23:27, Eric Blake wrote: > Detected by Coverity: Multiplying two 32-bit int and assigning > the result to a 64-bit number is a risk of overflow. Prior to > the conversion to byte-based interfaces, the block layer took > care of ensuring that a status request never exceeded 2G in > th

Re: [Qemu-devel] [PATCH v1 0/8] MemoryDevice: introduce and use ResourceHandler

2018-05-10 Thread Igor Mammedov
On Thu, 10 May 2018 15:20:55 +0200 David Hildenbrand wrote: > On 10.05.2018 15:02, Igor Mammedov wrote: > > On Wed, 9 May 2018 16:13:14 +0200 > > David Hildenbrand wrote: > > > >> On 03.05.2018 17:49, David Hildenbrand wrote: > >>> Hotplug handlers usually have the following tasks: > >>> 1.

Re: [Qemu-devel] [PATCH v3 0/5] refactor float-to-float and fix AHP

2018-05-10 Thread Alex Bennée
Peter Maydell writes: > On 10 May 2018 at 10:42, Alex Bennée wrote: >> Hi, >> >> Hi, >> >> I've not included the test case in the series but you can find it in >> my TCG fixup branch: >> >> >> https://github.com/stsquad/qemu/blob/testing/tcg-tests-revival-v4/tests/tcg/arm/fcvt.c >> >> Some o

Re: [Qemu-devel] [PATCH] lm32: take BQL before writing IP/IM register

2018-05-10 Thread Paolo Bonzini
On 09/05/2018 21:45, Philippe Mathieu-Daudé wrote: > On 02/01/2018 06:09 AM, Michael Walle wrote: >> >> Hi Peter, >> >> do you apply this patch? Or do I have to send a pull request? > > Cc'ing Paolo. Please send a pull request. Paolo >> >> -michael >> >> Am 2018-01-09 18:01, schrieb Michael Wal

Re: [Qemu-devel] [PATCH 2/3] nvdimm, acpi: add NFIT platform capabilities

2018-05-10 Thread Igor Mammedov
On Fri, 27 Apr 2018 15:53:13 -0600 Ross Zwisler wrote: > Add support for the NFIT Platform Capabilities Structure, newly added in > ACPI 6.2 Errata A. Look fine but I'd squash it into the next 3/3 patch. > Signed-off-by: Ross Zwisler > --- > hw/acpi/nvdimm.c | 32 +

Re: [Qemu-devel] [PATCH v2 1/2] qemu-iotests: reduce chance of races in 185

2018-05-10 Thread Vladimir Sementsov-Ogievskiy
08.05.2018 16:54, Stefan Hajnoczi wrote: Commit 8565c3ab537e78f3e69977ec2c609dc9417a806e ("qemu-iotests: fix 185") identified a race condition in a sub-test. Similar issues also affect the other sub-tests. If disk I/O completes quickly, it races with the QMP 'quit' command. This causes spuriou

[Qemu-devel] [PATCH] fpu/softfloat: Don't set Invalid for float-to-int(MAXINT)

2018-05-10 Thread Peter Maydell
In float-to-integer conversion, if the floating point input converts exactly to the largest or smallest integer that fits in to the result type, this is not an overflow. In this situation we were producing the correct result value, but were incorrectly setting the Invalid flag. For example for Arm

Re: [Qemu-devel] [PATCH 03/13] tests: Add QAPI optional discriminator tests

2018-05-10 Thread Eric Blake
On 05/09/2018 11:55 AM, Max Reitz wrote: There already is an optional discriminator test, although it also noted the discriminator name itself as optional. Changing that, and adding a default-variant field, makes that test pass instead of failing. I'm not sure I agree with that one. I think t

[Qemu-devel] [PATCH] fix fp16 tininess

2018-05-10 Thread Peter Maydell
In commit d81ce0ef2c4f105 we added an extra float_status field fp_status_fp16 for Arm, but forgot to initialize it correctly by setting it to float_tininess_before_rounding. This currently will only cause problems for the new V8_FP16 feature, since the float-to-float conversion code doesn't use it

Re: [Qemu-devel] [Qemu-arm] [PATCH] fix fp16 tininess

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 15:09, Peter Maydell wrote: > In commit d81ce0ef2c4f105 we added an extra float_status field > fp_status_fp16 for Arm, but forgot to initialize it correctly > by setting it to float_tininess_before_rounding. This currently > will only cause problems for the new V8_FP16 feature, s

Re: [Qemu-devel] [PATCH v4] dump: add Windows dump format to dump-guest-memory

2018-05-10 Thread Viktor Prutyanov
On Tue, 1 May 2018 16:20:31 +0300 Viktor Prutyanov wrote: > This patch adds Windows crashdumping feature. Now QEMU can produce > ELF-dump containing Windows crashdump header, which can help to > convert to a valid WinDbg-understandable crashdump file, or > immediately create such file. The crash

Re: [Qemu-devel] [PATCH 04/13] qapi: Formalize qcow2 encryption probing

2018-05-10 Thread Eric Blake
On 05/10/2018 02:58 AM, Daniel P. Berrangé wrote: On Wed, May 09, 2018 at 06:55:21PM +0200, Max Reitz wrote: Currently, you can give no encryption format for a qcow2 file while still passing a key-secret. That does not conform to the schema, so this patch changes the schema to allow it. Signed

Re: [Qemu-devel] [PATCH 05/13] qapi: Formalize qcow encryption probing

2018-05-10 Thread Eric Blake
On 05/09/2018 11:55 AM, Max Reitz wrote: Currently, you can give no encryption format for a qcow file while still passing a key-secret. That does not conform to the schema, so this patch changes the schema to allow it. Signed-off-by: Max Reitz --- ## # @BlockdevQcowEncryptionFormat: #

Re: [Qemu-devel] [PATCH v3 04/10] tcg: Introduce atomic helpers for integer min/max

2018-05-10 Thread Peter Maydell
On 8 May 2018 at 19:27, Peter Maydell wrote: > On 8 May 2018 at 18:49, Peter Maydell wrote: >> [weird compiler errors] > > This fixes them: > > --- a/include/qemu/atomic.h > +++ b/include/qemu/atomic.h > @@ -187,7 +187,7 @@ > /* Returns the eventual value, failed or not */ > #define atomic_cmpx

Re: [Qemu-devel] [PATCH v7 2/2] Add QTest testcase for the Intel Hexadecimal Object File Loader.

2018-05-10 Thread Stefan Hajnoczi
On Thu, May 10, 2018 at 03:18:31PM +0800, Su Hang wrote: > 'test.hex' file is a bare metal ARM software stored in Hexadecimal > Object Format. When it's loaded by QEMU, it will print "Hello world!\n" > on console. > > `pre_store` array in 'hexloader-test.c' file, stores the binary format > of 'tes

Re: [Qemu-devel] [PATCH 05/13] qapi: Formalize qcow encryption probing

2018-05-10 Thread Daniel P . Berrangé
On Thu, May 10, 2018 at 09:24:24AM -0500, Eric Blake wrote: > On 05/09/2018 11:55 AM, Max Reitz wrote: > > Currently, you can give no encryption format for a qcow file while still > > passing a key-secret. That does not conform to the schema, so this > > patch changes the schema to allow it. > >

Re: [Qemu-devel] [PATCH] fix fp16 tininess

2018-05-10 Thread Richard Henderson
On 05/10/2018 07:09 AM, Peter Maydell wrote: > In commit d81ce0ef2c4f105 we added an extra float_status field > fp_status_fp16 for Arm, but forgot to initialize it correctly > by setting it to float_tininess_before_rounding. This currently > will only cause problems for the new V8_FP16 feature, sin

[Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning

2018-05-10 Thread Peter Maydell
Some versions of gcc produce a spurious warning if the result of __atomic_compare_echange_n() is not used and the type involved is a signed 8 bit value: error: value computed is not used [-Werror=unused-value] This has been seen on at least gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 Wor

Re: [Qemu-devel] [PATCH] tcg: Optionally log FPU state in TCG -d cpu logging

2018-05-10 Thread Richard Henderson
On 05/10/2018 06:00 AM, Peter Maydell wrote: > Usually the logging of the CPU state produced by -d cpu is sufficient > to diagnose problems, but sometimes you want to see the state of > the floating point registers as well. We don't want to enable that > by default as it adds a lot of extra data to

Re: [Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning

2018-05-10 Thread Richard Henderson
On 05/10/2018 07:36 AM, Peter Maydell wrote: > Some versions of gcc produce a spurious warning if the result of > __atomic_compare_echange_n() is not used and the type involved > is a signed 8 bit value: > error: value computed is not used [-Werror=unused-value] > This has been seen on at least >

Re: [Qemu-devel] [PATCH] tcg: Optionally log FPU state in TCG -d cpu logging

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 15:36, Richard Henderson wrote: > On 05/10/2018 06:00 AM, Peter Maydell wrote: >> Usually the logging of the CPU state produced by -d cpu is sufficient >> to diagnose problems, but sometimes you want to see the state of >> the floating point registers as well. We don't want to en

Re: [Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning

2018-05-10 Thread Peter Maydell
On 10 May 2018 at 15:37, Richard Henderson wrote: > On 05/10/2018 07:36 AM, Peter Maydell wrote: >> Some versions of gcc produce a spurious warning if the result of >> __atomic_compare_echange_n() is not used and the type involved >> is a signed 8 bit value: >> error: value computed is not used

Re: [Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning

2018-05-10 Thread Richard Henderson
On 05/10/2018 07:38 AM, Peter Maydell wrote: > Thanks. Do we care about trying to follow up on the gcc side > to find out if this is a definitely-fixed bug? Given I did not see the problem with gcc 6 as shipped with debian 9, I'm not overly inclined to dig further than that. r~

Re: [Qemu-devel] [PATCH v7 1/2] Implement .hex file loader

2018-05-10 Thread Stefan Hajnoczi
On Thu, May 10, 2018 at 03:18:30PM +0800, Su Hang wrote: Great, this is getting close. A few more comments below... > if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64) && kernel_size < 0) { > kernel_size = load_aarch64_image(info->kernel_filename, >

Re: [Qemu-devel] [PATCH v3 1/5] fpu/softfloat: int_to_float ensure r fully initialised

2018-05-10 Thread Richard Henderson
On 05/10/2018 02:42 AM, Alex Bennée wrote: > Reported by Coverity (CID1390635). We ensure this for uint_to_float > later on so we might as well mirror that. > > Signed-off-by: Alex Bennée > --- > fpu/softfloat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Hender

Re: [Qemu-devel] [PATCH v3 3/9] qcow2: Implement copy offloading

2018-05-10 Thread Fam Zheng
On Thu, 05/10 10:25, Stefan Hajnoczi wrote: > On Wed, May 09, 2018 at 10:58:09PM +0800, Fam Zheng wrote: > > +static int qcow2_co_copy_range_from(BlockDriverState *bs, > > +BdrvChild *src, uint64_t src_offset, > > +BdrvChild *d

Re: [Qemu-devel] [PATCH 06/13] block: Add block-specific QDict header

2018-05-10 Thread Eric Blake
On 05/09/2018 11:55 AM, Max Reitz wrote: There are numerous QDict functions that have been introduced for and are used only by the block layer. Move their declarations into an own s/an own/their own/ header file to reflect that. While qdict_extract_subqdict() is in fact used outside of the

Re: [Qemu-devel] [PATCH] atomic.h: Work around gcc spurious "unused value" warning

2018-05-10 Thread Philippe Mathieu-Daudé
On 05/10/2018 11:36 AM, Peter Maydell wrote: > Some versions of gcc produce a spurious warning if the result of > __atomic_compare_echange_n() is not used and the type involved > is a signed 8 bit value: > error: value computed is not used [-Werror=unused-value] > This has been seen on at least >

Re: [Qemu-devel] [PATCH v3 00/10] target/arm: Implement v8.1-Atomics

2018-05-10 Thread Peter Maydell
On 8 May 2018 at 16:14, Richard Henderson wrote: > This implements the Atomics extension, which is mandatory for v8.1. > While testing the v8.2-SVE extension, I've run into issues with the > GCC testsuite expecting this to exist. > > Missing is the wiring up of the system registers to indicate tha

Re: [Qemu-devel] [PATCH] qcow2: fix preallocation with metadata on bare block device

2018-05-10 Thread Ivan Ren
ping for review On Tue, May 8, 2018 at 8:27 PM Ivan Ren wrote: > Create a qcow2 directly on bare block device with > "-o preallocation=metadata" option. When read this qcow2, it will > return dirty data of block device. This patch add QCOW_OFLAG_ZERO > for all preallocated l2 entry if the underl

Re: [Qemu-devel] [PATCH] fix fp16 tininess

2018-05-10 Thread Alex Bennée
Peter Maydell writes: > In commit d81ce0ef2c4f105 we added an extra float_status field > fp_status_fp16 for Arm, but forgot to initialize it correctly > by setting it to float_tininess_before_rounding. This currently > will only cause problems for the new V8_FP16 feature, since the > float-to-fl

Re: [Qemu-devel] [PATCH v2 00/14] sdcard: Proper implementation of CRC7

2018-05-10 Thread Peter Maydell
On 9 May 2018 at 04:46, Philippe Mathieu-Daudé wrote: > Hi, > > This series emerged after last Coverity scan and Peter suggestion in: > http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg05046.html > > (3) "proper" implementation of CRC, so that an sd controller > can either (a) ma

Re: [Qemu-devel] [PATCH] fpu/softfloat: Don't set Invalid for float-to-int(MAXINT)

2018-05-10 Thread Richard Henderson
On 05/10/2018 07:01 AM, Peter Maydell wrote: > In float-to-integer conversion, if the floating point input > converts exactly to the largest or smallest integer that > fits in to the result type, this is not an overflow. > In this situation we were producing the correct result value, > but were inc

Re: [Qemu-devel] [PATCH] qcow2: fix preallocation with metadata on bare block device

2018-05-10 Thread Eric Blake
On 05/08/2018 07:27 AM, Ivan Ren wrote: Create a qcow2 directly on bare block device with "-o preallocation=metadata" option. When read this qcow2, it will return dirty data of block device. Yes, reading garbage is expected. This patch add QCOW_OFLAG_ZERO for all preallocated l2 entry if the

Re: [Qemu-devel] [PATCH 08/13] tests: Add qdict_stringify_for_keyval() test

2018-05-10 Thread Eric Blake
On 05/09/2018 11:55 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/check-qdict.c | 54 + 1 file changed, 54 insertions(+) +static void qdict_stringify_for_keyval_test(void) +{ +QDict *dict = qdict_new(); + +/* + * Te

Re: [Qemu-devel] [PATCH v2 01/14] target/arm: Implement vector shifted SCVF/UCVF for fp16

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > While we have some of the scalar paths for *CVF for fp16, > we failed to decode the fp16 version of these instructions. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Richard Henderson > > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v2 02/14] target/arm: Implement vector shifted FCVT for fp16

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > While we have some of the scalar paths for FCVT for fp16, > we failed to decode the fp16 version of these instructions. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Richard Henderson > > --- > v2: Use parens with (x << y) >> z. > --- Reviewed

Re: [Qemu-devel] [PATCH v2 05/14] target/arm: Implement FMOV (general) for fp16

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > Adding the fp16 moves to/from general registers. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 22 +- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a

Re: [Qemu-devel] [PATCH v2 08/14] target/arm: Introduce and use read_fp_hreg

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > Cc: qemu-sta...@nongnu.org > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 30 ++ > 1 file changed, 14 insertions(+), 16 deletions(-) > Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v4 02/11] machine: make MemoryHotplugState accessible via the machine

2018-05-10 Thread Paolo Bonzini
On 04/05/2018 21:26, Eduardo Habkost wrote: > On Mon, Apr 23, 2018 at 06:51:17PM +0200, David Hildenbrand wrote: > [...] >> +/* always allocate the device memory information */ >> +machine->device_memory = g_malloc(sizeof(*machine->device_memory)); > [...] >> -/* initialize hotplug memo

Re: [Qemu-devel] [PATCH v2 11/14] target/arm: Implement FCMP for fp16

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > From: Alex Bennée > > These where missed out from the rest of the half-precision work. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Alex Bennée > [rth: Diagnose lack of FP16 before fp_access_check] > Signed-off-by: Richard Henderson > --- >

Re: [Qemu-devel] [PATCH v2 12/14] target/arm: Implement FCSEL for fp16

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > From: Alex Bennée > > These were missed out from the rest of the half-precision work. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Alex Bennée > [rth: Fix erroneous check vs type] > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter

Re: [Qemu-devel] [PATCH v2 13/14] target/arm: Implement FMOV (immediate) for fp16

2018-05-10 Thread Peter Maydell
On 2 May 2018 at 23:15, Richard Henderson wrote: > From: Alex Bennée > > All the hard work is already done by vfp_expand_imm, we just need to > make sure we pick up the correct size. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Alex Bennée > [rth: Merge unallocated_encoding check with TCGMemO

  1   2   3   >