Re: [PATCH v2 27/54] tcg/riscv: Require TCG_TARGET_REG_BITS == 64

2023-04-13 Thread Richard Henderson
On 4/12/23 22:18, Daniel Henrique Barboza wrote: On 4/10/23 22:04, Richard Henderson wrote: The port currently does not support "oversize" guests, which means riscv32 can only target 32-bit guests.  We will soon be building TCG once for all guests.  This implies that we can only support riscv6

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Maxime Coquelin
On 4/12/23 22:51, Stefan Hajnoczi wrote: On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, setting the vhost features will set this feature, too. Doing so disables all vrings, which may not be intended. For e

Re: Reducing vdpa migration downtime because of memory pin / maps

2023-04-13 Thread Eugenio Perez Martin
On Wed, Apr 12, 2023 at 8:19 AM Jason Wang wrote: > > On Wed, Apr 12, 2023 at 1:56 PM Jason Wang wrote: > > > > On Tue, Apr 11, 2023 at 8:34 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Apr 5, 2023 at 1:37 PM Eugenio Perez Martin > > > wrote: > > > > > > > > Hi! > > > > > > > > As me

Re: [PATCH] replication: compile out some staff when replication is not configured

2023-04-13 Thread Daniil Tatianin
Just a few minor nits On 4/11/23 5:51 PM, Vladimir Sementsov-Ogievskiy wrote: Don't compile-in replication-related files when replication is disabled in config. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! I'm unsure, should it be actually separate --disable-colo / --enable-colo o

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Hanna Czenczek
On 12.04.23 22:51, Stefan Hajnoczi wrote: On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, setting the vhost features will set this feature, too. Doing so disables all vrings, which may not be intended. For exa

Re: [PATCH 0/4] vhost-user-fs: Internal migration

2023-04-13 Thread Hanna Czenczek
On 12.04.23 23:00, Stefan Hajnoczi wrote: Hi, Is there a vhost-user.rst spec patch? Ah, right, I forgot. Will add! Hanna

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-13 Thread Eugenio Perez Martin
On Tue, Apr 11, 2023 at 5:33 PM Hanna Czenczek wrote: > > So-called "internal" virtio-fs migration refers to transporting the > back-end's (virtiofsd's) state through qemu's migration stream. To do > this, we need to be able to transfer virtiofsd's internal state to and > from virtiofsd. > > Beca

[PATCH 1/6] target/riscv: Update pmp_get_tlb_size()

2023-04-13 Thread Weiwei Li
Not only the matched PMP entry, Any PMP entry that overlap with partial of the tlb page may make the regions in that page have different permission rights. So all of them should be taken into consideration. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 7

[PATCH 6/6] accel/tcg: Remain TLB_INVALID_MASK in the address when TLB is re-filled

2023-04-13 Thread Weiwei Li
When PMP entry overlap part of the page, we'll set the tlb_size to 1, and this will make the address set with TLB_INVALID_MASK to make the page un-cached. However, if we clear TLB_INVALID_MASK when TLB is re-filled, then the TLB host address will be cached, and the following instructions can use th

[PATCH 0/6] target/riscv: Fix PMP related problem

2023-04-13 Thread Weiwei Li
This patchset tries to fix the PMP bypass problem issue https://gitlab.com/qemu-project/qemu/-/issues/1542 The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-pmp-fix Weiwei Li (6): target/riscv: Update pmp_get_tlb_size() target/riscv: Move pmp_get_tlb_size apart from

[PATCH 2/6] target/riscv: Move pmp_get_tlb_size apart from get_physical_address_pmp

2023-04-13 Thread Weiwei Li
pmp_get_tlb_size have no relationship with pmp-related permission check currently. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/c

[PATCH 4/6] target/riscv: Flush TLB only when pmpcfg/pmpaddr really changes

2023-04-13 Thread Weiwei Li
TLB needn't be flushed when pmpcfg/pmpaddr don't changes. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/pmp.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 6d4813806b..aced23c4

[PATCH 3/6] target/riscv: flush tlb when pmpaddr is updated

2023-04-13 Thread Weiwei Li
TLB should be flushed not only for pmpcfg csr changes, but also for pmpaddr csr changes. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/pmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 4f9389e73c..6d4813806b 100644 -

[RFC PATCH] softmmu/vl: fix typo for PHASE_MACHINE_INITIALIZED

2023-04-13 Thread Alex Bennée
Otherwise people might get confused grepping for MACHINE_PHASE_INITIALIZED and find nothing refers to it. Signed-off-by: Alex Bennée --- softmmu/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index ea20b23e4c..1b76fbb656 100644 --- a/softmmu/

[PATCH 5/6] target/riscv: flush tb when PMP entry changes

2023-04-13 Thread Weiwei Li
The translation block may also be affected when PMP entry changes. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/pmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index aced23c4d5..c2db52361f 100644 --- a/target/riscv/p

Re: [PATCH 3/4] vhost: Add high-level state save/load functions

2023-04-13 Thread Hanna Czenczek
On 12.04.23 23:14, Stefan Hajnoczi wrote: On Tue, Apr 11, 2023 at 05:05:14PM +0200, Hanna Czenczek wrote: vhost_save_backend_state() and vhost_load_backend_state() can be used by vhost front-ends to easily save and load the back-end's state to/from the migration stream. Because we do not know t

Re: [PATCH for-8.0 0/5] Xen emulation build/Coverity fixes

2023-04-13 Thread Peter Maydell
On Wed, 12 Apr 2023 at 20:01, David Woodhouse wrote: > > On Wed, 2023-04-12 at 19:55 +0100, Peter Maydell wrote: > > On Wed, 12 Apr 2023 at 19:52, David Woodhouse wrote: > > > > > > Some Coverity fixes and minor cleanups. And most notably, dropping > > > support for Xen libraries older than 4.7.1

[PATCH v3] cxl-cdat:Fix open file not closed in ct3_load_cdat

2023-04-13 Thread Hao Zeng
opened file processor not closed,May cause file processor leaks Fixes: aba578bdac ("hw/cxl: CDAT Data Object Exchange implementation") ChangeLog: v2->v3: Submission of v3 on the basis of v2, based on Philippe Mathieu-Daudé's suggestion "Pointless bzero in g_malloc0, however t

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-13 Thread Hanna Czenczek
On 12.04.23 23:06, Stefan Hajnoczi wrote: On Tue, Apr 11, 2023 at 05:05:13PM +0200, Hanna Czenczek wrote: So-called "internal" virtio-fs migration refers to transporting the back-end's (virtiofsd's) state through qemu's migration stream. To do this, we need to be able to transfer virtiofsd's in

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-13 Thread Hanna Czenczek
On 13.04.23 10:50, Eugenio Perez Martin wrote: On Tue, Apr 11, 2023 at 5:33 PM Hanna Czenczek wrote: So-called "internal" virtio-fs migration refers to transporting the back-end's (virtiofsd's) state through qemu's migration stream. To do this, we need to be able to transfer virtiofsd's intern

Re: [PATCH] target/riscv: Update check for Zca/zcf/zcd

2023-04-13 Thread Weiwei Li
On 2023/4/13 01:03, Daniel Henrique Barboza wrote: On 4/12/23 00:06, Weiwei Li wrote: Even though Zca/Zcf/Zcd can be included by C/F/D, however, their priv version is higher than the priv version of C/F/D. So if we use check for them instead of check for C/F/D totally, it will trigger new pr

Re: [PATCH v1 0/2] Update CXL documentation

2023-04-13 Thread Jonathan Cameron via
On Thu, 6 Apr 2023 18:58:37 +0530 Raghu H wrote: > Thanks Jonathan for quick review/comments on earlier patch, as suggested > splitting into two separate patches > https://www.mail-archive.com/qemu-devel@nongnu.org/msg952999.html > > Removed the unsupported size option for cxl-type3 device, Qem

[PATCH v4] cxl-cdat:Fix open file not closed in ct3_load_cdat

2023-04-13 Thread Hao Zeng
opened file processor not closed,May cause file processor leaks Fixes: aba578bdac ("hw/cxl: CDAT Data Object Exchange implementation") Signed-off-by: Zeng Hao Suggested-by: Philippe Mathieu-Daudé Suggested-by: Peter Maydell --- ChangeLog: v3-v4: Modify commit information,No code

RE: [PATCH] replication: compile out some staff when replication is not configured

2023-04-13 Thread Zhang, Chen
> -Original Message- > From: Vladimir Sementsov-Ogievskiy > Sent: Tuesday, April 11, 2023 10:51 PM > To: qemu-devel@nongnu.org > Cc: qemu-bl...@nongnu.org; pbonz...@redhat.com; arm...@redhat.com; > ebl...@redhat.com; jasow...@redhat.com; dgilb...@redhat.com; > quint...@redhat.com; hre..

Re: [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h

2023-04-13 Thread Richard Henderson
On 4/12/23 16:21, Warner Losh wrote: On Wed, Apr 12, 2023 at 4:10 AM Richard Henderson > wrote: On 4/11/23 19:09, Warner Losh wrote: > +++ b/bsd-user/syscallhdr.sh > @@ -0,0 +1,7 @@ > +#!/bin/sh > + > +in="$1" > +out="$2"

Re: [PATCH v2 27/54] tcg/riscv: Require TCG_TARGET_REG_BITS == 64

2023-04-13 Thread Daniel Henrique Barboza
On 4/10/23 22:04, Richard Henderson wrote: The port currently does not support "oversize" guests, which means riscv32 can only target 32-bit guests. We will soon be building TCG once for all guests. This implies that we can only support riscv64. Since all Linux distributions target riscv64

Re: [PATCH v2 27/54] tcg/riscv: Require TCG_TARGET_REG_BITS == 64

2023-04-13 Thread Daniel Henrique Barboza
On 4/13/23 04:12, Richard Henderson wrote: On 4/12/23 22:18, Daniel Henrique Barboza wrote: On 4/10/23 22:04, Richard Henderson wrote: The port currently does not support "oversize" guests, which means riscv32 can only target 32-bit guests.  We will soon be building TCG once for all guests

Re: [PATCH for 8.1] intel_iommu: refine iotlb hash calculation

2023-04-13 Thread Alex Bennée
Peter Maydell writes: > On Wed, 12 Apr 2023 at 09:40, Alex Bennée wrote: >> Peter Maydell writes: >> > Whoops, hadn't noticed that guint type... (glib's >> > g_int64_hash()'s approach to this is to XOR the top >> > 32 bits with the bottom 32 bits to produce the 32-bit >> > hash value.) >> >>

Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-13 Thread Alex Bennée
Jason Wang writes: > On Wed, Apr 12, 2023 at 4:43 PM Alex Bennée wrote: >> >> >> Jason Wang writes: >> >> > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into >> > account when calculating iotlb hash like: >> > >> > static guint vtd_iotlb_hash(gconstpointer v) >> > { >> >

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-13 Thread Eugenio Perez Martin
On Wed, Apr 12, 2023 at 11:06 PM Stefan Hajnoczi wrote: > > On Tue, Apr 11, 2023 at 05:05:13PM +0200, Hanna Czenczek wrote: > > So-called "internal" virtio-fs migration refers to transporting the > > back-end's (virtiofsd's) state through qemu's migration stream. To do > > this, we need to be abl

Re: [PATCH] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-13 Thread Yohei Kojima
Thank you for the review. I will reflect them in the next version. On 2023/04/11 21:57, Alex Bennée wrote: > > Yohei Kojima writes: > >> This commit adds the following description: >> 1. `memdev` option is recommended over `mem` option (see [1,2]) >> 2. users must specify memory for all NUMA no

Re: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-04-13 Thread Fiona Ebner
Am 12.04.23 um 14:18 schrieb Igor Mammedov: > On Thu, 30 Mar 2023 13:58:22 +0200 > Fiona Ebner wrote: > >> Am 30.03.23 um 10:22 schrieb Igor Mammedov: >>> On Tue, 28 Mar 2023 14:58:21 +0200 >>> Fiona Ebner wrote: >>> Hi, while trying to reproduce another issue, I ended up with

Re: virtio-iommu hotplug issue

2023-04-13 Thread Jean-Philippe Brucker
Hello, On Thu, Apr 13, 2023 at 01:49:43PM +0900, Akihiko Odaki wrote: > Hi, > > Recently I encountered a problem with the combination of Linux's > virtio-iommu driver and QEMU when a SR-IOV virtual function gets disabled. > I'd like to ask you what kind of solution is appropriate here and impleme

netdev-socket test hang (s390 host, mips64el guest, backtrace)

2023-04-13 Thread Peter Maydell
I just found a hung netdev-socket test on our s390 CI runner. Looks like a deadlock, no processes using CPU. Here's the backtrace; looks like both QEMU processes are sat idle but the test process is sat waiting forever for something in test_stream_inet_reconnect(). Any ideas? Process tree: netdev-

Re: virtio-iommu hotplug issue

2023-04-13 Thread Akihiko Odaki
On 2023/04/13 19:40, Jean-Philippe Brucker wrote: Hello, On Thu, Apr 13, 2023 at 01:49:43PM +0900, Akihiko Odaki wrote: Hi, Recently I encountered a problem with the combination of Linux's virtio-iommu driver and QEMU when a SR-IOV virtual function gets disabled. I'd like to ask you what kind

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Stefan Hajnoczi
On Thu, 13 Apr 2023 at 04:20, Hanna Czenczek wrote: > > On 12.04.23 22:51, Stefan Hajnoczi wrote: > > On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: > >> If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, > >> setting the vhost features will set this feature, too

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Stefan Hajnoczi
On Tue, 11 Apr 2023 at 11:05, Hanna Czenczek wrote: > > If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, > setting the vhost features will set this feature, too. Doing so > disables all vrings, which may not be intended. > > For example, enabling or disabling logging during mi

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-13 Thread Stefan Hajnoczi
On Thu, 13 Apr 2023 at 06:15, Eugenio Perez Martin wrote: > On Wed, Apr 12, 2023 at 11:06 PM Stefan Hajnoczi wrote: > > On Tue, Apr 11, 2023 at 05:05:13PM +0200, Hanna Czenczek wrote: > > (And I hope vDPA will import the device state vhost-user messages > > introduced in this series.) > > > > I g

[PATCH] vnc: increase max display size

2023-04-13 Thread Gerd Hoffmann
It's 2023. 4k display resolutions are a thing these days. Raise width and height limits of the qemu vnc server. Resolves: #1596 Signed-off-by: Gerd Hoffmann --- ui/vnc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index 757fa83044e7..5d9cd85a3c24

[PATCH v3] memory: Optimize replay of guest mapping

2023-04-13 Thread Zhenzhong Duan
On x86, there are two notifiers registered due to vtd-ir memory region splitting the entire address space. During replay of the address space for each notifier, the whole address space is scanned which is unnecessary. We only need to scan the space belong to notifier monitored space. While on x86

Re: [PATCH v4] cxl-cdat:Fix open file not closed in ct3_load_cdat

2023-04-13 Thread Jonathan Cameron via
On Thu, 13 Apr 2023 17:33:28 +0800 Hao Zeng wrote: > opened file processor not closed,May cause file processor leaks Patch description needs to say more on how this is fixed. Perhaps something like: "Open file descriptor not closed in error paths. Fix by replace open coded handling of read of w

Re: [PATCH v4 0/3] NUMA: Apply cluster-NUMA-node boundary for aarch64 and riscv machines

2023-04-13 Thread Igor Mammedov
On Thu, 13 Apr 2023 13:50:57 +0800 Gavin Shan wrote: > On 4/12/23 7:42 PM, Peter Maydell wrote: > > On Wed, 12 Apr 2023 at 02:08, Gavin Shan wrote: > >> On 3/27/23 9:26 PM, Igor Mammedov wrote: > >>> On Fri, 17 Mar 2023 14:25:39 +0800 > >>> Gavin Shan wrote: > >>> > For arm64 and ris

Re: [PATCH 3/4] vhost: Add high-level state save/load functions

2023-04-13 Thread Stefan Hajnoczi
On Thu, 13 Apr 2023 at 05:04, Hanna Czenczek wrote: > > On 12.04.23 23:14, Stefan Hajnoczi wrote: > > On Tue, Apr 11, 2023 at 05:05:14PM +0200, Hanna Czenczek wrote: > >> vhost_save_backend_state() and vhost_load_backend_state() can be used by > >> vhost front-ends to easily save and load the back

Re: [PATCH 2/4] vhost-user: Interface for migration state transfer

2023-04-13 Thread Stefan Hajnoczi
On Thu, 13 Apr 2023 at 05:24, Hanna Czenczek wrote: > > On 12.04.23 23:06, Stefan Hajnoczi wrote: > > On Tue, Apr 11, 2023 at 05:05:13PM +0200, Hanna Czenczek wrote: > >> So-called "internal" virtio-fs migration refers to transporting the > >> back-end's (virtiofsd's) state through qemu's migratio

Re: clean after distclean gobbles source files

2023-04-13 Thread Thomas Huth
On 07/04/2023 17.44, Steven Sistare wrote: Run 'make distclean', and GNUmakefile is removed. But, GNUmakefile is where we cd to build/. Run 'make distclean' or 'make clean' again, and Makefile applies the clean actions, such as this one, at the top level of the tree: find . \( -name '*.so'

Re: s390x TCG migration failure

2023-04-13 Thread Nina Schoetterl-Glausch
On Wed, 2023-04-12 at 23:01 +0200, Juan Quintela wrote: > Nina Schoetterl-Glausch wrote: > > Hi, > > > > We're seeing failures running s390x migration kvm-unit-tests tests with TCG. > > As this is tcg, could you tell the exact command that you are running? > Does it needs to be in s390x host, ri

Re: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-04-13 Thread Mike Maslenkin
Sorry for the noise, but just curious, how did you shutdown Windows? Did you use 'shutdown /s' or just press power button? Could it be that Windows was actually hibernated. So, when you try to boot it on the new (old) QEMU version with changed PCI topology, this could make it upset. I observed simi

Re: netdev-socket test hang (s390 host, mips64el guest, backtrace)

2023-04-13 Thread Peter Maydell
On Thu, 13 Apr 2023 at 11:50, Peter Maydell wrote: > > I just found a hung netdev-socket test on our s390 CI runner. > Looks like a deadlock, no processes using CPU. > Here's the backtrace; looks like both QEMU processes are sat > idle but the test process is sat waiting forever for something > in

[PATCH 0/1] qemu-options.hx: Update descriptions of memory options

2023-04-13 Thread Yohei Kojima
This patch updates an outdated description in qemu-options.hx. The patch reflects the changes in qemu behavior already described in another documentation, and it also changes paragraph structure for further readability. ChangeLog: v2: * Moved the description for the legacy `mem` option below e

[PATCH 1/1] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-13 Thread Yohei Kojima
This commit adds the following description: 1. `memdev` option is recommended over `mem` option (see [1,2]) 2. users must specify memory for all NUMA nodes (see [2]) This commit also separates descriptions for `mem` and `memdev` into two paragraphs. The old doc describes legacy `mem` option first,

Re: [PULL 19/54] acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors

2023-04-13 Thread Fiona Ebner
Am 13.04.23 um 13:46 schrieb Mike Maslenkin: > Sorry for the noise, but just curious, how did you shutdown Windows? > Did you use 'shutdown /s' or just press power button? > Could it be that Windows was actually hibernated. > So, when you try to boot it on the new (old) QEMU version with changed >

[PATCH v5] cxl-cdat:Fix open file not closed in ct3_load_cdat

2023-04-13 Thread Hao Zeng
Open file descriptor not closed in error paths. Fix by replace open coded handling of read of whole file into a buffer with g_file_get_contents() Fixes: aba578bdac ("hw/cxl: CDAT Data Object Exchange implementation") Signed-off-by: Zeng Hao Suggested-by: Philippe Mathieu-Daudé Suggested-by: Pe

Re: [PATCH 0/1] qemu-options.hx: Update descriptions of memory options

2023-04-13 Thread Yohei Kojima
I forgot to add v2 prefix to the subject. This is a revised patch from: https://patchew.org/QEMU/tyzpr06mb5418d6b0175a49e8e76988439d...@tyzpr06mb5418.apcprd06.prod.outlook.com/ On 2023/04/13 21:15, Yohei Kojima wrote: > This patch updates an outdated description in qemu-options.hx. > The patch ref

Re: [PATCH for-8.1] hw/display: Compile vga.c as target-independent code

2023-04-13 Thread Fabiano Rosas
Thomas Huth writes: > The target checks here are only during the initialization, so they > are not performance critical. We can switch these to runtime checks > to avoid that we have to compile this file multiple times during > the build, and make the code ready for an universal build one day. >

Re: [PATCH v4] cxl-cdat:Fix open file not closed in ct3_load_cdat

2023-04-13 Thread Hao Zeng
On Thu, 2023-04-13 at 12:17 +0100, Jonathan Cameron wrote: > On Thu, 13 Apr 2023 17:33:28 +0800 > Hao Zeng wrote: > > > opened file processor not closed,May cause file processor leaks > > Patch description needs to say more on how this is fixed. > Perhaps something like: > "Open file descriptor

Re: [PATCH v4] cxl-cdat:Fix open file not closed in ct3_load_cdat

2023-04-13 Thread Hao Zeng
On Thu, 2023-04-13 at 12:17 +0100, Jonathan Cameron wrote: > On Thu, 13 Apr 2023 17:33:28 +0800 > Hao Zeng wrote: > > > opened file processor not closed,May cause file processor leaks > > Patch description needs to say more on how this is fixed. > Perhaps something like: > "Open file descriptor

Re: [PATCH 0/2] hw/arm/npcm7xx_gpio: Add some pin state QOM

2023-04-13 Thread Peter Maydell
On Thu, 6 Apr 2023 at 01:25, Joe Komlodi wrote: > > Hi all, > > This series adds a couple QOM properties for retrieving and setting pin > state via qom-get and qom-get. > > We ran into a situation in multi-SoC simulation where the BMC would need > to update its input pin state based on behavior fr

Re: [PATCH] softmmu: Move dirtylimit.c into the target independent source set

2023-04-13 Thread Fabiano Rosas
Thomas Huth writes: > dirtylimit.c just uses one TARGET_PAGE_SIZE macro - change it to > qemu_target_page_size() so we can move thefile into the target > independent source set. Then we only have to compile this file > once during the build instead of multiple times (one time for > each target).

Re: [PULL 0/5] Migration 20230412 patches

2023-04-13 Thread Peter Maydell
On Wed, 12 Apr 2023 at 22:46, Juan Quintela wrote: > > The following changes since commit abb02ce0e76a8e00026699a863ab2d11d88f56d4: > > Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging > (2023-04-11 16:19:06 +0100) > > are available in the Git repository at: > > https://

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Michael S. Tsirkin
On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: > If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, > setting the vhost features will set this feature, too. Doing so > disables all vrings, which may not be intended. Hmm not sure I understand: why does it disable

Re: [PATCH] target/arm: Add overflow check for gt_recalc_timer

2023-04-13 Thread Peter Maydell
On Thu, 6 Apr 2023 at 16:16, Leonid Komarianskyi wrote: > > If gt_timer is enabled before cval initialization on a virtualized > setup on QEMU, cval equals (UINT64_MAX - 1). Adding an offset value > to this causes an overflow that sets timer into the past, which leads > to infinite loop, because t

[PATCH] hw/intc/riscv_aplic: Zero init APLIC internal state

2023-04-13 Thread Ivan Klokov
Since g_new is used to initialize the RISCVAPLICState->state structure, in some case we get behavior that is not as expected. This patch changes this to g_new0, which allows to initialize the APLIC in the correct state. Signed-off-by: Ivan Klokov --- hw/intc/riscv_aplic.c | 2 +- 1 file changed

Re: [RFC PATCH 0/1] Implement entropy leak reporting for virtio-rng

2023-04-13 Thread Babis Chalios
On 11/4/23 18:20, Jason A. Donenfeld wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Tue, Apr 11, 2023 at 6:19 PM Amit Shah wrote: Hey Babis, On Mon, 2023-0

Re: [PATCH] softmmu: Move dirtylimit.c into the target independent source set

2023-04-13 Thread Richard Henderson
On 4/13/23 07:45, Thomas Huth wrote: uint32_t dirty_ring_size = kvm_dirty_ring_size(); uint64_t dirty_ring_size_meory_MB = -dirty_ring_size * TARGET_PAGE_SIZE >> 20; +dirty_ring_size * qemu_target_page_size() >> 20; Existing problem, the types here are suspicious: di

Re: [RFC PATCH v2 38/44] target/loongarch: Implement vbitsel vset

2023-04-13 Thread Richard Henderson
On 4/13/23 04:53, gaosong wrote: 在 2023/4/12 下午2:53, Richard Henderson 写道: +#define SETANYEQZ(NAME, BIT, E) \ +void HELPER(NAME)(CPULoongArchState *env, uint32_t cd, uint32_t vj) \ +{   \ +    int i; \ +    bool ret = false; 

Re: virtio-iommu hotplug issue

2023-04-13 Thread Eric Auger
Hi, On 4/13/23 13:01, Akihiko Odaki wrote: > On 2023/04/13 19:40, Jean-Philippe Brucker wrote: >> Hello, >> >> On Thu, Apr 13, 2023 at 01:49:43PM +0900, Akihiko Odaki wrote: >>> Hi, >>> >>> Recently I encountered a problem with the combination of Linux's >>> virtio-iommu driver and QEMU when a SR-

Re: [PATCH] replication: compile out some staff when replication is not configured

2023-04-13 Thread Vladimir Sementsov-Ogievskiy
On 13.04.23 12:52, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Tuesday, April 11, 2023 10:51 PM To: qemu-devel@nongnu.org Cc: qemu-bl...@nongnu.org; pbonz...@redhat.com; arm...@redhat.com; ebl...@redhat.com; jasow...@redhat.com; dgilb...@redhat.com;

[PATCH v2] target/riscv: Update check for Zca/Zcf/Zcd

2023-04-13 Thread Weiwei Li
Even though Zca/Zcf/Zcd can be included by C/F/D, however, their priv version is higher than the priv version of C/F/D. So if we use check for them instead of check for C/F/D totally, it will trigger new problem when we try to disable the extensions based on the configured priv version. Signed-off

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Anton Kuchin
On 13/04/2023 14:03, Stefan Hajnoczi wrote: On Thu, 13 Apr 2023 at 04:20, Hanna Czenczek wrote: On 12.04.23 22:51, Stefan Hajnoczi wrote: On Tue, Apr 11, 2023 at 05:05:12PM +0200, Hanna Czenczek wrote: If the back-end supports the VHOST_USER_F_PROTOCOL_FEATURES feature, setting the vhost feat

Re: [PATCH V2] intel_iommu: refine iotlb hash calculation

2023-04-13 Thread Peter Xu
On Wed, Apr 12, 2023 at 03:35:10PM +0800, Jason Wang wrote: > Commit 1b2b12376c8 ("intel-iommu: PASID support") takes PASID into > account when calculating iotlb hash like: > > static guint vtd_iotlb_hash(gconstpointer v) > { > const struct vtd_iotlb_key *key = v; > > return key->gfn | ((

Re: [RFC PATCH v2] riscv: Add support for the Zfa extension

2023-04-13 Thread Christoph Müllner
". On Mon, Apr 10, 2023 at 3:23 PM LIU Zhiwei wrote: > > > On 2023/4/1 2:28, Christoph Muellner wrote: > > From: Christoph Müllner > > > > This patch introduces the RISC-V Zfa extension, which introduces > > additional floating-point extensions: > > * fli (load-immediate) with pre-defined immedi

Re: [PATCH] riscv: Add support for the Zfa extension

2023-04-13 Thread Christoph Müllner
On Fri, Mar 31, 2023 at 11:39 PM Richard Henderson wrote: > > On 3/31/23 11:22, Christoph Müllner wrote: > > On Mon, Mar 27, 2023 at 7:18 PM Richard Henderson > > wrote: > >> > >> On 3/27/23 01:00, Christoph Muellner wrote: > >>> +uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t

[PATCH 0/2] chardev/char-file: Allow setting input file on command line

2023-04-13 Thread Peter Maydell
Our 'file' chardev backend supports specifying both an input and an output file, but only if you create it via the QMP interface -- there is no command-line syntax support for setting the input file. This patchset adds an extra 'input-path' option to the chardev. The specific use case I have is th

[PATCH 1/2] qtest: Don't assert on "-qtest chardev:myid"

2023-04-13 Thread Peter Maydell
If the -qtest command line argument is passed a string that says "use this chardev for I/O", then it will assert: $ ./build/clang/qemu-system-i386 -chardev file,path=/dev/null,id=myid -qtest chardev:myid Unexpected error in qtest_set_chardev() at ../../softmmu/qtest.c:1011: qemu-system-i386: Cann

[PATCH 2/2] chardev: Allow setting file chardev input file on the command line

2023-04-13 Thread Peter Maydell
Our 'file' chardev backend supports both "output from this chardev is written to a file" and "input from this chardev should be read from a file" (except on Windows). However, you can only set up the input file if you're using the QMP interface -- there is no command line syntax to do it. Add comm

[PATCH 1/2] tcg: ppc64: Fix mask generation for vextractdm

2023-04-13 Thread Shivaprasad G Bhat
In function do_extractm() the mask is calculated as dup_const(1 << (element_width - 1)). '1' being signed int works fine for MO_8,16,32. For MO_64, on PPC64 host this ends up becoming 0 on compilation. The vextractdm uses MO_64, and it ends up having mask as 0. Explicitly use 1ULL instead of signe

[PATCH 0/2] tcg: ppc64: Fix mask generation for vextractdm

2023-04-13 Thread Shivaprasad G Bhat
While debugging gitlab issue[1] 1536, I happen to try the vextract[X]m instructions on the real hardware. The test used in [1] is failing for vextractdm. On debugging it is seen, in function do_extractm() the mask is calculated as dup_const(1 << (element_width - 1)). '1' being signed int works fin

[PATCH 2/2] tests: tcg: ppc64: Add tests for Vector Extract Mask Instructions

2023-04-13 Thread Shivaprasad G Bhat
Add test for vextractbm, vextractwm, vextractdm and vextractqm instructions. Test works for both qemu-ppc64 and qemu-ppc64le. Based on the test case written by John Platts posted at [1] References: [1]: https://gitlab.com/qemu-project/qemu/-/issues/1536 Signed-off-by: John Platts Signed-off-by:

[PATCH v3 1/6] virtio-input: generalize virtio_input_key_config()

2023-04-13 Thread Sergio Lopez
As there are other bitmap-based config properties that need to be dealt in a similar fashion as VIRTIO_INPUT_CFG_EV_BITS, generalize the function to receive select and subsel as arguments, and rename it to virtio_input_extend_config() Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --

[PATCH v3 4/6] virtio-input-pci: add virtio-multitouch-pci

2023-04-13 Thread Sergio Lopez
Add virtio-multitouch-pci, a Multitouch-capable input device, to the list of devices that can be provided by virtio-input-pci. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --- hw/virtio/virtio-input-pci.c | 25 + 1 file changed, 21 insertions(+), 4 deletion

[PATCH v3 6/6] ui/gtk: enable backend to send multi-touch events

2023-04-13 Thread Sergio Lopez
GTK3 provides the infrastructure to receive and process multi-touch events through the "touch-event" signal and the GdkEventTouch type. Make use of it to transpose events from the host to the guest. This allows users of machines with hardware capable of receiving multi-touch events to run guests t

[PATCH v3 2/6] ui: add the infrastructure to support MT events

2023-04-13 Thread Sergio Lopez
Add the required infrastructure to support generating multitouch events. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --- include/ui/input.h| 3 +++ qapi/ui.json | 46 --- replay/replay-input.c | 18 + ui/input.

[PATCH v3 0/6] Implement virtio-multitouch and enable GTK3 to use it

2023-04-13 Thread Sergio Lopez
This series adds a virtio-multitouch device to the family of devices emulated by virtio-input implementing the Multi-touch protocol as descripted here: https://www.kernel.org/doc/html/latest/input/multi-touch-protocol.html?highlight=multi+touch It also extends the GTK UI backend to be able to rec

[PATCH v3 5/6] ui: add helpers for virtio-multitouch events

2023-04-13 Thread Sergio Lopez
Add helpers for generating Multi-touch events from the UI backends that can be sent to the guest through a virtio-multitouch device. Signed-off-by: Sergio Lopez Reviewed-by: Marc-André Lureau --- include/ui/input.h | 5 + ui/input.c | 36 2 file

[PATCH] hw/i386/vmmouse:add relative packet flag for button status

2023-04-13 Thread Zongmin Zhou
The buttons value use macros instead of direct numbers. If request relative mode, have to add this for guest vmmouse driver to judge this is a relative packet. otherwise,vmmouse driver will not match the condition 'status & VMMOUSE_RELATIVE_PACKET', and can't report events on the correct(relative)

[PATCH v3 3/6] virtio-input: add a virtio-mulitouch device

2023-04-13 Thread Sergio Lopez
Add a virtio-multitouch device to the family of devices emulated by virtio-input implementing the Multi-touch protocol as descripted here: https://www.kernel.org/doc/html/latest/input/multi-touch-protocol.html?highlight=multi+touch This patch just add the device itself, without connecting it to a

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2023-04-13 Thread Christian Brauner
On Thu, Aug 18, 2022 at 04:24:21PM +0300, Kirill A . Shutemov wrote: > On Wed, Aug 17, 2022 at 10:40:12PM -0700, Hugh Dickins wrote: > > On Wed, 6 Jul 2022, Chao Peng wrote: > > > This is the v7 of this series which tries to implement the fd-based KVM > > > guest private memory. > > > > Here at la

Re: [PATCH for-7.2 v3 3/3] rtl8139: honor large send MSS value

2023-04-13 Thread Peter Maydell
On Thu, 17 Nov 2022 at 16:58, Stefan Hajnoczi wrote: > > The Large-Send Task Offload Tx Descriptor (9.2.1 Transmit) has a > Large-Send MSS value where the driver specifies the MSS. See the > datasheet here: > http://realtek.info/pdf/rtl8139cp.pdf > > The code ignores this value and uses a hardcode

Re: [PATCH 1/4] vhost: Re-enable vrings after setting features

2023-04-13 Thread Michael S. Tsirkin
On Thu, Apr 13, 2023 at 05:24:36PM +0300, Anton Kuchin wrote: > But is there a valid use-case for logging some dirty memory but not all? > I can't understand if this is a feature or a just flaw in specification. IRC the use-case originally conceived was for shadow VQs. If you use shadow VQs the V

[RFC PATCH v3] riscv: Add support for the Zfa extension

2023-04-13 Thread Christoph Muellner
From: Christoph Müllner This patch introduces the RISC-V Zfa extension, which introduces additional floating-point extensions: * fli (load-immediate) with pre-defined immediates * fminm/fmaxm (like fmin/fmax but with different NaN behaviour) * fround/froundmx (round to integer) * fcvtmod.w.d (Mod

Re: [PATCH] hw/intc/riscv_aplic: Zero init APLIC internal state

2023-04-13 Thread Anup Patel
On Thu, Apr 13, 2023 at 7:04 PM Ivan Klokov wrote: > > Since g_new is used to initialize the RISCVAPLICState->state structure, > in some case we get behavior that is not as expected. This patch > changes this to g_new0, which allows to initialize the APLIC in the correct > state. > > Signed-off-b

Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM

2023-04-13 Thread Kirill A. Shutemov
On Wed, Apr 12, 2023 at 06:07:28PM -0700, Sean Christopherson wrote: > On Wed, Jan 25, 2023, Kirill A. Shutemov wrote: > > On Wed, Jan 25, 2023 at 12:20:26AM +, Sean Christopherson wrote: > > > On Tue, Jan 24, 2023, Liam Merwick wrote: > > > > On 14/01/2023 00:37, Sean Christopherson wrote: > >

Re: [PATCH] hw/mips/malta: Fix the malta machine on big endian hosts

2023-04-13 Thread Michael Tokarev
30.03.2023 18:26, Thomas Huth wrote: Booting a Linux kernel with the malta machine is currently broken on big endian hosts. The cpu_to_gt32 macro wants to byteswap a value for little endian targets only, but uses the wrong way to do this: cpu_to_[lb]e32 works the other way round on big endian hos

Re: [RFC PATCH 1/3] python: add mkvenv.py

2023-04-13 Thread John Snow
On Wed, Mar 29, 2023 at 8:56 AM Paolo Bonzini wrote: > > On 3/28/23 23:11, John Snow wrote: > > +for entry_point in entry_points: > > +# Python 3.8 doesn't have 'module' or 'attr' attributes > > +if not (hasattr(entry_point, 'module') and > > +

Re: [PATCH 0/4] vhost-user-fs: Internal migration

2023-04-13 Thread Michael S. Tsirkin
On Tue, Apr 11, 2023 at 05:05:11PM +0200, Hanna Czenczek wrote: > RFC: > https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg04263.html > > Hi, > > Patch 2 of this series adds new vhost methods (only for vhost-user at > this point) for transferring the back-end’s internal state to/from qe

Re: [PATCH v2 03/10] tcg: Use one-insn-per-tb accelerator property in curr_cflags()

2023-04-13 Thread Peter Maydell
On Mon, 3 Apr 2023 at 19:33, Richard Henderson wrote: > > On 4/3/23 07:46, Peter Maydell wrote: > > uint32_t curr_cflags(CPUState *cpu) > > { > > uint32_t cflags = cpu->tcg_cflags; > > +TCGState *tcgstate = TCG_STATE(current_accel()); > > As mentioned against the cover, this is a ver

Re: [PATCH] hw/mips/malta: Fix the malta machine on big endian hosts

2023-04-13 Thread Peter Maydell
On Thu, 13 Apr 2023 at 17:08, Michael Tokarev wrote: > > 30.03.2023 18:26, Thomas Huth wrote: > > Booting a Linux kernel with the malta machine is currently broken > > on big endian hosts. The cpu_to_gt32 macro wants to byteswap a value > > for little endian targets only, but uses the wrong way to

Re: [RFC PATCH 1/3] python: add mkvenv.py

2023-04-13 Thread John Snow
On Wed, Mar 29, 2023 at 8:56 AM Paolo Bonzini wrote: > > BTW, another way to repair Debian 10's pip is to create a symbolic link > to sys.base_prefix + '/share/python-wheels' in sys.prefix + > '/share/python-wheels'. Since this is much faster, perhaps it can be > done unconditionally and checkpip

[PATCH] rtl8139: fix large_send_mss divide-by-zero

2023-04-13 Thread Stefan Hajnoczi
If the driver sets large_send_mss to 0 then a divide-by-zero occurs. Even if the division wasn't a problem, the for loop that emits MSS-sized packets would never terminate. Solve these issues by skipping offloading when large_send_mss=0. This issue was found by OSS-Fuzz as part of Alexander Bulek

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2023-04-13 Thread Ackerley Tng
Chao Peng writes: From: "Kirill A. Shutemov" Introduce 'memfd_restricted' system call with the ability to create memory areas that are restricted from userspace access through ordinary MMU operations (e.g. read/write/mmap). The memory content is expected to be used through the new in-kernel

  1   2   >