Re: [PATCH v2] pc: add property for Linux setup_data random number seed

2022-08-05 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 11:24:41PM +0200, Paolo Bonzini wrote: > Using a property makes it possible to use the normal compat property > mechanism instead of ad hoc code; it avoids parameter proliferation > in x86_load_linux; and allows shipping the code even if it is > disabled by default. > > Cc:

Re: [PATCH 7.1] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 02:56:59PM -0400, Stefan Hajnoczi wrote: > On Wed, Aug 03, 2022 at 12:28:24PM -0400, Stefan Hajnoczi wrote: > > As soon as virtio_scsi_data_plane_start() attaches host notifiers the > > IOThread may start virtqueue processing. There is a race between > > IOThread virtqueue p

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Cédric Le Goater
On 8/4/22 21:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Peter Maydell wrote: On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: I was trying to find out how to do it but I don't understand QOM enough to answer the simple question of how to get the cpu object from QOM. My guesses are: objec

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Michael S. Tsirkin
On Wed, Aug 03, 2022 at 12:28:24PM -0400, Stefan Hajnoczi wrote: > As soon as virtio_scsi_data_plane_start() attaches host notifiers the > IOThread may start virtqueue processing. There is a race between > IOThread virtqueue processing and virtio_scsi_data_plane_start() because > it only assigns s-

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Thomas Huth
On 02/08/2022 12.00, Zhang, Chen wrote: -Original Message- From: Qemu-devel On Behalf Of Jagannathan Raman Sent: Tuesday, August 2, 2022 9:24 AM To: qemu-devel@nongnu.org Cc: stefa...@gmail.com; berra...@redhat.com Subject: [PATCH 0/1] Update vfio-user module to the latest Hi, This

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:41:01 +0100 Daniel P. Berrangé wrote: > On Thu, Aug 04, 2022 at 04:49:29PM +0200, Claudio Imbrenda wrote: > > On Thu, 4 Aug 2022 09:29:39 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Aug 03, 2022 at 06:34:45PM +0100, Daniel P. Berrangé wrote: > > > > On Wed, A

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:56:34 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal signal, > > the VM is to

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-05 Thread Florian Weimer
* Daniel P. Berrangé: > CC'ing Florian to get the POV of a glibc maintainer on what we've > had to do to work around this compatibility brekage. Meh, that's really not great. 8-( I'll see if I can add a similar workaround to the glibc headers. Unfortunately I'm busy with other stuff right now, s

[PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute

2022-08-05 Thread Sam Li
Use sysfs attribute files to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke --- block/file-posix.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/block/file-posix.c b/block/file-posi

[PATCH v6 1/8] include: add zoned device structs

2022-08-05 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- 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 100644 --- a/include/block/block-

[PATCH v6 3/8] file-posix: introduce get_sysfs_str_val for device zoned model

2022-08-05 Thread Sam Li
Use sysfs attribute files to get the string value of device zoned model. Then get_sysfs_zoned_model can convert it to BlockZoneModel type in QEMU. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke --- block/file-posix.c | 70 include/block/block_i

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-05 Thread Eric Auger
Hi Gavin, On 8/5/22 10:36, Gavin Shan wrote: > Hi Eric, > > On 8/4/22 5:19 PM, Eric Auger wrote: >> On 8/4/22 04:47, Gavin Shan wrote: >>> On 8/3/22 10:52 PM, Eric Auger wrote: On 8/3/22 15:02, Gavin Shan wrote: > On 8/3/22 5:01 PM, Marc Zyngier wrote: >> On Wed, 03 Aug 2022 04:01:04

[PATCH v6 0/8] Add support for zoned device

2022-08-05 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 v6 4/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-05 Thread Sam Li
By adding zone management operations in BlockDriver, storage controller emulation can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset). Add zoned storage commands of the device: zone_report(zrp), zone_open(zo), zone_close(zc), zone

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:58:34 +0100 Daniel P. Berrangé wrote: > On Thu, Aug 04, 2022 at 09:20:59AM +0100, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 07:56:49AM +0200, Claudio Imbrenda wrote: > > > On Wed, 3 Aug 2022 18:34:45 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On We

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > This is just moving qapi-gen.py and related subdir to qemu-common, to > ease review and proceed step by step. The following patches will move > related necessary code, tests etc. > > Signed-off-by: Marc-André Lureau As moved file

[PATCH v6 5/8] raw-format: add zone operations to pass through requests

2022-08-05 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 --- block/raw-format.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c in

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Paolo Bonzini
On 8/5/22 01:04, Jason A. Donenfeld wrote: +/* Nothing else uses this part of the hardware mapped region */ +setup_data_base = 0xf - 0x1000; Isn't this where the BIOS lives? I don't think this works. Does it work to place setup_data at the end of the cmdline file instead of havin

[PATCH v6 6/8] config: add check to block layer

2022-08-05 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 | 13 + block/file-posix.c | 1 + block/raw-format.c | 1 + include/block/block_int-common.

Re: [PATCH v10 12/21] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > We are always using the given bs AioContext, so there is no need > to take the job ones (which is identical anyways). > This also reduces the point we need to check when protecting > job.aio_context field. > > Reviewed-by: Vladim

[PATCH v6 7/8] qemu-iotests: test new zone operations

2022-08-05 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 v2] pc: add property for Linux setup_data random number seed

2022-08-05 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 10:16:37AM +0200, Paolo Bonzini wrote: > On 8/5/22 09:01, Michael S. Tsirkin wrote: > > > -if (!legacy_no_rng_seed) { > > > +if (x86ms->linuxboot_randomness != ON_OFF_AUTO_OFF && > > > +(protocol >= 0x209 || x86ms->linuxboot_randomness == > > > ON_OFF_AUTO_O

[PATCH v6 8/8] docs/zoned-storage: add zoned device documentation

2022-08-05 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li --- docs/devel/zoned-storage.rst | 41 ++ docs/system/qemu-block-drivers.rst.inc | 6 2 files changed, 47 insertions(+) create mode 100644 docs/devel/zoned

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: > On 02/08/2022 12.00, Zhang, Chen wrote: > > > > > > > -Original Message- > > > From: Qemu-devel > > bounces+chen.zhang=intel@nongnu.org> On Behalf Of Jagannathan > > > Raman > > > Sent: Tuesday, August 2, 2022 9:24 AM > >

Re: [PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 12:25:07PM +0800, ling xu wrote: > This commit adds runtime check of AVX512 on running machine, and implements > AVX512 of > xbzrle_encode_buffer function to accelerate xbzrle encoding speed. > Compared with C version of xbzrle_encode_buffer function, AVX512 version > can a

Re: [PATCH v2] pc: add property for Linux setup_data random number seed

2022-08-05 Thread Paolo Bonzini
On 8/5/22 09:01, Michael S. Tsirkin wrote: -if (!legacy_no_rng_seed) { +if (x86ms->linuxboot_randomness != ON_OFF_AUTO_OFF && +(protocol >= 0x209 || x86ms->linuxboot_randomness == ON_OFF_AUTO_ON)) { Hmm so if user requested "on" but protocol is too old then we just ignore it sile

RE: [PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-05 Thread Zhao, Zhou
Hi: Its convenient for other guys if they need use other avx flag, they need not change the meson file again. So we all disable that avx flag in that meson option file exclude for that "avx512_bw" that we used. -Original Message- From: Daniel P. Berrangé Sent: Friday, August 5, 2022

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Emanuele Giuseppe Esposito
Am 03/08/2022 um 18:28 schrieb Stefan Hajnoczi: > As soon as virtio_scsi_data_plane_start() attaches host notifiers the > IOThread may start virtqueue processing. There is a race between > IOThread virtqueue processing and virtio_scsi_data_plane_start() because > it only assigns s->dataplane_sta

Re: [PATCH v10 13/21] job: detect change of aiocontext within job coroutine

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > From: Paolo Bonzini > > We want to make sure access of job->aio_context is always done > under either BQL or job_mutex. Is this the goal of this series? If so, it would have been useful to state somewhere more obvious, because

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-05 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 12:12 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > This is just moving qapi-gen.py and related subdir to qemu-common, to > > ease review and proceed step by step. The following patches will move > > related nec

Re: [PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Peter Maydell
On Thu, 4 Aug 2022 at 19:50, Ilya Leoshkevich wrote: > > When the first instruction of a translation block is located in a > non-readable page, qemu-user fills siginfo_t correctly. For the other > instructions the result is as if it were the first instruction, which > is not correct. > > The reaso

Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 06:56, Zhang, Chen wrote: > > > > > -Original Message- > > From: Jason Wang > > I wonder under which case we can see data == NULL? > > > > AFAIK, data is either dup via packet_new() or assigned to a pointer to the > > buf > > in packet_new_nocopy(). > > Yes, you are

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: > On 02/08/2022 12.00, Zhang, Chen wrote: > > > > > > > -Original Message- > > > From: Qemu-devel > > bounces+chen.zhang=intel@nongnu.org> On Behalf Of Jagannathan > > > Raman > > > Sent: Tuesday, August 2, 2022 9:24 AM > >

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 09:24:56AM +0100, Daniel P. Berrangé wrote: > On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: > > On 02/08/2022 12.00, Zhang, Chen wrote: > > > > > > > > > > -Original Message- > > > > From: Qemu-devel > > > bounces+chen.zhang=intel@nongnu.org> On

Re: [PATCH v10 14/21] jobs: protect job.aio_context with BQL and job_mutex

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > In order to make it thread safe, implement a "fake rwlock", > where we allow reads under BQL *or* job_mutex held, but > writes only under BQL *and* job_mutex. Oh, so the "or BQL" part is only for job.aio_context? Okay. > The onl

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Thomas Huth
On 05/08/2022 10.55, Michael S. Tsirkin wrote: On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: On 02/08/2022 12.00, Zhang, Chen wrote: -Original Message- From: Qemu-devel On Behalf Of Jagannathan Raman Sent: Tuesday, August 2, 2022 9:24 AM To: qemu-devel@nongnu.org Cc:

Re: [PATCH v10 15/21] blockjob.h: categorize fields in struct BlockJob

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > The same job lock is being used also to protect some of blockjob fields. > Categorize them just as done in job.h. > > Reviewed-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Emanuele Giuseppe Esposito Why do speed, limit an

Re: [PATCH v2 for-7.1] hw/usb/hcd-xhci: Fix unbounded loop in xhci_ring_chain_length() (CVE-2020-14394)

2022-08-05 Thread Mauro Matteo Cascella
On Thu, Aug 4, 2022 at 3:13 PM Thomas Huth wrote: > > The loop condition in xhci_ring_chain_length() is under control of > the guest, and additionally the code does not check for failed DMA > transfers (e.g. if reaching the end of the RAM), so the loop there > could run for a very long time or eve

Re: [PATCH v10 16/21] blockjob: rename notifier callbacks as _locked

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > They all are called with job_lock held, in job_event_*_locked() Worth documenting that for the notifier lists in struct Job, too? > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Eman

RE: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Zhang, Chen
> -Original Message- > From: Peter Maydell > Sent: Friday, August 5, 2022 4:53 PM > To: Zhang, Chen > Cc: Jason Wang ; Li Zhijian ; > qemu-dev > Subject: Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity. > > On Fri, 5 Aug 2022 at 06:56, Zhang, Chen wrote: > > > > >

Regression in -readconfig [memory] size (was: [PULL 13/27] machine: add mem compound property)

2022-08-05 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> Make -m syntactic sugar for a compound property "-machine >> mem.{size,max-size,slots}". The new property does not have >> the magic conversion to megabytes of unsuffixed arguments, >> and also does not understand that "0" means the default

Re: [PATCH] ui/console: fix qemu_console_resize() regression

2022-08-05 Thread Marc-André Lureau
Hi On Thu, Aug 4, 2022 at 12:11 PM Mark Cave-Ayland wrote: > > On 25/07/2022 17:35, Mark Cave-Ayland wrote: > > > On 25/07/2022 12:58, marcandre.lur...@redhat.com wrote: > > > >> From: Marc-André Lureau > >> > >> The display may be corrupted when changing screen colour depth in > >> qemu-system-

[PATCH for-7.2 v2 05/20] hw/ppc: set machine->fdt in bamboo_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the bamboo machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/ppc440_bamboo.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc

[PATCH for-7.2 v2 04/20] hw/ppc: set machine->fdt in ppce500_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the e500 machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 32495d01

[PATCH for-7.2 v2 01/20] hw/arm: do not free machine->fdt in arm_load_dtb()

2022-08-05 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 th

[PATCH for-7.2 v2 00/20] QMP/HMP: add 'dumpdtb' and 'info fdt' commands

2022-08-05 Thread Daniel Henrique Barboza
Hi, This second version implements the review comments/suggestion made in the v1 review [1]. First 13 patches are adaptations (basically set machine->fdt) I made in several machines to enable them to work with these commands. Patches 14-20 have the actual QMP/HMP/device_tree implementation. A pla

[PATCH for-7.2 v2 10/20] hw/ppc: set machine->fdt in spapr machine

2022-08-05 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 HMP commands to read and save the FDT, which will rely on setting machine->fdt properly to work across all machine archs/types. Let's set machi

[PATCH for-7.2 v2 02/20] hw/microblaze: set machine->fdt in microblaze_load_dtb()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all microblaze machines that uses microblaze_load_dtb(). Cc: Edgar E. Iglesias Signed-off-by: Daniel Henrique Barboza --- hw/microblaze/boot.c | 13 - hw/microblaze/meson.build | 2 +- 2 files changed, 13 i

[PATCH for-7.2 v2 08/20] hw/ppc: set machine->fdt in pegasos2_machine_reset()

2022-08-05 Thread Daniel Henrique Barboza
We'll introduce QMP/HMP commands 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 | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 61f426

[PATCH for-7.2 v2 06/20] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the sam460ex machine. Cc: BALATON Zoltan Signed-off-by: Daniel Henrique Barboza --- hw/ppc/sam460ex.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index

[PATCH for-7.2 v2 11/20] hw/riscv: set machine->fdt in sifive_u_machine_init()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the sifive_u machine. Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Signed-off-by: Daniel Henrique Barboza --- hw/riscv/sifive_u.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/riscv/sifive_u.c b/hw

[PATCH for-7.2 v2 03/20] hw/nios2: set machine->fdt in nios2_load_dtb()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands 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 | 13 - hw/nios2/meson.build | 2 +- 2 files changed, 13 insertions

[PATCH for-7.2 v2 20/20] hmp, device_tree.c: add 'info fdt ' support

2022-08-05 Thread Daniel Henrique Barboza
'info fdt' is only able to print full nodes so far. It would be good to be able to also print single properties, since ometimes we just want to verify a single value from the FDT. libfdt does not have support to find a property given its full path, but it does have a way to return a fdt_property g

[PATCH for-7.2 v2 09/20] hw/ppc: set machine->fdt in pnv_reset()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c ind

[PATCH for-7.2 v2 13/20] hw/xtensa: set machine->fdt in xtfpga_init()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all xtensa machines that uses a FDT. Signed-off-by: Daniel Henrique Barboza --- hw/xtensa/meson.build | 2 +- hw/xtensa/xtfpga.c| 11 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/xtensa/

[PATCH for-7.2 v2 07/20] hw/ppc: set machine->fdt in xilinx_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the virtex_ml507 machine. Cc: Edgar E. Iglesias Signed-off-by: Daniel Henrique Barboza --- hw/ppc/virtex_ml507.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/ppc/virtex_ml507.c b/hw/pp

[PATCH for-7.2 v2 14/20] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-05 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 mac

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Paolo Bonzini
On 8/3/22 18:28, Stefan Hajnoczi wrote: diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c index 8bb6e6acfc..a575c3f0cd 100644 --- a/hw/scsi/virtio-scsi-dataplane.c +++ b/hw/scsi/virtio-scsi-dataplane.c @@ -66,6 +66,21 @@ static int virtio_scsi_set_host_notifier(VirtIO

[PATCH for-7.2 v2 18/20] device_node.c: enable 'info fdt' to print subnodes

2022-08-05 Thread Daniel Henrique Barboza
Printing subnodes of a given node will allow us to show a whole subtree, which the additional perk of 'info fdt /' being able to print the whole FDT. Since we're now printing more than one subnode, change 'fdt_info' to print the full path of the first node. This small tweak helps identifying which

[PATCH] pc-bios/s390-ccw: Fix booting with logical block size < physical block size

2022-08-05 Thread Thomas Huth
For accessing single blocks during boot, it's the logical block size that matters. (Physical block sizes are rather interesting e.g. for creating file systems with the correct alignment for speed reasons etc.). So the s390-ccw bios has to use the logical block size for calculating sector numbers du

Re: Regression in -readconfig [memory] size (was: [PULL 13/27] machine: add mem compound property)

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 11:30:12AM +0200, Markus Armbruster wrote: > Markus Armbruster writes: > > > Paolo Bonzini writes: > > > >> Make -m syntactic sugar for a compound property "-machine > >> mem.{size,max-size,slots}". The new property does not have > >> the magic conversion to megabytes of

[PATCH for-7.2 v2 12/20] hw/riscv: set machine->fdt in spike_board_init()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the spike machine. Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Bin Meng Signed-off-by: Daniel Henrique Barboza --- hw/riscv/spike.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/riscv/spike.c b/hw/ris

[PATCH for-7.2 v2 17/20] device_tree.c: support remaining FDT prop types

2022-08-05 Thread Daniel Henrique Barboza
When printing a blob with 'dtc' using the '-O dts' option there are 3 distinct data types being printed: strings, arrays of uint32s and regular byte arrays. Previous patch added support to print strings. Let's add the remaining formats. We want to resemble the format that 'dtc -O dts' uses, so eve

Re: [PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 08:37:27AM +, Zhao, Zhou wrote: > Hi: > Its convenient for other guys if they need use other avx flag, > they need not change the meson file again. So we all disable > that avx flag in that meson option file exclude for that > "avx512_bw" that we used. I don't think t

[PATCH for-7.2 v2 15/20] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-05 Thread Daniel Henrique Barboza
Reading the FDT requires that the user saves the fdt_blob and then use 'dtc' to read the contents. Saving the file and using 'dtc' is a strong use case when we need to compare two FDTs, but it's a lot of steps if you want to do quick check on a certain node or property. 'info fdt' retrieves FDT no

[PATCH for-7.2 v2 19/20] device_tree.c: add fdt_format_property() helper

2022-08-05 Thread Daniel Henrique Barboza
We want to be able to also print properties with 'info fdt'. Create a helper to format properties based on the already existing code from fdt_format_node(). Signed-off-by: Daniel Henrique Barboza --- softmmu/device_tree.c | 35 --- 1 file changed, 20 insertions(+

[PATCH for-7.2 v2 16/20] device_tree.c: support string props in fdt_format_node()

2022-08-05 Thread Daniel Henrique Barboza
To support printing string properties in 'info fdt' we need to determine whether a void data might contain a string. We do that by casting the void data to a string array and: - check if the array finishes with a null character - check if all characters are printable If both conditions are met,

[PATCH for-7.1] vl: fix [memory] section with -readconfig

2022-08-05 Thread Paolo Bonzini
The -M memory.* options do not have magic applied to them than the -m option, namely no "M" (for mebibytes) is tacked at the end of a suffixless value for "-M memory.size". This magic is performed by parse_memory_options, and we have to do it for both "-m" and the [memory] section of a config file

Re: Regression in -readconfig [memory] size (was: [PULL 13/27] machine: add mem compound property)

2022-08-05 Thread Paolo Bonzini
On 8/5/22 11:30, Markus Armbruster wrote: This appears to change the meaning of [memory] size = "1024" in a -readconfig file from 1024MiB to 8KiB (1024 Bytes rounded up to 8KiB silently). No reply so far. If we can't fix this, we better mention it in the release notes. Can we fix

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Paolo Bonzini
On 8/5/22 09:04, Michael S. Tsirkin wrote: Buglink:https://bugzilla.redhat.com/show_bug.cgi?id=2099541 Reported-by: Qing Wang Signed-off-by: Stefan Hajnoczi A scsi thing that tree seems more appropriate. Reviewed-by: Michael S. Tsirkin Since the same thing has to be done in virtio-blk, an

Re: [PATCH V2] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 10:53, Zhang Chen wrote: > > When enable the virtio-net-pci, guest network packet will > load the vnet_hdr. In COLO status, the primary VM's network > packet maybe redirect to another VM, it need filter-redirect > enable the vnet_hdr flag at the same time, COLO-proxy will > c

[PATCH V2] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Zhang Chen
When enable the virtio-net-pci, guest network packet will load the vnet_hdr. In COLO status, the primary VM's network packet maybe redirect to another VM, it need filter-redirect enable the vnet_hdr flag at the same time, COLO-proxy will correctly parse the original network packet. If have any misc

Re: [PATCH v2 14/15] mtest2make.py: teach suite name that are just "PROJECT"

2022-08-05 Thread Paolo Bonzini
On 7/12/22 11:35, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau A subproject test may be simply in the "PROJECT" suite (such as "qemu-common" with the following patches) Signed-off-by: Marc-André Lureau --- scripts/mtest2make.py | 7 +-- 1 file changed, 5 insertions(+), 2

Re: [PATCH] RFC: char: deprecate usage of bidirectional pipe

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 01:55:41PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jul 26, 2022 at 12:44 PM Daniel P. Berrangé > wrote: > > > > On Tue, Jul 26, 2022 at 12:32:32PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > As Ed Swierk explained back in

Re: [PATCH] RFC: char: deprecate usage of bidirectional pipe

2022-08-05 Thread Marc-André Lureau
Hi On Tue, Jul 26, 2022 at 12:44 PM Daniel P. Berrangé wrote: > > On Tue, Jul 26, 2022 at 12:32:32PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > As Ed Swierk explained back in 2006: > > https://lists.nongnu.org/archive/html/qemu-devel/2006-12/msg00160.html > > >

Re: [PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Ilya Leoshkevich
On Fri, 2022-08-05 at 09:50 +0100, Peter Maydell wrote: > On Thu, 4 Aug 2022 at 19:50, Ilya Leoshkevich > wrote: > > > > When the first instruction of a translation block is located in a > > non-readable page, qemu-user fills siginfo_t correctly. For the > > other > > instructions the result is a

Re: [PATCH] pc-bios/s390-ccw: Fix booting with logical block size < physical block size

2022-08-05 Thread Cornelia Huck
On Fri, Aug 05 2022, Thomas Huth wrote: > For accessing single blocks during boot, it's the logical block size that > matters. (Physical block sizes are rather interesting e.g. for creating > file systems with the correct alignment for speed reasons etc.). > So the s390-ccw bios has to use the lo

Re: [PATCH for-7.2 04/10] ppc/pnv: add helpers for pnv-phb user devices

2022-08-05 Thread Frederic Barrat
On 03/08/2022 15:44, Daniel Henrique Barboza wrote: pnv_parent_qom_fixup() and pnv_parent_bus_fixup() are versions of the helpers that were reverted by commit 9c10d86fee "ppc/pnv: Remove user-created PHB{3,4,5} devices". They are needed to amend the QOM and bus hierarchies of user created pnv-

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Stefan Hajnoczi
On Fri, Aug 5, 2022, 05:59 Paolo Bonzini wrote: > On 8/3/22 18:28, Stefan Hajnoczi wrote: > > diff --git a/hw/scsi/virtio-scsi-dataplane.c > b/hw/scsi/virtio-scsi-dataplane.c > > index 8bb6e6acfc..a575c3f0cd 100644 > > --- a/hw/scsi/virtio-scsi-dataplane.c > > +++ b/hw/scsi/virtio-scsi-dataplane.

Re: [PATCH for-7.2 06/10] ppc/pnv: enable user created pnv-phb for powernv8

2022-08-05 Thread Frederic Barrat
diff --git a/hw/pci-host/pnv_phb.c b/hw/pci-host/pnv_phb.c index 077f391d59..953c384bf6 100644 --- a/hw/pci-host/pnv_phb.c +++ b/hw/pci-host/pnv_phb.c @@ -17,6 +17,7 @@ #include "hw/ppc/pnv.h" #include "hw/qdev-properties.h" #include "qom/object.h" +#include "sysemu/sysemu.h" /*

Re: [PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 11:28, Ilya Leoshkevich wrote: > On Fri, 2022-08-05 at 09:50 +0100, Peter Maydell wrote: > > Which guests do you observe this on ? I think we should indeed > > fix this in the translators. More specifically, I think we should > > get this correct already on Arm, and I would e

[PATCH 2/2] char: open unidirectional in/out pipes with one-way mode

2022-08-05 Thread marcandre . lureau
From: Marc-André Lureau This is how those paths are meant to be used. Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index f9897a3786..3759558d81 100644 --- a/chardev/cha

[PATCH 1/2] char: open pipe in write-only mode

2022-08-05 Thread marcandre . lureau
From: Marc-André Lureau When not using the "path.in", "path.out", open "path" in read-only mode, as eating our own output is usually not what we want. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=2106975 Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 6 -- qemu-opt

Re: [PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > iostatus is the only field (together with .job) that needs > protection using the job mutex. > > It is set in the main loop (GLOBAL_STATE functions) but read > in I/O code (block_job_error_action). > > In order to protect it, ch

Re: [PATCH RFC 7/7] vl: Allow ThreadContext objects to be created before the sandbox option

2022-08-05 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > Currently, there is no way to configure a CPU affinity inside QEMU when > the sandbox option disables it for QEMU as a whole, for example, via: > -sandbox enable=on,resourcecontrol=deny > > While ThreadContext objects can be created on the QEMU comm

Re: [PATCH for-7.2 v2 09/20] hw/ppc: set machine->fdt in pnv_reset()

2022-08-05 Thread Frederic Barrat
On 05/08/2022 11:39, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 6 +- 1 file changed, 5 insertions(+),

Re: [PATCH RFC 0/7] hostmem: NUMA-aware memory preallocation using ThreadContext

2022-08-05 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > This is a follow-up on "util: NUMA aware memory preallocation" [1] by > Michal. > > Setting the CPU affinity of threads from inside QEMU usually isn't > easily possible, because we don't want QEMU -- once started and running > guest code -- to be able t

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Ard Biesheuvel
On Fri, 5 Aug 2022 at 10:10, Paolo Bonzini wrote: > > On 8/5/22 01:04, Jason A. Donenfeld wrote: > > +/* Nothing else uses this part of the hardware mapped region */ > > +setup_data_base = 0xf - 0x1000; > > Isn't this where the BIOS lives? I don't think this works. > > Does it work to

Re: [PATCH RFC 3/7] util: Introduce ThreadContext user-creatable object

2022-08-05 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > Setting the CPU affinity of QEMU threads is a bit problematic, because > QEMU doesn't always have permissions to set the CPU affinity itself, > for example, with seccomp after initialized by QEMU: > -sandbox enable=on,resourcecontrol=deny > > While

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Christian Schoenebeck
On Donnerstag, 4. August 2022 09:25:17 CEST Nikita Ivanov wrote: > From 0ceb04ada1ed5a863914f4449469d7572d3443ed Mon Sep 17 00:00:00 2001 > From: Nikita Ivanov > Date: Wed, 3 Aug 2022 12:54:00 +0300 > Subject: [PATCH] error handling: Use TFR() macro where applicable > > There is a defined TFR() m

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 3:11 PM Christian Schoenebeck wrote: > > On Donnerstag, 4. August 2022 09:25:17 CEST Nikita Ivanov wrote: > > From 0ceb04ada1ed5a863914f4449469d7572d3443ed Mon Sep 17 00:00:00 2001 > > From: Nikita Ivanov > > Date: Wed, 3 Aug 2022 12:54:00 +0300 > > Subject: [PATCH] err

Re: [PATCH for-7.2 00/10] enable pnv-phb user created devices

2022-08-05 Thread Frederic Barrat
Hi Daniel, Other than my comment on patch 6 regarding the qom parenting of the root port, that series looks pretty good to me! Fred On 03/08/2022 15:44, Daniel Henrique Barboza wrote: Hi, This is a rebase on top of ppc-7.2 of the previous patches sent here: https://lists.gnu.org/archiv

Re: [PATCH v2 14/15] mtest2make.py: teach suite name that are just "PROJECT"

2022-08-05 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 2:39 PM Paolo Bonzini wrote: > On 7/12/22 11:35, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > A subproject test may be simply in the "PROJECT" suite (such as > > "qemu-common" with the following patches) > > > > Signed-off-by: Marc-André Lurea

Re: [PATCH v6 2/2] target/s390x: support SHA-512 extensions

2022-08-05 Thread David Hildenbrand
On 03.08.22 19:15, Jason A. Donenfeld wrote: > In order to fully support MSA_EXT_5, we have to also support the SHA-512 > special instructions. So implement those. > > The implementation began as something TweetNacl-like, and then was > adjusted to be useful here. It's not very beautiful, but it i

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 12:27, Marc-André Lureau wrote: > On Fri, Aug 5, 2022 at 3:11 PM Christian Schoenebeck > wrote: > > I was thinking the same as Marc-André before: > > > > commit 1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6 > > Author: Marc-André Lureau > > Date: Wed Mar 23 19:57:27 2022 +0400

Re: [PATCH for-7.1 v2 0/5] Fix gdb bugs and update gdb-xml

2022-08-05 Thread Alex Bennée
Song Gao writes: > Hi,All > > This series fiex LoongArch GDB get the wrong pc, because the xml missing > the register orig_a0, and update loongarch gdb-xml to match GDB[1] > > [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch > > Please review! For the whole series:

[PATCH 1/1] tests/qtest: add scenario for -readconfig handling

2022-08-05 Thread Daniel P . Berrangé
This test of -readconfig validates the last three regressions we have fixed with -readconfig: * Interpretation of memory size units as MiB not bytes * Allow use of [spice] * Allow use of [object] Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 1 + tests/qtest/readcon

Re: [PATCH for-7.1] vl: fix [memory] section with -readconfig

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 12:06:35PM +0200, Paolo Bonzini wrote: > The -M memory.* options do not have magic applied to them than the -m > option, namely no "M" (for mebibytes) is tacked at the end of a > suffixless value for "-M memory.size". > > This magic is performed by parse_memory_options, and

[PATCH 0/1] tests/qtest: add testing coverage of -readconfig

2022-08-05 Thread Daniel P . Berrangé
I reviewing Paolo's latest fix for -readconfig I noticed that we have absolutely zero coverage of -readconfig under tests/, which makes it way too easy for regressions to slip in. This following patch doesn't do much, but it tests the last three regressions we've had and gives a starting point for

Re: [PATCH for-7.2 v2 09/20] hw/ppc: set machine->fdt in pnv_reset()

2022-08-05 Thread Daniel Henrique Barboza
On 8/5/22 08:03, Frederic Barrat wrote: On 05/08/2022 11:39, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza ---   hw/ppc/pnv.c | 6

  1   2   3   >