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

2020-04-24 Thread Richard Henderson
On 4/24/20 3:47 PM, Stephen Long wrote: > Oh, maybe I misread the manual description for SVE2 TBL, but I thought Zm was > the indexes register and the loop compares the index from Zm with the total > number of elems, table_elems. That's right. You take the index from Zm just fine, but fail to

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

2020-04-24 Thread Stephen Long
Oh, maybe I misread the manual description for SVE2 TBL, but I thought Zm was the indexes register and the loop compares the index from Zm with the total number of elems, table_elems. -Original Message- From: Richard Henderson Sent: Friday, April 24, 2020 2:37 PM To: Stephen Long ;

Re: [PATCH RFC] target/arm: Implement SVE2 SPLICE, EXT

2020-04-24 Thread Richard Henderson
On 4/23/20 11:03 AM, Stephen Long wrote: > Signed-off-by: Stephen Long > > I'm not sure I can just use the SVE helper functions for the SVE2 > variants of EXT and SPLICE. Absolutely. The new insns are functionally identical to movprfx + the old insn. I presume the new insns were added for

[PATCH] linux-user: return target error codes for socket() and prctl()

2020-04-24 Thread Helge Deller
Return target error codes instead of host error codes. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff..655a86fa45 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2987,7 +2987,7 @@ static abi_long do_socket(int domain, int

Re: [PATCH] linux-user: Drop unnecessary check in dup3 syscall

2020-04-24 Thread Eric Blake
On 4/24/20 4:47 PM, Helge Deller wrote: -    host_flags = target_to_host_bitmask(arg3, fcntl_flags_tbl); +    int host_flags = target_to_host_bitmask(arg3, fcntl_flags_tbl); I don't think this is quite correct. target_to_host_bitmask() silently ignores unknown bits, and a user that

Re: [PATCH] linux-user: Drop open-coded fcntl flags conversion in eventfd2 syscall

2020-04-24 Thread Richard Henderson
On 4/24/20 1:48 PM, Helge Deller wrote: > Drop the open-coded fcntl flags conversion in the eventfd2 syscall and > replace it with the built-in conversion with fcntl_flags_tbl. > > Signed-off-by: Helge Deller Reviewed-by: Richard Henderson r~

Re: [PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform

2020-04-24 Thread Richard Henderson
On 4/24/20 2:06 PM, Helge Deller wrote: > Provide an own /proc/cpuinfo file for the hppa (parisc) platform. "our own" perhaps? > Signed-off-by: Helge Deller Reviewed-by: Richard Henderson r~

Re: [PATCH] linux-user: Drop unnecessary check in dup3 syscall

2020-04-24 Thread Helge Deller
On 24.04.20 23:32, Eric Blake wrote: > On 4/24/20 3:57 PM, Helge Deller wrote: >> Drop the extra check in dup3() if anything other than FD_CLOEXEC (aka >> O_CLOEXEC) was given. Instead simply rely on any error codes returned by >> the host dup3() syscall. >> >> Signed-off-by: Helge Deller >> >>

Re: [PATCH RFC 1/3] target/arm: Implement SVE2 AESMC, AESIMC

2020-04-24 Thread Richard Henderson
On 4/23/20 3:37 PM, Stephen Long wrote: > +#define DO_CRYPTO_AESMC(NAME, DECRYPT) \ > +void HELPER(NAME)(void *vd, void *vn, uint32_t desc)\ > +{ \ > +intptr_t i, opr_sz = simd_oprsz(desc);

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

2020-04-24 Thread Richard Henderson
On 4/23/20 9:42 AM, Stephen Long wrote: > 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

Re: [PATCH] linux-user: Drop unnecessary check in dup3 syscall

2020-04-24 Thread Eric Blake
On 4/24/20 3:57 PM, Helge Deller wrote: Drop the extra check in dup3() if anything other than FD_CLOEXEC (aka O_CLOEXEC) was given. Instead simply rely on any error codes returned by the host dup3() syscall. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c

Re: [RFC patch v1 2/3] qemu-file: add buffered mode

2020-04-24 Thread Eric Blake
On 4/13/20 6:12 AM, Denis Plotnikov wrote: The patch adds ability to qemu-file to write the data asynchronously to improve the performance on writing. Before, only synchronous writing was supported. Enabling of the asyncronous mode is managed by new asynchronous "enabled_buffered" callback.

Re: [RFC patch v1 1/3] qemu-file: introduce current buffer

2020-04-24 Thread Eric Blake
On 4/13/20 6:12 AM, Denis Plotnikov wrote: To approach async wrtiting in the further commits, the buffer writing allocated in QEMUFile struct is replaced with the link to the current buffer. We're going to use many buffers to write the qemu file stream to the unerlying storage

[PATCH] linux-user: Add support for /proc/cpuinfo on hppa platform

2020-04-24 Thread Helge Deller
Provide an own /proc/cpuinfo file for the hppa (parisc) platform. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff..ebf0d38321 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7438,6 +7435,18 @@ static int open_cpuinfo(void

[PATCH] linux-user: Drop unnecessary check in signalfd4 syscall

2020-04-24 Thread Helge Deller
The signalfd4() syscall takes optional O_NONBLOCK and O_CLOEXEC fcntl flags. If the user gave any other invalid flags, the host syscall will return correct error codes, so simply drop the extra check here. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c

[PATCH] linux-user: Drop unnecessary check in dup3 syscall

2020-04-24 Thread Helge Deller
Drop the extra check in dup3() if anything other than FD_CLOEXEC (aka O_CLOEXEC) was given. Instead simply rely on any error codes returned by the host dup3() syscall. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff..ebf0d38321 100644 ---

[PATCH] linux-user: Drop open-coded fcntl flags conversion in eventfd2 syscall

2020-04-24 Thread Helge Deller
Drop the open-coded fcntl flags conversion in the eventfd2 syscall and replace it with the built-in conversion with fcntl_flags_tbl. Signed-off-by: Helge Deller diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff..ebf0d38321 100644 --- a/linux-user/syscall.c +++

[Bug 1874904] [NEW] qemu windows with gtk and french keypad not working as expected

2020-04-24 Thread Jean-Yves BAUDY
Public bug reported: When I use qemu on Windows 10 with a French AZERTY keypad with the correct options the emulated system keypad still QWERTY. If I use sdl it works fine the emulated keypad is AZERTY. Example of command with ubuntu live cd: -> qemu-system-x86_64.exe -m 4G

Re: [PATCH v3] target/arm: Implement SVE2 FMMLA

2020-04-24 Thread Richard Henderson
On 4/22/20 9:55 AM, Stephen Long wrote: > +intptr_t opr_sz = simd_oprsz(desc) / (sizeof(TYPE) >> 2); \ > +\ > +for (s = 0; s < opr_sz; ++s) { \ > +TYPE

Re: [PATCH RFC] target/arm: Implement SVE2 gather load insns

2020-04-24 Thread Richard Henderson
On 4/22/20 8:23 AM, Stephen Long wrote: > Add decoding logic for SVE2 64-bit/32-bit gather non-temporal load > insns. > > 64-bit > * LDNT1SB > * LDNT1B (vector plus scalar) > * LDNT1SH > * LDNT1H (vector plus scalar) > * LDNT1SW > * LDNT1W (vector plus scalar) > * LDNT1D (vector plus scalar) > >

Re: [RFC PATCH] translate-all: include guest address in out_asm output

2020-04-24 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200424173914.2957-1-alex.ben...@linaro.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 06/11] error: Use error_reportf_err() where appropriate

2020-04-24 Thread Eric Blake
On 4/24/20 2:20 PM, Markus Armbruster wrote: Replace error_report("...: %s", ..., error_get_pretty(err)); by error_reportf_err(err, "...: ", ...); Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- chardev/char-socket.c | 5 +++-- hw/sd/pxa2xx_mmci.c | 4 ++--

Re: [PATCH v2] target/arm: Implement SVE2 scatter store insns

2020-04-24 Thread Richard Henderson
On 4/22/20 7:15 AM, Stephen Long wrote: > Add decoding logic for SVE2 64-bit/32-bit scatter non-temporal store > insns. > > 64-bit > * STNT1B (vector plus scalar) > * STNT1H (vector plus scalar) > * STNT1W (vector plus scalar) > * STNT1D (vector plus scalar) > > 32-bit > * STNT1B (vector plus

Re: [PATCH v2 1/2] riscv: sifive_e: Support changing CPU type

2020-04-24 Thread Alistair Francis
On Fri, Apr 24, 2020 at 12:12 PM Corey Wharton wrote: > > > > > -Original Message- > > From: Alistair Francis > > Sent: Friday, April 24, 2020 9:04 AM > > To: Corey Wharton > > Cc: qemu-devel@nongnu.org Developers ; open > > list:RISC-V ; Sagar Karandikar > > ; Bastian Koppelmann >

Re: tst-arm-mte bug: PSTATE.TCO is cleared on exceptions

2020-04-24 Thread Richard Henderson
On 4/21/20 9:39 PM, Richard Henderson wrote: > On 4/20/20 3:29 AM, Szabolcs Nagy wrote: >> i'm using the branch at >> >> https://github.com/rth7680/qemu/tree/tgt-arm-mte >> >> to test armv8.5-a mte and hope this is ok to report bugs here. >> >> i'm doing tests in qemu-system-aarch64 with linux

Re: [PATCH v4 23/30] qcow2: Update L2 bitmap in qcow2_alloc_cluster_link_l2()

2020-04-24 Thread Eric Blake
On 3/17/20 1:16 PM, Alberto Garcia wrote: The L2 bitmap needs to be updated after each write to indicate what new subclusters are now allocated. This needs to happen even if the cluster was already allocated and the L2 entry was otherwise valid. Signed-off-by: Alberto Garcia Reviewed-by: Max

Re: [RFC PATCH] translate-all: include guest address in out_asm output

2020-04-24 Thread Richard Henderson
On 4/24/20 10:39 AM, Alex Bennée wrote: > +/* first dump prologue */ > +insn_start = tcg_ctx->gen_insn_end_off[0]; > +if (insn_start > 0) { > +qemu_log(" prologue: [size=%ld]\n", insn_start); > +log_disas(tb->tc.ptr, insn_start); > +} > + >

[PATCH 02/11] xen: Fix and improve handling of device_add usb-host errors

2020-04-24 Thread Markus Armbruster
usbback_portid_add() leaks the error when qdev_device_add() fails. Fix that. While there, use the error to improve the error message. The qemu_opts_from_qdict() similarly leaks on failure. But any failure there is a programming error. Pass _abort. Fixes:

[PATCH 10/11] arm/sabrelite: Consistently use _fatal in sabrelite_init()

2020-04-24 Thread Markus Armbruster
Cc: Peter Maydell Cc: Jean-Christophe Dubois Signed-off-by: Markus Armbruster --- hw/arm/sabrelite.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c index e31694bb92..04f4b96591 100644 --- a/hw/arm/sabrelite.c +++

[PATCH 09/11] mips/boston: Plug memory leak in boston_mach_init()

2020-04-24 Thread Markus Armbruster
Fixes: df1d8a1f29f567567b9d20be685a4241282e7005 Cc: Paul Burton Cc: Aleksandar Rikalo Signed-off-by: Markus Armbruster --- hw/mips/boston.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 2832dfa6ae..a896056be1 100644 ---

[PATCH 03/11] s390x/cpumodel: Fix harmless misuse of visit_check_struct()

2020-04-24 Thread Markus Armbruster
Commit e47970f51d "s390x/cpumodel: Fix query-cpu-model-FOO error API violations" neglected to change visit_end_struct()'s Error ** argument along with the others. If visit_end_struct() failed, we'd take the success path. Fortunately, it can't fail here: qobject_input_check_struct() checks we

[PATCH 08/11] mips/boston: Fix boston_mach_init() error handling

2020-04-24 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second boston_mach_init() is wrong that way.

[PATCH 06/11] error: Use error_reportf_err() where appropriate

2020-04-24 Thread Markus Armbruster
Replace error_report("...: %s", ..., error_get_pretty(err)); by error_reportf_err(err, "...: ", ...); Signed-off-by: Markus Armbruster --- chardev/char-socket.c | 5 +++-- hw/sd/pxa2xx_mmci.c | 4 ++-- hw/sd/sd.c| 4 ++-- hw/usb/dev-mtp.c | 9 + qemu-nbd.c

[Bug 1874674] Re: [Feature request] acceptance test class to run user-mode binaries

2020-04-24 Thread Richard Henderson
What user-mode testing do you think might be improved by using avocado? IMO at present we have a fairly comprehensive testing infrastructure for user-mode that is simply underused. With docker, we have a set of cross-compilers for most guest architectures, and we are able to build statically

[PATCH 07/11] mips/malta: Fix create_cps() error handling

2020-04-24 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second create_cps() is wrong that way. The

[PATCH 05/11] tests/migration: Tighten error checking

2020-04-24 Thread Markus Armbruster
migrate_get_socket_address() neglects to check visit_type_SocketAddressList() failure. This smells like a leak, but it actually will crash dereferencing @addrs. Pass _abort to remove the code smell. Signed-off-by: Markus Armbruster --- tests/qtest/migration-test.c | 4 ++-- 1 file changed, 2

[PATCH 01/11] nvdimm: Plug memory leak in uuid property setter

2020-04-24 Thread Markus Armbruster
nvdimm_set_uuid() leaks memory on qemu_uuid_parse() failure. Fix that. Fixes: 6c5627bb24dcd68c997857a8b671617333b1289f Cc: Xiao Guangrong Cc: Shivaprasad G Bhat Signed-off-by: Markus Armbruster --- hw/mem/nvdimm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mem/nvdimm.c

[PATCH 00/11] More miscellaneous error handling fixes

2020-04-24 Thread Markus Armbruster
Markus Armbruster (11): nvdimm: Plug memory leak in uuid property setter xen: Fix and improve handling of device_add usb-host errors s390x/cpumodel: Fix harmless misuse of visit_check_struct() s390x/pci: Fix harmless mistake in zpci's property fid's setter tests/migration: Tighten error

[PATCH 04/11] s390x/pci: Fix harmless mistake in zpci's property fid's setter

2020-04-24 Thread Markus Armbruster
s390_pci_set_fid() sets zpci->fid_defined to true even when visit_type_uint32() failed. Reproducer: "-device zpci,fid=junk". Harmless in practice, because qdev_device_add() then fails, throwing away @zpci. Fix it anyway. Cc: Matthew Rosato Cc: Cornelia Huck Signed-off-by: Markus Armbruster

[PATCH 11/11] i386: Fix x86_cpu_load_model() error API violation

2020-04-24 Thread Markus Armbruster
The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. x86_cpu_load_model() is wrong

RE: [PATCH v2 1/2] riscv: sifive_e: Support changing CPU type

2020-04-24 Thread Corey Wharton
> -Original Message- > From: Alistair Francis > Sent: Friday, April 24, 2020 9:04 AM > To: Corey Wharton > Cc: qemu-devel@nongnu.org Developers ; open > list:RISC-V ; Sagar Karandikar > ; Bastian Koppelmann paderborn.de>; Alistair Francis ; Palmer Dabbelt > ; Bin Meng > Subject: Re:

Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration

2020-04-24 Thread Dr. David Alan Gilbert
* Yan Zhao (yan.y.z...@intel.com) wrote: > On Tue, Apr 21, 2020 at 08:08:49PM +0800, Tian, Kevin wrote: > > > From: Yan Zhao > > > Sent: Tuesday, April 21, 2020 10:37 AM > > > > > > On Tue, Apr 21, 2020 at 06:56:00AM +0800, Alex Williamson wrote: > > > > On Sun, 19 Apr 2020 21:24:57 -0400 > > > >

[PATCH v3 2/3] qcow2: Allow resize of images with internal snapshots

2020-04-24 Thread Eric Blake
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 image. But the snapshot size tracking was

[PATCH v3 0/3] qcow2: Allow resize of images with internal snapshots

2020-04-24 Thread Eric Blake
In v3: - patch 1: fix error returns [patchew, Max], R-b dropped - patch 2,3: unchanged, so add R-b Eric Blake (3): block: Add blk_new_with_bs() helper qcow2: Allow resize of images with internal snapshots qcow2: Tweak comment about bitmaps vs. resize include/sysemu/block-backend.h | 2 ++

[PATCH v3 1/3] block: Add blk_new_with_bs() helper

2020-04-24 Thread Eric Blake
There are several callers that need to create a new block backend from an existing BDS; make the task slightly easier with a common helper routine. Suggested-by: Max Reitz Signed-off-by: Eric Blake --- include/sysemu/block-backend.h | 2 ++ block/block-backend.c | 23

[PATCH v3 3/3] qcow2: Tweak comment about bitmaps vs. resize

2020-04-24 Thread Eric Blake
Our comment did not actually match the code. Rewrite the comment to be less sensitive to any future changes to qcow2-bitmap.c that might implement scenarios that we currently reject. Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1

[Bug 1874888] [NEW] certain programs make QEMU crash with "tcg fatal error"

2020-04-24 Thread Konstantin
Public bug reported: The following code snippet crashes qemu with .../tcg/tcg.c:3279: tcg fatal error qemu-x86_64: /usr/local/google/home/kostik/qemu-5.0.0-rc4/accel/tcg/cpu-exec.c:701: int cpu_exec(CPUState *): Assertion `!have_mmap_lock()' failed. int main() { /*

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Eric Blake
On 4/24/20 1:37 PM, Alberto Garcia wrote: On Fri 24 Apr 2020 08:25:45 PM CEST, Vladimir Sementsov-Ogievskiy wrote: Reading the entire cluster will be interesting - you'll have to decompress the entire memory, then overwrite the zeroed portions. I don't think so, qcow2_get_host_offset()

Re: [PATCH] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-24 Thread Eduardo Habkost
On Fri, Apr 24, 2020 at 03:23:56PM +, Ani Sinha wrote: > > > > On Apr 22, 2020, at 4:15 PM, Ani Sinha wrote: > > > > > > > >> On Apr 21, 2020, at 8:32 PM, Daniel P. Berrangé > >> wrote: > >> > >> On Tue, Apr 21, 2020 at 02:45:04PM +, Ani Sinha wrote: > >>> > >>> > On Apr

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Alberto Garcia
On Fri 24 Apr 2020 08:15:04 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > AFAIK, now compressed clusters can't be used in scenarios with guest, > as qcow2 driver doesn't support rewriting them. You can write to those images just fine, it's just not efficient because you have to COW the

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Alberto Garcia
On Fri 24 Apr 2020 08:25:45 PM CEST, Vladimir Sementsov-Ogievskiy wrote: >>> Reading the entire cluster will be interesting - you'll have to >>> decompress the entire memory, then overwrite the zeroed portions. >> >> I don't think so, qcow2_get_host_offset() would detect the number of >>

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Vladimir Sementsov-Ogievskiy
24.04.2020 20:56, Alberto Garcia wrote: On Fri 24 Apr 2020 07:44:33 PM CEST, Eric Blake wrote: at the same time, I can see where you're coming from in stating that if it makes management of extended L2 easier to allow zero subclusters on top of a compressed cluster, then there's no reason to

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Vladimir Sementsov-Ogievskiy
24.04.2020 20:44, Eric Blake wrote: On 4/24/20 12:21 PM, Alberto Garcia wrote: On Fri 24 Apr 2020 07:11:08 PM CEST, Eric Blake wrote: 'write -c 0 64k' followed by 'write -z 16k 16k' would not need to do any copy on write. The compressed data would remain untouched on disk but some of the

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Alberto Garcia
On Fri 24 Apr 2020 07:44:33 PM CEST, Eric Blake wrote: >>> at the same time, I can see where you're coming from in stating that >>> if it makes management of extended L2 easier to allow zero subclusters >>> on top of a compressed cluster, then there's no reason to forbid it. >> >> I'm not sure

Re: [RFC patch v1 1/3] qemu-file: introduce current buffer

2020-04-24 Thread Vladimir Sementsov-Ogievskiy
13.04.2020 14:12, Denis Plotnikov wrote: To approach async wrtiting in the further commits, the buffer allocated in QEMUFile struct is replaced with the link to the current buffer. We're going to use many buffers to write the qemu file stream to the unerlying storage asynchronously. The current

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Eric Blake
On 4/24/20 12:21 PM, Alberto Garcia wrote: On Fri 24 Apr 2020 07:11:08 PM CEST, Eric Blake wrote: 'write -c 0 64k' followed by 'write -z 16k 16k' would not need to do any copy on write. The compressed data would remain untouched on disk but some of the subclusters would have the 'all zeroes'

[RFC PATCH] translate-all: include guest address in out_asm output

2020-04-24 Thread Alex Bennée
This is a slightly hackish Friday afternoon attempt to include the guest address in our out_asm output in an effort to make it a little easier to see what is generating what final assembly. Signed-off-by: Alex Bennée --- accel/tcg/translate-all.c | 38 -- 1

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Alberto Garcia
On Fri 24 Apr 2020 07:11:08 PM CEST, Eric Blake wrote: >> 'write -c 0 64k' followed by 'write -z 16k 16k' would not need to do any >> copy on write. The compressed data would remain untouched on disk but >> some of the subclusters would have the 'all zeroes' bit set, exactly >> like what happens

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Eric Blake
On 4/24/20 12:02 PM, Alberto Garcia wrote: On Tue 17 Mar 2020 07:16:21 PM CET, Alberto Garcia wrote: Compressed clusters always have the bitmap part of the extended L2 entry set to 0. I was just finishing some improvements to the new code that allows BDRV_REQ_ZERO_WRITE at the subcluster

Re: [PATCH v4 24/30] qcow2: Clear the L2 bitmap when allocating a compressed cluster

2020-04-24 Thread Alberto Garcia
On Tue 17 Mar 2020 07:16:21 PM CET, Alberto Garcia wrote: > Compressed clusters always have the bitmap part of the extended L2 > entry set to 0. I was just finishing some improvements to the new code that allows BDRV_REQ_ZERO_WRITE at the subcluster level, and I'm starting to entertain the idea

[PATCH v22 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back into

[PATCH v22 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report' with

[PATCH v22 QEMU 1/5] linux-headers: Update to allow renaming of free_page_report_cmd_id

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Sync to the latest upstream changes for free page hinting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[PATCH v22 QEMU 4/5] virtio-balloon: Implement support for page poison reporting feature

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we

[PATCH v22 QEMU 2/5] linux-headers: update to contain virito-balloon free page reporting

2020-04-24 Thread Alexander Duyck
From: Alexander Duyck Sync the latest upstream changes for free page reporting. To be replaced by a full linux header sync. Signed-off-by: Alexander Duyck --- include/standard-headers/linux/virtio_balloon.h |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v22 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-04-24 Thread Alexander Duyck
This series provides an asynchronous means of reporting free guest pages to QEMU through virtio-balloon so that the memory associated with those pages can be discarded and reused by other processes and/or guests on the host. Using this it is possible to avoid unnecessary I/O to disk and greatly

Re: [PATCH v2 1/2] riscv: sifive_e: Support changing CPU type

2020-04-24 Thread Alistair Francis
On Fri, Mar 13, 2020 at 12:35 PM Corey Wharton wrote: > > Allows the CPU to be changed from the default via the -cpu command > line option. > > Signed-off-by: Corey Wharton > Reviewed-by: Bin Meng > Reviewed-by: Alistair Francis Thanks for the patch. Unfortunately this fails `make check`.

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 8:34 AM David Hildenbrand wrote: > > > >> Also, I do wonder if we want to default-enable it. It can still have a > >> negative performance impact and some people might not want that. > > > > The negative performance impact should be minimal. At this point the > > hinting

Re: [PATCH 2/3] fuzz: Simplify how we compute available machines and types

2020-04-24 Thread Alexander Bulekov
On 200424 0911, Markus Armbruster wrote: > apply_to_qlist(), apply_to_node() work with QObjects. This is > designed for use by tests/qtest/qos-test.c, which gets the data in > that form via QMP. Goes back to commit fc281c8020 "tests: qgraph API > for the qtest driver framework". > > Commit

Re: [PATCH 1/3] Makefile: Drop unused, broken target recurse-fuzz

2020-04-24 Thread Alexander Bulekov
On 200424 0911, Markus Armbruster wrote: > Target recurse-fuzz depends on pc-bios/optionrom/fuzz, which can't be > made. It's not used anywhere. Added in commit c621dc3e01c, looks > like cargo cult. Delete. > > Signed-off-by: Markus Armbruster Reviewed-by: Alexander Bulekov > --- >

[Bug 1874539] Re: tulip driver broken in v5.0.0-rc4

2020-04-24 Thread Helge Deller
Attached trivial patch fixes it. ** Attachment added: "patch to fix tulip rx hangs" https://bugs.launchpad.net/qemu/+bug/1874539/+attachment/5359564/+files/p2 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread David Hildenbrand
>> Also, I do wonder if we want to default-enable it. It can still have a >> negative performance impact and some people might not want that. > > The negative performance impact should be minimal. At this point the > hinting process ends up being very light since it only processes a > small

Re: [RFC PATCH 0/3] hw/net/tulip: Fix LP#1874539

2020-04-24 Thread Helge Deller
* Philippe Mathieu-Daudé : > Attempt to fix the launchpad bug filled by Helge: > > In a qemu-system-hppa system, qemu release v5.0.0-rc, > the tulip nic driver is broken. The tulip nic is detected, > even getting DHCP info does work. But when trying to > download bigger files via

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

2020-04-24 Thread Vladimir Sementsov-Ogievskiy
24.04.2020 17:27, 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 used

Re: [PATCH] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-24 Thread Ani Sinha
> On Apr 22, 2020, at 4:15 PM, Ani Sinha wrote: > > > >> On Apr 21, 2020, at 8:32 PM, Daniel P. Berrangé wrote: >> >> On Tue, Apr 21, 2020 at 02:45:04PM +, Ani Sinha wrote: >>> >>> On Apr 20, 2020, at 8:32 PM, Michael S. Tsirkin wrote: But I for one would like to

Re: [PATCH v21 QEMU 5/5] virtio-balloon: Provide an interface for free page reporting

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 4:20 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > Add support for free page reporting. The idea is to function very similar > > to how the balloon works in that we basically end up madvising the page as > >

[PATCH] travis: explicitly include gnutls to ensure it is updated

2020-04-24 Thread Daniel P . Berrangé
Travis includes gnutls in the default package set, but it is an outdated version linkng to an incompatible libffi version. The 'update: true' stanza causes the brew toolchain to be updated but not the installed formula. It is possible to run 'brew upgrade' to update installed formula, but this is

Re: [PATCH v21 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread David Hildenbrand
On 24.04.20 16:56, Alexander Duyck wrote: > On Fri, Apr 24, 2020 at 4:23 AM David Hildenbrand wrote: >> >> On 22.04.20 20:21, Alexander Duyck wrote: >>> From: Alexander Duyck >>> >>> In an upcoming patch a feature named Free Page Reporting is about to be >>> added. In order to avoid any

[PATCH] target/riscv: fix check of guest pa top bits

2020-04-24 Thread Jose Martins
The spec states that on sv39x4 guest physical "address bits 63:41 must all be zeros, or else a guest-page-fault exception occurs.". However, the check performed for these top bits of the virtual address on the second stage is the same as the one performed for virtual addresses on the first stage

Re: [PATCH RESEND v6 10/36] multi-process: build system for remote device process

2020-04-24 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:45PM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > Modify Makefile to support the building of the remote > device process. Implements main() function of remote > device process. > > Signed-off-by: John G Johnson > Signed-off-by:

Re: [PATCH v21 QEMU 3/5] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-04-24 Thread Alexander Duyck
On Fri, Apr 24, 2020 at 4:23 AM David Hildenbrand wrote: > > On 22.04.20 20:21, Alexander Duyck wrote: > > From: Alexander Duyck > > > > In an upcoming patch a feature named Free Page Reporting is about to be > > added. In order to avoid any confusion we should drop the use of the word > >

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

2020-04-24 Thread Vladimir Sementsov-Ogievskiy
24.04.2020 15:54, Kevin Wolf wrote: Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- [..] + +# After this, 0 to base_size should be allocated/zeroed. Actually, top_size_old to base_size, yes? (sorry, nitpicking, missed on previous review). +

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

2020-04-24 Thread Laszlo Ersek
On 04/23/20 13:41, Gerd Hoffmann wrote: > 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

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

2020-04-24 Thread Eric Blake
On 4/24/20 7:54 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 in

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

2020-04-24 Thread Max Reitz
On 24.04.20 16:27, 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

Re: [PATCH] iotests/041: Fix NBD socket path

2020-04-24 Thread Eric Blake
On 4/24/20 8:46 AM, Max Reitz wrote: We should put all UNIX socket files into the sock_dir, not test_dir. Reported-by: Elena Ufimtseva Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake I'm happy to queue

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

2020-04-24 Thread Vladimir Sementsov-Ogievskiy
24.04.2020 15:17, Kevin Wolf wrote: Am 24.04.2020 um 08:16 hat Vladimir Sementsov-Ogievskiy geschrieben: 23.04.2020 18:01, 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

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

2020-04-24 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

Re: [RFC PATCH 3/3] hw/net/tulip: Set descriptor error bit when lenght is incorrect

2020-04-24 Thread Eric Blake
On 4/23/20 6:16 PM, Philippe Mathieu-Daudé wrote: When a frame lenght is incorrect, set the RDES0 'Error Summary' length (here, and in the subject) and 'Frame too long' bits. Then stop the receive process and trigger an abnormal interrupt. See [4.3.5 Receive Process]. -- Eric Blake,

Re: [PATCH v2 1/3] block: Add blk_new_with_bs() helper

2020-04-24 Thread Max Reitz
On 24.04.20 16:18, Eric Blake wrote: > On 4/24/20 5:02 AM, Max Reitz wrote: > >>> (With the Patchew warning fixed, of course (i.e., we should set ret to >>> -EPERM or something in qcow.c)) >> >> Er, well, maybe I should have looked into more places.  The compiler >> only warns about that single

Re: [PATCH v2 1/3] block: Add blk_new_with_bs() helper

2020-04-24 Thread Eric Blake
On 4/24/20 5:02 AM, Max Reitz wrote: (With the Patchew warning fixed, of course (i.e., we should set ret to -EPERM or something in qcow.c)) Er, well, maybe I should have looked into more places. The compiler only warns about that single one because it’s the only place where @ret is really

Re: [EXT] Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-04-24 Thread Auger Eric
Hi Bharat, On 4/2/20 11:01 AM, Bharat Bhushan wrote: > Hi Eric/Alex, > >> -Original Message- >> From: Alex Williamson >> Sent: Thursday, March 26, 2020 11:23 PM >> To: Auger Eric >> Cc: Bharat Bhushan ; peter.mayd...@linaro.org; >> pet...@redhat.com; eric.auger@gmail.com;

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

2020-04-24 Thread Eric Blake
On 4/24/20 7:17 AM, Kevin Wolf wrote: +ret = qcow2_co_pwritev_part(bs, old_length, qiov.size, , 0, 0); Better not do it if this cluster is already ZERO.. But it may be a later patch to improve that. I doubt it's worth writing code to optimise a corner case inside a corner

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

2020-04-24 Thread Max Reitz
On 24.04.20 14:54, Kevin Wolf wrote: > v7: > - Allocate smaller zero buffer [Vladimir] > - Added missing error_setg_errno() [Max] > - Code cleanup in the iotest, enabled mapping for 'metadata' [Vladimir] > - Don't assign to errp twice [Eric] I would have liked to see that change in patch 10, but

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

2020-04-24 Thread Max Reitz
On 24.04.20 14:54, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/274 | 155 + > tests/qemu-iotests/274.out | 268 + > tests/qemu-iotests/group | 1 + > 3 files changed, 424 insertions(+) > create mode

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

2020-04-24 Thread Max Reitz
On 24.04.20 14:54, 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

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

2020-04-24 Thread Max Reitz
On 24.04.20 14:54, 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

Re: [PATCH v2 00/15] qapi: Spring cleaning

2020-04-24 Thread Eric Blake
On 4/24/20 5:06 AM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200424084338.26803-1-arm...@redhat.com/ 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

Re: [PATCH v2 15/15] qapi: Generate simpler marshalling code when no arguments

2020-04-24 Thread Eric Blake
On 4/24/20 3:43 AM, Markus Armbruster wrote: When command FOO has no arguments, its generated qmp_marshal_FOO() is a bit confusing. Make it simpler: visit_start_struct(v, NULL, NULL, 0, ); if (err) { goto out; } - -if (!err) { -visit_check_struct(v, ); -

Re: [PATCH v2 14/15] qapi: Disallow qmp_marshal_FOO(NULL, ...)

2020-04-24 Thread Eric Blake
On 4/24/20 3:43 AM, Markus Armbruster wrote: For QMP commands without arguments, gen_marshal() laboriously generates a qmp_marshal_FOO() that copes with null @args. Turns there's just one caller that passes null instead of an empty QDict. Adjust that caller, and simplify gen_marshal().

  1   2   3   >