RE: [PATCH] Hexagon (target/hexagon) implement mutability mask for GPRs

2022-09-03 Thread Brian Cain
> -Original Message- > From: Richard Henderson ... > It might be clearer, and easier to initialize, if you invert the sense of the > mask: Ok -- thanks for the suggestions! I'll give 'em all a try. -Brian

Re: [PATCH] RISC-V: Add support for Ztso

2022-09-03 Thread Richard Henderson
On 9/2/22 04:44, Palmer Dabbelt wrote: -#define TCG_GUEST_DEFAULT_MO 0 +/* + * RISC-V has two memory models: TSO is a bit weaker than Intel (MMIO and + * fetch), and WMO is approximately equivilant to Arm MCA. Rather than + * enforcing orderings on most accesses, just default to the target

Re: [PATCH] Hexagon (target/hexagon) implement mutability mask for GPRs

2022-09-03 Thread Richard Henderson
On 9/1/22 22:29, Brian Cain wrote: +void gen_masked_reg_write(TCGv cur_val, TCGv in_val, TCGv out_val, +target_ulong reg_mask) { +TCGv set_bits = tcg_temp_new(); +TCGv cleared_bits = tcg_temp_new(); + +/* + * set_bits = in_val & reg_mask + * cleared_bits = (~in_val) &

[PULL v2 16/20] accel/tcg: Add fast path for translator_ld*

2022-09-03 Thread Richard Henderson
Cache the translation from guest to host address, so we may use direct loads when we hit on the primary translation page. Look up the second translation page only once, during translation. This obviates another lookup of the second page within tb_gen_code after translation. Fixes a bug in that

[PULL v2 00/20] tcg patch queue

2022-09-03 Thread Richard Henderson
v2: Fix incorretly resolved rebase conflict in patch 16. r~ The following changes since commit 61fd710b8da8aedcea9b4f197283dc38638e4b60: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-09-02 13:24:28 -0400) are available in the Git repository at:

Re: [PATCH v5 06/14] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-09-03 Thread BALATON Zoltan
On Sat, 3 Sep 2022, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' QMP/HMP command for the sam460ex machine. Cc: BALATON Zoltan Signed-off-by: Daniel Henrique Barboza --- hw/ppc/sam460ex.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v5 10/14] hw/ppc: set machine->fdt in spapr machine

2022-09-03 Thread Daniel Henrique Barboza
The pSeries machine never bothered with the common machine->fdt attribute. We do all the FDT related work using spapr->fdt_blob. We're going to introduce a QMP/HMP command to dump the FDT, which will rely on setting machine->fdt properly to work across all machine archs/types. Let's set

[PATCH v5 07/14] hw/ppc: set machine->fdt in xilinx_load_device_tree()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for the virtex_ml507 machine. Cc: Edgar E. Iglesias Signed-off-by: Daniel Henrique Barboza --- hw/ppc/virtex_ml507.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/ppc/virtex_ml507.c

[PATCH v5 06/14] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for the sam460ex machine. Cc: BALATON Zoltan Signed-off-by: Daniel Henrique Barboza --- hw/ppc/sam460ex.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index

[PATCH v5 14/14] qmp/hmp, device_tree.c: introduce dumpdtb

2022-09-03 Thread Daniel Henrique Barboza
To save the FDT blob we have the '-machine dumpdtb=' property. With this property set, the machine saves the FDT in and exit. The created file can then be converted to plain text dts format using 'dtc'. There's nothing particularly sophisticated into saving the FDT that can't be done with the

[PATCH v5 04/14] hw/ppc: set machine->fdt in ppce500_load_device_tree()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for the e500 machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index

[PATCH v5 12/14] hw/riscv: set machine->fdt in spike_board_init()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for the 'dumpdtb' QMP/HMP command for the spike machine. Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Bin Meng Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/spike.c | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v5 13/14] hw/xtensa: set machine->fdt in xtfpga_init()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for the 'dumpdtb' QMP/HMP command for all xtensa machines that uses a FDT. Signed-off-by: Daniel Henrique Barboza --- hw/xtensa/meson.build | 2 +- hw/xtensa/xtfpga.c| 9 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/xtensa/meson.build

[PATCH v5 11/14] hw/riscv: set machine->fdt in sifive_u_machine_init()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for the sifive_u machine. Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/sifive_u.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v5 02/14] hw/microblaze: set machine->fdt in microblaze_load_dtb()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for all microblaze machines that uses microblaze_load_dtb(). Cc: Edgar E. Iglesias Signed-off-by: Daniel Henrique Barboza --- hw/microblaze/boot.c | 8 +++- hw/microblaze/meson.build | 2 +- 2 files changed, 8 insertions(+), 2

[PATCH v5 09/14] hw/ppc: set machine->fdt in pnv_reset()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for the 'dumpdtb' QMP/HMP command for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index

[PATCH v5 01/14] hw/arm: do not free machine->fdt in arm_load_dtb()

2022-09-03 Thread Daniel Henrique Barboza
At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is the case of machvirt_dtb() from hw/arm/virt.c, fdt now has a pointer to machine->fdt. And, in

[PATCH v5 08/14] hw/ppc: set machine->fdt in pegasos2_machine_reset()

2022-09-03 Thread Daniel Henrique Barboza
We'll introduce a QMP/HMP command that requires machine->fdt to be set properly. Cc: BALATON Zoltan Cc: qemu-...@nongnu.org Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pegasos2.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index

[PATCH v5 05/14] hw/ppc: set machine->fdt in bamboo_load_device_tree()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for the bamboo machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/ppc440_bamboo.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c

[PATCH v5 03/14] hw/nios2: set machine->fdt in nios2_load_dtb()

2022-09-03 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' QMP/HMP command for all nios2 machines that uses nios2_load_dtb(). Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Daniel Henrique Barboza --- hw/nios2/boot.c | 8 +++- hw/nios2/meson.build | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-)

[PATCH v5 00/14] QMP/HMP: introduce 'dumpdtb'

2022-09-03 Thread Daniel Henrique Barboza
Hi, In this version I removed the 'info fdt' command. It didn't get enough traction/acceptance to justify the amount of code to implement it. Aside from that, all other changes are based on Markus' feedback on patch 14. Changes from v4: - patches 15-21: removed - patch 14: - dumpdtb is now

[PATCH 2/2] vvfat: allow spaces in file names

2022-09-03 Thread Hervé Poussineau
In R/W mode, files with spaces were never created on host side. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1176 Fixes: c79e243ed67683d6d06692bd7040f7394da178b0 Signed-off-by: Hervé Poussineau --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 0/2] Fix some problems with vvfat in R/W mode

2022-09-03 Thread Hervé Poussineau
Hi, When testing vvfat in read-write mode, I came across some blocking problems when using Windows guests. This patchset is not here to fix all problems of vvfat, but only the main ones I encountered. First patch allows setting/resetting the 'volume dirty' flag on boosector, and the second one

[PATCH 1/2] vvfat: allow some writes to bootsector

2022-09-03 Thread Hervé Poussineau
'reserved1' field in bootsector is used to mark volume dirty, or need to verify. Allow writes to bootsector which only changes the 'reserved1' field. This fixes I/O errors on Windows guests. Resolves: https://bugs.launchpad.net/qemu/+bug/1889421 Signed-off-by: Hervé Poussineau ---

[PATCH] 9pfs: use GHashMap for fid table

2022-09-03 Thread Linus Heckemann
The previous implementation would iterate over the fid table for lookup operations, resulting in an operation with O(n) complexity on the number of open files and poor cache locality -- for nearly every open, stat, read, write, etc operation. This change uses a hashtable for this instead,

Re: [PATCH 33/51] tests/qtest: {ahci, ide}-test: Use relative path for temporary files

2022-09-03 Thread Bin Meng
On Thu, Sep 1, 2022 at 4:58 PM Marc-André Lureau wrote: > > > > On Wed, Aug 24, 2022 at 2:55 PM Bin Meng wrote: >> >> From: Bin Meng >> >> These test cases uses "blkdebug:path/to/config:path/to/image" for >> testing. On Windows, absolute file paths contain the delimiter ':' >> which causes the

Re: [PATCH] tests/tcg/x86_64: add cross-modifying code test

2022-09-03 Thread Alex Bennée
Ilya Leoshkevich writes: > commit f025692c992c ("accel/tcg: Clear PAGE_WRITE before translation") > fixed cross-modifying code handling, but did not add a test. The > changed code was further improved recently [1], and I was not sure > whether these modifications were safe (spoiler: they were