Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-03 Thread David Hildenbrand
On 04.02.21 07:41, David Hildenbrand wrote: Am 04.02.2021 um 03:22 schrieb Richard Henderson : On 2/1/21 10:45 AM, Richard W.M. Jones wrote: This commit breaks running certain s390x binaries, at least the "mount" command (or a library it uses) breaks. More details in this BZ:

Re: [PATCH] MAINTAINERS: Fix the location of virtiofsd.rst

2021-02-03 Thread Philippe Mathieu-Daudé
On 2/3/21 10:19 PM, Wainer dos Santos Moschetta wrote: > The virtiofsd.rst file was moved to docs/tools, so this update > MAINTAINERS accordingly. > > Fixes: a08b4a9fe6c ("docs: Move tools documentation to tools manual") Thanks, but why not directly fix all the files changed by that commit? >

Re: [PATCH v2 20/36] block: add bdrv_attach_child_common() transaction action

2021-02-03 Thread Kevin Wolf
Am 04.02.2021 um 08:34 hat Vladimir Sementsov-Ogievskiy geschrieben: > 04.02.2021 00:01, Kevin Wolf wrote: > > Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Split out no-perm part of bdrv_root_attach_child() into separate > > > transaction action.

Re: [PATCH v2 20/36] block: add bdrv_attach_child_common() transaction action

2021-02-03 Thread Vladimir Sementsov-Ogievskiy
04.02.2021 00:01, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: Split out no-perm part of bdrv_root_attach_child() into separate transaction action. bdrv_root_attach_child() now moves to new permission update paradigm: first update graph relations then

[Bug 1912777] Re: KVM_EXIT_MMIO has increased in Qemu4.0.0 when compared to Qemu 2.11.0

2021-02-03 Thread ANIMESH KUMAR SINHA
** Description changed: I was able to generate trace dump in Qemu for kvm_run_exit event in both QEMU 2.11.0 and QEMU 4.0.0 From the trace i noticed that the number of KVM_KXIT_MMIO calls has increased alot and is causing delay in testcase execution. I executed same testcase from Qemu

Re: [PATCH v2 19/36] block: fix bdrv_replace_node_common

2021-02-03 Thread Vladimir Sementsov-Ogievskiy
03.02.2021 21:23, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: inore_children thing doesn't help to track all propagated permissions of children we want to ignore. The simplest way to correctly update permissions is update graph first and then do

[PATCH] qemu-storage-daemon: Enable object-add

2021-02-03 Thread Kevin Wolf
As we don't have a fully QAPIfied version of object-add yet and it still has 'gen': false in the schema, it needs to be registered explicitly in init_qmp_commands() to be available for users. Fixes: 2af282ec51a27116d0402cab237b8970800f870c Signed-off-by: Kevin Wolf ---

Re: [PATCH v2 15/36] block: use topological sort for permission update

2021-02-03 Thread Vladimir Sementsov-Ogievskiy
03.02.2021 21:38, Kevin Wolf wrote: Am 28.01.2021 um 19:04 hat Vladimir Sementsov-Ogievskiy geschrieben: 28.01.2021 20:13, Kevin Wolf wrote: Am 28.01.2021 um 10:34 hat Vladimir Sementsov-Ogievskiy geschrieben: 27.01.2021 21:38, Kevin Wolf wrote: Am 27.11.2020 um 15:45 hat Vladimir

Re: [PATCH 1/6] travis.yml: Move gprof/gcov test across to gitlab

2021-02-03 Thread Thomas Huth
On 03/02/2021 20.32, Wainer dos Santos Moschetta wrote: Hi, On 2/3/21 8:32 AM, Thomas Huth wrote: From: Philippe Mathieu-Daudé Similarly to commit 8cdb2cef3f1, move the gprof/gcov test to GitLab. The coverage-summary.sh script is not Travis-CI specific, make it generic. Signed-off-by:

[PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-03 Thread schspa
At the moment the following QEMU command line triggers an assertion failure On xlnx-versal SOC:   qemu-system-aarch64 \   -machine xlnx-versal-virt -nographic -smp 2 -m 128 \   -fsdev local,id=shareid,path=${HOME}/work,security_model=none \   -device

Re: [PATCH 02/22] tests/acceptance/boot_linux.py: rename misleading cloudinit method

2021-02-03 Thread Thomas Huth
On 03/02/2021 18.23, Cleber Rosa wrote: There's no downloading happening on that method, so let's call it "prepare" instead. While at it, and because of it, the current "prepare_boot" and "prepare_cloudinit" are also renamed. The reasoning here is that "prepare_" methods will just work on the

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-03 Thread David Hildenbrand
> Am 04.02.2021 um 03:22 schrieb Richard Henderson > : > > On 2/1/21 10:45 AM, Richard W.M. Jones wrote: >> This commit breaks running certain s390x binaries, at least >> the "mount" command (or a library it uses) breaks. >> >> More details in this BZ: >> >>

Re: gitlab containers are broken

2021-02-03 Thread Richard Henderson
On 2/3/21 8:03 PM, Thomas Huth wrote: > On 04/02/2021 00.04, Richard Henderson wrote: >> Something has gone wrong with the building of the containers >> in gitlab, because *all* off them are installing Alpine Linux. >> >> https://gitlab.com/rth7680/qemu/-/jobs/1006336396#L155 > > I think that's

Re: gitlab containers are broken

2021-02-03 Thread Thomas Huth
On 04/02/2021 00.04, Richard Henderson wrote: Something has gone wrong with the building of the containers in gitlab, because *all* off them are installing Alpine Linux. https://gitlab.com/rth7680/qemu/-/jobs/1006336396#L155 I think that's ok ... the output about alpine that you see there is

Re: [PATCH v4 0/9] hw/sd: Support block read/write in SPI mode

2021-02-03 Thread Bin Meng
On Thu, Jan 28, 2021 at 2:30 PM Bin Meng wrote: > > From: Bin Meng > > This includes the previously v3 series [1], and one single patch [2]. > > Compared to v3, this fixed the following issue in patch [v3,6/6]: > - Keep the card state to SSI_SD_CMD instead of SSI_SD_RESPONSE after > receiving

[Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly

2021-02-03 Thread Vadim Averin
Public bug reported: When the emulated pl110/pl111 is switched programmatically to 8-bit color depth mode, the display is drawn green and blue, but the real PL110 displays grayscale in 8-bit mode. The bug appears in qemu-system-arm version 3.1.0 (Debian 1:3.1+dfsg-8+deb10u8) and qemu-system-arm

Re: [PATCH v2 2/2] hw/ppc: e500: Fill in correct for the serial nodes

2021-02-03 Thread Bin Meng
On Thu, Feb 4, 2021 at 12:58 PM David Gibson wrote: > > On Wed, Feb 03, 2021 at 10:24:48PM +0800, Bin Meng wrote: > > From: Bin Meng > > > > At present the property of the serial node is > > populated with value zero. U-Boot's ns16550 driver is not happy > > about this, so let's fill in a

Re: [PATCH v2 2/2] hw/ppc: e500: Fill in correct for the serial nodes

2021-02-03 Thread David Gibson
On Wed, Feb 03, 2021 at 10:24:48PM +0800, Bin Meng wrote: > From: Bin Meng > > At present the property of the serial node is > populated with value zero. U-Boot's ns16550 driver is not happy > about this, so let's fill in a meaningful value. Are you sure this is correct - that is that the

Re: [PATCH v2 1/2] hw/ppc: e500: Use a macro for the platform clock frequency

2021-02-03 Thread David Gibson
On Wed, Feb 03, 2021 at 10:24:47PM +0800, Bin Meng wrote: > From: Bin Meng > > At present the platform clock frequency is using a magic number. > Convert it to a macro and use it everywhere. > > Signed-off-by: Bin Meng > Reviewed-by: Philippe Mathieu-Daudé Applied to ppc-for-6.0, thanks. >

Re: [RFC PATCH v1 01/01] PCIe DOE for PCIe and CXL 2.0

2021-02-03 Thread Chris Browy
Hi Jonathan, Thanks for the review comments and we'll put out a v2 patch series based on a genuine git send-email flow in a day or so and plan to include - functionally separate patches - new MSI-X support - few bugs found in CDAT table header + checksum generation - more fully respond to

Re: [PATCH v2 00/93] TCI fixes and cleanups

2021-02-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210204014509.882821-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210204014509.882821-1-richard.hender...@linaro.org Subject: [PATCH v2 00/93]

Re: [RFC 09/10] vhost: Route guest->host notification through shadow virtqueue

2021-02-03 Thread Jason Wang
On 2021/2/2 下午6:08, Eugenio Perez Martin wrote: On Mon, Feb 1, 2021 at 7:29 AM Jason Wang wrote: On 2021/1/30 上午4:54, Eugenio Pérez wrote: Shadow virtqueue notifications forwarding is disabled when vhost_dev stops. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h |

Re: [PATCH 1/2] target/cris: Use MMUAccessType enum type when possible

2021-02-03 Thread Richard Henderson
On 1/27/21 2:32 PM, Philippe Mathieu-Daudé wrote: > Replace the 0/1/2 magic values by the corresponding MMUAccessType. > We can remove a comment as enum names are self explicit. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/cris/helper.c | 4 ++-- > target/cris/mmu.c| 13

Re: [RFC 05/10] vhost: Add vhost_dev_from_virtio

2021-02-03 Thread Jason Wang
On 2021/2/2 下午6:17, Eugenio Perez Martin wrote: On Tue, Feb 2, 2021 at 4:31 AM Jason Wang wrote: On 2021/2/1 下午4:28, Eugenio Perez Martin wrote: On Mon, Feb 1, 2021 at 7:13 AM Jason Wang wrote: On 2021/1/30 上午4:54, Eugenio Pérez wrote: Signed-off-by: Eugenio Pérez ---

Re: [PATCH 2/2] target/nios2: Use MMUAccessType enum type when possible

2021-02-03 Thread Richard Henderson
On 1/27/21 1:41 PM, Philippe Mathieu-Daudé wrote: > All callers of mmu_translate() provide it a MMUAccessType > type. Let the prototype use it as argument, as it is stricter > than an integer. We can remove the documentation as enum > names are self explicit. > > Signed-off-by: Philippe

Re: [PATCH 3/5] target/sh4: Pass mmu_idx to get_physical_address()

2021-02-03 Thread Richard Henderson
On 1/27/21 1:21 PM, Philippe Mathieu-Daudé wrote: > get_mmu_address() and get_physical_address() don't use their > 'int access_type' argument: remove it along with ACCESS_INT > in superh_cpu_tlb_fill(). Sure. > Pass the MMU index along, as other targets do. But if it's unused, why? r~

Re: [PATCH v8 07/13] confidential guest support: Introduce cgs "ready" flag

2021-02-03 Thread David Gibson
On Wed, Feb 03, 2021 at 05:15:48PM +0100, Greg Kurz wrote: > On Tue, 2 Feb 2021 15:13:09 +1100 > David Gibson wrote: > > > The platform specific details of mechanisms for implementing > > confidential guest support may require setup at various points during > > initialization. Thus, it's not

Re: [PATCH v8 10/13] spapr: Add PEF based confidential guest support

2021-02-03 Thread David Gibson
On Wed, Feb 03, 2021 at 06:50:16PM +0100, Greg Kurz wrote: > On Tue, 2 Feb 2021 15:13:12 +1100 > David Gibson wrote: > > > Some upcoming POWER machines have a system called PEF (Protected > > Execution Facility) which uses a small ultravisor to allow guests to > > run in a way that they can't

Re: [PATCH 1/2] target/nios2: Replace magic value by MMU definitions

2021-02-03 Thread Richard Henderson
On 1/27/21 1:41 PM, Philippe Mathieu-Daudé wrote: > cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type. > The first MMU is the supervisor one. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/nios2/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I'll note that

Re: [PATCH 1/5] target/sh4: Fix code style for checkpatch.pl

2021-02-03 Thread Richard Henderson
On 1/27/21 1:21 PM, Philippe Mathieu-Daudé wrote: > We are going to move this code, fix its style first. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Easier to review using 'git-diff -w -b' > --- > target/sh4/helper.c | 82 ++--- > 1 file changed, 41

Re: [PATCH 2/2] target/cris: Let cris_mmu_translate() use MMUAccessType access_type

2021-02-03 Thread Richard Henderson
On 1/27/21 2:32 PM, Philippe Mathieu-Daudé wrote: > All callers of cris_mmu_translate() provide a MMUAccessType > type. Let the prototype use it as argument, as it is stricter > than an integer. We can remove the documentation as enum > names are self explicit. > > Signed-off-by: Philippe

Re: [PATCH 2/5] target/sh4: Replace magic value by MMUAccessType definitions

2021-02-03 Thread Richard Henderson
On 1/27/21 1:21 PM, Philippe Mathieu-Daudé wrote: > Replace the 0/1/2 magic values by the corresponding MMUAccessType. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sh4/helper.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson

Re: [PATCH 4/5] target/sh4: Let get_physical_address() use MMUAccessType access_type

2021-02-03 Thread Richard Henderson
On 1/27/21 1:21 PM, Philippe Mathieu-Daudé wrote: > superh_cpu_tlb_fill() already provides a access_type variable of > type MMUAccessType, and it is passed along, but casted as integer > and renamed 'rw'. > Simply replace 'int rw' by 'MMUAccessType access_type'. > > Signed-off-by: Philippe

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-03 Thread Richard Henderson
On 2/1/21 10:45 AM, Richard W.M. Jones wrote: > This commit breaks running certain s390x binaries, at least > the "mount" command (or a library it uses) breaks. > > More details in this BZ: > > https://bugzilla.redhat.com/show_bug.cgi?id=1922248 > > Could we revert this change since it seems to

Re: [PATCH 5/5] target/sh4: Remove unused definitions

2021-02-03 Thread Richard Henderson
On 1/27/21 1:21 PM, Philippe Mathieu-Daudé wrote: > Remove these confusing and unused definitions. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sh4/cpu.h | 11 --- > 1 file changed, 11 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH v2 92/93] tcg/tci: Implement mulu2, muls2

2021-02-03 Thread Richard Henderson
We already had mulu2_i32 for a 32-bit host; expand this to 64-bit hosts as well. The muls2_i32 and the 64-bit opcodes are new. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 8 tcg/tci.c| 35 +--

Re: [PATCH 07/13] target/mips: Let page_table_walk_refill() take MMUAccessType argument

2021-02-03 Thread Richard Henderson
On 1/28/21 4:41 AM, Philippe Mathieu-Daudé wrote: > -static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, int rw, > -int mmu_idx) > +static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, > + MMUAccessType access_type, int

Re: [PATCH 00/13] target/mips: Replace integer by MMUAccessType enum when possible

2021-02-03 Thread Richard Henderson
On 1/28/21 4:41 AM, Philippe Mathieu-Daudé wrote: > Philippe Mathieu-Daudé (13): > target/mips: Remove access_type argument from map_address() handler > target/mips: Remove access_type argument from get_seg_physical_address > target/mips: Remove access_type arg from

[PATCH v2 91/93] tcg/tci: Implement clz, ctz, ctpop

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 12 +-- tcg/tci.c| 44 tcg/tci/tcg-target.c.inc | 9 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.h

[PATCH v2 88/93] tcg/tci: Implement movcond

2021-02-03 Thread Richard Henderson
When this opcode is not available in the backend, tcg middle-end will expand this as a series of 5 opcodes. So implementing this saves bytecode space. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 4 ++-- tcg/tci.c| 16 +++-

[PATCH v2 90/93] tcg/tci: Implement extract, sextract

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 8 tcg/tci.c| 42 tcg/tci/tcg-target.c.inc | 32 ++ 3 files changed, 78 insertions(+), 4 deletions(-) diff --git a/tcg/tci/tcg-target.h

[PATCH v2 87/93] tcg/tci: Implement goto_ptr

2021-02-03 Thread Richard Henderson
This operation is critical to staying within the interpretation loop longer, which avoids the overhead of setup and teardown for many TBs. The check in tcg_prologue_init is disabled because TCI does want to use NULL to indicate exit, as opposed to branching to a real epilogue. Signed-off-by:

[PATCH v2 86/93] tcg/tci: Change encoding to uint32_t units

2021-02-03 Thread Richard Henderson
This removes all of the problems with unaligned accesses to the bytecode stream. With an 8-bit opcode at the bottom, we have 24 bits remaining, which are generally split into 6 4-bit slots. This fits well with the maximum length opcodes, e.g. INDEX_op_add2_i386, which have 6 register operands.

[PATCH v2 93/93] tcg/tci: Implement add2, sub2

2021-02-03 Thread Richard Henderson
We already had the 32-bit versions for a 32-bit host; expand this to 64-bit hosts as well. The 64-bit opcodes are new. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 8 tcg/tci.c| 40 ++-- tcg/tci/tcg-target.c.inc |

[PATCH v2 89/93] tcg/tci: Implement andc, orc, eqv, nand, nor

2021-02-03 Thread Richard Henderson
These were already present in tcg-target.c.inc, but not in the interpreter. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 20 ++-- tcg/tci.c| 40 2 files changed, 50 insertions(+), 10 deletions(-) diff --git

[PATCH v2 85/93] tcg/tci: Remove tci_write_reg

2021-02-03 Thread Richard Henderson
Inline it into its one caller, tci_write_reg64. Drop the asserts that are redundant with tcg_read_r. Signed-off-by: Richard Henderson --- tcg/tci.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index e7268b13e1..4f81cbb904 100644 ---

[PATCH v2 83/93] tcg/tci: Reserve r13 for a temporary

2021-02-03 Thread Richard Henderson
We're about to adjust the offset range on host memory ops, and the format of branches. Both will require a temporary. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 1 + tcg/tci/tcg-target.c.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/tcg/tci/tcg-target.h

[PATCH v2 82/93] tcg/tci: Split out tcg_out_op_r[iI]

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 50 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index e4a5872b2a..c2d2bd24d7 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 81/93] tcg/tci: Split out tcg_out_op_np

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index eeafec6d44..e4a5872b2a 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 75/93] tcg/tci: Split out tcg_out_op_rrcl

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 6c743a8fbd..8cc63124d4 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 79/93] tcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm}

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 70 ++-- 1 file changed, 53 insertions(+), 17 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index fb4aacaca3..f93772f01f 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 84/93] tcg/tci: Emit setcond before brcond

2021-02-03 Thread Richard Henderson
The encoding planned for tci does not have enough room for brcond2, with 4 registers and a condition as input as well as the label. Resolve the condition into TCG_REG_TMP, and relax brcond to one register plus a label, considering the condition to always be reg != 0. Signed-off-by: Richard

[PATCH v2 80/93] tcg/tci: Split out tcg_out_op_v

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index f93772f01f..eeafec6d44 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc

[PATCH v2 73/93] tcg/tci: Split out tcg_out_op_rrrrrc

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 5848779208..8eda159dde 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 79/93] tcg/tci: Split out tcg_out_op_{rrm,rrrm,rrrrm}

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 70 ++-- 1 file changed, 53 insertions(+), 17 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index fb4aacaca3..f93772f01f 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 78/93] tcg/tci: Split out tcg_out_op_rrrrcl

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index c2bbd85130..fb4aacaca3 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 72/93] tcg/tci: Split out tcg_out_op_rrrc

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 546424c2bd..5848779208 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 74/93] tcg/tci: Split out tcg_out_op_rrrbb

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 8eda159dde..6c743a8fbd 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 77/93] tcg/tci: Split out tcg_out_op_rrrr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index f7595fbd65..c2bbd85130 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 76/93] tcg/tci: Split out tcg_out_op_rrrrrr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 8cc63124d4..f7595fbd65 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 69/93] tcg/tci: Split out tcg_out_op_p

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 1e3f2c4049..cb0cbbb8da 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-03 Thread Richard Henderson
This requires adjusting where arguments are stored. Place them on the stack at left-aligned positions. Adjust the stack frame to be at entirely positive offsets. Signed-off-by: Richard Henderson --- include/tcg/tcg.h| 1 + tcg/tci/tcg-target.h | 2 +- tcg/tcg.c|

[PATCH v2 71/93] tcg/tci: Split out tcg_out_op_rrr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 272e3ca70b..546424c2bd 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 68/93] tcg/tci: Split out tcg_out_op_l

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 707f801099..1e3f2c4049 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc

[PATCH v2 70/93] tcg/tci: Split out tcg_out_op_rr

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

[PATCH v2 59/93] tcg/tci: Hoist op_size checking into tci_args_*

2021-02-03 Thread Richard Henderson
This performs the size check while reading the arguments, which means that we don't have to arrange for it to be done after the operation. Which tidies all of the branches. Signed-off-by: Richard Henderson --- tcg/tci.c | 87 ++- 1 file

[PATCH v2 61/93] tcg/tci: Implement the disassembler properly

2021-02-03 Thread Richard Henderson
Actually print arguments as opposed to simply the opcodes and, uselessly, the argument counts. Reuse all of the helpers developed as part of the interpreter. Signed-off-by: Richard Henderson --- meson.build | 2 +- include/tcg/tcg-opc.h | 2 - disas/tci.c | 61

[PATCH v2 65/93] tcg/tci: Move call-return regs to end of tcg_target_reg_alloc_order

2021-02-03 Thread Richard Henderson
As the only call-clobbered regs for TCI, these should receive the least priority. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index

[PATCH v2 67/93] tcg/tci: Split out tcg_out_op_rrs

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 84 +++- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 050d514853..707f801099 100644 --- a/tcg/tci/tcg-target.c.inc +++

[PATCH v2 58/93] tcg/tci: Split out tci_args_{rrm,rrrm,rrrrm}

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 147 ++ 1 file changed, 81 insertions(+), 66 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index ddc138359b..a1846825ea 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -66,22 +66,18 @@

[PATCH v2 56/93] tcg/tci: Clean up deposit operations

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

[PATCH v2 55/93] tcg/tci: Split out tci_args_rrrr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 84d77855ee..cb24295cd9 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -237,6 +237,15 @@ static void tci_args_rrrc(const uint8_t **tb_ptr, }

[PATCH v2 66/93] tcg/tci: Push opcode emit into each case

2021-02-03 Thread Richard Henderson
We're about to split out bytecode output into helpers, but we can't do that one at a time if tcg_out_op_t is being done outside of the switch. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-)

[PATCH v2 53/93] tcg/tci: Reuse tci_args_l for goto_tb

2021-02-03 Thread Richard Henderson
Convert to indirect jumps, as it's less complicated. Then we just have a pointer to the tb address at which the chain is stored, from which we read. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 11 +++ tcg/tci.c| 8 +++- tcg/tci/tcg-target.c.inc |

[PATCH v2 46/93] tcg/tci: Split out tci_args_rrrc

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 1736234bfd..86625061f1 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -207,6 +207,15 @@ static void tci_args_rrs(const uint8_t

[PATCH v2 54/93] tcg/tci: Split out tci_args_rrrrrr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0301ee63a7..84d77855ee 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -258,6 +258,17 @@ static void tci_args_rc(const

[PATCH v2 64/93] tcg/tci: Improve tcg_target_call_clobber_regs

2021-02-03 Thread Richard Henderson
The current setting is much too pessimistic. Indicating only the one or two registers that are actually assigned after a call should avoid unnecessary movement between the register array and the stack array. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 10 -- 1 file

[PATCH v2 52/93] tcg/tci: Reuse tci_args_l for exit_tb

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

[PATCH v2 49/93] tcg/tci: Split out tci_args_rrcl and tci_args_rrrrcl

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 52 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 692b95b5c2..1e2f78a9f9 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -212,6 +212,15 @@ static void

[PATCH v2 51/93] tcg/tci: Reuse tci_args_l for calls.

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 5cc05fa554..92b13829c3 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -452,30 +452,30 @@ uintptr_t QEMU_DISABLE_CFI

[PATCH v2 62/93] tcg: Build ffi data structures for helpers

2021-02-03 Thread Richard Henderson
We will shortly use libffi for tci, as that is the only portable way of calling arbitrary functions. Signed-off-by: Richard Henderson --- meson.build| 9 +- include/exec/helper-ffi.h | 115 + include/exec/helper-tcg.h

[PATCH v2 45/93] tcg/tci: Split out tci_args_rrr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 154 -- 1 file changed, 57 insertions(+), 97 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 0bc5294e8b..1736234bfd 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -191,6 +191,14 @@ static void

[PATCH v2 47/93] tcg/tci: Split out tci_args_l

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 86625061f1..8bc9dd27b0 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -184,6 +184,11 @@ static tcg_target_ulong tci_read_label(const uint8_t

[PATCH v2 50/93] tcg/tci: Split out tci_args_ri and tci_args_rI

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 1e2f78a9f9..5cc05fa554 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -121,16 +121,6 @@ static int32_t

[PATCH v2 60/93] tcg/tci: Remove tci_disas

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

[PATCH v2 44/93] tcg/tci: Split out tci_args_rr

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 67 +-- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index be298ae39d..0bc5294e8b 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -184,6 +184,13 @@ static

[PATCH v2 36/93] tcg/tci: Reduce use of tci_read_r64

2021-02-03 Thread Richard Henderson
In all cases restricted to 64-bit hosts, tcg_read_r is identical. We retain the 64-bit symbol for the single case of INDEX_op_qemu_st_i64. Signed-off-by: Richard Henderson --- tcg/tci.c | 93 +-- 1 file changed, 42 insertions(+), 51

[PATCH v2 48/93] tcg/tci: Split out tci_args_rrrrrc

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 8bc9dd27b0..692b95b5c2 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -221,6 +221,19 @@ static void tci_args_rrrc(const uint8_t

[PATCH v2 57/93] tcg/tci: Reduce qemu_ld/st TCGMemOpIdx operand to 32-bits

2021-02-03 Thread Richard Henderson
We are currently using the "natural" size routine, which uses 64-bits on a 64-bit host. The TCGMemOpIdx operand has 11 bits, so we can safely reduce to 32-bits. Signed-off-by: Richard Henderson --- tcg/tci.c| 8 tcg/tci/tcg-target.c.inc | 4 ++-- 2 files changed, 6

[PATCH v2 42/93] tcg/tci: Rename tci_read_r to tci_read_rval

2021-02-03 Thread Richard Henderson
In the next patches, we want to use tci_read_r to return the raw register number. So rename the existing function, which returns the register value, to tci_read_rval. Signed-off-by: Richard Henderson --- tcg/tci.c | 192 +++--- 1 file changed, 96

[PATCH v2 27/93] tcg/tci: Fix TCG_REG_R4 misusage

2021-02-03 Thread Richard Henderson
This was removed from tcg_target_reg_alloc_order and tcg_target_call_iarg_regs on the assumption that it was the stack. This was incorrectly copied from i386. For tci, the stack is R15. By adding R4 back to tcg_target_call_iarg_regs, adjust the other entries so that 6 (or 12) entries are still

[PATCH v2 43/93] tcg/tci: Split out tci_args_rrs

2021-02-03 Thread Richard Henderson
Begin splitting out functions that do pure argument decode, without actually loading values from the register set. This means that decoding need not concern itself between input and output registers. We can assert that the register number is in range during decode, so that it is safe to simply

[PATCH v2 40/93] tcg/tci: Merge bswap operations

2021-02-03 Thread Richard Henderson
This includes bswap16 and bswap32. Signed-off-by: Richard Henderson --- tcg/tci.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 1819652c5a..c979215332 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -652,15 +652,15 @@ uintptr_t

[PATCH v2 41/93] tcg/tci: Merge mov, not and neg operations

2021-02-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci.c | 29 + 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index c979215332..225cb698e8 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -404,7 +404,7 @@ uintptr_t QEMU_DISABLE_CFI

[PATCH v2 22/93] tcg/tci: Use g_assert_not_reached

2021-02-03 Thread Richard Henderson
Three TODO instances are never happen cases. Other uses of tcg_abort are also indicating unreachable cases. Tested-by: Alex Bennée Reviewed-by: Stefan Weil Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tci.c | 15 +++ 1 file changed, 7 insertions(+), 8

[PATCH v2 39/93] tcg/tci: Remove ifdefs for TCG_TARGET_HAS_ext32[us]_i64

2021-02-03 Thread Richard Henderson
These operations are always available under different names: INDEX_op_ext_i32_i64 and INDEX_op_extu_i32_i64, so we remove no code with the ifdef. Signed-off-by: Richard Henderson --- tcg/tci.c | 4 1 file changed, 4 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index

[PATCH v2 38/93] tcg/tci: Merge extension operations

2021-02-03 Thread Richard Henderson
This includes ext8s, ext8u, ext16s, ext16u. Signed-off-by: Richard Henderson --- tcg/tci.c | 44 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 894e87e1b0..cdfd9b7af8 100644 --- a/tcg/tci.c +++ b/tcg/tci.c

[PATCH v2 29/93] tcg/tci: Remove TCG_CONST

2021-02-03 Thread Richard Henderson
Only allow registers or constants, but not both, in any given position. Removing this difference in input will allow more code to be shared between 32-bit and 64-bit. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target-con-set.h | 6 +- tcg/tci/tcg-target.h | 3 - tcg/tci.c

[PATCH v2 20/93] tcg/tci: Move stack bounds check to compile-time

2021-02-03 Thread Richard Henderson
The existing check was incomplete: (1) Only applied to two of the 7 stores, and not to the loads at all. (2) Only checked the upper, but not the lower bound of the stack. Doing this at compile time means that we don't need to do it at runtime as well. Tested-by: Alex Bennée Reviewed-by: Alex

[PATCH v2 33/93] tcg/tci: Remove tci_read_r16

2021-02-03 Thread Richard Henderson
Use explicit casts for ext16u opcodes, and allow truncation to happen with the store for st8 opcodes, and with the call for bswap16 opcodes. Signed-off-by: Richard Henderson --- tcg/tci.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/tcg/tci.c

  1   2   3   4   5   6   >