[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

[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(+),

[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) ->

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

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

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

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 > >

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)

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()

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: >>

[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: [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

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

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

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

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

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 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

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

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

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: [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 > >

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. > >

[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 ---

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 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

[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

[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 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

[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

[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 ++---

[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

[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 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(-)

[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.

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

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

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

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 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,

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

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

[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

[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

[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

[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

[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

[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

[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 ++

[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

[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

[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 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

[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

[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,

[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

[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:

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

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); > ... >

[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

[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 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

[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 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

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

[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

[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

[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 ---

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 >> --- >>

[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

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

[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

[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 +

[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 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

[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 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

[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

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

[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: