Re: [PATCH v6 12/14] target/ppc: Implement vcfuged instruction

2021-06-01 Thread Richard Henderson
On 6/1/21 12:35 PM, matheus.fe...@eldorado.org.br wrote: +++ b/target/ppc/translate/vector-impl.c.inc @@ -0,0 +1,56 @@ +/* + * Power ISA decode for Vector Facility instructions + * + * Copyright (c) 2021 Instituto de Pesquisas Eldorado (eldorado.org.br) + * + * This library is free software; you

Re: [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server

2021-06-01 Thread Eric Blake
On Tue, Jun 01, 2021 at 07:57:28AM +0200, Sergio Lopez wrote: > Before switching between AioContexts we need to make sure that we're > fully quiesced ("nb_requests == 0" for every client) when entering the > drained section. > > To do this, we set "quiescing = true" for every client on >

Re: [PATCH v3 02/33] block/nbd: fix how state is cleared on nbd_open() failure paths

2021-06-01 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:40AM +0300, Vladimir Sementsov-Ogievskiy wrote: > We have two "return error" paths in nbd_open() after > nbd_process_options(). Actually we should call nbd_clear_bdrvstate() > on these paths. Interesting that nbd_process_options() calls > nbd_clear_bdrvstate() by

[PATCH v2 0/4] Hexagon (target/hexagon) bug fixes and cleanup

2021-06-01 Thread Taylor Simpson
Fixes for bugs found by inspection and internal testing Tests added to tests/tcg/hexagon/misc.c *** Changes in v2 *** Added patches 3 and 4 Taylor Simpson (4): Hexagon (target/hexagon) fix bug in fLSBNEW* Hexagon (target/hexagon) fix l2fetch instructions Hexagon (target/hexagon) cleanup

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

2021-06-01 Thread Mahmoud Mandour
CC'ing Emilio On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour wrote: > Made both icache and dcache configurable through plugin arguments > and added memory trace printing in a separate file. > > Signed-off-by: Mahmoud Mandour > --- > contrib/plugins/cache.c | 68

[PATCH v7 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX 聽

2021-06-01 Thread Cindy Lu
In order to support configure interrupt for vhost-vdpa introduce VIRTIO_CONFIG_IRQ_IDX -1as a queue index, then we can reuse the function guest_notifier_mask and guest_notifier_pending. we add the check of queue index, if the driver not support configure interrupt, the function will just return

[PATCH v7 00/10] vhost-vdpa: add support for configure interrupt

2021-06-01 Thread Cindy Lu
these patches are add the support for configure interrupt These code are all tested in vp-vdpa (support configure interrupt) vdpa_sim (not support configure interrupt) test in virtio-pci bus and virtio-mmio bus Change in v2: Add support for virtio-mmio bus active the notifier while the backend

Re: [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server

2021-06-01 Thread Sergio Lopez
On Tue, Jun 01, 2021 at 04:29:07PM -0500, Eric Blake wrote: > On Tue, Jun 01, 2021 at 07:57:28AM +0200, Sergio Lopez wrote: > > Before switching between AioContexts we need to make sure that we're > > fully quiesced ("nb_requests == 0" for every client) when entering the > > drained section. > >

Re: [PATCH v2 01/26] s390x/tcg: Fix FP CONVERT TO (LOGICAL) FIXED NaN handling

2021-06-01 Thread Richard Henderson
On 5/17/21 7:27 AM, David Hildenbrand wrote: @@ -634,6 +664,9 @@ uint64_t HELPER(clfxb)(CPUS390XState *env, uint64_t h, uint64_t l, uint32_t m34) s390_restore_bfp_rounding_mode(env, old_mode); handle_exceptions(env, xxc_from_m34(m34), GETPC()); +if

Re: [PATCH v2 02/26] s390x/tcg: Fix instruction name for VECTOR FP LOAD (LENGTHENED|ROUNDED)

2021-06-01 Thread Richard Henderson
On 5/17/21 7:27 AM, David Hildenbrand wrote: Let's use the correct name. Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

[RFC PATCH 4/5] target/ppc: powerpc_excp: Standardize arguments to interrupt code

2021-06-01 Thread Fabiano Rosas
The next patches will split the big switch statement in powerpc_excp into individual functions so it would be cleaner if all variables are already grouped in a structure and their names consistent. This patch makes it so that the old values for MSR and NIP (from env) are saved at the beginning as

Re: [PATCH v1 0/6] support dirtyrate at the granualrity of vcpu

2021-06-01 Thread Hyman Huang
在 2021/6/2 5:54, Peter Xu 写道: On Tue, Jun 01, 2021 at 01:02:45AM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Since the Dirty Ring on QEMU part has been merged recently, how to use this feature is under consideration. In the scene of migration, it is valuable to provide a

[PATCH] target/i386: Fix decode of cr8

2021-06-01 Thread Richard Henderson
A recent cleanup did not recognize that there are two ways to encode cr8: one via the LOCK and the other via REX. Fixes: 7eff2e7c Resolves: https://gitlab.com/qemu-project/qemu/-/issues/380 Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH v1 0/6] support dirtyrate at the granualrity of vcpu

2021-06-01 Thread Peter Xu
On Tue, Jun 01, 2021 at 01:02:45AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Since the Dirty Ring on QEMU part has been merged recently, how to use > this feature is under consideration. > > In the scene of migration, it is valuable to provide a more accurante >

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

2021-06-01 Thread Gavin Shan
Hi Drew, On 6/1/21 5:50 PM, Andrew Jones wrote: 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

Re: [PATCH v1 2/6] KVM: introduce dirty_pages into CPUState

2021-06-01 Thread Peter Xu
On Tue, Jun 01, 2021 at 01:04:06AM +0800, huang...@chinatelecom.cn wrote: > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h > index 044f668a6e..973c193501 100644 > --- a/include/hw/core/cpu.h > +++ b/include/hw/core/cpu.h > @@ -375,6 +375,8 @@ struct CPUState { > struct kvm_run

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

2021-06-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210602002210.3144559-1-...@linux.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210602002210.3144559-1-...@linux.ibm.com Subject: [PATCH v3 0/2] target/s390x: Fix

[PATCH 1/2] vhost-vdpa: don't initialize backend_features

2021-06-01 Thread Jason Wang
We used to initialize backend_features during vhost_vdpa_init() regardless whether or not it was supported by vhost. This will lead the unsupported features like VIRTIO_F_IN_ORDER to be included and set to the vhost-vdpa during vhost_dev_start. Because the VIRTIO_F_IN_ORDER is not supported by

[PATCH 2/2] vhost-vdpa: remove the unused vhost_vdpa_get_acked_features()

2021-06-01 Thread Jason Wang
No user for this helper, let's remove it. Signed-off-by: Jason Wang --- include/net/vhost-vdpa.h | 1 - net/vhost-vdpa.c | 9 - 2 files changed, 10 deletions(-) diff --git a/include/net/vhost-vdpa.h b/include/net/vhost-vdpa.h index 45e34b7cfc..b81f9a6f2a 100644 ---

Re: [PATCH v2 2/2] ui/vdagent: fix clipboard info memory leak in error path

2021-06-01 Thread Thomas Huth
On 01/06/2021 17.57, Stefan Hajnoczi wrote: If the size of a VD_AGENT_CLIPBOARD_GRAB message is invalid we leak info when returning early. Thanks to Coverity for spotting this: *** CID 1453266: Resource leaks (RESOURCE_LEAK) /qemu/ui/vdagent.c: 465 in vdagent_chr_recv_clipboard() 459

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

2021-06-01 Thread Mahmoud Mandour
On Tue, Jun 1, 2021 at 1:12 PM Alex Bennée wrote: > > 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 > > --- > >

[PATCH v7 05/10] vhost-vdpa: add support for config interrupt call back

2021-06-01 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function only supported in vhost-vdpa backend Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events

[PATCH v2 1/4] Hexagon (target/hexagon) fix bug in fLSBNEW*

2021-06-01 Thread Taylor Simpson
Change fLSBNEW/fLSBNEW0/fLSBNEW1 from copy to "x & 1" Remove gen_logical_not function Clean up fLSBNEWNOT to use andi-1 followed by xori-1 Test cases added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson --- target/hexagon/macros.h| 27 ++-

[PATCH v2 2/4] Hexagon (target/hexagon) fix l2fetch instructions

2021-06-01 Thread Taylor Simpson
Y4_l2fetch == l2fetch(Rs32, Rt32) Y5_l2fetch == l2fetch(Rs32, Rtt32) The semantics for these instructions are present, but the encodings are missing. Note that these are treated as nops in qemu, so we add overrides. Test case added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson ---

[PULL v2 04/44] Python: add utility function for retrieving port redirection

2021-06-01 Thread John Snow
From: Cleber Rosa Slightly different versions for the same utility code are currently present on different locations. This unifies them all, giving preference to the version from virtiofs_submounts.py, because of the last tweaks added to it. While at it, this adds a "qemu.utils" module to host

[PULL v2 00/44] Python patches

2021-06-01 Thread John Snow
The following changes since commit 52848929b70dcf92a68aedcfd90207be81ba3274: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210528-pull-request' into staging (2021-05-30 20:10:30 +0100) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git

Re: [PATCH v2 3/4] Hexagon (target/hexagon) cleanup gen_store_conditional[48] functions

2021-06-01 Thread Richard Henderson
On 6/1/21 4:19 PM, Taylor Simpson wrote: Previously the store-conditional code was writing to hex_pred[prednum]. Then, the fGEN_TCG override was reading from there to the destination variable so that the packet commit logic would handle it properly. The correct implementation is to write to the

Re: GSoC Intro - TUI interface for QMP

2021-06-01 Thread John Snow
On 5/26/21 11:35 AM, Niteesh G. S. wrote: Hello Stefan, On Mon, May 24, 2021 at 7:02 PM Stefan Hajnoczi > wrote: On Sat, May 22, 2021 at 12:32:00AM +0530, Niteesh G. S. wrote: > By end of this summer, I would like to get a basic TUI with some desirable

Re: [PULL 00/44] Python patches

2021-06-01 Thread John Snow
On 6/1/21 6:36 AM, Peter Maydell wrote: 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,

Re: [PATCH v2 1/2] vhost-user-blk-test: fix Coverity open(2) false positives

2021-06-01 Thread Thomas Huth
On 01/06/2021 17.57, Stefan Hajnoczi wrote: Coverity checks that the file descriptor return value of open(2) is checked and used. Normally this is helpful in identifying real bugs but vhost-user-blk-test opens /dev/null as stdin and stdout after fork. In this case we don't need to look at the

[PATCH v7 09/10] virtio-pci: add support for configure interrupt

2021-06-01 Thread Cindy Lu
Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 63

[PATCH v7 08/10] virtio-pci: decouple virtqueue from kvm_virtio_pci_vector_use

2021-06-01 Thread Cindy Lu
inorder to support configure interrupt, we need to decouple virtqueue from vector use and vector release function this patch introduce vector_release_one and vector_use_one to support one vector. Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 122 -

[PATCH v7 04/10] vhost: add new call back function for config interrupt

2021-06-01 Thread Cindy Lu
To support configure interrupt, we need to add a new call back function for config interrupt. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index

[RFC PATCH 5/5] target/ppc: powerpc_excp: Move interrupt raising code to QOM

2021-06-01 Thread Fabiano Rosas
This patch introduces a new way to dispatch the emulated interrupts in powerpc_excp. It leverages the QEMU object model to store the implementations for each interrupt and link them to their identifier from POWERPC_EXCP enum. The processor-specific code then uses this identifier to register which

[RFC PATCH 1/5] target/ppc: powerpc_excp: Move lpes code to where it is used

2021-06-01 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 47 +--- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 04418054f5..5ea8503b46 100644 --- a/target/ppc/excp_helper.c +++

[RFC PATCH 3/5] target/ppc: powerpc_excp: Consolidade TLB miss code

2021-06-01 Thread Fabiano Rosas
The only difference in the code for Instruction fetch, Data load and Data store TLB miss errors is that when called from an unsupported processor (i.e. not one of 602, 603, 603e, G2, 7x5 or 74xx), they abort with a message specific to the operation type (insn fetch, data load/store). If a

[PATCH v2 3/4] Hexagon (target/hexagon) cleanup gen_store_conditional[48] functions

2021-06-01 Thread Taylor Simpson
Previously the store-conditional code was writing to hex_pred[prednum]. Then, the fGEN_TCG override was reading from there to the destination variable so that the packet commit logic would handle it properly. The correct implementation is to write to the destination variable and don't have the

[PATCH v2 4/4] Hexagon (target/hexagon) remove unused TCG variables

2021-06-01 Thread Taylor Simpson
Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c| 6 -- target/hexagon/translate.c | 11 ++- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index bd18cb1..5dbabe0 100644 --- a/target/hexagon/genptr.c +++

Re: [PATCH v2 1/4] Hexagon (target/hexagon) fix bug in fLSBNEW*

2021-06-01 Thread Richard Henderson
On 6/1/21 4:19 PM, Taylor Simpson wrote: Change fLSBNEW/fLSBNEW0/fLSBNEW1 from copy to "x & 1" Remove gen_logical_not function Clean up fLSBNEWNOT to use andi-1 followed by xori-1 Test cases added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson --- target/hexagon/macros.h| 27

Re: [PATCH v2 2/4] Hexagon (target/hexagon) fix l2fetch instructions

2021-06-01 Thread Richard Henderson
On 6/1/21 4:19 PM, Taylor Simpson wrote: Y4_l2fetch == l2fetch(Rs32, Rt32) Y5_l2fetch == l2fetch(Rs32, Rtt32) The semantics for these instructions are present, but the encodings are missing. Note that these are treated as nops in qemu, so we add overrides. Test case added to

Re: [PATCH v4] i386: Add ratelimit for bus locks acquired in guest

2021-06-01 Thread Chenyi Qiang
On 6/2/2021 4:10 AM, Eduardo Habkost wrote: On Tue, Jun 01, 2021 at 02:18:37PM -0400, Eduardo Habkost wrote: On Mon, May 31, 2021 at 01:14:54PM +0800, Chenyi Qiang wrote: On 5/28/2021 5:19 AM, Eduardo Habkost wrote: On Fri, May 21, 2021 at 12:38:20PM +0800, Chenyi Qiang wrote: [...] @@

Re: [PATCH v1 2/6] KVM: introduce dirty_pages into CPUState

2021-06-01 Thread Peter Xu
On Wed, Jun 02, 2021 at 08:27:19AM +0800, Hyman Huang wrote: > 在 2021/6/2 7:20, Peter Xu 写道: > > On Tue, Jun 01, 2021 at 01:04:06AM +0800, huang...@chinatelecom.cn wrote: > > > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h > > > index 044f668a6e..973c193501 100644 > > > ---

[PATCH v7 10/10] virtio-net: add peer_deleted check in virtio_net_handle_rx

2021-06-01 Thread Cindy Lu
During the test, We found this function will continue running while the peer is deleted, this will cause the crash. so add check for this. this only exist in machines type microvm reproduce step : load the VM with qemu-system-x86_64 -M microvm ... -netdev

[PATCH v7 03/10] virtio: decouple virtqueue from set notifier fd handler

2021-06-01 Thread Cindy Lu
To support config interrupt.we need to decouple virtqueue number from virtio_queue_set_guest_notifier_fd_handler, Signed-off-by: Cindy Lu --- hw/s390x/virtio-ccw.c | 6 +++--- hw/virtio/virtio-mmio.c| 4 ++-- hw/virtio/virtio-pci.c | 4 ++-- hw/virtio/virtio.c | 17

[PATCH v7 06/10] vhost:add support for configure interrupt

2021-06-01 Thread Cindy Lu
Add configure notifier support in vhost and virtio driver When backend support VIRTIO_NET_F_STATUS,setup the configure interrupt function in vhost_dev_start and release the related resource when vhost_dev_stop Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 +

[PATCH v7 02/10] virtio-pci:decouple virtqueue from interrupt setting process

2021-06-01 Thread Cindy Lu
Decouple virtqueue from interrupt setting process to support config interrupt Now the code for interrupt/vector are coupling with the vq number, this patch will decouple the vritqueue numbers from these functions. Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 51

[PATCH v7 07/10] virtio-mmio: add support for configure interrupt

2021-06-01 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c

Re: [PATCH 2/2] nbd/server: Use drained block ops to quiesce the server

2021-06-01 Thread Eric Blake
On Tue, Jun 01, 2021 at 06:31:29PM +0200, Sergio Lopez wrote: > > Hm, how do you get more than one coroutine per client yielding in > > nbd_read_eof() at the same time? I thought the model is that you always > > have one coroutine reading the next request (which is > > client->recv_coroutine) and

Re: [PATCH v3 03/33] block/nbd: ensure ->connection_thread is always valid

2021-06-01 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:41AM +0300, Vladimir Sementsov-Ogievskiy wrote: > From: Roman Kagan > > Simplify lifetime management of BDRVNBDState->connect_thread by > delaying the possible cleanup of it until the BDRVNBDState itself goes > away. > > This also reverts > 0267101af6 "block/nbd:

[RFC PATCH 0/5] target/ppc: powerpc_excp improvements - part I

2021-06-01 Thread Fabiano Rosas
This is my attempt at reducing the size of powerpc_excp and cleaning it up a bit. It has two parts: part I (this series) tackles the big switch statement that runs the interrupt emulation code. Each interrupt now gets its own callback function that is kept within QOM. The per-processor code still

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

2021-06-01 Thread Mahmoud Mandour
On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour wrote: > 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 + >

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

2021-06-01 Thread Mahmoud Mandour
On Tue, Jun 1, 2021 at 1:29 PM Alex Bennée wrote: > > (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

Re: [PATCH 1/2] block-backend: add drained_poll

2021-06-01 Thread Eric Blake
On Tue, Jun 01, 2021 at 05:59:10PM +0200, Kevin Wolf wrote: > > +++ b/block/block-backend.c > > @@ -2393,8 +2393,13 @@ static void blk_root_drained_begin(BdrvChild *child) > > static bool blk_root_drained_poll(BdrvChild *child) > > { > > BlockBackend *blk = child->opaque; > > +int ret =

Re: [PATCH v3 05/33] block/nbd: BDRVNBDState: drop unused connect_err and connect_status

2021-06-01 Thread Eric Blake
On Fri, Apr 16, 2021 at 11:08:43AM +0300, Vladimir Sementsov-Ogievskiy wrote: > These fields are write-only. Drop them. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Roman Kagan > --- > block/nbd.c | 12 ++-- > 1 file changed, 2 insertions(+), 10 deletions(-) >

[PATCH] target/arm: Mark LDS{MIN,MAX} as signed operations

2021-06-01 Thread Richard Henderson
The operands to tcg_gen_atomic_fetch_s{min,max}_i64 must be signed, so that the inputs are properly extended. Zero extend the result afterward, as needed. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/364 Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 13

[PATCH] migration/rdma: Fix cm event use after free

2021-06-01 Thread Li Zhijian
Signed-off-by: Li Zhijian --- migration/rdma.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 1cdb4561f32..d90b29a4b51 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -1539,16 +1539,20 @@ static int

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

2021-06-01 Thread Mahmoud Mandour
On Sun, May 30, 2021 at 8:37 AM Mahmoud Mandour wrote: > 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

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

2021-06-01 Thread Mahmoud Mandour
On Tue, Jun 1, 2021 at 3:27 PM Alex Bennée wrote: > > 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

[RFC PATCH 2/5] target/ppc: powerpc_excp: Remove dump_syscall_vectored

2021-06-01 Thread Fabiano Rosas
This function is identical to dump_syscall, so use the latter for system call vectored as well. Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index

Re: [PATCH v2 4/4] Hexagon (target/hexagon) remove unused TCG variables

2021-06-01 Thread Richard Henderson
On 6/1/21 4:19 PM, Taylor Simpson wrote: Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c| 6 -- target/hexagon/translate.c | 11 ++- 2 files changed, 2 insertions(+), 15 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH v3 1/2] target/s390x: Fix SIGILL psw.addr reporting

2021-06-01 Thread Ilya Leoshkevich
When a s390x CPU attempts to execute an illegal instruction, an operation exception is recognized. This is a suppressing exception, which means that the PSW is advanced by the length of the illegal instruction. On the real hardware or in qemu-system-s390x the kernel then raises SIGILL with

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

2021-06-01 Thread Ilya Leoshkevich
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, which relies on this value. Patch 1 fixes the issue, patch 2

[PATCH v3 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-06-01 Thread Ilya Leoshkevich
Verify that s390x-specific uc_mcontext.psw.addr is reported correctly. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/signal.c| 163 2 files changed, 164 insertions(+) create mode 100644

Re: [PATCH v1 2/6] KVM: introduce dirty_pages into CPUState

2021-06-01 Thread Hyman Huang
在 2021/6/2 7:20, Peter Xu 写道: On Tue, Jun 01, 2021 at 01:04:06AM +0800, huang...@chinatelecom.cn wrote: diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 044f668a6e..973c193501 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -375,6 +375,8 @@ struct CPUState {

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

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

Re: [PATCH v2 1/8] hw/riscv: sifive_u: Switch to use qemu_fdt_setprop_string_array() helper

2021-06-01 Thread Alistair Francis
On Mon, May 31, 2021 at 12:34 PM Bin Meng wrote: > > On Fri, Apr 30, 2021 at 3:13 PM Bin Meng wrote: > > > > From: Bin Meng > > > > Since commit 78da6a1bca22 ("device_tree: add qemu_fdt_setprop_string_array > > helper"), > > we can use the new helper to set the clock name for the ethernet > >

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

[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:

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 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 > >> > >>

[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 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

[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

[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

Re: [PULL 2/3] hw/usb: hcd-xhci-pci: Raise MSI/MSI-X interrupts only when told to

2021-06-01 Thread Bin Meng
On Mon, May 31, 2021 at 11:33 PM Alexander Bulekov wrote: > > On 210528 1622, Gerd Hoffmann wrote: > > From: Ruimei Yan > > > > At present MSI / MSI-X interrupts are triggered regardless of the > > irq level. We should have checked the level to determine whether > > the interrupt needs to be

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

[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

[PATCH 2/2] nbd/server: Use drained block ops to quiesce the server

2021-06-01 Thread Sergio Lopez
Before switching between AioContexts we need to make sure that we're fully quiesced ("nb_requests == 0" for every client) when entering the drained section. To do this, we set "quiescing = true" for every client on ".drained_begin" to prevent new coroutines to be created, and check if

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 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

[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 ---

[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

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

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: [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 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

[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

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

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

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

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

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

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 >>

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

[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 **

[PATCH v3 25/35] python/qemu/machine.py: refactor _qemu_args()

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
- 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 Reviewed-by: Max Reitz --- python/qemu/machine.py | 18 -- 1 file changed, 8 insertions(+), 10

[PATCH v3 26/35] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_keys: bool). Allow passing dict directly, simplifying

[PATCH v3 27/35] iotests.py: VM: add own __enter__ method

2021-06-01 Thread Vladimir Sementsov-Ogievskiy
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: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

  1   2   3   4   >