[RFC 0/1] SPI support in QEMU TPM

2022-08-03 Thread Iris Chen
From: Iris Chen Hey everyone, Thanks for all your comments on the SPI GPIO model. I am working through them. As for adding support for SPI-based TPMs in QEMU, this RFC patch adds SPI support in the QEMU TPM implementation via tpm_tis_spi.c. The QEMU tree already has support for two connection

[RFC 1/1] hw: tpmtisspi: add SPI support to QEMU TPM implementation

2022-08-03 Thread Iris Chen
From: Iris Chen Signed-off-by: Iris Chen --- configs/devices/arm-softmmu/default.mak | 1 + hw/arm/Kconfig | 5 + hw/tpm/Kconfig | 5 + hw/tpm/meson.build | 1 + hw/tpm/tpm_tis_spi.c| 311

Re: [PATCH 8/9] scripts/qapi-gen: add -i option

2022-08-03 Thread Marc-André Lureau
Hi On Tue, Aug 2, 2022 at 5:28 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > > > On Tue, Jun 21, 2022 at 6:14 PM Markus Armbruster > wrote: > >> > >> marcandre.lur...@redhat.com writes: > >> > >> > From: Marc-André Lureau > >> > > >> > Replace hard-coded "qemu/osdep

Re: [RFC 0/1] SPI support in QEMU TPM

2022-08-03 Thread Cédric Le Goater
[ Adding Stefan, TPM maintainer ] On 8/3/22 04:32, Iris Chen wrote: From: Iris Chen Hey everyone, Thanks for all your comments on the SPI GPIO model. I am working through them. As for adding support for SPI-based TPMs in QEMU, this RFC patch adds SPI support in the QEMU TPM implementation vi

Re: [RFC 1/1] hw: tpmtisspi: add SPI support to QEMU TPM implementation

2022-08-03 Thread Cédric Le Goater
On 8/3/22 04:32, Iris Chen wrote: From: Iris Chen A commit log telling us about this new device would be good to have. Signed-off-by: Iris Chen --- configs/devices/arm-softmmu/default.mak | 1 + hw/arm/Kconfig | 5 + hw/tpm/Kconfig

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Dr. David Alan Gilbert
* Alberto Faria (afa...@redhat.com) wrote: > Make non-void static functions whose return values are ignored by > all callers return void instead. > > These functions were found by static-analyzer.py. > > Not all occurrences of this problem were fixed. > > Signed-off-by: Alberto Faria > diff

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Daniel P . Berrangé
On Wed, Aug 03, 2022 at 11:46:26AM +0100, Dr. David Alan Gilbert wrote: > * Alberto Faria (afa...@redhat.com) wrote: > > Make non-void static functions whose return values are ignored by > > all callers return void instead. > > > > These functions were found by static-analyzer.py. > > > > Not all

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Alberto Faria
On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert wrote: > > * Alberto Faria (afa...@redhat.com) wrote: > > Make non-void static functions whose return values are ignored by > > all callers return void instead. > > > > These functions were found by static-analyzer.py. > > > > Not all occurren

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Richard W.M. Jones
On Wed, Aug 03, 2022 at 12:07:19PM +0100, Alberto Faria wrote: > On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert > wrote: > > > > * Alberto Faria (afa...@redhat.com) wrote: > > > Make non-void static functions whose return values are ignored by > > > all callers return void instead. > > > >

Re: [PATCH 8/9] scripts/qapi-gen: add -i option

2022-08-03 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Aug 2, 2022 at 5:28 PM Markus Armbruster wrote: > >> Marc-André Lureau writes: >> >> > Hi >> > >> > >> > On Tue, Jun 21, 2022 at 6:14 PM Markus Armbruster >> > wrote: [...] >> >> The option name --include doesn't really tell me what it is about. I

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Daniel P . Berrangé
On Wed, Aug 03, 2022 at 12:15:20PM +0100, Richard W.M. Jones wrote: > On Wed, Aug 03, 2022 at 12:07:19PM +0100, Alberto Faria wrote: > > On Wed, Aug 3, 2022 at 11:46 AM Dr. David Alan Gilbert > > wrote: > > > > > > * Alberto Faria (afa...@redhat.com) wrote: > > > > Make non-void static functions w

Re: [RFC v3 1/8] blkio: add io_uring block driver using libblkio

2022-08-03 Thread Peter Krempa
On Wed, Jul 27, 2022 at 21:33:40 +0200, Kevin Wolf wrote: > Am 08.07.2022 um 06:17 hat Stefan Hajnoczi geschrieben: > > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > > high-performance disk I/O. It currently supports io_uring and > > virtio-blk-vhost-vdpa with additional drive

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Peter Maydell
On Wed, 3 Aug 2022 at 12:44, Daniel P. Berrangé wrote: > Inconsistent return value checking is designed-in behaviour for > QEMU's current Error handling coding pattern with error_abort/fatal. Yes; I habitually mark as false-positive Coverity reports about missing error checks where it has not not

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Peter Maydell
On Fri, 29 Jul 2022 at 14:09, Alberto Faria wrote: > > Make non-void static functions whose return values are ignored by > all callers return void instead. > > These functions were found by static-analyzer.py. > > Not all occurrences of this problem were fixed. > > Signed-off-by: Alberto Faria >

Re: [RFC v2 02/10] Drop unused static function return values

2022-08-03 Thread Richard W.M. Jones
On Wed, Aug 03, 2022 at 01:25:34PM +0100, Peter Maydell wrote: > On Wed, 3 Aug 2022 at 12:44, Daniel P. Berrangé wrote: > > Inconsistent return value checking is designed-in behaviour for > > QEMU's current Error handling coding pattern with error_abort/fatal. > > Yes; I habitually mark as false-

Re: [RFC v3 1/8] blkio: add io_uring block driver using libblkio

2022-08-03 Thread Kevin Wolf
Am 03.08.2022 um 14:25 hat Peter Krempa geschrieben: > On Wed, Jul 27, 2022 at 21:33:40 +0200, Kevin Wolf wrote: > > Am 08.07.2022 um 06:17 hat Stefan Hajnoczi geschrieben: > > > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > > > high-performance disk I/O. It currently supports

[PATCH 1/3] block/qcow2: Keep auto_backing_file if possible

2022-08-03 Thread Hanna Reitz
qcow2_do_open() is used by qcow2_co_invalidate_cache(), i.e. may be run on an image that has been opened before. When reading the backing file string from the image header, compare it against the existing bs->backing_file, and update bs->auto_backing_file only if they differ. auto_backing_file sh

[PATCH 3/3] iotests/backing-file-invalidation: Add new test

2022-08-03 Thread Hanna Reitz
Add a new test to see what happens when you migrate a VM with a backing chain that has json:{} backing file strings, which, when opened, will be resolved to plain filenames. Signed-off-by: Hanna Reitz --- .../tests/backing-file-invalidation | 152 ++ .../tests/backing-f

[PATCH 2/3] block/qed: Keep auto_backing_file if possible

2022-08-03 Thread Hanna Reitz
Just like qcow2, qed invokes its open function in its .bdrv_co_invalidate_cache() implementation. Therefore, just like done for qcow2 in HEAD^, update auto_backing_file only if the backing file string in the image header differs from the one we have read before. Signed-off-by: Hanna Reitz --- b

[PATCH 0/3] block: Keep auto_backing_file post-migration

2022-08-03 Thread Hanna Reitz
Hi, https://gitlab.com/qemu-project/qemu/-/issues/1117 reports the following issue: Say you have a VM with a backing chain of images where the image metadata contains json:{} backing file strings, which however will be resolved to simple plain filenames when opened[1]. So when these images are o

Re: [PATCH v10 06/21] job: move and update comments from blockjob.c

2022-08-03 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > This comment applies more on job, it was left in blockjob as in the past > the whole job logic was implemented there. > > Note: at this stage, job_{lock/unlock} and job lock guard macros > are *nop*. > > No functional change int

Re: [PATCH v10 07/21] blockjob: introduce block_job _locked() APIs

2022-08-03 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Just as done with job.h, create _locked() functions in blockjob.h > > These functions will be later useful when caller has already taken > the lock. All blockjob _locked functions call job _locked functions. > > Note: at this st

[PATCH v2 1/2] virtio: document vdc->get_features() callback

2022-08-03 Thread Stefan Hajnoczi
Suggested-by: Cornelia Huck Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 20 1 file changed, 20 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index db1c0ddf6b..8d27fe1824 100644 --- a/include/hw/virtio/virtio.h +++ b/i

[PATCH v2 0/2] virtio: remove unnecessary host_features in ->get_features()

2022-08-03 Thread Stefan Hajnoczi
v2: - Document vdv->get_features() callback [Cornelia] The vdc->get_features() callbacks are a little inconsistent in how they use vdev->host_features. This is because the function's behavior changed over time. Clean things up. Stefan Hajnoczi (2): virtio: document vdc->get_features() callback

Re: [RFC 1/1] hw: tpmtisspi: add SPI support to QEMU TPM implementation

2022-08-03 Thread Peter Delevoryas
On Wed, Aug 03, 2022 at 10:52:23AM +0200, Cédric Le Goater wrote: > On 8/3/22 04:32, Iris Chen wrote: > > From: Iris Chen > > A commit log telling us about this new device would be good to have. > > > > Signed-off-by: Iris Chen > > --- > > configs/devices/arm-softmmu/default.mak | 1 + > >

[PATCH v2 2/2] virtio: remove unnecessary host_features in ->get_features()

2022-08-03 Thread Stefan Hajnoczi
Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: move host_features") the ->get_features() function has been called with host_features as an argument. Some devices manually add host_features in ->get_features() although the features argument already contains host_features.