[PATCH 10/16] vfio/pci: Make vfio_populate_device() return a bool

2024-05-15 Thread Zhenzhong Duan
Since vfio_populate_device() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio

[PATCH 06/16] vfio/platform: Make vfio_populate_device() and vfio_base_device_init() return bool

2024-05-15 Thread Zhenzhong Duan
This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/platform.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/hw/v

[PATCH 08/16] vfio/pci: Make vfio_intx_enable_kvm() return a bool

2024-05-15 Thread Zhenzhong Duan
Since vfio_intx_enable_kvm() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.

[PATCH 09/16] vfio/pci: Make vfio_pci_relocate_msix() and vfio_msix_early_setup() return a bool

2024-05-15 Thread Zhenzhong Duan
Since vfio_pci_relocate_msix() and vfio_msix_early_setup() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 32 1 file changed, 16 insertions(+), 16 deleti

[PATCH 00/16] VFIO: misc cleanups part2

2024-05-15 Thread Zhenzhong Duan
Hi This is the last round of cleanup series to change functions in hw/vfio/ to return bool when the error is passed through errp parameter. The first round is at https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg01147.html I see Cédric is also working on some migration stuff cleanup, so

Re: [PATCH v2 0/6] hw/loongarch: Refine numa memory map

2024-05-15 Thread gaosong
在 2024/5/7 上午11:48, Bibo Mao 写道: One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for

Re: [PATCH v5 3/3] tests: Add migration test for loongarch64

2024-05-15 Thread gaosong
在 2024/5/11 上午11:42, Bibo Mao 写道: This patch adds migration test support for loongarch64. The test code comes from aarch64 mostly, only that it booted as bios in qemu since kernel requires elf format and bios uses binary format. In addition to providing the binary, this patch also includes the s

Re: [PATCH v5 2/3] hw/loongarch: Remove minimum and default memory size

2024-05-15 Thread gaosong
在 2024/5/11 上午11:42, Bibo Mao 写道: Some qtest test cases such as numa use default memory size of generic machine class, which is 128M by fault. Here generic default memory size is used, and also remove minimum memory size which is 1G originally. Signed-off-by: Bibo Mao --- This patch has alrea

Re: [PATCH v5 1/3] hw/loongarch: Add compat machine for 9.1

2024-05-15 Thread gaosong
在 2024/5/11 上午11:42, Bibo Mao 写道: Since migration test case requires compat machine type support, compat machine is added for qemu 9.1 here. Signed-off-by: Bibo Mao --- Reviewed-by: Song Gao Thanks. Song Gao hw/loongarch/virt.c | 61 +++-- 1 file c

[PATCH v3] hw/pflash: fix block write start

2024-05-15 Thread Gerd Hoffmann
Move the pflash_blk_write_start() call. We need the offset of the first data write, not the offset for the setup (number-of-bytes) write. Without this fix u-boot can do block writes to the first flash block only. While being at it drop a leftover FIXME. Resolves: #2343 Fixes: fcc79f2e0955 ("hw/

[PATCH] intel_iommu: Make pasid entry type check accurate

2024-05-15 Thread Zhenzhong Duan
When guest configures Nested Translation(011b) or First-stage Translation only (001b), type check passed unaccurately. Fails the type check in those cases as their simulation isn't supported yet. Fixes: fb43cf739e1 ("intel_iommu: scalable mode emulation") Suggested-by: Yi Liu Signed-off-by: Zhen

RE: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-15 Thread Jamin Lin
Hi Cedric, Sorry reply you late. > Hello Jamin, > > On 4/30/24 09:56, Jamin Lin wrote: > > Hi Cedric, > > > >> -Original Message- > >> From: Cédric Le Goater > >> Sent: Tuesday, April 30, 2024 3:26 PM > >> To: Jamin Lin ; Peter Maydell > >> ; Andrew Jeffery > >> ; Joel Stanley ; > >> Ali

Re: [PATCH] tests/libqos: Add loongarch virt machine node

2024-05-15 Thread gaosong
在 2024/5/14 下午7:51, Bibo Mao 写道: Add loongarch virt machine to the graph. It is a modified copy of the existing riscv virtmachine in riscv-virt-machine.c It contains a generic-pcihost controller, and an extra function loongarch_config_qpci_bus() to configure GPEX pci host controller information,

RE: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-15 Thread Jamin Lin
Hi Cedric, Sorry reply you late. > Hello Jamin, > > To handle the DMA DRAM Side Address High register, we should reintroduce an > "dram-base" property which I removed a while ago. Something like : > > > > diff --git a/include/hw/ssi/aspeed_smc.h b/include/hw/ssi/aspeed_smc.h index > 7f32e43ff6

Re: [PATCH] tests/libqos: Add loongarch virt machine node

2024-05-15 Thread maobibo
On 2024/5/15 下午5:01, gaosong wrote: 在 2024/5/14 下午7:51, Bibo Mao 写道: Add loongarch virt machine to the graph. It is a modified copy of the existing riscv virtmachine in riscv-virt-machine.c It contains a generic-pcihost controller, and an extra function loongarch_config_qpci_bus() to configu

Re: [PATCH 02/20] qapi: linter fixups

2024-05-15 Thread Markus Armbruster
John Snow writes: > Fix minor irritants to pylint/flake8 et al. > > (Yes, these need to be guarded by the Python tests. That's a work in > progress, a series that's quite likely to follow once I finish this > Sphinx project. Please pardon the temporary irritation.) No worries; one step at a time

[PATCH v2 1/1] target/riscv/kvm.c: Fix the hart bit setting of AIA

2024-05-15 Thread Yong-Xuan Wang
In AIA spec, each hart (or each hart within a group) has a unique hart number to locate the memory pages of interrupt files in the address space. The number of bits required to represent any hart number is equal to ceil(log2(hmax + 1)), where hmax is the largest hart number among groups. However,

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread Markus Armbruster
John Snow writes: > In the coming patches, it's helpful to have a linting baseline. However, > there's no need to shuffle around the deck chairs too much, because most > of this code will be removed once the new qapidoc generator (the > "transmogrifier") is in place. > > To ease my pain: just tur

Re: [PATCH v6 5/9] vfio/migration: Add Error** argument to .vfio_save_config() handler

2024-05-15 Thread Eric Auger
On 5/14/24 17:31, Cédric Le Goater wrote: > Use vmstate_save_state_with_err() to improve error reporting in the > callers and store a reported error under the migration stream. Add > documentation while at it. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Cédric Le Goater > --- >

Re: [PATCH v6 6/9] vfio: Reverse test on vfio_get_xlat_addr()

2024-05-15 Thread Eric Auger
On 5/14/24 17:31, Cédric Le Goater wrote: > It will simplify the changes coming after. > > Reviewed-by: Avihai Horon > Signed-off-by: Cédric Le Goater > --- > > Changes in v6: > > - Modified title (Avihai) > - vfio_iommu_map_dirty_notify() : Modified goto label (Avihai) > > hw/vfio/

Re: [PATCH v6 7/9] memory: Add Error** argument to memory_get_xlat_addr()

2024-05-15 Thread Eric Auger
On 5/14/24 17:31, Cédric Le Goater wrote: > Let the callers do the reporting. This will be useful in > vfio_iommu_map_dirty_notify(). > > Cc: Michael S. Tsirkin > Cc: Paolo Bonzini > Cc: David Hildenbrand > Reviewed-by: Peter Xu > Signed-off-by: Cédric Le Goater > --- > > Changes in v6:

Re: [PULL 00/11] Ui patches

2024-05-15 Thread Richard Henderson
On 5/14/24 15:17, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The following changes since commit 9360070196789cc8b9404b2efaf319384e64b107: Merge tag 'for-upstream' ofhttps://gitlab.com/bonzini/qemu into staging (2024-05-12 13:41:26 +0200) are available in the Git repository

Re: [PATCH v6 8/9] vfio: Add Error** argument to .get_dirty_bitmap() handler

2024-05-15 Thread Eric Auger
On 5/14/24 17:31, Cédric Le Goater wrote: > Let the callers do the error reporting. Add documentation while at it. > > Signed-off-by: Cédric Le Goater > --- > > Changes in v6: > > - Fixed the line wrapping (Avihai) > - Fixed query_dirty_bitmap documentation (Avihai) > > Changes in v5

Re: [PATCH v6 9/9] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-05-15 Thread Eric Auger
On 5/14/24 17:31, Cédric Le Goater wrote: > vfio_save_complete_precopy() currently returns before doing the trace > event. Change that. > > Reviewed-by: Avihai Horon > Signed-off-by: Cédric Le Goater > --- > hw/vfio/migration.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/hw/v

Re: [PATCH v3] hw/pflash: fix block write start

2024-05-15 Thread Philippe Mathieu-Daudé
On 15/5/24 10:43, Gerd Hoffmann wrote: Move the pflash_blk_write_start() call. We need the offset of the first data write, not the offset for the setup (number-of-bytes) write. Without this fix u-boot can do block writes to the first flash block only. Wow, that is a fast fix :) Thanks! Whil

[PATCH v3 2/6] hw/loongarch: Refine fadt memory table for numa memory

2024-05-15 Thread Bibo Mao
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for minimum memory size for both total

[PATCH v3 6/6] tests/qtest: Add numa test for loongarch system

2024-05-15 Thread Bibo Mao
Add numa test case for loongarch system, it passes to run with command "make check-qtest". Signed-off-by: Bibo Mao --- tests/qtest/meson.build | 2 +- tests/qtest/numa-test.c | 53 + 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/tests/qte

[PATCH v3 5/6] hw/loongarch: Remove minimum and default memory size

2024-05-15 Thread Bibo Mao
Some qtest test cases such as numa use default memory size of generic machine class, which is 128M by fault. Here generic default memory size is used, and also remove minimum memory size which is 1G originally. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 5 - 1 file changed, 5 deletio

[PATCH v3 4/6] hw/loongarch: Refine system dram memory region

2024-05-15 Thread Bibo Mao
For system dram memory region, it is not necessary to use numa node information. There is only low memory region and high memory region. Remove numa node information for ddr memory region here, it can reduce memory region number on LoongArch virt machine. Signed-off-by: Bibo Mao --- hw/loongarc

[PATCH v3 1/6] hw/loongarch: Refine acpi srat table for numa memory

2024-05-15 Thread Bibo Mao
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for minimum memory size for both total

[PATCH v3 3/6] hw/loongarch: Refine fwcfg memory map

2024-05-15 Thread Bibo Mao
Memory map table for fwcfg is used for UEFI BIOS, UEFI BIOS uses the first entry from fwcfg memory map as the first memory HOB, the second memory HOB will be used if the first memory HOB is used up. Memory map table for fwcfg does not care about numa node, however in generic the first memory HOB i

[PULL 01/43] target/hppa: Move cpu_get_tb_cpu_state out of line

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/cpu.h | 43 ++- target/hppa/cpu.c | 42 ++ 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/target/hppa/cpu.h b/target/hppa/c

[PATCH v3 0/6] hw/loongarch: Refine numa memory map

2024-05-15 Thread Bibo Mao
One LoongArch virt machine platform, there is limitation for memory map information. The minimum memory size is 256M and minimum memory size for numa node0 is 256M also. With qemu numa qtest, it is possible that memory size of numa node0 is 128M. Limitations for minimum memory size for both total

[PULL 25/43] target/hppa: Use registerfields.h for FPSR

2024-05-15 Thread Richard Henderson
Define all of the context dependent field definitions. Use FIELD_EX32 and FIELD_DP32 with named fields instead of extract32 and deposit32 with raw constants. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 25 + target/hppa/fpu_h

[PULL 00/43] target/hppa: Misc improvements

2024-05-15 Thread Richard Henderson
The following changes since commit 3d48b6b687c558a042d91370633b91c6e29e0e05: Merge tag 'pull-request-2024-05-14' of https://gitlab.com/thuth/qemu into staging (2024-05-14 17:24:04 +0200) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-hpp

[PULL 18/43] target/hppa: Use displacements in DisasIAQE

2024-05-15 Thread Richard Henderson
This is a first step in enabling CF_PCREL, but for now we regenerate the absolute address before writeback. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 43 ++--- 1 file changed, 23 insertions(+), 20 deletions(-) d

[PULL 29/43] target/hppa: Use delay_excp for conditional traps

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/helper.h | 1 - target/hppa/int_helper.c | 2 +- target/hppa/op_helper.c | 7 --- target/hppa/translate.c | 41 ++-- 4 files changed, 32 insertions(+), 19 deletions(-) dif

[PULL 16/43] target/hppa: Always make a copy in do_ibranch_priv

2024-05-15 Thread Richard Henderson
This simplifies callers, which might otherwise have to make another copy. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c

[PULL 14/43] target/hppa: Add space argument to do_ibranch

2024-05-15 Thread Richard Henderson
This allows unification of BE, BLR, BV, BVE with a common helper. Since we can now track space with IAQ_Next, we can now let the TranslationBlock continue across the delay slot with BE, BVE. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 76

[PULL 02/43] target/hppa: Use hppa_form_gva_psw in hppa_cpu_get_pc

2024-05-15 Thread Richard Henderson
This function is for log_pc(), which needs to produce a similar result to cpu_get_tb_cpu_state(). Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c in

[PULL 22/43] target/hppa: Use TCG_COND_TST* in do_unit_zero_cond

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 62cc3c3117..b19d7c64fe 100644 --- a/target/hppa/translate.c +++ b/target/hppa/trans

[PULL 36/43] target/hppa: Manage PSW_X and PSW_B in translator

2024-05-15 Thread Richard Henderson
PSW_X is cleared after every instruction, and only set by RFI. PSW_B is cleared after every non-branch, or branch not taken, and only set by taken branches. We can clear both bits with a single store, at most once per TB. Taken branches set PSW_B, at most once per TB. Reviewed-by: Helge Deller

[PULL 13/43] target/hppa: Add space arguments to install_iaq_entries

2024-05-15 Thread Richard Henderson
Move space assighments to a central location. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 58 +++-- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c

[PULL 20/43] target/hppa: Use TCG_COND_TST* in do_cond

2024-05-15 Thread Richard Henderson
We can directly test bits of a 32-bit comparison without zero or sign-extending an intermediate result. We can directly test bit 0 for odd/even. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 64 ++--- 1 file changed,

[PULL 04/43] target/hppa: Pass displacement to do_dbranch

2024-05-15 Thread Richard Henderson
Pass a displacement instead of an absolute value. In trans_be, remove the user-only do_dbranch case. The branch we are attempting to optimize is to the zero page, which is perforce on a different page than the code currently executing, which means that we will *not* use a goto_tb. Use a plain in

[PULL 06/43] target/hppa: Use CF_BP_PAGE instead of cpu_breakpoint_test

2024-05-15 Thread Richard Henderson
The generic tcg driver will have already checked for breakpoints. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 140dfb747a..d

[PULL 03/43] target/hppa: Move constant destination check into use_goto_tb

2024-05-15 Thread Richard Henderson
Share this check between gen_goto_tb and hppa_tr_translate_insn. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c in

[PULL 33/43] target/hppa: Do not mask in copy_iaoq_entry

2024-05-15 Thread Richard Henderson
As with loads and stores, code offsets are kept intact until the full gva is formed. In qemu, this is in cpu_get_tb_cpu_state. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target

[PULL 39/43] target/hppa: Drop tlb_entry return from hppa_get_physical_address

2024-05-15 Thread Richard Henderson
The return-by-reference is never used. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 3 +-- target/hppa/int_helper.c | 2 +- target/hppa/mem_helper.c | 19 --- target/hppa/op_helper.c | 3 +-- 4

Re: [PATCH 04/11] plugins: extract generate ptr for qemu_plugin_u64

2024-05-15 Thread Philippe Mathieu-Daudé
On 14/5/24 19:42, Alex Bennée wrote: From: Pierrick Bouvier Plugin operations can access a scoreboard. This function factorizes code generation for accessing entry associated to a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-3-

[PULL 28/43] target/hppa: Introduce DisasDelayException

2024-05-15 Thread Richard Henderson
Allow an exception to be emitted at the end of the TranslationBlock, leaving only the conditional branch inline. Use it for simple exception instructions like break, which happen to be nullified. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 60 ++

[PULL 26/43] target/hppa: Use TCG_COND_TST* in trans_ftest

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index efd4398437..11d74bb2aa 1

[PULL 35/43] target/hppa: Split PSW X and B into their own field

2024-05-15 Thread Richard Henderson
Generally, both of these bits are cleared at the end of each instruction. By separating these, we will be able to clear both with a single insn, instead of 2 or 3. Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 3 ++-

[PULL 10/43] target/hppa: Skip nullified insns in unconditional dbranch path

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 9189e0350b..6c5efb0023 100644 --- a/target/hppa/translate.c +++ b/target/h

[PULL 34/43] target/hppa: Improve hppa_cpu_dump_state

2024-05-15 Thread Richard Henderson
Print both raw IAQ_Front and IAQ_Back as well as the GVAs. Print control registers in system mode. Print floating point registers if CPU_DUMP_FPU. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/helper.c | 60 +++- 1 file change

[PULL 30/43] target/hppa: Use delay_excp for conditional trap on overflow

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/helper.h | 1 - target/hppa/int_helper.c | 2 +- target/hppa/op_helper.c | 7 --- target/hppa/translate.c | 21 + 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/target/hp

[PULL 27/43] target/hppa: Remove cond_free

2024-05-15 Thread Richard Henderson
Now that we do not need to free tcg temporaries, the only thing cond_free does is reset the condition to never. Instead, simply write a new condition over the old, which may be simply cond_make_f() for the never condition. The do_*_cond functions do the right thing with c or cf == 0, so there's no

[PULL 38/43] target/hppa: Implement PSW_X

2024-05-15 Thread Richard Henderson
Use PAGE_WRITE_INV to temporarily enable write permission on for a given page, driven by PSW_X being set. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/mem_helper.c | 46 +++- 1 file changed, 27 insertions(+), 19 deletions(-) dif

[PULL 37/43] target/hppa: Implement PSW_B

2024-05-15 Thread Richard Henderson
PSW_B causes B,GATE to trap as an illegal instruction, removing our previous sequential execution test that was merely an approximation. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 25 ++--- 1 file changed, 6 insertions(+), 19 del

[PULL 40/43] target/hppa: Adjust priv for B,GATE at runtime

2024-05-15 Thread Richard Henderson
Do not compile in the priv change based on the first translation; look up the PTE at execution time. This is required for CF_PCREL, where a page may be mapped multiple times with different attributes. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/cpu.h| 1

[PULL 11/43] target/hppa: Simplify TB end

2024-05-15 Thread Richard Henderson
Minimize the amount of code in hppa_tr_translate_insn advancing the insn queue for the next insn. Move the goto_tb path to hppa_tr_tb_stop. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 109 +--- 1 file changed, 57

[PULL 05/43] target/hppa: Allow prior nullification in do_ibranch

2024-05-15 Thread Richard Henderson
Simplify the function by not attempting a conditional move on the branch destination -- just use nullify_over normally. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 73 +++-- 1 file changed, 20 insertions(+), 53 del

[PULL 19/43] target/hppa: Rename cond_make_* helpers

2024-05-15 Thread Richard Henderson
Use 'v' for a variable that needs copying, 't' for a temp that doesn't need copying, and 'i' for an immediate, and use this naming for both arguments of the comparison. So: cond_make_tmp -> cond_make_tt cond_make_0_tmp -> cond_make_ti cond_make_0 -> cond_make_vi cond_make -> cond_make

[PULL 12/43] target/hppa: Add IASQ entries to DisasContext

2024-05-15 Thread Richard Henderson
Add variable to track space changes to IAQ. So far, no such changes are introduced, but the new checks vs ctx->iasq_b may eliminate an unnecessary copy to cpu_iasq_f with e.g. BLR. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 39 +

[PULL 15/43] target/hppa: Use umax in do_ibranch_priv

2024-05-15 Thread Richard Henderson
Using umax is clearer than the same operation using movcond. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 1758c6e1d4..e

[PULL 17/43] target/hppa: Introduce and use DisasIAQE for branch management

2024-05-15 Thread Richard Henderson
Wrap offset and space together in one structure, ensuring that they're copied together as required. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 378 +--- 1 file changed, 198 insertions(+), 180 deletions(-) diff --

[PULL 42/43] target/hppa: Log cpu state at interrupt

2024-05-15 Thread Richard Henderson
This contains all of the information logged before, plus more. Signed-off-by: Richard Henderson --- target/hppa/int_helper.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index b82f32fd12..391

[PULL 08/43] target/hppa: Add install_link

2024-05-15 Thread Richard Henderson
Add a common routine for writing the return address. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 55 - 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/trans

[PULL 32/43] target/hppa: Store full iaoq_f and page offset of iaoq_b in TB

2024-05-15 Thread Richard Henderson
In preparation for CF_PCREL. store the iaoq_f in 3 parts: high bits in cs_base, middle bits in pc, and low bits in priv. For iaoq_b, set a bit for either of space or page differing, else the page offset. Install iaq entries before goto_tb. The change to not record the full direct branch difference

Re: [PATCH 10/11] plugins: extract cpu_index generate

2024-05-15 Thread Philippe Mathieu-Daudé
On 14/5/24 19:42, Alex Bennée wrote: From: Pierrick Bouvier Factorizes function to access current cpu index for a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-9-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- acc

[PULL 31/43] linux-user/hppa: Force all code addresses to PRIV_USER

2024-05-15 Thread Richard Henderson
The kernel does this along the return path to user mode. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- linux-user/hppa/target_cpu.h | 4 ++-- target/hppa/cpu.h| 3 +++ linux-user/elfload.c | 4 ++-- linux-user/hppa/cpu_loop.c | 14 +++--- linux-

[PULL 23/43] target/hppa: Use TCG_COND_TST* in do_unit_addsub

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index b19d7c64fe..4e49bd2b67 100644 --- a/target/h

[PULL 43/43] target/hppa: Log cpu state on return-from-interrupt

2024-05-15 Thread Richard Henderson
Inverse of the logging on taking an interrupt. Signed-off-by: Richard Henderson --- target/hppa/sys_helper.c | 12 1 file changed, 12 insertions(+) diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c index 22d6c89964..9b43b556fd 100644 --- a/target/hppa/sys_helper.c ++

Re: [PATCH 03/11] plugins: prepare introduction of new inline ops

2024-05-15 Thread Philippe Mathieu-Daudé
On 14/5/24 19:42, Alex Bennée wrote: From: Pierrick Bouvier Until now, only add_u64 was available, and all functions assumed this or were named uniquely. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-2-pierrick.bouv...@linaro.org> Signed-of

[PULL 21/43] target/hppa: Use TCG_COND_TST* in do_log_cond

2024-05-15 Thread Richard Henderson
We can directly test bits of a 32-bit comparison without zero or sign-extending an intermediate result. We can directly test bit 0 for odd/even. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 78 ++--- 1 file changed,

[PULL 09/43] target/hppa: Delay computation of IAQ_Next

2024-05-15 Thread Richard Henderson
We no longer have to allocate a temp and perform an addition before translation of the rest of the insn. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/target

Re: [PATCH 05/11] plugins: add new inline op STORE_U64

2024-05-15 Thread Philippe Mathieu-Daudé
On 14/5/24 19:42, Alex Bennée wrote: From: Pierrick Bouvier This new operation can store an immediate u64 value to a given scoreboard. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240502211522.346467-4-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée

[PULL 07/43] target/hppa: Add install_iaq_entries

2024-05-15 Thread Richard Henderson
Instead of two separate cpu_iaoq_entry calls, use one call to update both IAQ_Front and IAQ_Back. Simplify with an argument combination that automatically handles a simple increment from Front to Back. Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/translate.c | 64

[PULL 24/43] target/hppa: Use TCG_COND_TST* in trans_bb_imm

2024-05-15 Thread Richard Henderson
Reviewed-by: Helge Deller Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/hppa/translate.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 4e49bd2b67..af6be5100c 100644 --- a

[PULL 41/43] target/hppa: Implement CF_PCREL

2024-05-15 Thread Richard Henderson
Now that the groundwork has been laid, enabling CF_PCREL within the translator proper is a simple matter of updating copy_iaoq_entry and install_iaq_entries. We also need to modify the unwind info, since we no longer have absolute addresses to install. As expected, this reduces the runtime overhe

[PATCH] ui/console: Only declare variable fence_fd when CONFIG_GBM is defined

2024-05-15 Thread Cédric Le Goater
This to avoid a build breakage : ../ui/gtk-egl.c: In function ‘gd_egl_draw’: ../ui/gtk-egl.c:73:9: error: unused variable ‘fence_fd’ [-Werror=unused-variable] 73 | int fence_fd; | ^~~~ Fixes: fa6426805b12 ("ui/console: Use qemu_dmabuf_set_..() helpers instead") Cc: Dongw

Re: [PATCH] ui/console: Only declare variable fence_fd when CONFIG_GBM is defined

2024-05-15 Thread Philippe Mathieu-Daudé
On 15/5/24 12:05, Cédric Le Goater wrote: This to avoid a build breakage : ../ui/gtk-egl.c: In function ‘gd_egl_draw’: ../ui/gtk-egl.c:73:9: error: unused variable ‘fence_fd’ [-Werror=unused-variable] 73 | int fence_fd; | ^~~~ Fixes: fa6426805b12 ("ui/console: Use qe

Re: [PULL 00/11] Ui patches

2024-05-15 Thread Michael Tokarev
14.05.2024 16:17, marcandre.lur...@redhat.com wrote: UI: small fixes and improvements Bernhard Beschow (1): ui/sdl2: Allow host to power down screen Dongwon Kim

Re: [PULL 00/11] gitlab CI fix and glib update

2024-05-15 Thread Daniel P . Berrangé
Hi Michael, In this pull request, patches 2, 3 & 4 will be applicable to stable to fix the tsan CI job which broke with the latest GitLab software release. On Tue, May 14, 2024 at 02:51:08PM +0200, Thomas Huth wrote: > The following changes since commit 9360070196789cc8b9404b2efaf319384e64b107: >

Re: [PULL 00/11] Ui patches

2024-05-15 Thread Marc-André Lureau
Hi On Wed, May 15, 2024 at 2:29 PM Michael Tokarev wrote: > > 14.05.2024 16:17, marcandre.lur...@redhat.com wrote: > > > > UI: small fixes and improvements > > > > > >

[PATCH v3] vhost-user-gpu: fix import of DMABUF

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau When using vhost-user-gpu with GL, qemu -display gtk doesn't show output and prints: qemu: eglCreateImageKHR failed Since commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties"), egl_dmabuf_import_texture() uses backing_{width,height} for the

Re: CPR/liveupdate: test results using prior bug fix

2024-05-15 Thread Steven Sistare
On 5/14/2024 11:33 AM, Michael Tokarev wrote: 14.05.2024 16:54, Michael Tokarev пишет: On 5/14/24 16:39, Michael Galaxy wrote: Steve, OK, so it does not look like this bugfix you wrote was included in 8.2.4 (which was released yesterday). Unfortunately, that means that anyone using CPR in th

[PATCH] vl: fix "type is NULL" in -vga help

2024-05-15 Thread marcandre . lureau
From: Marc-André Lureau A VGA interface is available if it has no class_names, or we can look up any of the names - we shouldn't call module_object_class_by_name(NULL), as happening for ex with TCX or CG3 on x86. Signed-off-by: Marc-André Lureau --- system/vl.c | 13 ++--- 1 file chang

[PATCH] ui/gtk-egl.c: fix build break

2024-05-15 Thread Anushree Mathur
Qemu build is failing due to an unused variable. Removing it to fix the build break. Signed-off-by: Anushree Mathur --- ui/gtk-egl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 0473f689c9..3177992b91 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -70,7 +

Re: [PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-15 Thread Markus Armbruster
John Snow writes: > Prior to this patch, a section like this: > > @name: lorem ipsum >dolor sit amet > consectetur adipiscing elit > > would be parsed as: > > "lorem ipsum\ndolor sit amet\n consectetur adipiscing elit" > > We want to preserve the indentation for even the first body line

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread John Snow
On Wed, May 15, 2024, 5:17 AM Markus Armbruster wrote: > John Snow writes: > > > In the coming patches, it's helpful to have a linting baseline. However, > > there's no need to shuffle around the deck chairs too much, because most > > of this code will be removed once the new qapidoc generator (

Re: [PATCH] ui/gtk-egl.c: fix build break

2024-05-15 Thread Philippe Mathieu-Daudé
Hi Anushree, On 15/5/24 13:50, Anushree Mathur wrote: Qemu build is failing due to an unused variable. Removing it to fix the build break. Signed-off-by: Anushree Mathur --- ui/gtk-egl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 0473f689c9..3177992

Re: [PATCH v5 01/10] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-15 Thread Avihai Horon
On 13/05/2024 19:27, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/13/24 15:03, Avihai Horon wrote: Hi Cedric, On 06/05/2024 12:20, Cédric Le Goater wrote: External email: Use caution opening links or attachments We will use the Error object to imp

Re: [PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-15 Thread John Snow
On Wed, May 15, 2024, 7:50 AM Markus Armbruster wrote: > John Snow writes: > > > Prior to this patch, a section like this: > > > > @name: lorem ipsum > >dolor sit amet > > consectetur adipiscing elit > > > > would be parsed as: > > > > "lorem ipsum\ndolor sit amet\n consectetur adipisc

Re: [PATCH v5 01/10] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-15 Thread Cédric Le Goater
On 5/15/24 14:17, Avihai Horon wrote: On 13/05/2024 19:27, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/13/24 15:03, Avihai Horon wrote: Hi Cedric, On 06/05/2024 12:20, Cédric Le Goater wrote: External email: Use caution opening links or attachments

Re: [RFC PATCH v3 03/18] hw/arm/smmuv3: Fix encoding of CLASS in events

2024-05-15 Thread Eric Auger
Hi Mostafa, On 4/29/24 05:23, Mostafa Saleh wrote: > The SMMUv3 spec (ARM IHI 0070 F.b - 7.3 Event records) defines the > class of events faults as: > > CLASS: The class of the operation that caused the fault: > - 0b00: CD, CD fetch. > - 0b01: TTD, Stage 1 translation table fetch. > - 0b10: IN, Inp

Re: [PATCH v5 01/10] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-15 Thread Avihai Horon
On 15/05/2024 15:25, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/15/24 14:17, Avihai Horon wrote: On 13/05/2024 19:27, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/13/24 15:03, Avihai Horon wrote: Hi Cedr

Re: [PATCH v5 01/10] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-15 Thread Cédric Le Goater
On 5/15/24 14:29, Avihai Horon wrote: On 15/05/2024 15:25, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/15/24 14:17, Avihai Horon wrote: On 13/05/2024 19:27, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 5/13/

Re: [PULL 05/11] ui/console: Use qemu_dmabuf_get_..() helpers instead

2024-05-15 Thread Richard Henderson
On 5/14/24 15:17, marcandre.lur...@redhat.com wrote: --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -70,6 +70,7 @@ void gd_egl_draw(VirtualConsole *vc) QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf; #endif int ww, wh, ws; +int fence_fd; if (!vc->gfx.gls) { return; @

Re: [RFC PATCH v3 06/18] hw/arm/smmu: Consolidate ASID and VMID types

2024-05-15 Thread Eric Auger
Hi Mostafa, On 4/29/24 05:23, Mostafa Saleh wrote: > ASID and VMID used to be uint16_t in the translation config, however, > in other contexts they can be int as -1 in case of TLB invalidation, other contexts = TLB invalidation, right? > to represent all(don’t care). add space bewteen all and (. >

<    1   2   3   4   >