[PATCH] vfio/migration: Fix wrong enum usage

2022-10-16 Thread Avihai Horon
vfio_migration_init() initializes VFIOMigration->device_state using enum of VFIO migration protocol v2. Current implemented protocol is v1 so v1 enum should be used. Fix it. Fixes: 429c72800654 ("vfio/migration: Fix incorrect initialization value for parameters in VFIOMigration") Signed-off-by: A

Re: [PATCH v3] qapi/qmp: Add timestamps to qmp command responses

2022-10-16 Thread Denis Plotnikov
On 14.10.2022 16:19, Daniel P. Berrangé wrote: On Fri, Oct 14, 2022 at 02:57:06PM +0200, Markus Armbruster wrote: Daniel P. Berrangé writes: On Fri, Oct 14, 2022 at 11:31:13AM +0200, Markus Armbruster wrote: Daniel P. Berrangé writes: On Thu, Oct 13, 2022 at 05:00:26PM +0200, Markus Arm

[PATCH v3 0/9] ppc/e500: Add support for two types of flash, cleanup

2022-10-16 Thread Bernhard Beschow
Cover letter: ~ This series adds support for -pflash and direct SD card access to the PPC e500 boards. The idea is to increase compatibility with "real" firmware images where only the bare minimum of drivers is compiled in. The series is structured as follows: Patches 1-6 perform som

[PATCH v3 5/9] hw/sd/sdhci-internal: Unexport ESDHC defines

2022-10-16 Thread Bernhard Beschow
These defines aren't used outside of sdhci.c, so can be defined there. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-internal.h | 20 hw/sd/sdhci.c | 19 +++ 2 files changed, 19 insertions

[PATCH v3 3/9] hw/block/pflash_cfi01: Attach memory region in boards

2022-10-16 Thread Bernhard Beschow
pflash_cfi01_register() had a parameter which was only passed to sysbus_mmio_map() but not used otherwise. Pulling out sysbus_mmio_map() resolves that parameter and concentrates the memory region setup in board code. Furthermore, it allows attaching cfi01 devices relative to some parent bus rather

[PATCH v3 1/9] hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two

2022-10-16 Thread Bernhard Beschow
According to the JEDEC standard the device length is communicated to an OS as an exponent (power of two). Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 8 ++-- hw/block/pflash_cfi02.c | 5 + 2 files changed, 11 i

[PATCH v3 4/9] hw/block/pflash_cfi02: Attach memory region in boards

2022-10-16 Thread Bernhard Beschow
pflash_cfi02_register() had a parameter which was only passed to sysbus_mmio_map() but not used otherwise. Pulling out sysbus_mmio_map() resolves that parameter and concentrates the memory region setup in board code. Furthermore, it allows attaching cfi02 devices relative to some parent bus rather

[PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-16 Thread Bernhard Beschow
pflash_cfi01_register() always returns with a non-NULL pointer (otherwise it would crash internally). Therefore, the bodies of the if-statements are unreachable. Signed-off-by: Bernhard Beschow --- hw/arm/gumstix.c | 18 ++ hw/arm/mainstone.c | 13 + hw/arm/omap

[PATCH v3 8/9] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-10-16 Thread Bernhard Beschow
Will allow e500 boards to access SD cards using just their own devices. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 120 +- include/hw/sd/sdhci.h | 3 ++ 2 files changed, 122 insertions(+), 1 deletion(-) diff --git a/hw/sd/sdhci.c b/hw/s

Re: [PATCH v3 0/9] ppc/e500: Add support for two types of flash, cleanup

2022-10-16 Thread Bernhard Beschow
Am 16. Oktober 2022 12:27:28 UTC schrieb Bernhard Beschow : >Cover letter: > >~ > > > >This series adds support for -pflash and direct SD card access to the > >PPC e500 boards. The idea is to increase compatibility with "real" firmware > >images where only the bare minimum of drivers is

[PATCH v3 6/9] hw/sd/sdhci: Rename ESDHC_* defines to USDHC_*

2022-10-16 Thread Bernhard Beschow
The device model's functions start with "usdhc_", so rename the defines accordingly for consistency. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng --- hw/sd/sdhci.c | 66 +-- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/

Re: [PATCH v2 13/13] hw/ppc/e500: Add Freescale eSDHC to e500 boards

2022-10-16 Thread Bernhard Beschow
Am 3. Oktober 2022 21:06:57 UTC schrieb "Philippe Mathieu-Daudé" : >On 3/10/22 22:31, Bernhard Beschow wrote: >> Adds missing functionality to emulated e500 SOCs which increases the >> chance of given "real" firmware images to access SD cards. >> >> Signed-off-by: Bernhard Beschow >> --- >> do

[PATCH v11 1/5] target/riscv: Add smstateen support

2022-10-16 Thread Mayuresh Chitale
Smstateen extension specifies a mechanism to close the potential covert channels that could cause security issues. This patch adds the CSRs defined in the specification and the corresponding predicates and read/write functions. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li --- target/

[PATCH v11 0/5] RISC-V Smstateen support

2022-10-16 Thread Mayuresh Chitale
This series adds support for the Smstateen specification which provides a mechanism to plug the potential covert channels which are opened by extensions that add to processor state that may not get context-switched. Currently access to *envcfg registers and floating point(fcsr) is controlled via sm

[PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-16 Thread Bernhard Beschow
Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the given file. The idea is to put users into control

Re: [PATCH] tests/docker: Add flex/bison to `debian-hexagon-cross`

2022-10-16 Thread Alex Bennée
Anton Johansson writes: > debian-hexagon-cross contains two images, one to build the toolchain > used for building the Hexagon tests themselves, and one image to build > QEMU and run the tests. > > This commit adds flex/bison to the final image that builds QEMU so that > it can also build idef-

[PATCH v11 2/5] target/riscv: smstateen check for h/s/envcfg

2022-10-16 Thread Mayuresh Chitale
Accesses to henvcfg, henvcfgh and senvcfg are allowed only if the corresponding bit in mstateen0/hstateen0 is enabled. Otherwise an illegal instruction trap is generated. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/csr.c | 87 +++

[PATCH v3 9/9] hw/ppc/e500: Add Freescale eSDHC to e500plat

2022-10-16 Thread Bernhard Beschow
Adds missing functionality to e500plat machine which increases the chance of given "real" firmware images to access SD cards. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 12 hw/ppc/Kconfig | 1 + hw/ppc/e500.c | 35 ++

[PATCH v11 3/5] target/riscv: generate virtual instruction exception

2022-10-16 Thread Mayuresh Chitale
This patch adds a mechanism to generate a virtual instruction instruction exception instead of an illegal instruction exception during instruction decode when virt is enabled. Signed-off-by: Mayuresh Chitale --- target/riscv/translate.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-

[PATCH v11 4/5] target/riscv: smstateen check for fcsr

2022-10-16 Thread Mayuresh Chitale
If smstateen is implemented and sstateen0.fcsr is clear then the floating point operations must return illegal instruction exception or virtual instruction trap, if relevant. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li --- target/riscv/csr.c| 23

[PATCH v11 5/5] target/riscv: smstateen knobs

2022-10-16 Thread Mayuresh Chitale
Add knobs to allow users to enable smstateen and also export it via the ISA extension string. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c

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

2022-10-16 Thread Bin Meng
On Mon, Oct 10, 2022 at 12:05 PM Bin Meng wrote: > > 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); > ... > r

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-16 Thread BALATON Zoltan
On Sun, 16 Oct 2022, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the gi

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

2022-10-16 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

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

2022-10-16 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- 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 ind

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

2022-10-16 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 v12 4/7] raw-format: add zone operations to pass through requests

2022-10-16 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 Reviewed-by: Hannes Reinecke --- block/raw-format.c | 13 + 1 file changed, 13 insertions(

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

2022-10-16 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 v12 5/7] config: add check to block layer

2022-10-16 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 Reviewed-by: Hannes Reinecke --- block.c | 19 +++ block/file-posix.c | 12 block/raw-format.c

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

2022-10-16 Thread Sam Li
v4: - fix lock related issues[Damien] - drop all field in zone_mgmt op [Damien] - fix state checks in zong_mgmt command [Damien] - return start sector of wp when issuing zap req [Damien] v3: - only read wps when it is locked [Damien] - allow last smaller zone case [Damien] - add zone type and stat

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

2022-10-16 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal --- docs/devel/zoned-storage.rst | 43 ++ docs/system/qemu-block-drivers.rst.inc | 6 2 files cha

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

2022-10-16 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

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

2022-10-16 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 | 63 ++ tests/qemu-iotests/tests/zoned.out | 7 tests/qemu-iotests/tests/zoned.sh | 9 + 3 files chang

[RFC v3 0/2] Add zoned storage emulation to virtio-blk driver

2022-10-16 Thread Sam Li
Note: the virtio-blk headers isn't upstream in the kernel yet therefore marked as an RFC. v3: - use qemuio_from_buffer to write status bit [Stefan] - avoid using req->elem directly [Stefan] - fix error checkings and memory leak [Stefan] v2: - change units of emulated zone op coresponding to block

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

2022-10-16 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_

[RFC v3 1/2] include: update virtio_blk headers from Linux 5.19-rc2+

2022-10-16 Thread Sam Li
Use scripts/update-linux-headers.sh to update virtio-blk headers from Dmitry's "virtio-blk:add support for zoned block devices" linux patch. There is a link for more information: https://github.com/dmitry-fomichev/virtblk-zbd Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Signed-off-by: Sam

[RFC v3 2/2] virtio-blk: add zoned storage emulation for zoned devices

2022-10-16 Thread Sam Li
This patch extends virtio-blk emulation to handle zoned device commands by calling the new block layer APIs to perform zoned device I/O on behalf of the guest. It supports Report Zone, four zone oparations (open, close, finish, reset), and Append Zone. The VIRTIO_BLK_F_ZONED feature bit will only

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

2022-10-16 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

Re: [PATCH] docs/devel: remove incorrect claim about git send-email

2022-10-16 Thread Alyssa Ross
Linus Heckemann writes: > Alyssa Ross writes: > >> Alyssa Ross writes: >> >>> Linus Heckemann writes: >>> While it's unclear to me what git send-email actually does with the -v2 parameter (it is not documented, but also not rejected), it does not add a v2 tag to the email's subj

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-16 Thread Julien Grall
Hi, There seem to be some missing patches on xen-devel (including the cover letter). Is that expected? On 15/10/2022 06:07, Vikram Garhwal wrote: Add a new machine xenpv which creates a IOREQ server to register/connect with Xen Hypervisor. I don't like the name 'xenpv' because it doesn't co

Re: [PATCH v1 07/12] include/hw/xen/xen_common: return error from xen_create_ioreq_server

2022-10-16 Thread Julien Grall
Hi Vikram, On 15/10/2022 06:07, Vikram Garhwal wrote: From: Stefano Stabellini This is done to prepare for enabling xenpv support for ARM architecture. On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails, c

Re: [PATCH v1 06/12] xen-hvm: move common functions to hw/xen/xen-hvm-common.c

2022-10-16 Thread Julien Grall
Hi Vikram, On 15/10/2022 06:07, Vikram Garhwal wrote: +void xen_register_ioreq(XenIOState *state, unsigned int max_cpus, +MemoryListener xen_memory_listener) +{ [...] + +xen_bus_init(); + +/* Initialize backend core & drivers */ +if (xen_be_init() != 0) {

Re: [PATCH v4] tcg/loongarch64: Add direct jump support

2022-10-16 Thread Richard Henderson
On 10/15/22 19:27, Qi Hu wrote: Similar to the ARM64, LoongArch has PC-relative instructions such as PCADDU18I. These instructions can be used to support direct jump for LoongArch. Additionally, if instruction "B offset" can cover the target address(target is within ±128MB range), a single "B off

Re: [PULL 0/2] M68k for 7.2 patches

2022-10-16 Thread Stefan Hajnoczi
On Fri, 14 Oct 2022 at 03:26, Laurent Vivier wrote: > > The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: > > Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of > https://github.com/stsquad/qemu into staging (2022-10-06 07:11:56 -0400) > > are available in the

Re: [PATCH v4 00/10] m25p80: Add SFDP support

2022-10-16 Thread Joel Stanley
On Thu, 13 Oct 2022 at 16:12, Cédric Le Goater wrote: > > Hello, > > This patchset adds support for JEDEC STANDARD JESD216 Serial Flash > Discovery Parameters (SFDP). SFDP describes the features of a serial > flash device using a set of internal parameter tables. Support in > Linux has been added

[PATCH v7 0/9] target/arm: pc-relative translation blocks

2022-10-16 Thread Richard Henderson
This is the Arm specific changes required to reduce the amount of translation for address space randomization. Changes for v7: * Remove read_pc in patch 8. * Add DisasLabel and inlines to generate/emit, cleaning up the management of pc_save. * Restore pc_save after tcg_remove_ops_after.

[PATCH v7 1/9] target/arm: Introduce curr_insn_len

2022-10-16 Thread Richard Henderson
A simple helper to retrieve the length of the current insn. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.h | 5 + target/arm/translate-vfp.c | 2 +- target/arm/translate.c | 5 ++--- 3 files changed, 8 insertions(+), 4 deletions(-) d

[PATCH v7 3/9] target/arm: Change gen_*set_pc_im to gen_*update_pc

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values by passing in pc difference. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-a32.h | 2 +- target/arm/translate.h | 6 ++-- target/arm/translate-a64.c | 32 +---

[PATCH v7 2/9] target/arm: Change gen_goto_tb to work on displacements

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 40 -- target/arm/translate.c | 10 ++ 2 files changed, 27 insertions(+), 23 delet

[PATCH v7 4/9] target/arm: Change gen_exception_insn* to work on displacements

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.h| 5 +++-- target/arm/translate-a64.c| 28 ++- target/arm/translate-m-nocp.c | 6 ++--- target

[PATCH v7 6/9] target/arm: Change gen_jmp* to work on displacements

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/target/arm/translate.c b/tar

[PATCH v7 8/9] target/arm: Introduce gen_pc_plus_diff for aarch32

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/target/arm/transla

[PATCH v7 5/9] target/arm: Remove gen_exception_internal_insn pc argument

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Since we always pass dc->pc_curr, fold the arithmetic to zero displacement. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 6 +++--- target/arm/translate.c | 10 ++

[PATCH v7 7/9] target/arm: Introduce gen_pc_plus_diff for aarch64

2022-10-16 Thread Richard Henderson
In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 41 +++--- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/target/arm/translate-a6

[PATCH v7 9/9] target/arm: Enable TARGET_TB_PCREL

2022-10-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v7: Introduce DisasLabel to clean up pc_save frobbing. Adjust pc_save around tcg_remove_ops_after. --- target/arm/cpu-param.h| 1 + target/arm/translate.h| 50 - target/arm/cpu.c | 23 target/arm/tr

Re: [PULL 00/10] riscv-to-apply queue

2022-10-16 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] target/i386: Save and restore pc_save before tcg_remove_ops_after

2022-10-16 Thread Richard Henderson
Restore pc_save while undoing any state change that may have happened while decoding the instruction. Leave a TODO about removing all of that when the table-based decoder is complete. Cc: Paolo Bonzini Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- target/i386/tcg/translate.

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > 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-of

Re: [RFC v3 1/2] include: update virtio_blk headers from Linux 5.19-rc2+

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 23:05 +0800, Sam Li wrote: > Use scripts/update-linux-headers.sh to update virtio-blk headers > from Dmitry's "virtio-blk:add support for zoned block devices" > linux patch. There is a link for more information: > https://github.com/dmitry-fomichev/virtblk-zbd > > Signed-off-

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > Add the documentation about the zoned device support to virtio-blk > emulation. > > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Damien Le Moal > --- >  docs/devel/zoned-storage.rst   | 43

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > Signed-off-by: Sam Li > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Damien Le Moal > Reviewed-by: Hannes Reinecke > --- >  include/block/block-common.h | 43 >  1 file changed, 43 insertions(+) > > diff --gi

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > 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 z

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, 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 > Reviewed-by: Hannes Reinecke Reviewed-b

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, 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 > Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev > --- >  block.c  | 19 +

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > 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. change this to "whether the logs show the correct zone informa

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:56 +0800, Sam Li wrote: > 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 locatio

Re: [RFC v3 2/2] virtio-blk: add zoned storage emulation for zoned devices

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 23:05 +0800, Sam Li wrote: > This patch extends virtio-blk emulation to handle zoned device commands > by calling the new block layer APIs to perform zoned device I/O on > behalf of the guest. It supports Report Zone, four zone oparations (open, > close, finish, reset), and Ap

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

2022-10-16 Thread Dmitry Fomichev
On Sun, 2022-10-16 at 22:56 +0800, Sam Li wrote: > 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

Re: [PATCH v11 3/5] target/riscv: generate virtual instruction exception

2022-10-16 Thread weiwei
On 2022/10/16 20:47, Mayuresh Chitale wrote: This patch adds a mechanism to generate a virtual instruction instruction exception instead of an illegal instruction exception during instruction decode when virt is enabled. Signed-off-by: Mayuresh Chitale --- target/riscv/translate.c | 8 +

[PATCH] tcg/aarch64: Remove unused code in tcg_out_op

2022-10-16 Thread Qi Hu
AArch64 defines the TCG_TARGET_HAS_direct_jump. So the "else" block is useless in the case of "INDEX_op_goto_tb" in function "tcg_out_op". Add an assertion and delete these codes for clarity. Suggested-by: WANG Xuerui Signed-off-by: Qi Hu --- tcg/aarch64/tcg-target.c.inc | 31 ++

Re: [RFC v3 1/2] include: update virtio_blk headers from Linux 5.19-rc2+

2022-10-16 Thread Damien Le Moal
On 10/17/22 09:53, Dmitry Fomichev wrote: > On Sun, 2022-10-16 at 23:05 +0800, Sam Li wrote: >> Use scripts/update-linux-headers.sh to update virtio-blk headers >> from Dmitry's "virtio-blk:add support for zoned block devices" >> linux patch. There is a link for more information: >> https://github.

Re: [PATCH] qemu-config: extract same logic in *_add_opts() to fill_config_groups()

2022-10-16 Thread Wang, Lei
Kindly ping for any comments. BR, Lei On 9/2/2022 3:57 PM, Markus Armbruster wrote: > Cc: Gerd & Kevin, because they were involved with the code that gets > refactored here, and no good deed shall go unpunished. > > "Wang, Lei" writes: > >> QEMU use qemu_add_opts() and qemu_add_drive_opts() to

RE: [PATCH] migration: Fix a potential guest memory corruption

2022-10-16 Thread Duan, Zhenzhong
>-Original Message- >From: Dr. David Alan Gilbert >Sent: Tuesday, October 11, 2022 7:06 PM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; quint...@redhat.com >Subject: Re: [PATCH] migration: Fix a potential guest memory corruption > >* Zhenzhong Duan (zhenzhong.d...@intel.com) wrote:

Re: [PULL 0/2] M68k for 7.2 patches

2022-10-16 Thread Jason A. Donenfeld
On Sun, Oct 16, 2022 at 03:50:54PM -0400, Stefan Hajnoczi wrote: > On Fri, 14 Oct 2022 at 03:26, Laurent Vivier wrote: > > > > The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: > > > > Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of > > https://github.com/s

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

2022-10-16 Thread Damien Le Moal
On 10/16/22 23:51, Sam Li wrote: > 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 o

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

2022-10-16 Thread Damien Le Moal
On 10/16/22 23:56, Sam Li wrote: > 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 o

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

2022-10-16 Thread Damien Le Moal
On 10/16/22 23:56, Sam Li wrote: > 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 completio

[PATCH v3 0/2] implement `FIELDx_1CLEAR() macro

2022-10-16 Thread Wilfred Mallawa
From: Wilfred Mallawa This patch series implements a `FIELDx_1CLEAR()` macro and implements it in the `hw/ssi/ibex_spi.c` model. *** Changelog *** Since v2: - change the macro arguments name to match the existing macros. (reg_val, reg, field) -> (st

[PATCH v3 2/2] hw/ssi/ibex_spi: implement `FIELD32_1CLEAR` macro

2022-10-16 Thread Wilfred Mallawa
From: Wilfred Mallawa use the `FIELD32_1CLEAR` macro to implement register `rw1c` functionality to `ibex_spi`. This change was tested by running the `SPI_HOST` from TockOS. Signed-off-by: Wilfred Mallawa --- hw/ssi/ibex_spi_host.c | 21 + 1 file changed, 9 insertions(+), 1

[PATCH v3 1/2] hw/registerfields: add `FIELDx_1CLEAR()` macro

2022-10-16 Thread Wilfred Mallawa
From: Wilfred Mallawa Adds a helper macro that implements the register `w1c` functionality. Ex: uint32_t data = FIELD32_1CLEAR(val, REG, FIELD); If ANY bits of the specified `FIELD` is set then the respective field is cleared and returned to `data`. If the field is cleared (0), then no chang

[PATCH 2/3] tcg/sparc64: Rename from tcg/sparc

2022-10-16 Thread Richard Henderson
Emphasize that we only support full 64-bit code generation. Signed-off-by: Richard Henderson --- meson.build | 4 +--- tcg/{sparc => sparc64}/tcg-target-con-set.h | 0 tcg/{sparc => sparc64}/tcg-target-con-str.h | 0 tcg/{sparc => sparc64}/tcg-target.h | 0

[PATCH 3/3] tcg/sparc64: Remove sparc32plus constraints

2022-10-16 Thread Richard Henderson
With sparc64 we need not distinguish between registers that can hold 32-bit values and those that can hold 64-bit values. Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target-con-set.h | 16 + tcg/sparc64/tcg-target-con-str.h | 3 - tcg/sparc64/tcg-target.c.inc | 109 ++

[PATCH 1/3] tcg/sparc: Remove support for sparc32plus

2022-10-16 Thread Richard Henderson
Since 9b9c37c36439, we have only supported sparc64 cpus. Debian and Gentoo now only support 64-bit sparc64 userland, so it is time to drop the 32-bit sparc64 userland: sparc32plus. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.h | 11 --- tcg/tcg.c | 75 +--

[PATCH 0/3] tcg/sparc: Remove support for sparc32plus

2022-10-16 Thread Richard Henderson
While working on other cleanup/new features wrt calling conventions, I noticed, again, that I am unable to test sparc32plus. The current debian installation in the gcc compile farm is for sparc64, and that is also what gentoo is currently building. It has been 10 years since qemu dropped support

[PULL 4/5] linux-user: Fix struct statfs ABI on loongarch64

2022-10-16 Thread Song Gao
From: WANG Xuerui Previously the 32-bit version was incorrectly chosen, leading to funny but incorrect output from e.g. df(1). Simply select the version corresponding to the 64-bit asm-generic definition. For reference, this program should produce the same output no matter natively compiled or n

Re: [PATCH] tcg/aarch64: Remove unused code in tcg_out_op

2022-10-16 Thread Richard Henderson
On 10/17/22 12:08, Qi Hu wrote: AArch64 defines the TCG_TARGET_HAS_direct_jump. So the "else" block is useless in the case of "INDEX_op_goto_tb" in function "tcg_out_op". Add an assertion and delete these codes for clarity. Suggested-by: WANG Xuerui Signed-off-by: Qi Hu --- tcg/aarch64/tcg-tar

[PULL 2/5] target/loongarch: Fix fnm{sub/add}_{s/d} set wrong flags

2022-10-16 Thread Song Gao
Reviewed-by: Richard Henderson Signed-off-by: Song Gao Message-Id: <20220930024510.85-3-gaos...@loongson.cn> --- target/loongarch/insn_trans/trans_farith.c.inc | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/loongarch/insn_trans/trans_farith.c.inc b/t

[PULL 5/5] hw/intc: Fix LoongArch ipi device emulation

2022-10-16 Thread Song Gao
From: Xiaojuan Yang In ipi_send function, it should not to set irq before writing data to dest cpu iocsr space, as the irq will trigger after data writing. When call this function 'address_space_stl()', it will trigger loongarch_ipi_writel(), the addr arg is 0x1008 ('CORE_SET_OFF'), and qemu_irq_

[PULL 0/5] loongarch-to-apply queue

2022-10-16 Thread Song Gao
The following changes since commit 5c2439a92ce4a1c5a53070bd803d6f7647e702ca: Merge tag 'pull-riscv-to-apply-20221014' of https://github.com/alistair23/qemu into staging (2022-10-16 15:53:13 -0400) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarc

[PULL 3/5] softfloat: logB(0) should raise divideByZero exception

2022-10-16 Thread Song Gao
logB(0) should raise divideByZero exception from IEEE 754-2008 spec 7.3 Suggested-by: Richard Henderson Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-Id: <20220930024510.85-4-gaos...@loongson.cn> --- fpu/softfloat-parts.c.inc | 1 + 1 file changed, 1 insertion(+) diff --g

[PATCH v3 2/2] vhost-user: Support vhost_dev_start

2022-10-16 Thread Yajun Wu
The motivation of adding vhost-user vhost_dev_start support is to improve backend configuration speed and reduce live migration VM downtime. Today VQ configuration is issued one by one. For virtio net with multi-queue support, backend needs to update RSS (Receive side scaling) on every rx queue en

[PATCH v3 1/2] vhost: Change the sequence of device start

2022-10-16 Thread Yajun Wu
This patch is part of adding vhost-user vhost_dev_start support. The motivation is to improve backend configuration speed and reduce live migration VM downtime. Moving the device start routines after finishing all the necessary device and VQ configuration, further aligning to the virtio specificat

[PATCH v3 0/2] vhost-user: Support vhost_dev_start

2022-10-16 Thread Yajun Wu
The motivation of adding vhost-user vhost_dev_start support is to improve backend configuration speed and reduce live migration VM downtime. Today VQ configuration is issued one by one. For virtio net with multi-queue support, backend needs to update RSS (Receive side scaling) on every rx queue en