Re: [PATCH 0/5] Add LoongArch v1.1 instructions

2023-10-25 Thread gaosong
在 2023/10/26 上午9:38, Jiajie Chen 写道: On 2023/10/26 03:04, Richard Henderson wrote: On 10/25/23 10:13, Jiajie Chen wrote: On 2023/10/24 07:26, Richard Henderson wrote: See target/arm/tcg/translate-a64.c, gen_store_exclusive, TCGv_i128 block. See target/ppc/translate.c, gen_stqcx_. The situa

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 26/10/23 08:12, Thomas Huth wrote: >> On 26/10/2023 07.58, Philippe Mathieu-Daudé wrote: [...] >>> $ ../configure >>> The Meson build system >>> Version: 1.2.1 >>> Build type: native build >>> Project name: qemu >>> Project version: 8.1.50 >>> C compiler for

Re: [PATCH 2/6] system/physmem: IOMMU: Invoke the translate_size function if it is implemented

2023-10-25 Thread Ethan Chen via
On Wed, Oct 25, 2023 at 11:14:42AM -0400, Peter Xu wrote: > On Wed, Oct 25, 2023 at 01:14:26PM +0800, Ethan Chen wrote: > > Signed-off-by: Ethan Chen > > --- > > system/physmem.c | 9 +++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/system/physmem.c b/system/phy

Re: [PATCH] virtio: rng: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

2023-10-25 Thread Philippe Mathieu-Daudé
Hi Mathieu, On 25/10/23 19:18, Mathieu Poirier wrote: Since the driver doesn't support interrupts, we must return early when index is set to VIRTIO_CONFIG_IRQ_IDX. Basically the same thing Viresh did for "91208dd297f2 virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX". Fixes: 544f0

Re: [PATCH] linux-user/i386: Properly align signal frame

2023-10-25 Thread Michael Tokarev
24.05.2023 08:46, Richard Henderson: The beginning of the structure, with pretaddr, should be just below 16-byte alignment. Disconnect fpstate from sigframe, just like the kernel does. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1648 Ping? Has this been forgotten? It's been 5 mont

Re: [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file

2023-10-25 Thread Michael Tokarev
01.06.2023 22:28, Andrey Drobyshev via: In case when we're rebasing within one backing chain, and when target image is larger than old backing file, bdrv_is_allocated_above() ends up setting *pnum = 0. As a result, target offset isn't getting incremented, and we get stuck in an infinite for loop

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Philippe Mathieu-Daudé
On 26/10/23 08:12, Thomas Huth wrote: On 26/10/2023 07.58, Philippe Mathieu-Daudé wrote: On 26/10/23 07:31, Markus Armbruster wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand.  Bugs love to hide in such code. Evidence: commit bbde6

Re: [PATCH v2 1/2] hw/ide: reset: cancel async DMA operation before resetting state

2023-10-25 Thread Michael Tokarev
06.09.2023 16:09, Fiona Ebner wrote: If there is a pending DMA operation during ide_bus_reset(), the fact that the IDEState is already reset before the operation is canceled can be problematic. In particular, ide_dma_cb() might be called and then use the reset IDEState which contains the signatur

Re: [PATCH v2] hw/ide/ahci: fix legacy software reset

2023-10-25 Thread Michael Tokarev
05.10.2023 13:04, Niklas Cassel: From: Niklas Cassel Legacy software contains a standard mechanism for generating a reset to a Serial ATA device - setting the SRST (software reset) bit in the Device Control register. Serial ATA has a more robust mechanism called COMRESET, also referred to as p

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Thomas Huth
On 26/10/2023 07.58, Philippe Mathieu-Daudé wrote: On 26/10/23 07:31, Markus Armbruster wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand.  Bugs love to hide in such code. Evidence: commit bbde656263d (migration/rdma: Fix save_page m

Re: [PATCH] virtio: rng: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

2023-10-25 Thread Leo Yan
On Thu, Oct 26, 2023 at 01:06:21PM +0800, Leo Yan wrote: > On Wed, Oct 25, 2023 at 11:18:41AM -0600, Mathieu Poirier wrote: > > Since the driver doesn't support interrupts, we must return early when > > index is set to VIRTIO_CONFIG_IRQ_IDX. Basically the same thing Viresh > > did for "91208dd297f

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Philippe Mathieu-Daudé
On 26/10/23 07:31, Markus Armbruster wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: commit bbde656263d (migration/rdma: Fix save_page method to fail on polling error). Enable -Wshadow=lo

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Thomas Huth
On 26/10/2023 07.51, Warner Losh wrote: On Wed, Oct 25, 2023, 11:31 PM Markus Armbruster > wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand.  Bugs love to hide in such code. Evidence: commit

Re: [PATCH 0/1] Enable -Wshadow=local

2023-10-25 Thread Warner Losh
On Wed, Oct 25, 2023, 11:31 PM Markus Armbruster wrote: > Requires Brian's pull request and two patches from Thomas to compile: > > [PULL 0/2] hex queue - GETPC() fixes, shadowing fixes > [PATCH v2] block/snapshot: Fix compiler warning with -Wshadow=local > [PATCH v2] migration/ram: F

Re: [PATCH] target/i386/kvm: call kvm_put_vcpu_events() before kvm_put_nested_state()

2023-10-25 Thread Philippe Mathieu-Daudé
Cc'ing Vitaly. On 26/10/23 07:49, Eiichi Tsukata wrote: Hi all, Here is additional details on the issue. We've found this issue when testing Windows Virtual Secure Mode (VSM) VMs. We sometimes saw live migration failures of VSM-enabled VMs. It turned out that the issue happens during live migr

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Warner Losh
On Wed, Oct 25, 2023, 11:31 PM Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Bugs love to hide in such code. > Evidence: commit bbde656263d (migration/rdma: Fix save_page method to > fail on polling error).

Re: [PATCH] target/i386/kvm: call kvm_put_vcpu_events() before kvm_put_nested_state()

2023-10-25 Thread Eiichi Tsukata
Hi all, Here is additional details on the issue. We've found this issue when testing Windows Virtual Secure Mode (VSM) VMs. We sometimes saw live migration failures of VSM-enabled VMs. It turned out that the issue happens during live migration when VMs change boot related EFI variables (ex: BootO

Re: [PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Thomas Huth
On 26/10/2023 07.31, Markus Armbruster wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: commit bbde656263d (migration/rdma: Fix save_page method to fail on polling error). Enable -Wshadow=

[PATCH] target/i386/kvm: call kvm_put_vcpu_events() before kvm_put_nested_state()

2023-10-25 Thread Eiichi Tsukata
kvm_put_vcpu_events() needs to be called before kvm_put_nested_state() because vCPU's hflag is referred in KVM vmx_get_nested_state() validation. Otherwise kvm_put_nested_state() can fail with -EINVAL when a vCPU is in VMX operation and enters SMM mode. This leads to live migration failure. Signed

Re: [PATCH v6 23/23] build-sys: make pixman actually optional

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/meson.build b/meson.build index ad1e0155ee..a35cd860aa 100644 --- a/meson.build +++ b/meson.build @@ -817,9

Re: [PATCH v6 16/23] ui/vnc: VNC requires PIXMAN

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- meson.build| 6 +- ui/meson.build | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH v6 15/23] ui/gl: opengl doesn't require PIXMAN

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The QEMU fallback covers the requirements. We still need the flags of header inclusion with CONFIG_PIXMAN. Signed-off-by: Marc-André Lureau --- ui/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

Re: [PATCH v6 09/23] ui/console: allow to override the default VC

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". For that, set the dpy.type just before creating the default serial/parallel/monitor. As suggested by Paolo, if the display doe

[PATCH 1/1] meson: Enable -Wshadow=local

2023-10-25 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: commit bbde656263d (migration/rdma: Fix save_page method to fail on polling error). Enable -Wshadow=local to prevent such issues. Possible thanks t

Re: [PATCH v6 08/23] vl: move display early init before default devices

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The next commit needs to have the display registered itself before creating the default VCs. Signed-off-by: Marc-André Lureau --- system/vl.c | 31 ++- 1 file changed, 18 insertions(

[PATCH 0/1] Enable -Wshadow=local

2023-10-25 Thread Markus Armbruster
Requires Brian's pull request and two patches from Thomas to compile: [PULL 0/2] hex queue - GETPC() fixes, shadowing fixes [PATCH v2] block/snapshot: Fix compiler warning with -Wshadow=local [PATCH v2] migration/ram: Fix compilation with -Wshadow=local Stefan, the PR was posted a wee

Re: [PATCH v6 07/23] vl: simplify display_remote logic

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Bump the display_remote variable when the -vnc option is parsed, just like -spice. Signed-off-by: Marc-André Lureau --- system/vl.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/syste

Re: [PATCH v6 06/23] qemu-options: define -vnc only #ifdef CONFIG_VNC

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.08, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- system/vl.c | 13 + ui/vnc-stubs.c | 12 qemu-options.hx | 2 ++ 3 files changed, 11 insertions(+), 16 deletions(-) Reviewed-by: Thomas Hut

Re: [PATCH v6 05/23] vl: drop needless -spice checks

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.07, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Since commit 5324e3e958e ("qemu-options: define -spice only #ifdef CONFIG_SPICE"), it is unnecessary to check at runtime for "-spice" option. Signed-off-by: Marc-André Lureau --- system/vl.c | 7 +-- 1 file

Re: [PATCH v6 02/23] build-sys: drop needless warning pragmas for old pixman

2023-10-25 Thread Thomas Huth
On 25/10/2023 21.07, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Since commit 236f282c1c7 ("configure: check for pixman-1 version"), QEMU requires >= 0.21.8. Suggested-by: Thomas Huth Signed-off-by: Marc-André Lureau --- include/ui/qemu-pixman.h | 4 1 file changed, 4

Re: [PATCH] MAINTAINERS: aspeed: Update Andrew's email address

2023-10-25 Thread Andrew Jeffery
On Wed, 2023-10-25 at 10:57 +0200, Cédric Le Goater wrote: > On 10/24/23 11:36, Cédric Le Goater wrote: > > On 9/25/23 08:22, Andrew Jeffery wrote: > > > I've changed employers, have company email that deals with patch-based > > > workflows without too much of a headache, and am trying to steer som

Re: [PATCH] eeprom_at24c: Model 8-bit data addressing for 16-bit devices

2023-10-25 Thread Andrew Jeffery
On Wed, 2023-10-25 at 11:22 +0200, Klaus Jensen wrote: > On Oct 25 11:14, Cédric Le Goater wrote: > > It seems that the "at24c-eeprom" model doesn't have a maintainer. Until > > this is sorted out, may be this change could go through the NVMe queue > > since it is related. > > > > I can, but I'm

Re: [PATCH] virtio: rng: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX

2023-10-25 Thread Leo Yan
On Wed, Oct 25, 2023 at 11:18:41AM -0600, Mathieu Poirier wrote: > Since the driver doesn't support interrupts, we must return early when > index is set to VIRTIO_CONFIG_IRQ_IDX. Basically the same thing Viresh > did for "91208dd297f2 virtio: i2c: Check notifier helpers for > VIRTIO_CONFIG_IRQ_IDX

Re: [QEMU][PATCHv2 7/8] xen: add map and unmap callbacks for grant region

2023-10-25 Thread Vikram Garhwal
On Wed, Oct 25, 2023 at 06:32:26PM -0700, Stefano Stabellini wrote: > On Wed, 25 Oct 2023, Vikram Garhwal wrote: > > From: Juergen Gross > > > > Add the callbacks for mapping/unmapping guest memory via grants to the > > special grant memory region. > > > > Signed-off-by: Juergen Gross > > Signe

Re: [PATCH v2 2/5] hw/arm: ast2600: Set AST2600_MAX_IRQ to value from datasheet

2023-10-25 Thread Philippe Mathieu-Daudé
Hi Andrew, On 1/3/21 02:06, Andrew Jeffery wrote: The datasheet says we have 197 IRQs allocated, and we need more than 128 to describe IRQs from LPC devices. Raise the value now to allow modelling of the LPC devices. Signed-off-by: Andrew Jeffery --- hw/arm/aspeed_ast2600.c | 2 +- 1 file c

Re: [PATCH 0/6] tcg: Always implement neg and movcond

2023-10-25 Thread Richard Henderson
On 10/25/23 21:13, Richard Henderson wrote: Having opcodes always present means that we can remove some tests. NOT and MOVCOND were *almost* always present anyway. A close candidate is NOT. The hiccup is s390x: except for the most recent hardware revision, there is no single insn which can impl

[PATCH 0/6] tcg: Always implement neg and movcond

2023-10-25 Thread Richard Henderson
Having opcodes always present means that we can remove some tests. NOT and MOVCOND were *almost* always present anyway. A close candidate is NOT. The hiccup is s390x: except for the most recent hardware revision, there is no single insn which can implement the operation. I experimented with repl

[PATCH 5/6] tcg/loongarch64: Implement neg opcodes

2023-10-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 4 ++-- tcg/loongarch64/tcg-target.c.inc | 9 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tcg/loongarch64/tcg-target.h b/tcg/loongarch64/tcg-target.h index bebb2c6a05..d1c8e6d341 100644 --- a/tcg

[PATCH 3/6] tcg: Remove TCG_TARGET_HAS_movcond_{i32,i64}

2023-10-25 Thread Richard Henderson
The movcond opcode is now mandatory for backends to implement. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 4 +-- include/tcg/tcg.h| 1 - tcg/aarch64/tcg-target.h | 2 -- tcg/arm/tcg-target.h | 1 - tcg/i386/tcg-target.h| 2 -- tcg/loo

[PATCH 1/6] tcg/mips: Split out tcg_out_setcond_int

2023-10-25 Thread Richard Henderson
Return the temp and a set of flags, to be used as a primitive for setcond, brcond, movcond. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c.inc | 356 ++ 1 file changed, 132 insertions(+), 224 deletions(-) diff --git a/tcg/mips/tcg-target.c.inc b/t

[PATCH 6/6] tcg: Remove TCG_TARGET_HAS_neg_{i32,i64}

2023-10-25 Thread Richard Henderson
The movcond opcode is now mandatory for backends to implement. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 12 ++-- include/tcg/tcg-opc.h| 4 ++-- include/tcg/tcg.h| 1 - tcg/aarch64/tcg-target.h | 2 -- tcg/arm/tcg-target.h | 1

[PATCH 4/6] tcg/mips: Implement neg opcodes

2023-10-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.h | 4 ++-- tcg/mips/tcg-target.c.inc | 8 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h index 5b3fdcc726..20c14224fb 100644 --- a/tcg/mips/tcg-target.h +++ b/tcg/

[PATCH 2/6] tcg/mips: Always implement movcond

2023-10-25 Thread Richard Henderson
Expand as branch over move if not supported in the ISA. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.h | 4 ++-- tcg/mips/tcg-target.c.inc | 19 ++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h inde

Re: [PATCH] target/i386/kvm: Refine VMX controls setting for backward compatibility

2023-10-25 Thread Zhao Liu
On Mon, Sep 25, 2023 at 03:14:53AM -0400, EwanHai wrote: > Date: Mon, 25 Sep 2023 03:14:53 -0400 > From: EwanHai > Subject: [PATCH] target/i386/kvm: Refine VMX controls setting for backward > compatibility > X-Mailer: git-send-email 2.34.1 > > Commit 4a910e1 ("target/i386: do not set unsupported

Re: [PATCH 1/1] ui/cocoa: add full-screen-scaling display option

2023-10-25 Thread Akihiko Odaki
On 2023/10/25 23:04, carwynel...@gmail.com wrote: From: Carwyn Ellis Provides a display option, full-screen-scaling, that enables scaling of the display when full-screen mode is enabled. Also ensures that the corresponding menu item is marked as enabled when the option is set to on. Hi, Tha

Re: [PATCH 4/4] NOTFORMERGE tcg/i386: Assert sub of immediate has been folded

2023-10-25 Thread Richard Henderson
On 10/25/23 18:39, Richard Henderson wrote: A release build should simply accept and emit the subtract. I'm not even sure if this is reasonable to keep for debug. Not-Signed-off-by: Richard Henderson --- tcg/tcg.c | 49 ++- tcg/i386/tcg-tar

Re: [QEMU][PATCH v1 5/7] memory: add MemoryRegion map and unmap callbacks

2023-10-25 Thread Stefano Stabellini
On Wed, 11 Oct 2023, Juergen Gross wrote: > On 10.10.23 02:17, Stefano Stabellini wrote: > > On Thu, 5 Oct 2023, Vikram Garhwal wrote: > > > From: Juergen Gross > > > > > > In order to support mapping and unmapping guest memory dynamically to > > > and from qemu during address_space_[un]map() ope

[PATCH 3/4] tcg/optimize: Canonicalize sub2 with constants to add2

2023-10-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 9d91c25f68..280e6089a6 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1030,8 +1030,10 @@ static bool fold_add_

[PATCH 2/4] tcg/optimize: Canonicalize subi to addi during optimization

2023-10-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 5e16800cfa..9d91c25f68 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2237,7 +2237,19 @@ static bool fold_sub_vec(OptC

[PATCH 4/4] NOTFORMERGE tcg/i386: Assert sub of immediate has been folded

2023-10-25 Thread Richard Henderson
A release build should simply accept and emit the subtract. I'm not even sure if this is reasonable to keep for debug. Not-Signed-off-by: Richard Henderson --- tcg/tcg.c | 49 ++- tcg/i386/tcg-target.c.inc | 13 --- 2 files changed, 43

[PATCH 0/4] tcg: Canonicalize SUBI to ANDI

2023-10-25 Thread Richard Henderson
Supercedes: 20231025185956.72677-1-pbonz...@redhat.com ("tcg: allow a target to request canonicalization of SUBI to ADDI") Based-on: 20231025072707.833943-1-richard.hender...@linaro.org ("tcg: Introduce TCG_COND_TST{EQ,NE}") There a couple of optimize.c routines introduced which I use here. The f

[PATCH 1/4] tcg: Canonicalize subi to addi during opcode generation

2023-10-25 Thread Richard Henderson
Suggested-by: Paolo Bonzini Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 59deb3cbbb..3fce9bd8f4 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -147,12 +147,7 @@

Re: [PATCH 0/5] Add LoongArch v1.1 instructions

2023-10-25 Thread Jiajie Chen
On 2023/10/26 03:04, Richard Henderson wrote: On 10/25/23 10:13, Jiajie Chen wrote: On 2023/10/24 07:26, Richard Henderson wrote: See target/arm/tcg/translate-a64.c, gen_store_exclusive, TCGv_i128 block. See target/ppc/translate.c, gen_stqcx_. The situation here is slightly different: aarc

Re: [QEMU][PATCHv2 7/8] xen: add map and unmap callbacks for grant region

2023-10-25 Thread Stefano Stabellini
On Wed, 25 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add the callbacks for mapping/unmapping guest memory via grants to the > special grant memory region. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal > --- > hw/xen/xen-mapcache.c | 175 +

Re: [QEMU][PATCHv2 4/8] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2023-10-25 Thread Stefano Stabellini
On Wed, 25 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so > modify qemu_ram_ptr_length() a little bit and use it for > qemu_map_ram_ptr(), too. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal Re

Re: [QEMU][PATCHv2 3/8] xen: add pseudo RAM region for grant mappings

2023-10-25 Thread Stefano Stabellini
On Wed, 25 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add a memory region which can be used to automatically map granted > memory. It is starting at 0x8000ULL in order to be able to > distinguish it from normal RAM. > > For this reason the xen.ram memory region is expa

Re: [QEMU][PATCHv2 2/8] softmmu: physmem: Split ram_block_add()

2023-10-25 Thread Stefano Stabellini
On Wed, 25 Oct 2023, Vikram Garhwal wrote: > Extract ram block list update to a new function ram_block_add_list(). This is > done to support grant mappings which adds a memory region for granted memory > and > updates the ram_block list. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram G

Re: [QEMU][PATCHv2 1/8] xen: when unplugging emulated devices skip virtio devices

2023-10-25 Thread Stefano Stabellini
On Thu, 26 Oct 2023, David Woodhouse wrote: > On Wed, 2023-10-25 at 14:24 -0700, Vikram Garhwal wrote: > > From: Juergen Gross > > > > Virtio devices should never be unplugged at boot time, as they are > > similar to pci passthrough devices. > > > > Signed-off-by: Juergen Gross > > Signed-off-b

Re: [PATCH 01/20] target/sparc: Introduce cpu_put_psr_icc

2023-10-25 Thread Richard Henderson
On 10/19/23 07:11, Philippe Mathieu-Daudé wrote:   uint32_t psr;   __get_user(psr, ®s->psr); -    env->psr = (psr & PSR_ICC) | (env->psr & ~PSR_ICC); This keeps the non-PSR_ICC fields from env->psr, ... +    cpu_put_psr_icc(env, psr);   #endif   /* Note that pc and npc are handled

Re: [PULL 00/39] Migration 20231024 patches

2023-10-25 Thread Stefan Hajnoczi
On Tue, 24 Oct 2023 at 23:45, Juan Quintela wrote: > > The following changes since commit a95260486aa7e78d7c7194eba65cf03311ad94ad: > > Merge tag 'pull-tcg-20231023' of https://gitlab.com/rth7680/qemu into > staging (2023-10-23 14:45:46 -0700) > > are available in the Git repository at: > > h

Re: [PATCH 6/6] accel/tcg: Always require can_do_io

2023-10-25 Thread Richard Henderson
On 10/24/23 02:50, Clément Chigot wrote: Hi Richard, This commit has broken some of our internal bareboard testing on Risc-V 64. At some point in our programs, there is an AMOSWAP (= atomic swap) instruction on I/O. But since this commit, can_do_io is set to false triggering an infinite loop. II

[PATCH 06/29] tcg/optimize: Handle TCG_COND_TST{EQ,NE}

2023-10-25 Thread Richard Henderson
Fold constant comparisons. Canonicalize "tst x,x" to equality vs zero. Canonicalize "tst x,sign" to sign test vs zero. Fold double-word comparisons with zero parts. Fold setcond of "tst x,pow2" to a bit extract. Signed-off-by: Richard Henderson --- tcg/optimize.c | 225 ++

[PULL 18/94] target/sparc: Merge gen_branch_[an] with only caller

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 73 +--- 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index b8d51d6d6

[PULL 71/94] target/sparc: Move gen_ne_fop_DDD insns to decodetree

2023-10-25 Thread Richard Henderson
Move FMUL8x16, FMUL8x16AU, FMUL8x16AL, FMUL8SUx16, FMUL8ULx16, FMULD8SUx16, FMULD8ULx16, FPMERGE, FEXPAND, FANDNOT1d, FANDNOT2d, FANDd, FNANDd, FNORd, FORNOT1d, FORNOT2d, FORd, FPADD16d, FPADD32d, FPSUB16d, FPSUB32d, FXNORd, FXORd. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-of

[PULL 68/94] target/sparc: Move FMOVD, FNEGD, FABSD, FSRC*D, FNOT*D to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 +++ target/sparc/translate.c | 91 +-- 2 files changed, 56 insertions(+), 42 deletions(-) diff --git a/target/sparc/insns.decode b/ta

[PULL 65/94] target/sparc: Move ADDRALIGN* to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 56 ++- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/target/sparc/insns.decode b/ta

[PULL 80/94] target/sparc: Move FSMULD to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 43 +-- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/target/sparc/insns.decode b/targ

[PATCH 12/29] tcg/i386: Add rexw argument to tcg_out_testi

2023-10-25 Thread Richard Henderson
Move up above tcg_out_cmp, where it will be used. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 6e8af1fcf6..f4f4

[PULL 49/94] target/sparc: Drop ifdef around get_asi and friends

2023-10-25 Thread Richard Henderson
Mark some of the functions as unused, temporarily. Fix up some tl vs i64 issues revealed in the process. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 189 +++ 1 file changed, 72 insert

[PULL 76/94] target/sparc: Move FSQRTq to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 38 ++ 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/target/sparc/insns.decode b/targe

[PULL 67/94] target/sparc: Move FMOVS, FNEGS, FABSS, FSRC*S, FNOT*S to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 13 ++ target/sparc/translate.c | 92 +-- 2 files changed, 62 insertions(+), 43 deletions(-) diff --git a/target/sparc/insns.decode b

[PULL 93/94] target/sparc: Convert FZERO, FONE to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 5 +++ target/sparc/translate.c | 69 +++ 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/target/sparc/insns.decode b/ta

[PULL 35/94] target/sparc: Move MULX to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 8 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 1cff1

[PULL 94/94] target/sparc: Remove disas_sparc_legacy

2023-10-25 Thread Richard Henderson
All instructions are now converted. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 145 +-- 1 file changed, 1 insertion(+), 144 deletions(-) diff --git a/target/sparc/translate.c b/targ

[PULL 62/94] target/sparc: Merge LDFSR, LDXFSR implementations

2023-10-25 Thread Richard Henderson
Combine the helper to a single set_fsr(). Perform the mask and merge inline. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/helper.h | 3 +-- target/sparc/fop_helper.c | 17 ++-- target/sparc/translate.c | 42 +

[PULL 75/94] target/sparc: Move gen_fop_DD insns to decodetree

2023-10-25 Thread Richard Henderson
Move FSQRTd, FxTOd, FdTOx. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 50 +-- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/ta

[PATCH 22/29] tcg/ppc: Use cr0 in tcg_to_bc and tcg_to_isel

2023-10-25 Thread Richard Henderson
Using cr0 means we could choose to use rc=1 to compute the condition. Adjust the tables and tcg_out_cmp that feeds them. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 68 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/tc

[PULL 82/94] target/sparc: Move gen_fop_FD insns to decodetree

2023-10-25 Thread Richard Henderson
Move FdTOs, FdTOi, FxTOs. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 51 +-- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/tar

[PULL 34/94] target/sparc: Move ADDC to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 154 -- 2 files changed, 97 insertions(+), 58 deletions(-) diff --git a/target/sparc/insns.decode b/tar

[PULL 81/94] target/sparc: Move FDMULQ to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 41 +-- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/target/sparc/insns.decode b/targ

[PULL 21/94] target/sparc: Move Tcc to decodetree

2023-10-25 Thread Richard Henderson
Use the new delay_exceptionv function in the implementation. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 13 target/sparc/translate.c | 155 +++--- 2 files changed, 89 insertions(

[PULL 61/94] target/sparc: Move LDFSR, STFSR to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 + target/sparc/translate.c | 152 +++--- 2 files changed, 64 insertions(+), 92 deletions(-) diff --git a/target/sparc/insns.decode b/tar

[PULL 89/94] target/sparc: Move FMOVR, FMOVcc, FMOVfcc to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 12 +++ target/sparc/translate.c | 192 -- 2 files changed, 91 insertions(+), 113 deletions(-) diff --git a/target/sparc/insns.decode b/

[PULL 87/94] target/sparc: Move FdTOq, FxTOq to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 47 ++- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/target/sparc/insns.decode b/tar

[PULL 78/94] target/sparc: Move gen_fop_DDD insns to decodetree

2023-10-25 Thread Richard Henderson
Move FADDd, FSUBd, FMULd, FDIVd. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 55 --- 2 files changed, 32 insertions(+), 27 deletions(-) diff --gi

[PATCH 13/29] tcg/i386: Support TCG_COND_TST{EQ,NE}

2023-10-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 43 +++ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index f4f456a2c0..0d97864174 100644 --- a/tcg/i386/tcg-target.c.inc ++

[PULL 26/94] target/sparc: Move WRASR to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 31 target/sparc/translate.c | 341 +- 2 files changed, 216 insertions(+), 156 deletions(-) diff --git a/target/sparc/insns.decode

[PULL 54/94] target/sparc: Move LDSTUB, LDSTUBA to decodetree

2023-10-25 Thread Richard Henderson
Remove gen_ldstub_asi. Rename gen_ldstub_asi0 to gen_ldstub_asi. Merge gen_ldstub into gen_ldstub_asi. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 target/sparc/translate.c | 46 +++

[PULL 66/94] target/sparc: Move BMASK to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 2 ++ target/sparc/translate.c | 22 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.de

[PULL 79/94] target/sparc: Move gen_fop_QQQ insns to decodetree

2023-10-25 Thread Richard Henderson
Move FADDq, FSUBq, FMULq, FDIVq. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 52 +++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --gi

[PULL 73/94] target/sparc: Move gen_gsr_fop_DDD insns to decodetree

2023-10-25 Thread Richard Henderson
Move FPACK32, FALIGNDATA, BSHUFFLE. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 ++ target/sparc/translate.c | 101 -- 2 files changed, 55 insertions(+), 49 deletions(-) diff -

[PULL 69/94] target/sparc: Use tcg_gen_vec_{add,sub}*

2023-10-25 Thread Richard Henderson
Replace the local helpers for the same integer operations. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/helper.h | 12 target/sparc/translate.c | 15 +- target/sparc/vis_helper.c | 59

[PULL 42/94] target/sparc: Move MOVcc, MOVR to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 ++ target/sparc/translate.c | 116 -- 2 files changed, 64 insertions(+), 56 deletions(-) diff --git a/target/sparc/insns.decode b/ta

[PULL 77/94] target/sparc: Move gen_fop_FFF insns to decodetree

2023-10-25 Thread Richard Henderson
Move FADDs, FSUBs, FMULs, FDIVs. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 4 +++ target/sparc/translate.c | 54 +++ 2 files changed, 31 insertions(+), 27 deletions(-) diff --gi

[PULL 56/94] target/sparc: Move CASA, CASXA to decodetree

2023-10-25 Thread Richard Henderson
Remove gen_cas_asi, gen_casx_asi. Rename gen_cas_asi0 to gen_cas_asi. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 7 target/sparc/translate.c | 72 --- 2 files changed, 36 ins

[PULL 29/94] target/sparc: Move WRTBR, WRHPR to decodetree

2023-10-25 Thread Richard Henderson
Implement htstate in the obvious way. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 9 target/sparc/translate.c | 111 +++--- 2 files changed, 66 insertions(+), 54 deletions(-) di

[PATCH 20/29] tcg/sparc64: Support TCG_COND_TST{EQ,NE}

2023-10-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index e958e3c242..feeb318c39 100644 --- a/tcg/sparc64/tcg-target.c.inc +++ b/tcg/spar

[PULL 63/94] target/sparc: Move EDGE* to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 22 +++- target/sparc/translate.c | 271 -- 2 files changed, 133 insertions(+), 160 deletions(-) diff --git a/target/sparc/insns.decode

[PULL 31/94] target/sparc: Remove cpu_tick_cmpr, cpu_stick_cmpr, cpu_hstick_cmpr

2023-10-25 Thread Richard Henderson
Use direct loads and stores to env instead. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 41 ++-- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 096cbb869f..65b71dd93

[PULL 28/94] target/sparc: Move WRWIM, WRPR to decodetree

2023-10-25 Thread Richard Henderson
Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 21 +++ target/sparc/translate.c | 315 ++ 2 files changed, 200 insertions(+), 136 deletions(-) diff --git a/target/sparc/insns.decode b

  1   2   3   4   5   6   7   >