total fail on FreeBSD 14.0 amd64 regardless of compiler

2022-10-09 Thread Dennis Clarke
re: https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg01249.html Using GCC 12 is even worse : [2040/6841] Compiling C object qemu-system-aarch64.p/softmmu_main.c.o [2041/6841] Linking target qemu-system-aarch64 FAILED: qemu-system-aarch64 /usr/local/bin/g++12 -m64 -mcx16 @qemu-system

Re: [PATCH v3 4/8] m25p80: Add the mx25l25635f SFPD table

2022-10-09 Thread Cédric Le Goater
On 10/7/22 16:44, Francisco Iglesias wrote: On [2022 Jul 22] Fri 08:35:58, Cédric Le Goater wrote: The mx25l25635e and mx25l25635f chips have the same JEDEC id but the mx25l25635f has more capabilities reported in the SFDP table. Support for 4B opcodes is of interest because it is exploited by t

Re: [PATCH v11 7/7] docs/zoned-storage: add zoned device documentation

2022-10-09 Thread Hannes Reinecke
On 10/10/22 04:21, Sam Li wrote: Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/devel/zoned-storage.rst | 40 ++ docs/system/qemu-block-drivers.rst.inc | 6 2

FAILED: libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o

2022-10-09 Thread Dennis Clarke
On FreeBSD 14.0 CURRENT amd64 everything seems to go swimmingly until : [5679/6848] Compiling C object libqemu-arm-bsd-user.fa.p/bsd-user_mmap.c.o [5680/6848] Compiling C object libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o FAILED: libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o /usr/bin/cc -m64

Re: [PATCH v3 2/8] m25p80: Add the n25q256a SFDP table

2022-10-09 Thread Cédric Le Goater
On 10/7/22 16:03, Francisco Iglesias wrote: On [2022 Jul 22] Fri 08:35:56, Cédric Le Goater wrote: The same values were collected on 4 differents OpenPower systems, palmettos, romulus and tacoma. The SFDP table size is defined as being 0x100 bytes but it could be bigger. Only the mandatory tabl

Re: [PATCH v11 5/7] config: add check to block layer

2022-10-09 Thread Hannes Reinecke
On 10/10/22 04:21, Sam Li wrote: Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- block.c | 17 + block/file-posix.c | 13 + block/raw-format.c

Re: [PATCH v3 3/8] m25p80: Add the mx25l25635e SFPD table

2022-10-09 Thread Cédric Le Goater
Hello Francisco On 10/7/22 15:59, Francisco Iglesias wrote: Hi Cedric, On [2022 Jul 22] Fri 08:35:57, Cédric Le Goater wrote: The SFDP table is 0x80 bytes long. The mandatory table for basic features is available at byte 0x30 and an extra Macronix specific table is available at 0x60. 4B opcod

Re: [PATCH v11 4/7] raw-format: add zone operations to pass through requests

2022-10-09 Thread Hannes Reinecke
On 10/10/22 04:21, Sam Li wrote: raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- block/raw-format.c | 13 + 1 file changed, 13 inse

Re: [PATCH v11 1/7] include: add zoned device structs

2022-10-09 Thread Hannes Reinecke
On 10/10/22 04:21, Sam Li wrote: Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reineck

[PATCH v6 1/2] block: Ignore close() failure in get_tmp_filename()

2022-10-09 Thread Bin Meng
The temporary file has been created and is ready for use. Checking return value of close() does not seem useful. The file descriptor is almost certainly closed; see close(2) under "Dealing with error returns from close()". Let's simply ignore close() failure here. Suggested-by: Markus Armbruster

Re: [PATCH v3] disas/riscv.c: rvv: Add disas support for vector instructions

2022-10-09 Thread Alistair Francis
On Wed, Sep 28, 2022 at 3:19 PM Yang Liu wrote: > > Tested with https://github.com/ksco/rvv-decoder-tests > > Expected checkpatch errors for consistency and brevity reasons: > > ERROR: line over 90 characters > ERROR: trailing statements should be on next line > ERROR: braces {} are necessary for

[PATCH v6 2/2] block: Refactor get_tmp_filename()

2022-10-09 Thread Bin Meng
At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1); while the other

Re: Question about RISC-V brom register a1 set value

2022-10-09 Thread Alistair Francis
On Sat, Oct 1, 2022 at 11:33 AM Eric Chan wrote: > > Hi, qemu > > As I know, brom will pass 3 parameters to the next stage bootloader, ex: > openSBI. > a0 will pass hartid, a2 will pass fw_dynamic_info start address. > although a1 doesn't use directly in openSBI. > a1 read value is determined in

Re: [PATCH 3/6] riscv: re-randomize rng-seed on reboot

2022-10-09 Thread Alistair Francis
On Fri, Sep 30, 2022 at 9:24 AM Jason A. Donenfeld wrote: > > When the system reboots, the rng-seed that the FDT has should be > re-randomized, so that the new boot gets a new seed. Since the FDT is in > the ROM region at this point, we add a hook right after the ROM has been > added, so that we h

[PATCH] [PING] gdb-xml: Fix size of EFER register on i386 architecture when debugged by GDB

2022-10-09 Thread TaiseiIto
This is a ping to the patch below. https://patchew.org/QEMU/ty0pr0101mb4285f637209075c9f65fcda6a4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ https://lore.kernel.org/qemu-devel/ty0pr0101mb4285f637209075c9f65fcda6a4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ Before this commit, ther

Re: [PATCH v1 2/2] riscv/opentitan: connect lifecycle controller

2022-10-09 Thread Alistair Francis
On Wed, Sep 28, 2022 at 3:13 PM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > Connects the ibex lifecycle controller with opentitan, > with this change, we can now get past the lifecycle checks > in the boot rom. > > Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis Alistair

Re: [PATCH v1 1/2] hw/misc: add ibex lifecycle controller

2022-10-09 Thread Alistair Francis
On Wed, Sep 28, 2022 at 3:11 PM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > Device model for the OpenTitan lifecycle controller as per [1]. > > Addition of this model is the first of many steps to adding `boot_rom` > support for OpenTitan. The OpenTitan `boot_rom` needs to access the > l

[PATCH v3 3/3] qemu-iotests: test zone append operation

2022-10-09 Thread Sam Li
This tests is mainly a helper to indicate append writes in block layer behaves as expected. Signed-off-by: Sam Li --- qemu-io-cmds.c | 62 ++ tests/qemu-iotests/tests/zoned.out | 7 tests/qemu-iotests/tests/zoned.sh | 9 + 3 files chang

[PATCH v3 1/3] file-posix:add the tracking of the zones write pointers

2022-10-09 Thread Sam Li
Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modified to add zone append emulation using regular writes. To do this, the file-posix driver tracks the wp location of all zones of the device. It uses an array of uint64_

[PATCH v3 2/3] block: introduce zone append write for zoned devices

2022-10-09 Thread Sam Li
A zone append command is a write operation that specifies the first logical block of a zone as the write position. When writing to a zoned block device using zone append, the byte offset of writes is pointing to the write pointer of that zone. Upon completion the device will respond with the positi

[PATCH v3 0/3] Add zone append write for zoned device

2022-10-09 Thread Sam Li
v3: - only read wps when it is locked [Damien] - allow last smaller zone case [Damien] - add zone type and state checks in zone_mgmt command [Damien] - fix RESET_ALL related problems v2: - split patch to two patches for better reviewing - change BlockZoneWps's structure to an array of integers - u

[PATCH v11 7/7] docs/zoned-storage: add zoned device documentation

2022-10-09 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- docs/devel/zoned-storage.rst | 40 ++ docs/system/qemu-block-drivers.rst.inc | 6 2 files changed, 46 insertions(+) creat

[PATCH v11 6/7] qemu-iotests: test new zone operations

2022-10-09 Thread Sam Li
We have added new block layer APIs of zoned block devices. Test it with: Create a null_blk device, run each zone operation on it and see whether reporting right zone information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned.out | 53 ++ t

Re: [PATCH 2/3] hw/riscv: sifive_e: Support the watchdog timer of HiFive 1 rev b.

2022-10-09 Thread Alistair Francis
On Thu, Sep 22, 2022 at 6:45 PM Tommy Wu wrote: > > Create the AON device when we realize the sifive_e machine. > This patch only implemented the functionality of the watchdog timer, > not all the functionality of the AON device. > > Signed-off-by: Tommy Wu > --- > hw/riscv/Kconfig|

[PATCH v11 5/7] config: add check to block layer

2022-10-09 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- block.c | 17 + block/file-posix.c | 13 + block/raw-format.c | 1 + include/block/b

Re: [PATCH 1/3] hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b.

2022-10-09 Thread Alistair Francis
On Thu, Sep 22, 2022 at 6:43 PM Tommy Wu wrote: > > The watchdog timer is in the always-on domain device of HiFive 1 rev b, > so this patch added the AON device to the sifive_e machine. This patch > only implemented the functionality of the watchdog timer. > > Signed-off-by: Tommy Wu > --- > hw/

[PATCH v11 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-09 Thread Sam Li
Add a new zoned_host_device BlockDriver. The zoned_host_device option accepts only zoned host block devices. By adding zone management operations in this new BlockDriver, users can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset, re

[PATCH v11 4/7] raw-format: add zone operations to pass through requests

2022-10-09 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- block/raw-format.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/raw-for

[PATCH v11 2/7] file-posix: introduce helper functions for sysfs attributes

2022-10-09 Thread Sam Li
Use get_sysfs_str_val() to get the string value of device zoned model. Then get_sysfs_zoned_model() can convert it to BlockZoneModel type of QEMU. Use get_sysfs_long_val() to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke Reviewed-by: Stefan H

[PATCH v11 1/7] include: add zoned device structs

2022-10-09 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h b/include/block/block-common.h index fdb7306e78..36bd0e480e 1006

[PATCH v11 0/7] Add support for zoned device

2022-10-09 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at: https://zone

Re: [RFC v2] hw/registerfields: add `FIELDx_1CLEAR()` macro

2022-10-09 Thread Wilfred Mallawa
On Mon, 2022-10-10 at 11:29 +1000, Alistair Francis wrote: > On Tue, Sep 27, 2022 at 10:58 AM Wilfred Mallawa > wrote: > > > > From: Wilfred Mallawa > > > > Changes from V1: > >     * Instead of needing all field bits to be set > >   we clear the field if any are set. If the field i

Re: [PATCH] hw/riscv: Update comment for qtest check in riscv_find_firmware()

2022-10-09 Thread Alistair Francis
On Sun, Oct 9, 2022 at 11:04 PM Bin Meng wrote: > > From: Bin Meng > > Since commit 4211fc553234 ("roms/opensbi: Remove ELF images"), the > comment for qtest check in riscv_find_firmware() is out of date. > Update it to reflect the latest status. > > Signed-off-by: Bin Meng Thanks! Applied to

Re: [RFC v2] hw/registerfields: add `FIELDx_1CLEAR()` macro

2022-10-09 Thread Alistair Francis
On Tue, Sep 27, 2022 at 10:58 AM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > Changes from V1: > * Instead of needing all field bits to be set > we clear the field if any are set. If the field is > 0/clear then no change. The changelog should go > > Adds a he

Re: [PATCH V5 3/3] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-10-09 Thread Alistair Francis
On Tue, Oct 4, 2022 at 7:28 PM Sunil V L wrote: > > To boot S-mode firmware payload like EDK2 from persistent > flash storage, qemu needs to pass the flash address as the > next_addr in fw_dynamic_info to the opensbi. > > When both -kernel and -pflash options are provided in command line, > the ke

Re: [PATCH] hw/riscv: Update comment for qtest check in riscv_find_firmware()

2022-10-09 Thread Alistair Francis
On Sun, Oct 9, 2022 at 11:04 PM Bin Meng wrote: > > From: Bin Meng > > Since commit 4211fc553234 ("roms/opensbi: Remove ELF images"), the > comment for qtest check in riscv_find_firmware() is out of date. > Update it to reflect the latest status. > > Signed-off-by: Bin Meng Reviewed-by: Alistai

Re: [PATCH v2 00/13] ppc/e500: Add support for two types of flash, cleanup

2022-10-09 Thread Daniel Henrique Barboza
On 10/9/22 00:30, Bin Meng wrote: On Sun, Oct 9, 2022 at 12:11 AM Bernhard Beschow wrote: Am 4. Oktober 2022 12:43:35 UTC schrieb Daniel Henrique Barboza : Hey, On 10/3/22 18:27, Philippe Mathieu-Daudé wrote: Hi Daniel, On 3/10/22 22:31, Bernhard Beschow wrote: Cover letter: ~

Re: [PATCH v2 07/11] acpi/tests/bits: add python test that exercizes QEMU bios tables using biosbits

2022-10-09 Thread Ani Sinha
On Wed, Sep 28, 2022 at 1:14 PM Thomas Huth wrote: > > > > > Do not do any of this stuff, it is irrelevant to QEMU's needs. > > A developer using Avocado with QEMU does nothing more than: > > > > make check-avocado > > Right. And if you want to run individual tests, you can also do it like

[PATCH] hw/riscv: Update comment for qtest check in riscv_find_firmware()

2022-10-09 Thread Bin Meng
From: Bin Meng Since commit 4211fc553234 ("roms/opensbi: Remove ELF images"), the comment for qtest check in riscv_find_firmware() is out of date. Update it to reflect the latest status. Signed-off-by: Bin Meng --- hw/riscv/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

Re: [PATCH v3] linux-user: Add close_range() syscall

2022-10-09 Thread Helge Deller
On 9/27/22 13:00, Helge Deller wrote: Signed-off-by: Helge Deller +#if defined(__NR_close_range) && defined(TARGET_NR_close_range) +case TARGET_NR_close_range: +ret = get_errno(sys_close_range(arg1, arg2, arg3)); +if (ret == 0 && !(arg3 & CLOSE_RANGE_CLOEXEC)) { +