[PULL 18/38] tcg/tci: Split out tci_args_{rrm,rrrm,rrrrm}

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 147 ++ 1 file changed, 81 insertions(+), 66 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index ebd4c74176..1aa63fae4d 100644 --- a/tcg/tci.c +++ b/tcg/tci

[PULL 29/38] tcg/tci: Split out tcg_out_op_rrrrrc

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index d4207818cf..8504e82e95 100644 --- a/tcg/

[PULL 02/38] tcg/tci: Rename tci_read_r to tci_read_rval

2021-03-17 Thread Richard Henderson
In the next patches, we want to use tci_read_r to return the raw register number. So rename the existing function, which returns the register value, to tci_read_rval. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 192 +++---

[PULL 12/38] tcg/tci: Reuse tci_args_l for exit_tb

2021-03-17 Thread Richard Henderson
Do not emit a uint64_t, but a tcg_target_ulong, aka uintptr_t. This reduces the size of the constant on 32-bit hosts. The assert for label != NULL has to be removed because that is a valid value for exit_tb. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c

[PULL 23/38] tcg/tci: Split out tcg_out_op_rrs

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 84 +++- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index c5b061fe76..bb4dd76211 100644

[PULL 34/38] tcg/tci: Split out tcg_out_op_rrrrcl

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 1e98c73417..86b59179bb 100644 --- a/tcg/tci

[PULL 00/38] tcg patch queue for 6.0

2021-03-17 Thread Richard Henderson
tags/pull-tcg-20210317 for you to fetch changes up to 5e8892db93f3fb6a7221f2d47f3c952a7e489737: tcg: Fix prototypes for tcg_out_vec_op and tcg_out_op (2021-03-17 09:04:45 -0600) TCI argument extraction helpers and disassembler TCG

[PULL 16/38] tcg/tci: Clean up deposit operations

2021-03-17 Thread Richard Henderson
Use the correct set of asserts during code generation. We do not require the first input to overlap the output; the existing interpreter already supported that. Split out tci_args_rrrbb in the translator. Use the deposit32/64 functions rather than inline expansion. Reviewed-by: Philippe Mathieu-D

[PULL 27/38] tcg/tci: Split out tcg_out_op_rrr

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 322627811b..3320ec1088 100644 --- a/tcg/tci/tcg-tar

[PULL 35/38] tcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm}

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 70 ++-- 1 file changed, 53 insertions(+), 17 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 86b59179bb..2aa0997ae9 100644

[PULL 20/38] tcg/tci: Remove tci_disas

2021-03-17 Thread Richard Henderson
This function is unused. It's not even the disassembler, which is print_insn_tci, located in disas/tci.c. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 2 -- tcg/tci/tcg-target.c.inc | 10 -- 2 files changed, 12 deletions(-) diff

[PULL 10/38] tcg/tci: Split out tci_args_ri and tci_args_rI

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 854fc8df5d..9bb529c5ae 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -121,16 +12

Re: [PATCH] target/ppc/kvm: Cache timebase frequency

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 4:24 PM, Greg Kurz wrote: > Each vCPU core exposes its timebase frequency in the DT. When running > under KVM, this means parsing /proc/cpuinfo in order to get the timebase > frequency of the host CPU. > > The parsing appears to slow down the boot quite a bit with higher number > of cor

[PULL 37/38] tcg/tci: Split out tcg_out_op_r[iI]

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 50 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index f93d587493..7e7b9fed44 100644

[PULL 17/38] tcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bits

2021-03-17 Thread Richard Henderson
We are currently using the "natural" size routine, which uses 64-bits on a 64-bit host. The TCGMemOpIdx operand has 11 bits, so we can safely reduce to 32-bits. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c| 8 tcg/tci/tcg-target.c.

[PULL 26/38] tcg/tci: Split out tcg_out_op_rr

2021-03-17 Thread Richard Henderson
At the same time, validate the type argument in tcg_out_mov. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tc

[PULL 21/38] tcg/tci: Implement the disassembler properly

2021-03-17 Thread Richard Henderson
Actually print arguments as opposed to simply the opcodes and, uselessly, the argument counts. Reuse all of the helpers developed as part of the interpreter. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- meson.build | 2 +- include/tcg/tcg-opc.h | 2 -

[PULL 30/38] tcg/tci: Split out tcg_out_op_rrrbb

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 8504e82e95..b153334dfb 100644 --- a/tcg/tci/tcg

[PULL 25/38] tcg/tci: Split out tcg_out_op_p

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index bf2733d42b..85c5ab5a08 100644 --- a/tcg/tci/tcg-targ

[Bug 1917085] Re: [OSS-Fuzz] Issue 30588 pcnet: Loopback-related stack-overflow

2021-03-17 Thread Alexander Bulekov
OSS-Fuzz says this has been fixed ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1917085 Title: [OSS-Fuzz] Issue 30588 pcnet: Loopback-relat

[PULL 24/38] tcg/tci: Split out tcg_out_op_l

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index bb4dd76211..bf2733d42b 100644 --- a/tcg/tci/tcg-target.c

Re: [RFC PATCH] curl: Allow reading after EOF

2021-03-17 Thread Eric Blake
On 3/17/21 10:32 AM, Eric Blake wrote: > On 3/17/21 10:17 AM, Kevin Wolf wrote: >> This makes the curl driver more consistent with file-posix in that it >> doesn't return errors any more for reading after the end of the remote >> file. Instead, zeros are returned for these areas. >> >> This inconsi

[PULL 33/38] tcg/tci: Split out tcg_out_op_rrrr

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 20dd186b84..1e98c73417 100644 --- a/tcg/tci/tcg-t

[PULL 31/38] tcg/tci: Split out tcg_out_op_rrcl

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index b153334dfb..d0036c9519 100644 --- a/tcg/tci/tcg-t

Win10 always takes 100% cpu power even when idle

2021-03-17 Thread Reinoud Zandijk
Hi, when executing Qemu with qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \ -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=raw \ -rtc base=localtime,clock=host -spice port=5924,disable-ticketing=on \ -vga qxl -usb -device usb-tablet -net nic -net tap,ifname=tap0

[PULL 36/38] tcg/tci: Split out tcg_out_op_v

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 2aa0997ae9..f93d587493 100644 --- a/tcg/tci/tcg-target.c

[PULL 32/38] tcg/tci: Split out tcg_out_op_rrrrrr

2021-03-17 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index d0036c9519..20dd186b84 100644 --- a/tcg/tci

[PATCH] iotests: add test for removing persistent bitmap from backing file

2021-03-17 Thread Vladimir Sementsov-Ogievskiy
Just demonstrate one of x-blockdev-reopen usecases. We can't simply remove persistent bitmap from RO node (for example from backing file), as we need to remove it from the image too. So, we should reopen the node first. Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../tests/remove-bitmap-from

[PULL 38/38] tcg: Fix prototypes for tcg_out_vec_op and tcg_out_op

2021-03-17 Thread Richard Henderson
From: Miroslav Rezanina There are two different versions of prototype for tcg_out_op and tcg_out_vec_op functions: 1) using const TCGArg *args and const int *const_args arguments 2) using const TCGArg args[TCG_MAX_OP_ARGS] and const int const_args[TCG_MAX_OP_ARGS] aguments. This duality caus

Re: [PATCH 3/4] esp: ensure cmdfifo is not empty and current_dev is non-NULL

2021-03-17 Thread Alexander Bulekov
Hi Mark, On 210316 2330, Mark Cave-Ayland wrote: > When about to execute a SCSI command, ensure that cmdfifo is not empty and > current_dev is non-NULL. This can happen if the guest tries to execute a TI > (Transfer Information) command without issuing one of the select commands > first. > > Bugl

Re: [PATCH 1/4] esp: don't underflow cmdfifo if no message out/command data is present

2021-03-17 Thread Alexander Bulekov
On 210316 2330, Mark Cave-Ayland wrote: > If a guest sends a TI (Transfer Information) command without previously > sending > any message out/command phase data then cmdfifo will underflow triggering an > assert reading the IDENTIFY byte. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1919035

Re: [RFC PATCH 5/8] qtest/libqos: Restrict CPU I/O instructions

2021-03-17 Thread Laszlo Ersek
On 03/16/21 16:55, Philippe Mathieu-Daudé wrote: > Hi Richard and Laszlo, > > On 3/16/21 4:43 PM, Richard Henderson wrote: >> On 3/16/21 9:37 AM, Laszlo Ersek wrote: >>> (+Peter, comment below) >>> >>> On 03/15/21 00:29, Philippe Mathieu-Daudé wrote: Restrict CPU I/O instructions to architect

Re: [RFC PATCH 5/8] qtest/libqos: Restrict CPU I/O instructions

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 4:59 PM, Laszlo Ersek wrote: > On 03/16/21 16:55, Philippe Mathieu-Daudé wrote: >> Hi Richard and Laszlo, >> >> On 3/16/21 4:43 PM, Richard Henderson wrote: >>> On 3/16/21 9:37 AM, Laszlo Ersek wrote: (+Peter, comment below) On 03/15/21 00:29, Philippe Mathieu-Daudé wrote:

Re: [PATCH v3 00/36] block: update graph permissions update

2021-03-17 Thread Vladimir Sementsov-Ogievskiy
17.03.2021 18:21, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20210317143529.615584-1-vsement...@virtuozzo.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210317143529.615584-1-vsement...@

[Bug 1919253] Re: QEMU doesn't build reproducibly anymore in 5.2.0

2021-03-17 Thread Thomas Huth
Ok, thanks for the update, so I'm closing this ticket now. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919253 Title: QEMU doesn't build re

[RFC PATCH 1/9] migration/snap-tool: Introduce qemu-snap tool

2021-03-17 Thread Andrey Gruzdev
Initial commit with code to set up execution environment, parse command-line arguments, show usage/version info and so on. Signed-off-by: Andrey Gruzdev --- include/qemu-snap.h | 35 meson.build | 2 + qemu-snap.c | 414 3 file

[Bug 1880518] Re: issue while installing docker inside s390x container

2021-03-17 Thread Thomas Huth
QEMU 4.2 is quite old already, can you also reproduce the issue with the latest version of QEMU (v5.2 ... or maybe even with the 6.0-rc1 that should get released next week)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qem

[RFC PATCH 6/9] migration/snap-tool: Move RAM_SAVE_FLAG_xxx defines to migration/ram.h

2021-03-17 Thread Andrey Gruzdev
Move RAM_SAVE_FLAG_xxx defines from migration/ram.c to migration/ram.h Signed-off-by: Andrey Gruzdev --- migration/ram.c | 16 migration/ram.h | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 52537f14

Re: MIPS32 release 2 Instructions

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 12:20 PM, prashant chaturvedi wrote: > Hello all, > I'm trying execute a mips32r2 , little endian binary on qemu and the > instructions like enable interrupt(EI) and Pair upper Lower(PUL.PS > ) are not supported by qemu as it gives "Illegal > Instruction" error. PUL.PS is

[RFC PATCH] support.md: add a link to matrix bridge to IRC

2021-03-17 Thread Alex Bennée
We want users to be able to use newer tooling and not be stuck with IRC like the rest of the fossils. As the #QEMU channel is bridged by the matrix.org server lets point there as well. At least it's not Slack. Signed-off-by: Alex Bennée --- support.md | 10 ++ 1 file changed, 6 insertion

Re: [PATCH 2/2] cirrus.yml: Update the FreeBSD task to version 12.2

2021-03-17 Thread Alex Bennée
Daniel P. Berrangé writes: > On Wed, Mar 17, 2021 at 01:44:05PM +0100, Thomas Huth wrote: >> On 17/03/2021 12.16, Peter Maydell wrote: >> > On Wed, 17 Mar 2021 at 11:09, Thomas Huth wrote: >> > > >> > > FreeBSD version 12.1 is out of service now, and the task in the >> > > Cirrus-CI is failin

Re: [PATCH for-6.0] x86:acpi:piix4: reinitialize PM1.CNT on reset

2021-03-17 Thread Reinoud Zandijk
Reported-by: Reinoud Zandijk Tested-by: Reinoud Zandijk It works fine now with the patch

Re: [PATCH 2/4] esp: don't overflow cmdfifo if TC is larger than the cmdfifo size

2021-03-17 Thread Alexander Bulekov
On 210316 2330, Mark Cave-Ayland wrote: > If a guest transfers the message out/command phase data using DMA with a TC > that is larger than the cmdfifo size then the cmdfifo overflows triggering > an assert. Limit the size of the transfer to the free space available in > cmdfifo. > > Buglink: http

Re: [PATCH 1/4] esp: don't underflow cmdfifo if no message out/command data is present

2021-03-17 Thread Alexander Bulekov
On 210317 1114, Alexander Bulekov wrote: > On 210316 2330, Mark Cave-Ayland wrote: > > If a guest sends a TI (Transfer Information) command without previously > > sending > > any message out/command phase data then cmdfifo will underflow triggering an > > assert reading the IDENTIFY byte. > > > >

[RFC PATCH 0/9] migration/snap-tool: External snapshot utility

2021-03-17 Thread Andrey Gruzdev
This series is a kind of PoC for asynchronous snapshot reverting. This is about external snapshots only and doesn't involve block devices. Thus, it's mainly intended to be used with the new 'background-snapshot' migration capability and otherwise standard QEMU migration mechanism. The major ideas

Re: [RFC PATCH] curl: Allow reading after EOF

2021-03-17 Thread Daniel P . Berrangé
On Wed, Mar 17, 2021 at 04:17:34PM +0100, Kevin Wolf wrote: > This makes the curl driver more consistent with file-posix in that it > doesn't return errors any more for reading after the end of the remote > file. Instead, zeros are returned for these areas. > > This inconsistency was reported in:

Re: [PATCH] target/ppc/kvm: Cache timebase frequency

2021-03-17 Thread Greg Kurz
On Wed, 17 Mar 2021 16:39:04 +0100 Philippe Mathieu-Daudé wrote: > On 3/17/21 4:24 PM, Greg Kurz wrote: > > Each vCPU core exposes its timebase frequency in the DT. When running > > under KVM, this means parsing /proc/cpuinfo in order to get the timebase > > frequency of the host CPU. > > > > Th

Re: Win10 always takes 100% cpu power even when idle

2021-03-17 Thread Daniel P . Berrangé
On Wed, Mar 17, 2021 at 05:11:22PM +0100, Reinoud Zandijk wrote: > Hi, > > when executing Qemu with > > qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \ > -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=raw \ > -rtc base=localtime,clock=host -spice port=5924,disable-ti

[RFC PATCH 4/9] migration/snap-tool: Introduce qemu_ftell2() routine to qemu-file.c

2021-03-17 Thread Andrey Gruzdev
In several place we need to get QEMUFile input position in the meaning of the number of bytes read by qemu_get_byte()/qemu_get_buffer() routines. Existing qemu_ftell() returns offset in terms of the number of bytes read from underlying IOChannel object which is not suitable here. Signed-off-by: A

[RFC PATCH 3/9] migration/snap-tool: Preparations to run code in main loop context

2021-03-17 Thread Andrey Gruzdev
Major part of code is using QEMUFile and block layer routines, thus to take advantage from concurrent I/O operations we need to use coroutines and run in the the main loop context. Signed-off-by: Andrey Gruzdev --- include/qemu-snap.h | 3 +++ meson.build | 2 +- qemu-snap-handlers.c

Re: [PULL 0/6] s390x patches for 6.0 softfreeze

2021-03-17 Thread Peter Maydell
On Tue, 16 Mar 2021 at 10:12, Cornelia Huck wrote: > > The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging > (2021-03-14 17:47:49 +) > > are available in the Git

[RFC PATCH 5/9] migration/snap-tool: Block layer AIO support and file utility routines

2021-03-17 Thread Andrey Gruzdev
Introducing support for asynchronous block layer requests with in-order completion guerantee using simple buffer descriptor ring and coroutines. Added support for opening QEMUFile with VMSTATE area of QCOW2 image as backing, also introduced several file utility routines. Signed-off-by: Andrey Gru

Re: [PATCH v6 6/7] net/eth: Read ip6_ext_hdr_routing buffer before accessing it

2021-03-17 Thread Alexander Bulekov
Correction: there was a response suggesting to add padding to ip6_ext_hdr. On 210317 1233, Alexander Bulekov wrote: > Just noticed that I also reported this to QEMU-Security on 2020-05-17. > The problem was acknowledged, but I don't think there was any > communication after that, so I'm not sure w

Re: [RFC PATCH] support.md: add a link to matrix bridge to IRC

2021-03-17 Thread Daniel P . Berrangé
On Wed, Mar 17, 2021 at 04:02:59PM +, Alex Bennée wrote: > We want users to be able to use newer tooling and not be stuck with > IRC like the rest of the fossils. As the #QEMU channel is bridged by > the matrix.org server lets point there as well. At least it's not > Slack. > > Signed-off-by:

[Bug 1891748] Re: qemu-arm-static 5.1 can't run gcc

2021-03-17 Thread Alex Bennée
** Tags added: arm linux-user tcg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1891748 Title: qemu-arm-static 5.1 can't run gcc Status in QEMU: Fix Released Status in Juju Charms Collection:

[RFC PATCH 9/9] migration/snap-tool: Implementation of snapshot loading in postcopy

2021-03-17 Thread Andrey Gruzdev
Implementation of asynchronous snapshot loading using standard postcopy migration mechanism on destination VM. The point of switchover to postcopy is trivially selected based on percentage of non-zero pages loaded in precopy. Signed-off-by: Andrey Gruzdev --- include/qemu-snap.h | 11 + qemu-

Re: [RFC PATCH] curl: Allow reading after EOF

2021-03-17 Thread Kevin Wolf
Am 17.03.2021 um 17:12 hat Daniel P. Berrangé geschrieben: > On Wed, Mar 17, 2021 at 04:17:34PM +0100, Kevin Wolf wrote: > > This makes the curl driver more consistent with file-posix in that it > > doesn't return errors any more for reading after the end of the remote > > file. Instead, zeros are

Re: [RFC PATCH] curl: Allow reading after EOF

2021-03-17 Thread Kevin Wolf
Am 17.03.2021 um 16:46 hat Eric Blake geschrieben: > On 3/17/21 10:32 AM, Eric Blake wrote: > > On 3/17/21 10:17 AM, Kevin Wolf wrote: > >> This makes the curl driver more consistent with file-posix in that it > >> doesn't return errors any more for reading after the end of the remote > >> file. In

Re: [RFC PATCH] support.md: add a link to matrix bridge to IRC

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 5:02 PM, Alex Bennée wrote: > We want users to be able to use newer tooling and not be stuck with > IRC like the rest of the fossils. As the #QEMU channel is bridged by > the matrix.org server lets point there as well. At least it's not > Slack. > > Signed-off-by: Alex Bennée > --- >

Re: Win10 always takes 100% cpu power even when idle

2021-03-17 Thread Daniel P . Berrangé
On Wed, Mar 17, 2021 at 06:00:37PM +0100, Reinoud Zandijk wrote: > On Wed, Mar 17, 2021 at 04:18:53PM +, Daniel P. Berrangé wrote: > > On Wed, Mar 17, 2021 at 05:11:22PM +0100, Reinoud Zandijk wrote: > > > when executing Qemu with > > > > > > qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -sna

[RFC PATCH 2/9] migration/snap-tool: Snapshot image create/open routines for qemu-snap tool

2021-03-17 Thread Andrey Gruzdev
Implementation of routines for QCOW2 image creation and opening. Some predefined parameters for image creation and opening are introduced that provide reasonable tradeoff between performance, file size and usability. Thus, it was chosen to disable preallocation and keep image file dense on host fi

Re: Win10 always takes 100% cpu power even when idle

2021-03-17 Thread Reinoud Zandijk
On Wed, Mar 17, 2021 at 04:18:53PM +, Daniel P. Berrangé wrote: > On Wed, Mar 17, 2021 at 05:11:22PM +0100, Reinoud Zandijk wrote: > > when executing Qemu with > > > > qemu-system-x86_64 -m 4G -smp cores=2 -M q35 -snapshot \ > > -drive file=/home/reinoud/Downloads/Win10-demo.raw,format=r

Re: [PATCH v3 13/36] block: use topological sort for permission update

2021-03-17 Thread Alberto Garcia
On Wed 17 Mar 2021 03:35:06 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Rewrite bdrv_check_perm(), bdrv_abort_perm_update() and bdrv_set_perm() > to update nodes in topological sort order instead of simple DFS. With > topologically sorted nodes, we update a node only when all its parents > alre

Re: [PATCH v6 6/7] net/eth: Read ip6_ext_hdr_routing buffer before accessing it

2021-03-17 Thread Alexander Bulekov
Just noticed that I also reported this to QEMU-Security on 2020-05-17. The problem was acknowledged, but I don't think there was any communication after that, so I'm not sure whether this is also stuck in some private issue tracker. Seems pretty tame as far as memory-corrputions go, but I'll send a

[RFC PATCH 7/9] migration/snap-tool: Complete implementation of snapshot saving

2021-03-17 Thread Andrey Gruzdev
Includes code to parse incoming migration stream, dispatch data to section handlers and deal with complications of open-coded migration format without introducing strong dependencies on QEMU migration code. Signed-off-by: Andrey Gruzdev --- include/qemu-snap.h | 42 +++ qemu-snap-handlers.c |

Re: [PULL 00/11] QAPI patches patches for 2021-03-16

2021-03-17 Thread Peter Maydell
On Tue, 16 Mar 2021 at 10:33, Markus Armbruster wrote: > > The following changes since commit 2615a5e433aeb812c300d3a48e1a88e1303e2339: > > Merge remote-tracking branch > 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2021-03-15 > 19:23:00 +) > > are available in the Git r

[PATCH v4 5/6] iotests: Test reopening multiple devices at the same time

2021-03-17 Thread Alberto Garcia
This test swaps the images used by two active block devices. This is now possible thanks to the new ability to run x-blockdev-reopen on multiple devices at the same time. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/245 | 41 ++ tests/qemu-iotests

[RFC PATCH 8/9] migration/snap-tool: Implementation of snapshot loading in precopy

2021-03-17 Thread Andrey Gruzdev
This part implements snapshot loading in precopy mode. Signed-off-by: Andrey Gruzdev --- include/qemu-snap.h | 24 ++ qemu-snap-handlers.c | 586 ++- qemu-snap.c | 44 +++- 3 files changed, 649 insertions(+), 5 deletions(-) diff --git a/includ

[PATCH v4 3/6] iotests: Test replacing files with x-blockdev-reopen

2021-03-17 Thread Alberto Garcia
This patch adds new tests in which we use x-blockdev-reopen to change bs->file Signed-off-by: Alberto Garcia --- tests/qemu-iotests/245 | 109 - tests/qemu-iotests/245.out | 11 +++- 2 files changed, 117 insertions(+), 3 deletions(-) diff --git a/tests/q

Re: [PATCH v5 42/57] tcg/tci: Split out tcg_out_op_r[iI]

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 4:59 AM, Richard Henderson wrote: > On 3/16/21 5:39 PM, Philippe Mathieu-Daudé wrote: >> "And support mov_i64 on 32-bit host"? > > Um, no... > >>> +    case TCG_TYPE_I32: >>> +    tcg_out_op_ri(s, INDEX_op_tci_movi_i32, ret, arg); >>> +    break; >>>   #if TCG_TARGET_REG_BITS =

Re: [PATCH v6 6/7] net/eth: Read ip6_ext_hdr_routing buffer before accessing it

2021-03-17 Thread Philippe Mathieu-Daudé
On 3/17/21 5:35 PM, Alexander Bulekov wrote: > Correction: there was a response suggesting to add padding to ip6_ext_hdr. Was the response on the public list or the private security one? If it was public I missed it. On a private list such comment isn't very helpful if nobody sends patches to fix

Re: [PATCH 4/6] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread Paolo Bonzini
On 17/03/21 16:17, David Edmondson wrote: +if (tkt) { +if (tkt->read) { +if (lock->owners >= 0) { +lock->owners++; +co = tkt->co; +} +} else { +if (lock->owners == 0) { +lock->owners = -1; +

Re: [PATCH 1/5] hw/arm/aspeed: Do not directly map ram container onto main address bus

2021-03-17 Thread Cédric Le Goater
On 3/12/21 7:28 PM, Philippe Mathieu-Daudé wrote: > The RAM container is exposed as an AddressSpace. > AddressSpaces root MemoryRegion must not be mapped into other > MemoryRegion, therefore map the RAM container using an alias. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/arm/aspeed.c |

Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue

2021-03-17 Thread Eugenio Perez Martin
On Wed, Mar 17, 2021 at 3:05 AM Jason Wang wrote: > > > 在 2021/3/16 下午6:31, Eugenio Perez Martin 写道: > > On Tue, Mar 16, 2021 at 8:18 AM Jason Wang wrote: > >> > >> 在 2021/3/16 上午3:48, Eugenio Pérez 写道: > >>> Shadow virtqueue notifications forwarding is disabled when vhost_dev > >>> stops, so cod

[PATCH v4 1/6] block: Add bdrv_reopen_queue_free()

2021-03-17 Thread Alberto Garcia
Move the code to free a BlockReopenQueue to a separate function. It will be used in a subsequent patch. Signed-off-by: Alberto Garcia --- include/block/block.h | 1 + block.c | 16 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/block/block

Re: [RFC PATCH] curl: Allow reading after EOF

2021-03-17 Thread Eric Blake
On 3/17/21 11:43 AM, Kevin Wolf wrote: >>> It is not entirely clear to me if this is something we want to do. If we >>> do care about consistency between protocol drivers, something like this >>> should probably be done in block/io.c eventually - but that would >>> require converting bs->total_sect

Re: [PATCH v6 6/7] net/eth: Read ip6_ext_hdr_routing buffer before accessing it

2021-03-17 Thread Alexander Bulekov
On 210317 1742, Philippe Mathieu-Daudé wrote: > On 3/17/21 5:35 PM, Alexander Bulekov wrote: > > Correction: there was a response suggesting to add padding to ip6_ext_hdr. > > Was the response on the public list or the private security one? It was private, but I just CC-ed you on the response. Si

Re: [PATCH v3 00/36] block: update graph permissions update

2021-03-17 Thread Eric Blake
On 3/17/21 10:38 AM, Vladimir Sementsov-Ogievskiy wrote: >> 6/36 Checking commit 5780b805277e (block: drop ctx argument from >> bdrv_root_attach_child) >> 7/36 Checking commit 68189c099a3a (block: make bdrv_reopen_{prepare, >> commit, abort} private) >> ERROR: Author email address is mangled by th

Re: [RFC PATCH 5/8] qtest/libqos: Restrict CPU I/O instructions

2021-03-17 Thread Laszlo Ersek
On 03/17/21 17:24, Philippe Mathieu-Daudé wrote: > On 3/17/21 4:59 PM, Laszlo Ersek wrote: >> If this is about an "IO Bus" or "IO instructions", then we should call >> the macro TARGET_HAS_IO_BUS or "TARGET_ISA_HAS_IO" (or >> "TARGET_HAS_IO_INSNS"), or something like those. My only confusion was >

Re: [PATCH v3 1/3] hw: Model ASPEED's Hash and Crypto Engine

2021-03-17 Thread Cédric Le Goater
On 3/17/21 2:13 PM, Philippe Mathieu-Daudé wrote: > > > On 3/17/21 1:36 PM, Cédric Le Goater wrote: >> On 3/17/21 12:47 PM, Philippe Mathieu-Daudé wrote: >>> On 3/12/21 11:57 AM, Joel Stanley wrote: The HACE (Hash and Crypto Engine) is a device that offloads MD5, SHA1, SHA2, RSA and oth

Re: [RFC PATCH] support.md: add a link to matrix bridge to IRC

2021-03-17 Thread Paolo Bonzini
On 17/03/21 17:02, Alex Bennée wrote: We want users to be able to use newer tooling and not be stuck with IRC like the rest of the fossils. As the #QEMU channel is bridged by the matrix.org server lets point there as well. At least it's not Slack. Signed-off-by: Alex Bennée --- support.md | 1

[PATCH v1 0/5] RISC-V: Convert the CSR access functions to use

2021-03-17 Thread Alistair Francis
Alistair Francis (5): target/riscv: Convert the RISC-V exceptions to an enum target/riscv: Use the RiscVException enum for CSR predicates target/riscv: Fix 32-bit HS mode access permissions target/riscv: Use the RiscVException enum for CSR operations target/riscv: Use RiscVException enu

[PATCH v4 0/6] Allow changing bs->file on reopen

2021-03-17 Thread Alberto Garcia
Based-on: <20210317143529.615584-1-vsement...@virtuozzo.com> Hello, this is the same as v3, but rebased on top of Vladimir's "block: update graph permissions update v3", which you can get here: git: https://src.openvz.org/scm/~vsementsov/qemu.git tag: up-block-topologic-perm-v3 Tip: you may fin

[PATCH v1 1/5] target/riscv: Convert the RISC-V exceptions to an enum

2021-03-17 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/cpu_bits.h | 44 --- target/riscv/cpu.c| 2 +- target/riscv/cpu_helper.c | 4 ++-- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h in

[PATCH v4 6/6] block: Make blockdev-reopen stable API

2021-03-17 Thread Alberto Garcia
This patch drops the 'x-' prefix from x-blockdev-reopen. Signed-off-by: Alberto Garcia --- qapi/block-core.json | 6 +++--- blockdev.c | 2 +- tests/qemu-iotests/155 | 2 +- tests/qemu-iotests/165 | 2 +- tests/qemu-iotests/245 | 10 +- tests/qemu-io

[PATCH v1 2/5] target/riscv: Use the RiscVException enum for CSR predicates

2021-03-17 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/cpu.h | 3 +- target/riscv/csr.c | 80 +- 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 0edb2826a2..073a994d13 100644 --- a/target/riscv/c

Re: [RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions

2021-03-17 Thread Paolo Bonzini
On 15/03/21 06:14, Thomas Huth wrote: diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index ee8c17a04c4..3e0089f4a63 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -304,6 +304,13 @@ static bool get_io_address(address_range *re

[PATCH v4 2/6] block: Allow changing bs->file on reopen

2021-03-17 Thread Alberto Garcia
When the x-blockdev-reopen was added it allowed reconfiguring the graph by replacing backing files, but changing the 'file' option was forbidden. Because of this restriction some operations are not possible, notably inserting and removing block filters. This patch adds support for replacing the 'f

Re: [PATCH 4/6] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-17 Thread David Edmondson
On Wednesday, 2021-03-17 at 18:19:58 +01, Paolo Bonzini wrote: > On 17/03/21 16:17, David Edmondson wrote: >>> +if (tkt) { >>> +if (tkt->read) { >>> +if (lock->owners >= 0) { >>> +lock->owners++; >>> +co = tkt->co; >>> +} >>> +

[PATCH v1 5/5] target/riscv: Use RiscVException enum for CSR access

2021-03-17 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/cpu.h | 11 +++ target/riscv/csr.c | 37 ++--- target/riscv/gdbstub.c | 8 target/riscv/op_helper.c | 18 +- 4 files changed, 38 insertions(+), 36 deletions(-) diff --

[PATCH v4 4/6] block: Support multiple reopening with x-blockdev-reopen

2021-03-17 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- qapi/block-core.json | 18 + blockdev.c | 78 +++--- tests/qemu-iotests/155 | 9 +++-- tests/qemu-iotests/165 | 4 +- tests/qemu-iotests/245 | 27 +++-- tests/qemu-iotests/248

Re: [PATCH 0/3] target/riscv: fix PMP permission checking when softmmu's TLB hits

2021-03-17 Thread Alistair Francis
On Sun, Feb 21, 2021 at 10:33 AM Jim Shu wrote: > > Sorry for sending this patch set again. > The cover letter of my previous mail doesn't add cc list. > --- > > Current implementation of PMP permission checking only has effect when > softmmu's TLB miss. PMP checking is bypassed when TLB hits beca

[PATCH v1 3/5] target/riscv: Fix 32-bit HS mode access permissions

2021-03-17 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/csr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index da9baff6fb..d10f47c3fb 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -181,7 +181,11 @@ static RiscVException

[PATCH v2] target/ppc/kvm: Cache timebase frequency

2021-03-17 Thread Greg Kurz
Each vCPU core exposes its timebase frequency in the DT. When running under KVM, this means parsing /proc/cpuinfo in order to get the timebase frequency of the host CPU. The parsing appears to slow down the boot quite a bit with higher number of cores: # of cores seconds spent in spapr_dt_cpu

[PATCH v1 4/5] target/riscv: Use the RiscVException enum for CSR operations

2021-03-17 Thread Alistair Francis
Signed-off-by: Alistair Francis --- target/riscv/cpu.h | 14 +- target/riscv/csr.c | 658 +++-- 2 files changed, 398 insertions(+), 274 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 073a994d13..7af9fff776 100644 --- a/target/risc

[PATCH v5 0/6] coroutine rwlock downgrade fix, minor VDI changes

2021-03-17 Thread Paolo Bonzini
This is a resubmit of David Edmondson's series at https://patchew.org/QEMU/20210309144015.557477-1-david.edmond...@oracle.com/. After closer analysis on IRC, the CoRwlock's attempt to ensure fairness turned out to be flawed. Therefore, this series reimplements CoRwlock without using a CoQueue. Tr

[PATCH 5/6] test-coroutine: add rwlock upgrade test

2021-03-17 Thread Paolo Bonzini
Test that rwlock upgrade is fair, and readers go back to sleep if a writer is in line. Signed-off-by: Paolo Bonzini --- tests/unit/test-coroutine.c | 62 + 1 file changed, 62 insertions(+) diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c

[PATCH 3/6] coroutine/mutex: Store the coroutine in the CoWaitRecord only once

2021-03-17 Thread Paolo Bonzini
From: David Edmondson When taking the slow path for mutex acquisition, set the coroutine value in the CoWaitRecord in push_waiter(), rather than both there and in the caller. Reviewed-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Edmondson Message-Id: <20210309144

Re: [PATCH v3 00/36] block: update graph permissions update

2021-03-17 Thread Eric Blake
On 3/17/21 12:33 PM, Eric Blake wrote: > On 3/17/21 10:38 AM, Vladimir Sementsov-Ogievskiy wrote: > >>> 6/36 Checking commit 5780b805277e (block: drop ctx argument from >>> bdrv_root_attach_child) >>> 7/36 Checking commit 68189c099a3a (block: make bdrv_reopen_{prepare, >>> commit, abort} private)

[PATCH 2/6] block/vdi: Don't assume that blocks are larger than VdiHeader

2021-03-17 Thread Paolo Bonzini
From: David Edmondson Given that the block size is read from the header of the VDI file, a wide variety of sizes might be seen. Rather than re-using a block sized memory region when writing the VDI header, allocate an appropriately sized buffer. Signed-off-by: David Edmondson Message-Id: <20210

<    1   2   3   4   5   >