Re: [RFC v3 06/29] virtio-net: Honor VIRTIO_CONFIG_S_DEVICE_STOPPED

2021-06-01 Thread Eugenio Perez Martin
On Wed, May 26, 2021 at 3:10 AM Jason Wang wrote: > > > 在 2021/5/26 上午9:06, Jason Wang 写道: > > > > 在 2021/5/20 上午12:28, Eugenio Pérez 写道: > >> So the guest can stop and start net device. It implements the RFC > >> https://lists.oasis-open.org/archives/virtio-comment/202012/msg00027.html > >> > >>

Re: [PATCH v3] docs/secure-coding-practices: Describe how to use 'null-co' block driver

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
01.06.2021 08:35, Philippe Mathieu-Daudé wrote: Document that security reports must use 'null-co,read-zeroes=on' because otherwise the memory is left uninitialized (which is an on-purpose performance feature). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Vladimir Sementsov-Ogievskiy --

Re: [RFC v3 13/29] vhost: Add vhost_get_iova_range operation

2021-06-01 Thread Eugenio Perez Martin
On Thu, May 27, 2021 at 6:51 AM Jason Wang wrote: > > > 在 2021/5/27 上午1:49, Eugenio Perez Martin 写道: > > On Wed, May 26, 2021 at 3:14 AM Jason Wang wrote: > >> > >> 在 2021/5/20 上午12:28, Eugenio Pérez 写道: > >>> For simplicity, If a device does not support this operation it means > >>> that it can

Re: [PATCH] hw/nvme: add param to control auto zone transitioning to zone state closed

2021-06-01 Thread Niklas Cassel
On Mon, May 31, 2021 at 09:39:20PM +0200, Klaus Jensen wrote: > On May 31 15:42, Niklas Cassel wrote: > > On Fri, May 28, 2021 at 01:22:38PM +0200, Klaus Jensen wrote: > > > On May 28 11:05, Niklas Cassel wrote: > > > > From: Niklas Cassel > > > > > > > > In the Zoned Namespace Command Set Specifi

Re: [RFC v3 15/29] vhost: Add enable_custom_iommu to VhostOps

2021-06-01 Thread Eugenio Perez Martin
On Mon, May 31, 2021 at 11:02 AM Jason Wang wrote: > > > 在 2021/5/20 上午12:28, Eugenio Pérez 写道: > > This operation enable the backend-specific IOTLB entries. > > > > If a backend support this, it start managing its own entries, and vhost > > can disable it through this operation and recover contro

Re: [PATCH] hw/arm/boot: Use NUMA node ID in memory node name

2021-06-01 Thread Andrew Jones
On Tue, Jun 01, 2021 at 03:30:04PM +0800, Gavin Shan wrote: > We possibly populate empty nodes where memory isn't included and might > be hot added at late time. The FDT memory nodes can't be created due > to conflicts on their names if multiple empty nodes are specified. > For example, the VM fail

[PATCH v3 0/6] block permission updated follow-up

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
v3: 02: add article 04: new 05: improve commit message, add assertion 06: rewrite error message Based-on: Kevin's block branch Vladimir Sementsov-Ogievskiy (6): block: document child argument of bdrv_attach_child_common() block-backend: improve blk_root_get_parent_desc() block: improve bdrv

[PATCH v3 3/6] block: improve bdrv_child_get_parent_desc()

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
We have different types of parents: block nodes, block backends and jobs. So, it makes sense to specify type together with name. Next, this handler us used to compose an error message about permission conflict. And permission conflict occurs in a specific place of block graph. We shouldn't report

[PATCH v3 1/6] block: document child argument of bdrv_attach_child_common()

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
The logic around **child is not obvious: this reference is used not only to return resulting child, but also to rollback NULL value on transaction abort. So, let's add documentation and some assertions. While being here, drop extra declaration of bdrv_attach_child_noperm(). Signed-off-by: Vladim

[PATCH v3 6/6] block: improve permission conflict error message

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
Now permissions are updated as follows: 1. do graph modifications ignoring permissions 2. do permission update (of course, we rollback [1] if [2] fails) So, on stage [2] we can't say which users are "old" and which are "new" and exist only since [1]. And current error message is a bit outdated

[PATCH v3 5/6] block: simplify bdrv_child_user_desc()

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
All child classes have this callback. So, drop unreachable code. Still add an assertion to bdrv_attach_child_common(), to early detect bad classes. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/block.c b/block.

[PATCH v3 4/6] block/vvfat: inherit child_vvfat_qcow from child_of_bds

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
Recently we've fixed a crash by adding .get_parent_aio_context handler to child_vvfat_qcow. Now we want it to support .get_parent_desc as well. child_vvfat_qcow wants to implement own .inherit_options, it's not bad. But omitting all other handlers is a bad idea. Let's inherit the class from child_o

[PATCH v3 2/6] block-backend: improve blk_root_get_parent_desc()

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
We have different types of parents: block nodes, block backends and jobs. So, it makes sense to specify type together with name. While being here also use g_autofree. iotest 307 output is updated. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/block-backend.

Re: [PATCH v3 4/5] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
17.05.2021 17:50, Emanuele Giuseppe Esposito wrote: That would be unsafe in case a rule other than the current one is removed while the coroutine has yielded. Keep FOREACH_SAFE because suspend_request deletes the current rule. After this patch, *all* matching rules are deleted before suspending

Re: [RFC PATCH] configure: allow the overriding of default-config in the build

2021-06-01 Thread Philippe Mathieu-Daudé
On 5/28/21 6:31 PM, Alex Bennée wrote: > While the default config works well enough it does end up enabling a > lot of stuff. For more minimal builds we can pass a slimmed down list > of devices and let Kconfig work out what we want. For example: > > ../../configure --without-default-features \

Re: [RFC v3 21/29] vhost: Add VhostIOVATree

2021-06-01 Thread Eugenio Perez Martin
On Mon, May 31, 2021 at 11:40 AM Jason Wang wrote: > > > 在 2021/5/20 上午12:28, Eugenio Pérez 写道: > > This tree is able to look for a translated address from a IOVA address. > > > > At first glance is similar to util/iova-tree. However, SVQ working on > > devices with limited IOVA space need more ca

Re: [PATCH v3 5/5] blkdebug: protect rules and suspended_reqs with a lock

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
17.05.2021 17:50, Emanuele Giuseppe Esposito wrote: Co-developed-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito --- block/blkdebug.c | 53 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/block/blkdebug.c b/block/bl

RE: [RFC] KVM: x86: Support KVM VMs sharing SEV context

2021-06-01 Thread Kalra, Ashish
[AMD Public Use] To add, using this alternative approach and handling KVM_EXIT_IO using kvm_handle_io, still requires CPUState{..} structure and the backing "X86CPU" structure, for example, as part of kvm_arch_post_run() to get the MemTxAttrs needed by kvm_handle_io(). Or the other option is t

[Bug 1926111] Re: Assertion `tx_queue_idx <= s->txq_num' failed in vmxnet3_io_bar0_write

2021-06-01 Thread Thomas Huth
I can reproduce this issue with the latest version of QEMU. Marking as "Confirmed" ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1926111 Title:

[RFC PATCH] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-01 Thread Alex Bennée
The previous numbers were a guess at best. While we could extract the information from a loaded ELF file via -kernel we could still get tripped up by self decompressing or relocating code. Besides sane library code has access to the same symbols in run time to make a determination of the location o

Re: [PATCH v2 22/33] qapi: publish copy-before-write filter

2021-06-01 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 2ea294129e..8c4801a

Re: [RFC PATCH] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-01 Thread Peter Maydell
On Tue, 1 Jun 2021 at 10:12, Alex Bennée wrote: > > The previous numbers were a guess at best. While we could extract the > information from a loaded ELF file via -kernel we could still get > tripped up by self decompressing or relocating code. Besides sane > library code has access to the same sy

Re: [PULL 0/2] Libslirp patches

2021-06-01 Thread Peter Maydell
On Sat, 29 May 2021 at 19:55, wrote: > > From: Marc-André Lureau > > The following changes since commit 62c0ac5041e9130b041adfa13a41583d3c3ddd24: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210526' > into staging (2021-05-28 16:25:21 +0100) > > are available in the Git

Re: [PATCH v2 23/33] python/qemu/machine.py: refactor _qemu_args()

2021-06-01 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: - use shorter construction - don't create new dict if not needed - drop extra unpacking key-val arguments - drop extra default values Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/machine.py | 18 --

Re: [RFC PATCH] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-01 Thread Alex Bennée
Peter Maydell writes: > On Tue, 1 Jun 2021 at 10:12, Alex Bennée wrote: >> >> The previous numbers were a guess at best. While we could extract the >> information from a loaded ELF file via -kernel we could still get >> tripped up by self decompressing or relocating code. Besides sane >> libra

[RFC PATCH] docs/specs: QMP configuration design specification

2021-06-01 Thread Mirela Grujic
This document describes the design specification for the configuration of machines using QMP. The QMP configuration will be built on top of the existing: 1) machine initialization phases 2) -preconfig command line option 3) x-exit-preconfig QMP command We plan to implement query-machine-phase and

Re: [PATCH v2 24/33] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-01 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it things that passed unpacked dict is a s/things/thinks/ positional argument and complains that it type should be bool (because second argument

Re: [RFC PATCH] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-01 Thread Peter Maydell
On Tue, 1 Jun 2021 at 11:07, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Tue, 1 Jun 2021 at 10:12, Alex Bennée wrote: > >> > >> The previous numbers were a guess at best. While we could extract the > >> information from a loaded ELF file via -kernel we could still get > >> tripped up

Re: [PATCH] replay: improve determinism of virtio-net

2021-06-01 Thread Pavel Dovgalyuk
On 31.05.2021 09:39, Jason Wang wrote: 在 2021/5/31 下午2:35, Pavel Dovgalyuk 写道: On 31.05.2021 07:55, Jason Wang wrote: 在 2021/5/17 下午9:04, Pavel Dovgalyuk 写道: virtio-net device uses bottom halves for callbacks. These callbacks should be deterministic, because they affect VM state. This patch

Re: [PULL 00/44] Python patches

2021-06-01 Thread Peter Maydell
On Sun, 30 May 2021 at 20:22, John Snow wrote: > > On 5/30/21 3:09 PM, Peter Maydell wrote: > > Fails to build on my machine that runs the BSD VMs, apparently > > before it gets to the point of launching the VM: > When I have seen this error message in the past, it has been because of > using a n

[Bug 1879955] Re: target/i386/seg_helper.c: 16-bit TSS struct format wrong?

2021-06-01 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/382 ** Changed in: qemu Status: Incomplete => Expired ** Bu

Re: [RFC PATCH] configure: allow the overriding of default-config in the build

2021-06-01 Thread Paolo Bonzini
On 28/05/21 18:31, Alex Bennée wrote: + --with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-cc-FOO option" Extra "cc". Looks pretty good otherwise, possible tweaks include: 1) check that the architecture exists (i.e. that it there is a valid softmmu target named after

Re: [PATCH v2 25/33] iotests.py: VM: add own __enter__ method

2021-06-01 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: In superclass __enter__ method is defined with return value type hint 'QEMUMachine'. So, mypy thinks that return value of VM.__enter__ is QEMUMachine. Let's redefine __enter__ in VM class, to give it correct type hint. Signed-off-by: Vladimi

Re: [PATCH v3 1/1] yank: Unregister function when using TLS migration

2021-06-01 Thread Lukas Straub
On Tue, 1 Jun 2021 02:40:31 -0300 Leonardo Bras wrote: > After yank feature was introduced in migration, whenever migration > is started using TLS, the following error happens in both source and > destination hosts: > > (qemu) qemu-kvm: ../util/yank.c:107: yank_unregister_instance: > Assertion

Re: [PULL 0/2] Libslirp patches

2021-06-01 Thread Marc-André Lureau
Hi Peter On Tue, Jun 1, 2021 at 1:17 PM Peter Maydell wrote: > On Sat, 29 May 2021 at 19:55, wrote: > > > > From: Marc-André Lureau > > > > The following changes since commit > 62c0ac5041e9130b041adfa13a41583d3c3ddd24: > > > > Merge remote-tracking branch > 'remotes/rth-gitlab/tags/pull-tcg-

Re: [PATCH v3] docs/secure-coding-practices: Describe how to use 'null-co' block driver

2021-06-01 Thread Kevin Wolf
Am 01.06.2021 um 07:35 hat Philippe Mathieu-Daudé geschrieben: > Document that security reports must use 'null-co,read-zeroes=on' > because otherwise the memory is left uninitialized (which is an > on-purpose performance feature). > > Signed-off-by: Philippe Mathieu-Daudé > --- > v3: Simplified u

Re: [RFC PATCH 1/3] plugins: Added a new cache modelling plugin

2021-06-01 Thread Alex Bennée
Mahmoud Mandour writes: > Added a cache modelling plugin that uses a static configuration used in > many of the commercial microprocessors and uses random eviction policy. > > Signed-off-by: Mahmoud Mandour > --- > contrib/plugins/Makefile | 1 + > contrib/plugins/cache.c | 398 +++

Re: [PATCH v2 26/33] iotests/222: fix pylint and mypy complains

2021-06-01 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: Here: - long line - move to new interface of vm.qmp() (direct passing dict), to avoid mypy false-positive, as it thinks that unpacked dict is a positional argument. - extra parenthesis - handle event_wait possible None value

Re: [PATCH v2 27/33] iotests/222: constantly use single quotes for strings

2021-06-01 Thread Max Reitz
On 20.05.21 16:21, Vladimir Sementsov-Ogievskiy wrote: The file use both single and double quotes for strings. Let's be consistent. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/222 | 68 +- 1 file changed, 34 insertions(+), 34 del

Re: [PATCH v2 28/33] iotests: move 222 to tests/image-fleecing

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: Give a good name to test file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/{222 => tests/image-fleecing} | 0 tests/qemu-iotests/{222.out => tests/image-fleecing.out} | 0 2 files changed, 0 insertions(+),

Re: [PATCH v2 29/33] iotests.py: hmp_qemu_io: support qdev

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz

Re: [RFC PATCH v2 2/3] plugins: cache: Enabled parameterization and added trace printing

2021-06-01 Thread Alex Bennée
(Stefan CC'ed for tracing discussion) Mahmoud Mandour writes: > Made both icache and dcache configurable through plugin arguments > and added memory trace printing in a separate file. Please keep the commits discreet and single topic. The memory trace is an extra feature so should be in it's

Re: [PATCH v2 30/33] iotests/image-fleecing: proper source device

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: Define scsi device to operate with it by qom-set in further patch. Give a new node-name to source block node, to not look like device name. Job now don't want to work without giving explicit id, so, let's call it "fleecing". Signed-off-by:

Re: [PATCH 1/2] block/file-posix: Fix problem with fallocate(PUNCH_HOLE) on GPFS

2021-06-01 Thread Kevin Wolf
Am 27.05.2021 um 19:20 hat Thomas Huth geschrieben: > A customer reported that running > > qemu-img convert -t none -O qcow2 -f qcow2 input.qcow2 output.qcow2 > > fails for them with the following error message when the images are > stored on a GPFS file system : > > qemu-img: error while writ

Re: [PATCH v1 1/1] target/riscv: Use target_ulong for the DisasContext misa

2021-06-01 Thread Bin Meng
On Mon, May 31, 2021 at 12:27 PM Alistair Francis wrote: > > The is_32bit() check in translate.c expects a 64-bit guest to have a > 64-bit misa value otherwise the macro check won't work. This patches > fixes that and fixes a Coverity issue at the same time. > > Fixes: CID 1453107 > Signed-off-by:

Re: [PATCH v2 31/33] iotests/image-fleecing: rename tgt_node

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: Actually target of backup(sync=None) is not a final backup target: image fleecing is intended to be used with external tool, which will copy data from fleecing node to some real backup target. Also, we are going to add a test case for "push

Re: [PATCH v2 32/33] iotests/image-fleecing: prepare for adding new test-case

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: We are going to add a test-case with some behavior modifications. So, let's prepare a function to be reused. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 19 +-- 1 file changed

Re: [PATCH v1 1/3] hw/char/ibex_uart: Make the register layout private

2021-06-01 Thread Bin Meng
On Mon, May 31, 2021 at 12:33 PM Alistair Francis wrote: > > We don't need to expose the register layout in the public header, so > don't. > > Signed-off-by: Alistair Francis > --- > include/hw/char/ibex_uart.h | 37 - > hw/char/ibex_uart.c | 37 ++

Re: [PATCH v2] docs/devel: Explain in more detail the TB chaining mechanisms

2021-06-01 Thread Bruno Piazera Larsen
I don't know enough about the technical information to say if the docs are correct, but there were 2 paragraphs where I think wording could be improved to make the explanation more clear. On 31/05/2021 18:14, Luis Pires wrote: Signed-off-by: Luis Pires --- v2: - s/outer execution loop/main

Re: [PATCH v2 33/33] iotests/image-fleecing: add test-case for copy-before-write filter

2021-06-01 Thread Max Reitz
On 20.05.21 16:22, Vladimir Sementsov-Ogievskiy wrote: New fleecing method becomes available: copy-before-write filter. Actually we don't need backup job to setup image fleecing. Add test for new recommended way of image fleecing. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-io

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-06-01 Thread Alexey Kardashevskiy
On 31/05/2021 23:07, BALATON Zoltan wrote: On Sun, 30 May 2021, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c new file mode 100644 index ..a283b7d251a7 --- /dev/null +++ b/hw/ppc/vof.c @@ -0,0 +1,1021 @@ +/* + * QE

Re: [PATCH v3] migration/dirtyrate: make sample page count configurable

2021-06-01 Thread Hyman Huang
Ping though dirtyrate by sampling page may kind of be inaccurate, it still valuable for those who run qemu on non-x86 or kernel which does not support dirty ring, this patch is necessary i think, what would you think of it ? 在 2021/5/11 22:21, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇)

RE: [PATCH v2] docs/devel: Explain in more detail the TB chaining mechanisms

2021-06-01 Thread Luis Fernando Fujita Pires
From: Bruno Piazera Larsen > I feel like there is either a comma missing or the paragraph can be reordered > a bit here. The way it is written means that there are many cases where the > TB is already available and you'll be explaining how the handle the most > common of such cases, but by cha

Re: [PATCH v2 0/2] target/s390x: Fix SIGILL psw.addr reporting

2021-06-01 Thread Ilya Leoshkevich
On Fri, 2021-05-21 at 13:19 +0200, Ilya Leoshkevich wrote: > qemu-s390x puts a wrong value into SIGILL's siginfo_t's psw.addr: it > should be a pointer to the instruction following the illegal > instruction, but at the moment it is a pointer to the illegal > instruction itself. This breaks OpenJDK,

[PATCH v3] docs/devel: Explain in more detail the TB chaining mechanisms

2021-06-01 Thread Luis Pires
Signed-off-by: Luis Pires --- v3: - Dropped "most common" from the sentence introducing the chaining mechanisms - Changed wording about using the TB address returned by exit_tb v2: - s/outer execution loop/main loop - Mention re-evaluation of cpu_exec_interrupt() - Changed wording on lookup_

Re: [PATCH v1 2/3] hw/timer: Initial commit of Ibex Timer

2021-06-01 Thread Bin Meng
On Mon, May 31, 2021 at 12:33 PM Alistair Francis wrote: Please write some commit message, for example, what is supported in this initial version, and what is not. > > Signed-off-by: Alistair Francis > --- > include/hw/timer/ibex_timer.h | 52 ++ > hw/timer/ibex_timer.c | 305

Re: [PATCH v1 3/3] hw/riscv: OpenTitan: Connect the mtime and mtimecmp timer

2021-06-01 Thread Bin Meng
On Mon, May 31, 2021 at 12:33 PM Alistair Francis wrote: > Please write some commit message here > Signed-off-by: Alistair Francis > --- > include/hw/riscv/opentitan.h | 5 - > hw/riscv/opentitan.c | 14 +++--- > 2 files changed, 15 insertions(+), 4 deletions(-) > > diff -

Re: [RFC PATCH] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-01 Thread Andrew Strauss
Yeah, newlib falls back to using the symbols __stack and end to figure out where to start the stack and heap if 0 is returned by SYS_HEAPINFO. -- Andrew Strauss On Tue, Jun 1, 2021 at 6:31 AM Peter Maydell wrote: > On Tue, 1 Jun 2021 at 11:07, Alex Bennée wrote: > > > > > > Peter Maydell writ

Re: [RFC PATCH] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-01 Thread Andrew Strauss
Tested-by: Andrew Strauss Reviewed-by: Andrew Strauss On Tue, Jun 1, 2021 at 5:07 AM Alex Bennée wrote: > The previous numbers were a guess at best. While we could extract the > information from a loaded ELF file via -kernel we could still get > tripped up by self decompressing or relocating c

[PATCH v4 03/13] trace: add trace_event_iter_init_group

2021-06-01 Thread Gerd Hoffmann
This allows to interate over an event group. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/control.h | 13 + trace/control.c | 19 --- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/trace/control.h b/trace/control.h index ce40bd

[PATCH v4 02/13] trace: iter init tweaks

2021-06-01 Thread Gerd Hoffmann
Rename trace_event_iter_init() to trace_event_iter_init_pattern(), add trace_event_iter_init_all() for interating over all events. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/control.h| 17 + monitor/misc.c | 4 ++-- trace/control-target.

[PATCH v4 00/13] [RfC] fix tracing for modules

2021-06-01 Thread Gerd Hoffmann
First version that actually works. Only qxl covered for this RfC, other modules will follow once the basics are hashed out. v4: - rebase to latest master. - fix systemtap tracing. - also cover virtio-gpu modules. - pick up some review tags. - misc minor tweaks. v3: - handle initialization

[PATCH v4 08/13] meson: add module_trace & module_trace_src

2021-06-01 Thread Gerd Hoffmann
module_trace is a dict which keeps track of the trace source files for a module. module_trace_src collects the trace source files for a given trace-events file, which then either added to the source set or to a new module_trace dict depending on whenever they are for a module or core qemu. Signed

[PATCH v4 09/13] trace/stap: build stap files for modules

2021-06-01 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- meson.build | 32 trace/meson.build | 5 +++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 0e1c2f995d79..51fc261a22d3 100644 --- a/meson.build +++ b/meson.build @@ -2020,6

[PATCH v4 04/13] trace/simple: pass iter to st_write_event_mapping

2021-06-01 Thread Gerd Hoffmann
Pass an iter to st_write_event_mapping, so the function can interate different things depending on how we initialize the iter. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/simple.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trace/simple

[PATCH v4 12/13] meson: move virtio trace events to separate file

2021-06-01 Thread Gerd Hoffmann
Move virtio-gpu trace events to separate trace-events-virtio file. Signed-off-by: Gerd Hoffmann --- hw/display/trace-virtio.h | 1 + hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-gpu.c| 2 +- hw/display/meson.build | 4 hw/display/trace-events| 17

[PATCH v4 10/13] meson: move qxl trace events to separate file

2021-06-01 Thread Gerd Hoffmann
Move qxl trace events to separate trace-events-qxl file. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- hw/display/trace-qxl.h | 1 + hw/display/qxl-render.c | 2 +- hw/display/qxl.c| 2 +- hw/display/meson.build | 4 +++ hw/display/trace-events

[PATCH v4 01/13] qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful.

2021-06-01 Thread Gerd Hoffmann
Setting SYSTEMTAP_TAPSET to some value other than /usr/share/systemtap/tapsets results in systemtap not finding the standard tapset library any more, which in turn breaks tracing because pid() and other standard systemtap functions are not available any more. So using SYSTEMTAP_TAPSET to point sys

[PATCH v4 13/13] meson: move virtio-gl trace events to separate file

2021-06-01 Thread Gerd Hoffmann
Move virtio-gpu-gl trace events to separate trace-events-virtio-gl file. Signed-off-by: Gerd Hoffmann --- hw/display/trace-virtio-gl.h | 1 + hw/display/virtio-gpu-virgl.c | 2 +- hw/display/meson.build| 4 hw/display/trace-events | 19 ---

[PATCH v4 11/13] virtio-gpu: split trace points

2021-06-01 Thread Gerd Hoffmann
Create separate trace points for the simple and virgl variants of the virtio-gpu device. Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu-virgl.c | 48 +-- hw/display/trace-events | 30 ++ 2 files changed, 43 insertions(+), 35 delet

[PATCH v4 05/13] trace/simple: add st_init_group

2021-06-01 Thread Gerd Hoffmann
Add helper function and call it for each trace event group added. Makes sure that events added at module load time are initialized properly. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- trace/simple.h | 1 + trace/control.c | 4 trace/simple.c | 12 3 file

Re: [RFC PATCH v2 3/3] plugins: cache: Added FIFO and LRU eviction policies.

2021-06-01 Thread Alex Bennée
Mahmoud Mandour writes: > Now one of the three eviction policies can be chosen as an argument. On > not specifying an argument, LRU is used by default. > > Signed-off-by: Mahmoud Mandour > --- > contrib/plugins/cache.c | 159 > 1 file changed, 146 inse

Re: [PATCH v3] target/i386/sev: add support to query the attestation report

2021-06-01 Thread Eduardo Habkost
On Mon, May 31, 2021 at 04:01:16PM -0400, Eduardo Habkost wrote: > On Thu, Apr 29, 2021 at 12:07:28PM -0500, Brijesh Singh wrote: > > The SEV FW >= 0.23 added a new command that can be used to query the > > attestation report containing the SHA-256 digest of the guest memory > > and VMSA encrypted

[PATCH v4 06/13] meson: add trace_events_config[]

2021-06-01 Thread Gerd Hoffmann
It's an array of dicts, where each dict holds the configuration for one trace-events file. For now just fill it from trace_events_subdirs. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi --- meson.build | 1 + trace/meson.build | 18 +++--- 2 files changed, 16 inse

Re: About the performance of hyper-v

2021-06-01 Thread Liang Li
== > > Analyze events for all VMs, all VCPUs: > > VM-EXITSamples Samples% Time%Min TimeMax > > Time Avg time > >MSR_WRITE 92404589.96%81.10% 0.42us > > 68.42us 1.26us ( +- 0.07% ) > >DR_ACC

[PATCH v4 07/13] meson: move up hw subdir (specifically before trace subdir)

2021-06-01 Thread Gerd Hoffmann
Needed so trace/meson.build can see trace_events_config[] changes done in hw/*/meson.build. Signed-off-by: Gerd Hoffmann --- meson.build | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 84a9e17533cb..b1f2e7920977 100644 --- a/meson.build +++

Re: [RFC PATCH v2 0/3] Cache modelling TCG plugin

2021-06-01 Thread Alex Bennée
Mahmoud Mandour writes: > In this RFC patch series, I propose an initial cache modelling TCG > plugin. As of now, it models separate L1 data cache and L1 instruction > cache. It supports three eviction policies: LRU, random, and FIFO. Once > a policy is chosen, it's used for both instruction an

Re: [PATCH] target/nios2: Mark raise_exception() as noreturn

2021-06-01 Thread Richard Henderson
On 5/31/21 2:30 AM, Philippe Mathieu-Daudé wrote: Raised exceptions don't return, so mark the helper with TCG_CALL_NO_RETURN. Fixes: 032c76bc6f9 ("nios2: Add architecture emulation support") Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/helper.h | 2 +- 1 file changed, 1 insertion(+

Re: [PATCH] hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds

2021-06-01 Thread Hyman
在 2021/6/1 8:57, Peter Xu 写道: These two commands are missing when adding the QMP sister commands. Add them, so developers can play with them easier. Cc: Dr. David Alan Gilbert Cc: Juan Quintela Cc: Leonardo Bras Soares Passos Cc: Chuan Zheng Cc: huang...@chinatelecom.cn Signed-off-by: Pe

Re: HSS Issue with GCC 10, Qemu Setup for microchip-icicle-kit

2021-06-01 Thread Bin Meng
Hi Rahul, On Tue, Jun 1, 2021 at 11:12 AM Rahul Pathak wrote: > > Hi BIn,Alistair, > > I was passing the hss.elf file and it was strange that gdb after connecting > was not letting the target to continue from gdb. This is the expected behavior if you pass an image to gdb before connecting to th

[PATCH 1/1] amd_iommu: fix device entry invalidation

2021-06-01 Thread Roman Kapl
Since QEMU maintains TLB entries keyed by the device ID, there is no separate device entry cache. This means we need to invalidate all translations keyed by the device ID. Signed-off-by: Roman Kapl --- hw/i386/amd_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i386/amd_iommu.c

Re: [PATCH v3] migration/dirtyrate: make sample page count configurable

2021-06-01 Thread Peter Xu
On Tue, Jun 01, 2021 at 08:09:34PM +0800, Hyman Huang wrote: > Ping > > though dirtyrate by sampling page may kind of be inaccurate, > it still valuable for those who run qemu on non-x86 or kernel > which does not support dirty ring, this patch is necessary i > think, what would you think of it ?

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-06-01 Thread BALATON Zoltan
On Tue, 1 Jun 2021, Alexey Kardashevskiy wrote: On 31/05/2021 23:07, BALATON Zoltan wrote: On Sun, 30 May 2021, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c new file mode 100644 index ..a283b7d251a7 --- /dev/null ++

[PATCH v2] hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds

2021-06-01 Thread Peter Xu
These two commands are missing when adding the QMP sister commands. Add them, so developers can play with them easier. Cc: Dr. David Alan Gilbert Cc: Juan Quintela Cc: Leonardo Bras Soares Passos Cc: Chuan Zheng Cc: huang...@chinatelecom.cn Signed-off-by: Peter Xu --- v2: - rebase to "migrat

Re: HSS Issue with GCC 10, Qemu Setup for microchip-icicle-kit

2021-06-01 Thread Rahul Pathak
Hi Bin, Thanks for the response. I think the issue currently is that if I keep the "wait=on" and launch minicom on "unix\#serial1.sock" then nothing happens. Qemu keeps waiting for the connection on serial1 and no logs for uboot and Kernel appears on the serial1. Thanks Rahul On Tue, Jun 1, 20

[PATCH] tests/tcg/linux-test: Fix random hangs in test_socket

2021-06-01 Thread Ilya Leoshkevich
test_socket hangs randomly in connect(), especially when run without qemu. Apparently the reason is that linux started treating backlog value of 0 literally instead of rounding it up since v4.4 (commit ef547f2ac16b). So set it to 1 instead. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarc

Re: [PATCH] sockets: update SOCKET_ADDRESS_TYPE_FD listen(2) backlog

2021-06-01 Thread Stefan Hajnoczi
Please consider this patch for the QEMU 6.0 stable release. The bug was introduced in QEMU 6.0. Thanks, Stefan On Wed, Mar 10, 2021 at 5:54 PM Stefan Hajnoczi wrote: > > socket_get_fd() fails with the error "socket_get_fd: too many > connections" if the given listen backlog value is not 1. > > N

Re: [PATCH 1/1] amd_iommu: fix device entry invalidation

2021-06-01 Thread Philippe Mathieu-Daudé
On 6/1/21 4:10 PM, Roman Kapl wrote: > Since QEMU maintains TLB entries keyed by the device ID, there is no separate > device entry cache. This means we need to invalidate all translations keyed by > the device ID. > Fixes: d29a09ca684 ("hw/i386: Introduce AMD IOMMU") ? > Signed-off-by: Roman Ka

Re: [PATCH v6 08/26] tcg: Build ffi data structures for helpers

2021-06-01 Thread Richard Henderson
On 5/31/21 11:55 AM, Philippe Mathieu-Daudé wrote: Hi Richard, On 5/3/21 1:57 AM, Richard Henderson wrote: Add libffi as a build requirement for TCI. Add libffi to the dockerfiles to satisfy that requirement. Construct an ffi_cif structure for each unique typemask. Record the result in a separ

Re: [PATCH] hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds

2021-06-01 Thread Peter Xu
On Tue, Jun 01, 2021 at 10:08:31PM +0800, Hyman wrote: > > > 在 2021/6/1 8:57, Peter Xu 写道: > > These two commands are missing when adding the QMP sister commands. Add > > them, > > so developers can play with them easier. > > > > Cc: Dr. David Alan Gilbert > > Cc: Juan Quintela > > Cc: Leona

Re: [PATCH v6 11/26] tcg/tci: Use ffi for calls

2021-06-01 Thread Richard Henderson
On 5/31/21 10:18 PM, Philippe Mathieu-Daudé wrote: /* Used for function call generation. */ #define TCG_TARGET_CALL_STACK_OFFSET0 -#define TCG_TARGET_STACK_ALIGN 16 +#define TCG_TARGET_STACK_ALIGN 8 Is this FFI_SIZEOF_ARG? No, just uint64_t. +call_slots[0] = NU

Re: [PATCH v3 1/1] yank: Unregister function when using TLS migration

2021-06-01 Thread Peter Xu
On Tue, Jun 01, 2021 at 02:40:31AM -0300, Leonardo Bras wrote: > After yank feature was introduced in migration, whenever migration > is started using TLS, the following error happens in both source and > destination hosts: > > (qemu) qemu-kvm: ../util/yank.c:107: yank_unregister_instance: > Asser

[PATCH 0/2] linux-user: Let sigaction query SIGKILL/SIGSTOP

2021-06-01 Thread Ilya Leoshkevich
valgrind fails to start under linux-user, one of the reasons being that it tries to query all the sigactions, which qemu (unlike the real kernel) doesn't allow for SIGKILL/SIGSTOP. Patch 1 lifts this restriction, patch 2 adds a test. Ilya Leoshkevich (2): linux-user: Let sigaction query SIGKILL

[PATCH 1/2] linux-user: Let sigaction query SIGKILL/SIGSTOP

2021-06-01 Thread Ilya Leoshkevich
The kernel allows doing this, so let's allow this in qemu as well. Valgrind relies on this. Signed-off-by: Ilya Leoshkevich --- linux-user/signal.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 9016896dcd..bc3431708f 1006

[PATCH 2/2] tests/tcg/linux-test: Check that sigaction can query SIGKILL/SIGSTOP

2021-06-01 Thread Ilya Leoshkevich
Verify that querying is allowed, but making changes isn't. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/linux-test.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c index ce033c21c7..cd9d8159bc 100644 ---

[RFC PATCH] plugins/api: expose symbol lookup to plugins

2021-06-01 Thread Alex Bennée
This is a quality of life helper for plugins so they don't need to re-implement symbol lookup when dumping an address. The strings are constant so don't need to be duplicated. One minor tweak is to return NULL instead of a zero length string to show lookup failed. Based-on: 20210530063712.6832-4-m

[PATCH v7 01/27] tcg: Combine dh_is_64bit and dh_is_signed to dh_typecode

2021-06-01 Thread Richard Henderson
We will shortly be interested in distinguishing pointers from integers in the helper's declaration, as well as a true void return. We currently have two parallel 1 bit fields; merge them and expand to a 3 bit field. Our current maximum is 7 helper arguments, plus the return makes 8 * 3 = 24 bits

[PATCH v7 05/27] accel/tcg: Add tcg call flags to plugins helpers

2021-06-01 Thread Richard Henderson
As noted by qemu-plugins.h, plugins can neither read nor write guest registers. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tc

[PATCH v7 03/27] accel/tcg/plugin-gen: Drop inline markers

2021-06-01 Thread Richard Henderson
Let the compiler decide on inlining. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.

[PATCH v7 00/27] TCI fixes and cleanups

2021-06-01 Thread Richard Henderson
About half of the patches have review. These do not: 04-plugins-Drop-tcg_flags-from-struct-qemu_plugin_dy.patch 09-tcg-tci-Improve-tcg_target_call_clobber_regs.patch 12-tcg-tci-Reserve-r13-for-a-temporary.patch 13-tcg-tci-Emit-setcond-before-brcond.patch 15-tcg-tci-Change-encoding-to-ui

  1   2   3   4   >