[PATCH v1 14/14] .travis.yml: drop MacOSX

2020-04-23 Thread Alex Bennée
This keeps breaking on Travis so lets just fall back to the Cirrus CI builds which seem to be better maintained. Fix up the comments while we are doing this as we never had a windows build. Signed-off-by: Alex Bennée --- .travis.yml | 28 +--- 1 file changed, 1

[PATCH v1 11/14] tests/guest-debug: use the unix socket for linux-user tests

2020-04-23 Thread Alex Bennée
Now we have support for debugging over a unix socket for linux-user lets use it in our test harness. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/guest-debug/run-test.py

[PATCH v1 09/14] gdbstub: eliminate gdbserver_fd global

2020-04-23 Thread Alex Bennée
We don't really need to track this fd beyond the initial creation of the socket. We already know if the system has been initialised by virtue of the gdbserver_state so lets remove it. This makes the later re-factoring easier. Signed-off-by: Alex Bennée --- gdbstub.c | 23 ++-

[PATCH v1 08/14] tests/tcg: drop inferior.was_attached() test

2020-04-23 Thread Alex Bennée
This test seems flaky and reports attachment even when we failed to negotiate the architecture. However the fetching of the guest architecture will fail tripping up the gdb AttributeError which will trigger our early no error status exit from the test Signed-off-by: Alex Bennée ---

[PATCH v1 05/14] configure: favour gdb-multiarch if we have it

2020-04-23 Thread Alex Bennée
As gdb will generally be talking to "foreign" guests lets use that if we can. Otherwise the chances of gdb barfing are considerably higher. Signed-off-by: Alex Bennée --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index

[PATCH for 5.1 v1 00/14] guest_base, gdbstub and Travis

2020-04-23 Thread Alex Bennée
Hi, This is the current state of my random collection of fixes that didn't make it into 5.0. The gdbstub related fixes will probably get queued up separately (and possibly submitted for stable?) once the tree gets re-opened. We have: - The linux-user guest_base rework (which enable more

[PATCH v1 04/14] .gitignore: include common build sub-directories

2020-04-23 Thread Alex Bennée
As out-of-tree builds become more common (or rather building in a subdir) we can add a lot of load to "git ls-files" as it hunts down sub-directories that are irrelevant to the source tree. This is especially annoying if you have a prompt that attempts to summarise the current git status on

[PATCH v1 06/14] gdbstub: Introduce gdb_get_float64() to get 64-bit float registers

2020-04-23 Thread Alex Bennée
From: Philippe Mathieu-Daudé When converted to use GByteArray in commits 462474d760c and a010bdbe719, the call to stfq_p() was removed. This call serialize a float. Since we now use a GByteArray, we can not use stfq_p() directly. Introduce the gdb_get_float64() helper to load a float64 register.

[PATCH v1 07/14] tests/tcg: better trap gdb failures

2020-04-23 Thread Alex Bennée
It seems older and non-multiarach aware GDBs might not fail gracefully when faced with something they don't know. For example when faced with a target XML for s390x the Ubuntu 18.04 gdb will generate an internal fault and prompt for a core dump. Work around this by invoking GDB in a more batch

[PATCH v1 03/14] accel/tcg: Relax va restrictions on 64-bit guests

2020-04-23 Thread Alex Bennée
From: Richard Henderson We cannot at present limit a 64-bit guest to a virtual address space smaller than the host. It will mostly work to ignore this limitation, except if the guest uses high bits of the address space for tags. But it will certainly work better, as presently we can wind up

[PATCH v1 02/14] exec/cpu-all: Use bool for have_guest_base

2020-04-23 Thread Alex Bennée
From: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 2 +- bsd-user/main.c| 4 ++-- linux-user/main.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v1 01/14] linux-user: completely re-write init_guest_space

2020-04-23 Thread Alex Bennée
First we ensure all guest space initialisation logic comes through probe_guest_base once we understand the nature of the binary we are loading. The convoluted init_guest_space routine is removed and replaced with a number of pgb_* helpers which are called depending on what requirements we have

Re: [PATCH 0/5] QEMU Gating CI

2020-04-23 Thread Cleber Rosa
- Original Message - > From: "Peter Maydell" > To: "Markus Armbruster" > Cc: "Fam Zheng" , "Thomas Huth" , "Beraldo > Leal" , "Erik > Skultety" , "Alex Bennée" , > "Wainer Moschetta" , > "QEMU Developers" , "Wainer dos Santos Moschetta" > , "Willian Rampazzo" > , "Cleber Rosa" ,

[PATCH RFC] target/arm: Implement SVE2 TBL, TBX

2020-04-23 Thread Stephen Long
Signed-off-by: Stephen Long These insns don't show up under any SVE2 categories in the manual. But if you lookup each insn, you'll find they have SVE2 variants. --- target/arm/helper-sve.h| 10 +++ target/arm/sve.decode | 5 target/arm/sve_helper.c| 53

[Bug 1874486] [NEW] Bug in qemu-img when converting to streamOptimized vmdk images

2020-04-23 Thread Ed Wittmann
Public bug reported: I reviewed #1006655, and I think I'm already on a newer version, so this is either a regression or a new bug. I have been recently attempting to convert images from raw and qcow2 formats to vmdk. It appears that the option "subformat=streamOptimized" produces a broken or

Re: Warnings with GCC 9.3

2020-04-23 Thread Peter Maydell
On Thu, 23 Apr 2020 at 17:19, Pranith Kumar wrote: > > Hello, > > I keep seeing these warnings on the latest master with GCC 9.3: > > /home/pranith/qemu/hw/block/pflash_cfi01.c: In function > ‘pflash_mem_read_with_attrs’: > /home/pranith/qemu/hw/block/pflash_cfi01.c:667:20: note: parameter

Re: [PATCH v6 04/10] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Kevin Wolf
Am 23.04.2020 um 17:18 hat Eric Blake geschrieben: > On 4/23/20 10:01 AM, Kevin Wolf wrote: > > If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling > > qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't > > undo any previous preallocation, but just adds the zero

Re: [PATCH v2 09/36] tcg: Consolidate 3 bits into enum TCGTempKind

2020-04-23 Thread Richard Henderson
On 4/23/20 2:00 AM, Philippe Mathieu-Daudé wrote: >>> @@ -1885,12 +1896,17 @@ static char *tcg_get_arg_str_ptr(TCGContext *s, >>> char *buf, int buf_size, >>> { >>> int idx = temp_idx(ts); >>> >>> -if (ts->temp_global) { >>> +switch (ts->kind) { >>> +case TEMP_FIXED: >>> +

Warnings with GCC 9.3

2020-04-23 Thread Pranith Kumar
Hello, I keep seeing these warnings on the latest master with GCC 9.3: /home/pranith/qemu/hw/block/pflash_cfi01.c: In function ‘pflash_mem_read_with_attrs’: /home/pranith/qemu/hw/block/pflash_cfi01.c:667:20: note: parameter passing for argument of type ‘MemTxAttrs’ {aka ‘struct MemTxAttrs’}

Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Eric Blake
On 4/23/20 11:04 AM, Kevin Wolf wrote: Hmm. When we get block status, it is very easy to tell that something reads as zero when the qcow2 file has the zero bit set, but when the qcow2 file does not have the zero bit set, we have to then query the format layer whether it reads as zeros (which

Re: [PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-23 Thread David Hildenbrand
On 23.04.20 16:46, Alexander Duyck wrote: > On Thu, Apr 23, 2020 at 1:11 AM David Hildenbrand wrote: >> >> On 22.04.20 20:21, Alexander Duyck wrote: >>> From: Alexander Duyck >>> >>> We need to make certain to advertise support for page poison tracking if >>> we want to actually get data on if

[PATCH 00/13] qapi: Spring cleaning

2020-04-23 Thread Markus Armbruster
Markus Armbruster (13): qapi: Belatedly update visitor.h's big comment for QAPI modules qapi: Fix the virtual walk example in visitor.h's big comment qapi: Fix typo in visit_start_list()'s contract qapi: Document @errp usage more thoroughly in visitor.h qapi: Polish prose in visitor.h

Re: [PATCH v9 8/9] virtio-iommu: Implement probe request

2020-04-23 Thread Jean-Philippe Brucker
Hi Bharat, A few more things found while rebasing On Mon, Mar 23, 2020 at 02:16:16PM +0530, Bharat Bhushan wrote: > This patch implements the PROBE request. Currently supported > page size mask per endpoint is returned. Also append a NONE > property in the end. > > Signed-off-by: Bharat Bhushan

[PATCH 07/13] qapi: Fix Visitor contract for start_alternate()

2020-04-23 Thread Markus Armbruster
The contract demands v->start_alternate() for input and dealloc visitors, but visit_start_alternate() actually requires it for input and clone visitors. Fix the contract, and delete superfluous qapi_dealloc_start_alternate(). Signed-off-by: Markus Armbruster --- include/qapi/visitor-impl.h | 5

Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Kevin Wolf
Am 23.04.2020 um 17:36 hat Eric Blake geschrieben: > On 4/23/20 10:01 AM, Kevin Wolf wrote: > > The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the > > image is possibly preallocated and then the zero flag is added to all > > clusters. This means that a copy-on-write operation

[PATCH 04/13] qapi: Document @errp usage more thoroughly in visitor.h

2020-04-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/visitor.h | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index c5d0ce9184..09df7099c6 100644 --- a/include/qapi/visitor.h +++

[PATCH 13/13] qom: Simplify object_property_get_enum()

2020-04-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qom/object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qom/object.c b/qom/object.c index 1812f79224..be700e831f 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1550,11 +1550,9 @@ int object_property_get_enum(Object *obj, const

[PATCH 02/13] qapi: Fix the virtual walk example in visitor.h's big comment

2020-04-23 Thread Markus Armbruster
Call visit_check_list(). Missed in commit a4a1c70dc7 "qapi: Make input visitors detect unvisited list tails". Drop an irrelevant error_propagate() while there. Signed-off-by: Markus Armbruster --- include/qapi/visitor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 09/13] qapi: Assert non-input visitors see only valid narrow integers

2020-04-23 Thread Markus Armbruster
visit_type_intN() and visit_type_uintN() fail when the value is out of bounds. This is appropriate with an input visitor: the value comes from input, and input may be bad. It should never happen with the other visitors: the value comes from the caller, and callers must keep it within bounds.

[PATCH 05/13] qapi: Polish prose in visitor.h

2020-04-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/visitor.h | 104 + 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index 09df7099c6..a425ea514c 100644 --- a/include/qapi/visitor.h +++

[PATCH 03/13] qapi: Fix typo in visit_start_list()'s contract

2020-04-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/visitor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index 7f63e4c381..c5d0ce9184 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -345,9 +345,9 @@

[PATCH 12/13] qapi: Only input visitors can actually fail

2020-04-23 Thread Markus Armbruster
The previous few commits have made this more obvious, and removed the one exception. Time to clarify the documentation, and drop dead error checking. Signed-off-by: Markus Armbruster --- include/qapi/visitor-impl.h | 4 include/qapi/visitor.h | 40

[PATCH 01/13] qapi: Belatedly update visitor.h's big comment for QAPI modules

2020-04-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/visitor.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index c5b23851a1..f8a0fc1ea9 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -58,7 +58,7

[PATCH 06/13] qapi: Assert incomplete object occurs only in dealloc visitor

2020-04-23 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/visitor.h | 5 + qapi/qapi-visit-core.c | 5 + scripts/qapi/visit.py | 4 3 files changed, 14 insertions(+) diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index a425ea514c..2d40d2fe0f 100644 ---

[PATCH 11/13] qapi: Assert non-input visitors see only valid alternate tags

2020-04-23 Thread Markus Armbruster
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type. This is appropriate with an input visitor: visit_start_alternate() sets ->type according to the input, and bad input can lead to bad ->type. It should never happen with an output, clone or dealloc visitor: if it did,

[PATCH 08/13] qapi: Assert output visitors see only valid enum values

2020-04-23 Thread Markus Armbruster
output_type_enum() fails when *obj is not a valid value of the enum type. Should not happen. Drop the check, along with its unit tests. qapi_enum_lookup()'s assertion still guards. Signed-off-by: Markus Armbruster --- qapi/qapi-visit-core.c | 9 ---

[PATCH 10/13] qapi: Clean up visitor's recovery from input with invalid type

2020-04-23 Thread Markus Armbruster
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type. If it's an input visit, we then need to free the the object we got from visit_start_alternate(). We do that with qapi_free_FOO(), which uses the dealloc visitor. Trouble is that object is in a bad state: its ->type

Re: [PATCH RESEND v6 06/36] monitor: destaticize HMP commands

2020-04-23 Thread Philippe Mathieu-Daudé
On 4/23/20 5:07 PM, Jag Raman wrote: On Apr 23, 2020, at 10:14 AM, Philippe Mathieu-Daudé wrote: Why 'destaticize HMP commands’? Hi Philippe, Both QEMU & the remote process links the QMP code. QEMU uses all of the QMP commands, whereas, the remote process only uses a subset of this.

Re: [PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Eric Blake
On 4/23/20 10:01 AM, Kevin Wolf wrote: The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the image is possibly preallocated and then the zero flag is added to all clusters. This means that a copy-on-write operation may be needed when writing to these clusters, despite having

Re: [PATCH 1/3] block: use int64_t as bytes type in tracked requests

2020-04-23 Thread Kevin Wolf
Am 30.03.2020 um 16:18 hat Vladimir Sementsov-Ogievskiy geschrieben: > We are generally moving to int64_t for both offset and bytes paramaters > on all io paths. Convert tracked requests now. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block_int.h | 4 ++-- >

Re: [PATCH v6 07/10] block: truncate: Don't make backing file data visible

2020-04-23 Thread Eric Blake
On 4/23/20 10:01 AM, Kevin Wolf wrote: When extending the size of an image that has a backing file larger than its old size, make sure that the backing file data doesn't become visible in the guest, but the added area is properly zeroed out. Consider the following scenario where the overlay is

Re: [PATCH v6 04/10] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Eric Blake
On 4/23/20 10:01 AM, Kevin Wolf wrote: If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't undo any previous preallocation, but just adds the zero flag to all relevant L2 entries. If an external data file is

Re: [PATCH 0/1] KVM support for VMD devices

2020-04-23 Thread Derrick, Jonathan
On Wed, 2020-04-22 at 23:16 -0700, Christoph Hellwig wrote: > On Wed, Apr 22, 2020 at 01:14:44PM -0400, Jon Derrick wrote: > > The two patches (Linux & QEMU) add support for passthrough VMD devices > > in QEMU/KVM. VMD device 28C0 already supports passthrough natively by > > providing the Host

Re: [PATCH RESEND v6 36/36] multi-process: add configure and usage information

2020-04-23 Thread Jag Raman
> On Apr 23, 2020, at 9:54 AM, 罗勇刚(Yonggang Luo) wrote: > > Does multi-process support on Windows? > I found it use mmap and unix socket for inter-process communication, that may > not support under Windows. Hi Yonggang, We have only tested this on Linux till now. Are you using QEMU with

Re: [PATCH RESEND v6 06/36] monitor: destaticize HMP commands

2020-04-23 Thread Jag Raman
> On Apr 23, 2020, at 10:14 AM, Philippe Mathieu-Daudé > wrote: > > Why 'destaticize HMP commands’? Hi Philippe, Both QEMU & the remote process links the QMP code. QEMU uses all of the QMP commands, whereas, the remote process only uses a subset of this. Therefore, the ‘static’ functions

[PATCH v6 10/10] qcow2: Forward ZERO_WRITE flag for full preallocation

2020-04-23 Thread Kevin Wolf
The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the image is possibly preallocated and then the zero flag is added to all clusters. This means that a copy-on-write operation may be needed when writing to these clusters, despite having used preallocation, negating one of the

[PATCH v6 08/10] iotests: Filter testfiles out in filter_img_info()

2020-04-23 Thread Kevin Wolf
We want to keep TEST_IMG for the full path of the main test image, but filter_testfiles() must be called for other test images before replacing other things like the image format because the test directory path could contain the format as a substring. Insert a filter_testfiles() call between

[PATCH v6 07/10] block: truncate: Don't make backing file data visible

2020-04-23 Thread Kevin Wolf
When extending the size of an image that has a backing file larger than its old size, make sure that the backing file data doesn't become visible in the guest, but the added area is properly zeroed out. Consider the following scenario where the overlay is shorter than its backing file:

[PATCH v6 09/10] iotests: Test committing to short backing file

2020-04-23 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/274 | 157 ++ tests/qemu-iotests/274.out | 260 + tests/qemu-iotests/group | 1 + 3 files changed, 418 insertions(+) create mode 100755 tests/qemu-iotests/274

[PATCH v6 04/10] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Kevin Wolf
If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't undo any previous preallocation, but just adds the zero flag to all relevant L2 entries. If an external data file is in use, a write_zeroes request to the data

[PATCH v6 06/10] file-posix: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Kevin Wolf
For regular files, we always get BDRV_REQ_ZERO_WRITE behaviour from the OS, so we can advertise the flag and just ignore it. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- block/file-posix.c | 4 1 file changed,

[PATCH v6 01/10] block: Add flags to BlockDriver.bdrv_co_truncate()

2020-04-23 Thread Kevin Wolf
This adds a new BdrvRequestFlags parameter to the .bdrv_co_truncate() driver callbacks, and a supported_truncate_flags field in BlockDriverState that allows drivers to advertise support for request flags in the context of truncate. For now, we always pass 0 and no drivers declare support for any

[PATCH v6 00/10] block: Fix resize (extending) of short overlays

2020-04-23 Thread Kevin Wolf
v6: - qcow2: Don't round up end offset [Eric] - qcow2: Use different error messages for different error paths - Request BDRV_REQ_ZERO_WRITE only if the backing file actually covers (part of) the new area (fix regression from v3) [Max] - New patch: Forward ZERO_WRITE flag for full preallocation

[PATCH v6 03/10] block-backend: Add flags to blk_truncate()

2020-04-23 Thread Kevin Wolf
Now that node level interface bdrv_truncate() supports passing request flags to the block driver, expose this on the BlockBackend level, too. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz ---

[PATCH v6 02/10] block: Add flags to bdrv(_co)_truncate()

2020-04-23 Thread Kevin Wolf
Now that block drivers can support flags for .bdrv_co_truncate, expose the parameter in the node level interfaces bdrv_co_truncate() and bdrv_truncate(). Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz ---

[PATCH v6 05/10] raw-format: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Kevin Wolf
The raw format driver can simply forward the flag and let its bs->file child take care of actually providing the zeros. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- block/raw-format.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: Need BT support in qemu for Zephyr

2020-04-23 Thread Peter Maydell
On Thu, 23 Apr 2020 at 15:41, Dan Christian wrote: > I'm new to trying to use qemu+bt (via btproxy) and haven't managed to get > anything working. As Dan notes, your command line isn't trying to use any of QEMU's bluetooth support code. More generally, from the point of view of the

Re: [PATCH v21 QEMU 4/5] virtio-balloon: Implement support for page poison tracking feature

2020-04-23 Thread Alexander Duyck
On Thu, Apr 23, 2020 at 1:11 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > We need to make certain to advertise support for page poison tracking if > > we want to actually get data on if the guest will be poisoning pages. > > > > Add

Re: Need BT support in qemu for Zephyr

2020-04-23 Thread Daniel P . Berrangé
On Thu, Apr 23, 2020 at 08:40:32AM -0600, Dan Christian wrote: > I'm new to trying to use qemu+bt (via btproxy) and haven't managed to get > anything working. > > btproxy is launched first, then Zephyr launches qemu via it's west tool. > The commands look like: > sudo tools/btproxy -u -i 0 -d #

Re: Need BT support in qemu for Zephyr

2020-04-23 Thread Dan Christian
I'm new to trying to use qemu+bt (via btproxy) and haven't managed to get anything working. btproxy is launched first, then Zephyr launches qemu via it's west tool. The commands look like: sudo tools/btproxy -u -i 0 -d # in a separate window x86_64-pokysdk-linux/usr/bin/qemu-system-aarch64 -cpu

Re: [PATCH] qcow2: Allow resize of images with internal snapshots

2020-04-23 Thread Eric Blake
On 4/23/20 8:55 AM, Max Reitz wrote: On 22.04.20 22:53, Eric Blake wrote: We originally refused to allow resize of images with internal snapshots because the v2 image format did not require the tracking of snapshot size, making it impossible to safely revert to a snapshot with a different size

Re: [PATCH v4 20/30] qcow2: Add subcluster support to discard_in_l2_slice()

2020-04-23 Thread Alberto Garcia
On Wed 22 Apr 2020 08:09:53 PM CEST, Vladimir Sementsov-Ogievskiy wrote: >> There's currently an inconsistency now that I think of it: if an image >> has subclusters and QCOW_OFLAG_ZERO set then qcow2_get_cluster_type() >> returns QCOW2_CLUSTER_ZERO_* but qcow2_get_subcluster_type() returns >>

Re: [PATCH RESEND v6 06/36] monitor: destaticize HMP commands

2020-04-23 Thread Philippe Mathieu-Daudé
Why 'destaticize HMP commands'? On 4/23/20 6:13 AM, elena.ufimts...@oracle.com wrote: From: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Dr. David Alan Gilbert --- hmp-commands.hx| 4 +-

Re: [PATCH RESEND v6 02/36] multi-process: Refactor machine_init and exit notifiers

2020-04-23 Thread Philippe Mathieu-Daudé
On 4/23/20 6:13 AM, elena.ufimts...@oracle.com wrote: From: Elena Ufimtseva Relocate machine_int and exit notifiers into common code Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- MAINTAINERS | 1 + Makefile.objs

Re: Need BT support in qemu for Zephyr

2020-04-23 Thread Daniel P . Berrangé
On Thu, Apr 23, 2020 at 07:33:37AM -0600, Dan Christian wrote: > There was a note about BT support being deprecated. > > Having it makes developing/testing Zephyr > bluetooth vastly easier. > > I hope it will be retained. Unfortunately it has

Re: [PATCH 3/3] net/colo-compare.c: Fix deadlock

2020-04-23 Thread Lukas Straub
On Wed, 22 Apr 2020 08:40:40 + "Zhang, Chen" wrote: > > -Original Message- > > From: Lukas Straub > > Sent: Thursday, April 9, 2020 2:34 AM > > To: qemu-devel > > Cc: Zhang, Chen ; Li Zhijian > > ; Jason Wang ; Marc- > > André Lureau ; Paolo Bonzini > > > > Subject: [PATCH 3/3]

Re: [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering

2020-04-23 Thread Gerd Hoffmann
On Thu, Apr 23, 2020 at 08:52:58AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 22, 2020 at 11:54:54PM +0200, Anthoine Bourgeois wrote: > > With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility > > with stdvga. By default, bar #2 is used by virtio modern io bar. > > This bar

Need BT support in qemu for Zephyr

2020-04-23 Thread Dan Christian
There was a note about BT support being deprecated. Having it makes developing/testing Zephyr bluetooth vastly easier. I hope it will be retained. Thanks, Dan

Re: [PATCH v5 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Eric Blake
On 4/23/20 8:23 AM, Kevin Wolf wrote: So qcow2_cluster_zeroize() seems to accept the unaligned tail. It would still set the zero flag for the partial last cluster and for the external data file, bdrv_co_pwrite_zeroes() would have the correct size. Then I'm in favor of NOT rounding the tail.

Re: [PATCH v5 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Max Reitz
On 23.04.20 15:25, Kevin Wolf wrote: > Am 23.04.2020 um 12:53 hat Max Reitz geschrieben: >> On 22.04.20 17:21, Kevin Wolf wrote: >>> If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling >>> qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't >>> undo any previous

Re: [PATCH] qcow2: Allow resize of images with internal snapshots

2020-04-23 Thread Max Reitz
On 22.04.20 22:53, Eric Blake wrote: > We originally refused to allow resize of images with internal > snapshots because the v2 image format did not require the tracking of > snapshot size, making it impossible to safely revert to a snapshot > with a different size than the current view of the

Re: [PATCH RESEND v6 36/36] multi-process: add configure and usage information

2020-04-23 Thread Yonggang Luo
Does multi-process support on Windows? I found it use mmap and unix socket for inter-process communication, that may not support under Windows. And also, can the python script be replaced by C implementation? On Thu, Apr 23, 2020 at 12:38 PM wrote: > From: Elena Ufimtseva > > Signed-off-by:

Re: [PATCH v2 00/36] tcg 5.1 omnibus patch set

2020-04-23 Thread Alex Bennée
Richard Henderson writes: > For v1, I had split this into 4 logically distinct parts. But > apparently there are minor interdependencies, because the later > sets would not apply standalone, says Alex. > > Rather than tease them apart, and then have to undo that work > in order to actually

Re: [PATCH v2 31/36] tcg: Implement gvec support for rotate by scalar

2020-04-23 Thread Alex Bennée
Richard Henderson writes: > No host backend support yet, but the interfaces for rotls > are in place. Only implement left-rotate for now, as the > only known use of vector rotate by scalar is s390x, so any > right-rotate would be unused and untestable. > > Signed-off-by: Richard Henderson

Re: [PATCH v2 29/36] tcg: Implement gvec support for rotate by vector

2020-04-23 Thread Alex Bennée
Richard Henderson writes: > No host backend support yet, but the interfaces for rotlv > and rotrv are in place. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200423124305.14718-1-f4...@amsat.org/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200423124305.14718-1-f4...@amsat.org/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200423124305.14718-1-f4...@amsat.org/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's ID_AA64DFR0

2020-04-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200423110915.10527-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] target/arm: Use correct variable for setting 'max' cpu's ID_AA64DFR0 Message-id:

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200423124305.14718-1-f4...@amsat.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1 Message-id:

Re: [PATCH v2 28/36] tcg: Implement gvec support for rotate by immediate

2020-04-23 Thread Alex Bennée
Richard Henderson writes: > No host backend support yet, but the interfaces for rotli > are in place. Canonicalize immediate rotate to the left, > based on a survey of architectures, but provide both left > and right shift interfaces to the translators. > > Signed-off-by: Richard Henderson

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200423124305.14718-1-f4...@amsat.org/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash export

Re: [PATCH v5 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Kevin Wolf
Am 23.04.2020 um 12:53 hat Max Reitz geschrieben: > On 22.04.20 17:21, Kevin Wolf wrote: > > If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling > > qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't > > undo any previous preallocation, but just adds the zero

Re: [PATCH v5 4/9] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-23 Thread Kevin Wolf
Am 22.04.2020 um 18:14 hat Eric Blake geschrieben: > On 4/22/20 10:58 AM, Kevin Wolf wrote: > > > > > @@ -4214,6 +4215,35 @@ static int coroutine_fn > > > > qcow2_co_truncate(BlockDriverState *bs, int64_t offset, > > > >g_assert_not_reached(); > > > >} > > > > +if ((flags

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread Laurent Desnogues
On Thu, Apr 23, 2020 at 2:44 PM Philippe Mathieu-Daudé wrote: > > MIDR_EL1 is a 32-bit register. In fact MIDR_EL1 a 64-bit system register with the top 32-bit being RES0. So the right fix might be to change midr field size, just to be future proof :-) But if we stick to a 32-bit midr then:

Re: [PATCH v5 7/9] block: truncate: Don't make backing file data visible

2020-04-23 Thread Kevin Wolf
Am 23.04.2020 um 13:14 hat Max Reitz geschrieben: > On 22.04.20 17:21, Kevin Wolf wrote: > > When extending the size of an image that has a backing file larger than > > its old size, make sure that the backing file data doesn't become > > visible in the guest, but the added area is properly zeroed

Re: [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering

2020-04-23 Thread Michael S. Tsirkin
On Wed, Apr 22, 2020 at 11:54:54PM +0200, Anthoine Bourgeois wrote: > With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility > with stdvga. By default, bar #2 is used by virtio modern io bar. > This bar is the last one introduce in the virtio pci bar layout and it's > crushed by

[PATCH] target/arm: Use correct variable for setting 'max' cpu's MIDR_EL1

2020-04-23 Thread Philippe Mathieu-Daudé
MIDR_EL1 is a 32-bit register. This fixes when compiling with -Werror=conversion: target/arm/cpu64.c: In function ‘aarch64_max_initfn’: target/arm/cpu64.c:628:21: error: conversion from ‘uint64_t’ {aka ‘long unsigned int’} to ‘uint32_t’ {aka ‘unsigned int’} may change value

Re: [PATCH v5 1/9] block: Add flags to BlockDriver.bdrv_co_truncate()

2020-04-23 Thread Kevin Wolf
Am 23.04.2020 um 11:41 hat Max Reitz geschrieben: > On 22.04.20 17:21, Kevin Wolf wrote: > > This adds a new BdrvRequestFlags parameter to the .bdrv_co_truncate() > > driver callbacks, and a supported_truncate_flags field in > > BlockDriverState that allows drivers to advertise support for request

Re: [PATCH] target/arm: Use correct variable for setting 'max' cpu's ID_AA64DFR0

2020-04-23 Thread Philippe Mathieu-Daudé
On Thu, Apr 23, 2020 at 1:09 PM Peter Maydell wrote: > > In aarch64_max_initfn() we update both 32-bit and 64-bit ID > registers. The intended pattern is that for 64-bit ID registers we > use FIELD_DP64 and the uint64_t 't' register, while 32-bit ID > registers use FIELD_DP32 and the uint32_t

[PATCH v2 4/4] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes

2020-04-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Disable unsupported FDT firmware nodes if a user passes us a DTB with nodes enabled that the machine cannot support due to lack of EL3 or EL2 support. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- hw/arm/xlnx-zcu102.c | 30

[PATCH v2 3/4] hw/arm: xlnx-zcu102: Move arm_boot_info into XlnxZCU102

2020-04-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Move arm_boot_info into XlnxZCU102. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Edgar E. Iglesias --- hw/arm/xlnx-zcu102.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c index

[PATCH v2 2/4] device_tree: Constify compat in qemu_fdt_node_path()

2020-04-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Make compat in qemu_fdt_node_path() const char *. Signed-off-by: Edgar E. Iglesias --- device_tree.c| 2 +- include/sysemu/device_tree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device_tree.c b/device_tree.c index

[PATCH v2 1/4] device_tree: Allow name wildcards in qemu_fdt_node_path()

2020-04-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Allow name wildcards in qemu_fdt_node_path(). This is useful to find all nodes with a given compatibility string. Reviewed-by: Alistair Francis Signed-off-by: Edgar E. Iglesias --- device_tree.c| 2 +- include/sysemu/device_tree.h | 3 +++ 2 files

[PATCH v2 0/4] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes

2020-04-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" When users try direct Linux runs on the ZynqMP models without enabling EL3 (and using appropriate FW) they run into trouble because the upstream kernel device-tree has EL3 based firmware nodes by default. PSCI firmware nodes work because we emulate the firmware in QEMU.

Re: [PATCH v2 0/2] hw/arm/virt: dt: add kaslr-seed property

2020-04-23 Thread Peter Maydell
On Mon, 20 Apr 2020 at 13:20, Jerome Forissier wrote: > > This patchset creates the DT property /chosen/kaslr-seed which is used > by the OS for Address Space Layout Randomization. If the machine is > secure, a similar property is created under /secure-chosen. > > Changes since v1: > - Move

Re: [PATCH v5 9/9] iotests: Test committing to short backing file

2020-04-23 Thread Max Reitz
On 22.04.20 17:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/274 | 157 ++ > tests/qemu-iotests/274.out | 260 + > tests/qemu-iotests/group | 1 + > 3 files changed, 418 insertions(+) > create mode

Re: [PATCH v1 3/3] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes

2020-04-23 Thread Peter Maydell
On Thu, 23 Apr 2020 at 12:43, Edgar E. Iglesias wrote: > Without it, I see the following warning but compat in > qemu_fdt_node_path should probably be changed to const char *. > I can make that change in a v2 if you prefer. Yes, I think that would be better. I can't see any reason why the compat

Re: [PATCH v1 3/3] hw/arm: xlnx-zcu102: Disable unsupported FDT firmware nodes

2020-04-23 Thread Edgar E. Iglesias
On Thu, Apr 23, 2020 at 12:21:11PM +0100, Peter Maydell wrote: > On Sun, 19 Apr 2020 at 17:27, Edgar E. Iglesias > wrote: > > > > From: "Edgar E. Iglesias" > > > > Disable unsupported FDT firmware nodes if a user passes us > > a DTB with nodes enabled that the machine cannot support > > due to

Re: [PATCH 4/5] ramfb: add sanity checks to ramfb_create_display_surface

2020-04-23 Thread Gerd Hoffmann
Hi, > - if "linesize" is nonzero, make sure it is a whole multiple of the > required word size (?) > > - if "linesize" is nonzero, make sure it is not bogus with relation to > "width". I'm thinking something like: Yep, the whole linesize is a bit bogus, noticed after sending out this series,

<    1   2   3   >