Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-28 Thread Alistair Francis
On Mon, Jun 13, 2022 at 10:10 PM Jason A. Donenfeld wrote: > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This is confirmed to successfully initialize the > RNG on Linux 5.19-rc2.

[PATCH v2 05/13] hw/i2c: add asynchronous send

2022-06-28 Thread Peter Delevoryas
From: Klaus Jensen Add an asynchronous version of i2c_send() that requires the slave to explicitly acknowledge on the bus with i2c_ack(). The current master must use the new i2c_start_send_async() to indicate that it wants to do an asynchronous transfer. This allows the i2c core to check if the

[PATCH v2 00/13] hw/i2c/aspeed: Add new-registers DMA slave mode RX support

2022-06-28 Thread Peter Delevoryas
Hey Cedric, I've gone over the patch series and reordered it a little better. Changes since v1: - Replaced printf's with qemu_log_mask or trace events. - Added more detailed commit messages to several commits. - Removed one unnecessary patch through reordering intel-me before oby35-cl. -

[PATCH v2 08/13] hw/i2c/pmbus: Reset out buf after switching pages

2022-06-28 Thread Peter Delevoryas
When a pmbus device switches pages, it should clears its output buffer so that the next transaction doesn't emit data from the previous page. Fixes: 3746d5c15e70570b ("hw/i2c: add support for PMBus”) Signed-off-by: Peter Delevoryas --- hw/i2c/pmbus_device.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH 2/2] hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it

2022-06-28 Thread Laurent Vivier
Le 26/06/2022 à 11:46, Bernhard Beschow a écrit : xen_piix_pci_write_config_client() is implemented in the xen sub tree and uses PIIX constants internally, thus creating a direct dependency on PIIX. Now that xen_set_pci_link_route() is stubbable, the logic of xen_piix_pci_write_config_client()

Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid

2022-06-28 Thread Rahul Pathak
Hi Alistair My fix patch needs to be dropped since Anup took care of this issue in his yesterdays series update in this patch - [PATCH v8 4/4] target/riscv: Force disable extensions if priv spec version does not match Thanks Rahul On Wed, Jun 29, 2022 at 7:32 AM Alistair Francis wrote: > > On

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

2022-06-28 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

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

2022-06-28 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

Re: [RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-28 Thread Sam Li
Damien Le Moal 于2022年6月29日周三 10:32写道: > > On 6/29/22 10:50, Sam Li wrote: > >>> +rep_size = sizeof(struct blk_zone_report) + nrz * sizeof(struct > >>> blk_zone); > >>> +g_autofree struct blk_zone_report *rep = g_new(struct > >>> blk_zone_report, nrz); > >> > >>

Re: [RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-28 Thread Damien Le Moal
On 6/29/22 10:50, Sam Li wrote: >>> +rep_size = sizeof(struct blk_zone_report) + nrz * sizeof(struct >>> blk_zone); >>> +g_autofree struct blk_zone_report *rep = g_new(struct >>> blk_zone_report, nrz); >> >> g_new() looks incorrect. There should be 1 struct

[PATCH v2 10/13] hw/misc/aspeed: Add PECI controller

2022-06-28 Thread Peter Delevoryas
This introduces a really basic PECI controller that responses to commands by always setting the response code to success and then raising an interrupt to indicate the command is done. This helps avoid getting hit with constant errors if the driver continuously attempts to send a command and keeps

[PATCH v2 11/13] hw/misc/aspeed: Add fby35-sb-cpld

2022-06-28 Thread Peter Delevoryas
fby35 machines have 1 BMC on a baseboard and 2-4 server boards with BIC's. There are also CPLD's on each of the boards, one type of CPLD on the baseboard and another type on each of the server boards. This commit adds an implementation of some of the logic performed by the server board CPLD, which

[PATCH v2] target/ppc: Return default CPU for max CPU

2022-06-28 Thread Murilo Opsfelder Araujo
All ppc CPUs represent hardware that exists in the real world, i.e.: we do not have a "max" CPU with all possible emulated features enabled. Return the default CPU type for the machine because that has greater chance of being useful as the "max" CPU. Resolves:

Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid

2022-06-28 Thread Alistair Francis
On Tue, Jun 28, 2022 at 3:03 AM Rahul Pathak wrote: > > mhartid csr is not available in user-mode code path and > user-mode build fails because of its reference in > riscv_cpu_realize function > > Commit causing the issue is currently in Alistair's > riscv-to-apply.next branch and need to be

Re: [PATCH] aspeed/smc: Fix potential overflow

2022-06-28 Thread Joel Stanley
On Tue, 28 Jun 2022 at 16:55, Cédric Le Goater wrote: > > Coverity warns that "ssi_transfer(s->spi, 0U) << 8 * i" might overflow > because the expression is evaluated using 32-bit arithmetic and then > used in a context expecting a uint64_t. Would it make sense to also place a limit on "size"?

Re: [PATCH v8 2/4] target/riscv: Set minumum priv spec version for mcountinhibit

2022-06-28 Thread Alistair Francis
On Tue, Jun 28, 2022 at 8:23 PM Anup Patel wrote: > > The minimum priv spec versino for mcountinhibit to v1.11 so that it > is not available for v1.10 (or lower). > > Fixes: eab4776b2bad ("target/riscv: Add support for hpmcounters/hpmevents") > Signed-off-by: Anup Patel Reviewed-by: Alistair

[PATCH v2 07/13] hw/i2c/aspeed: Add new-registers DMA slave mode RX support

2022-06-28 Thread Peter Delevoryas
This commit adds support for DMA RX in slave mode while using the new register set in the AST2600 and AST1030. This patch also pretty much assumes packet mode is enabled, I'm not sure if this will work in DMA step mode. This is particularly useful for testing IPMB exchanges between Zephyr and

Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid

2022-06-28 Thread Bin Meng
Hi Rahul, On Wed, Jun 29, 2022 at 10:07 AM Rahul Pathak wrote: > > Hi Alistair > > My fix patch needs to be dropped since Anup took care of this issue > in his yesterdays series update in this patch - > [PATCH v8 4/4] target/riscv: Force disable extensions if priv spec > version does not match

[PATCH v2 13/13] hw/arm/aspeed: Add oby35-cl machine

2022-06-28 Thread Peter Delevoryas
The fby35 machine includes 4 server boards, each of which has a "bridge interconnect" (BIC). This chip abstracts the pinout for the server board into a single endpoint that the baseboard management controller (BMC) can talk to using IPMB. The codename for this board is oby35-cl, which means

Re: [PATCH 0/2] Decouple Xen-HVM from PIIX

2022-06-28 Thread B
Am 26. Juni 2022 09:46:54 UTC schrieb Bernhard Beschow : >hw/i386/xen/xen-hvm.c contains logic which is PIIX-specific. This makes >xen-hvm.c depend on PIIX which can be avoided if PIIX logic was isolated in >PIIX itself. > > > >Bernhard Beschow (2): > > hw/i386/xen/xen-hvm: Allow for

Re: Slowness with multi-thread TCG?

2022-06-28 Thread Alex Bennée
Frederic Barrat writes: > On 28/06/2022 17:12, Alex Bennée wrote: >> Frederic Barrat writes: >> >>> On 28/06/2022 13:25, Matheus K. Ferst wrote: On 27/06/2022 15:25, Frederic Barrat wrote: > [ Resending as it was meant for the qemu-ppc list ] > > Hello, > > I've been

Re: [PATCH 1/2] hw/i386/xen/xen-hvm: Allow for stubbing xen_set_pci_link_route()

2022-06-28 Thread Laurent Vivier
Le 26/06/2022 à 11:46, Bernhard Beschow a écrit : The only user of xen_set_pci_link_route() is xen_piix_pci_write_config_client() which implements PIIX-specific logic in the xen namespace. This makes xen-hvm depend on PIIX which could be avoided if xen_piix_pci_write_config_client() was

[PATCH v2 01/13] hw/i2c/aspeed: Fix R_I2CD_FUN_CTRL reference

2022-06-28 Thread Peter Delevoryas
Very minor, doesn't effect functionality, but this is supposed to be R_I2CC_FUN_CTRL (new-mode, not old-mode). Fixes: ba2cccd64e9 ("aspeed: i2c: Add new mode support") Signed-off-by: Peter Delevoryas --- hw/i2c/aspeed_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 12/13] hw/misc/aspeed: Add intel-me

2022-06-28 Thread Peter Delevoryas
The Intel Management Engine is an IPMI endpoint that responds to various IPMI commands. In this commit, I've added some very basic functionality that will respond back with a respond code of zero (success), while also setting an appropriate response NetFN (request NetFN + 1), a matching command ID

Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid

2022-06-28 Thread Anup Patel
On Wed, Jun 29, 2022 at 9:27 AM Bin Meng wrote: > > Hi Rahul, > > On Wed, Jun 29, 2022 at 10:07 AM Rahul Pathak > wrote: > > > > Hi Alistair > > > > My fix patch needs to be dropped since Anup took care of this issue > > in his yesterdays series update in this patch - > > [PATCH v8 4/4]

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-06-28 Thread Laurent Vivier
Le 06/05/2022 à 18:31, Tong Zhang a écrit : assert(dbs->acb) is meant to check the return value of io_func per documented in commit 6bee44ea34 ("dma: the passed io_func does not return NULL"). However, there is a chance that after calling aio_context_release(dbs->ctx); the dma_blk_cb function is

Re: [PATCH v5 2/2] target/xtensa: Use semihosting/syscalls.h

2022-06-28 Thread Richard Henderson
On 6/28/22 19:08, Max Filippov wrote: On Tue, Jun 28, 2022 at 4:43 AM Richard Henderson wrote: This separates guest file descriptors from host file descriptors, and utilizes shared infrastructure for integration with gdbstub. Remove the xtensa custom console handing and rely on the generic

Re: [RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-28 Thread Damien Le Moal
On 6/28/22 19:23, Sam Li wrote: > Damien Le Moal 于2022年6月28日周二 17:05写道: >> >> On 6/28/22 17:05, Sam Li wrote: >>> Stefan Hajnoczi 于2022年6月28日周二 14:52写道: On Mon, Jun 27, 2022 at 08:19:13AM +0800, Sam Li wrote: > diff --git a/block/block-backend.c b/block/block-backend.c > index

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

2022-06-28 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

[PATCH v2 09/13] hw/i2c/pmbus: Add read-only IC_DEVICE_ID support

2022-06-28 Thread Peter Delevoryas
Signed-off-by: Peter Delevoryas --- hw/i2c/pmbus_device.c| 5 + hw/sensor/isl_pmbus_vr.c | 31 +++ include/hw/i2c/pmbus_device.h| 1 + include/hw/sensor/isl_pmbus_vr.h | 1 + 4 files changed, 38 insertions(+) diff --git

[PATCH v2 04/13] hw/i2c: support multiple masters

2022-06-28 Thread Peter Delevoryas
From: Klaus Jensen Allow slaves to master the bus by registering a bottom halve. If the bus is busy, the bottom half is queued up. When a slave has succesfully mastered the bus, the bottom half is scheduled. Signed-off-by: Klaus Jensen [ clg : - fixed typos in commit log ] Message-Id:

Re: [PATCH] target/ppc: Add error reporting when opening file fails

2022-06-28 Thread Markus Armbruster
jianchunfu writes: > Add error reporting before return when opening file fails. > > Signed-off-by: jianchunfu > --- > target/ppc/kvm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c > index dc93b99189..ef9a871411 100644 > --- a/target/ppc/kvm.c >

Re: [RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-28 Thread Sam Li
Damien Le Moal 于2022年6月29日周三 09:43写道: > > On 6/28/22 19:23, Sam Li wrote: > > Damien Le Moal 于2022年6月28日周二 17:05写道: > >> > >> On 6/28/22 17:05, Sam Li wrote: > >>> Stefan Hajnoczi 于2022年6月28日周二 14:52写道: > > On Mon, Jun 27, 2022 at 08:19:13AM +0800, Sam Li wrote: > > diff --git

[PATCH] target/ppc: Add error reporting when opening file fails

2022-06-28 Thread jianchunfu
Add error reporting before return when opening file fails. Signed-off-by: jianchunfu --- target/ppc/kvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index dc93b99189..ef9a871411 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -1798,6

[PULL 30/60] semihosting: Split out semihost_sys_write

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_WRITE to a reusable function. This handles all GuestFD. This removes the last use of common_semi_syscall_len. Note that gdb_do_syscall %x reads target_ulong, not int. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson ---

Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests

2022-06-28 Thread Ani Sinha
On Tue, Jun 28, 2022 at 3:56 AM Michael S. Tsirkin wrote: > > On Mon, Jun 27, 2022 at 12:58:55PM +0530, Ani Sinha wrote: > > The README file is added describing the directory structure and the purpose > > of every file it contains. It also describes how to add new tests, make > > changes > > to

[PULL 17/60] include/exec: Move gdb_stat and gdb_timeval to gdbstub.h

2022-06-28 Thread Richard Henderson
We have two copies of these structures, and require them in semihosting/ going forward. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/gdbstub.h| 25 + target/m68k/m68k-semi.c | 32

[PULL 28/60] semihosting: Split out semihost_sys_close

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_CLOSE to a reusable function. This handles all GuestFD. Note that gdb_do_syscall %x reads target_ulong, not int. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 3 +++ semihosting/arm-compat-semi.c

[PULL 31/60] semihosting: Bound length for semihost_sys_{read,write}

2022-06-28 Thread Richard Henderson
Fixes a minor bug in which a 64-bit guest on a 32-bit host could truncate the length. This would only ever cause a problem if there were no bits set in the low 32, so that it truncates to 0. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- semihosting/syscalls.c | 16

[PULL 03/12] vhost: add method vhost_set_vring_err

2022-06-28 Thread Michael S. Tsirkin
From: Konstantin Khlebnikov Kernel and user vhost may report virtqueue errors via eventfd. This is only reliable way to get notification about protocol error. Signed-off-by: Konstantin Khlebnikov Message-Id: <20220623161325.18813-2-vsement...@yandex-team.ru> Reviewed-by: Michael S. Tsirkin

[PULL 51/60] semihosting: Use console_out_gf for SYS_WRITE0

2022-06-28 Thread Richard Henderson
Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index d61b773f98..1a1e2a6960 100644 ---

[PULL 35/60] semihosting: Split out semihost_sys_remove

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_REMOVE to a reusable function. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 3 +++ semihosting/arm-compat-semi.c | 13 +-- semihosting/syscalls.c | 40

[PULL 07/60] semihosting: Simplify softmmu_lock_user_string

2022-06-28 Thread Richard Henderson
We are not currently bounding the search to the 1024 bytes that we allocated, possibly overrunning the buffer. Use softmmu_strlen_user to find the length and allocate the correct size from the beginning. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[PULL 46/60] semihosting: Add GuestFDConsole

2022-06-28 Thread Richard Henderson
Add a GuestFDType for connecting to the semihosting console. Hook up to read, write, isatty, and fstat syscalls. Note that the arm-specific syscall flen cannot be applied to the console, because the console is not a descriptor exposed to the guest. Reviewed-by: Luc Michel Reviewed-by: Alex

[PULL 57/60] target/mips: Add UHI errno values

2022-06-28 Thread Richard Henderson
>From the Unified Hosting Interface, MD01069 Reference Manual, version 1.1.6, 06 July 2015. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 40 ++ 1 file changed, 40 insertions(+) diff --git

[PULL 60/60] target/nios2: Move nios2-semi.c to nios2_softmmu_ss

2022-06-28 Thread Richard Henderson
Semihosting is not enabled for nios2-linux-user. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/nios2/nios2-semi.c | 5 - target/nios2/meson.build | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git

[PULL 11/60] semihosting: Clean up common_semi_flen_cb

2022-06-28 Thread Richard Henderson
Do not read from the gdb struct stat buffer if the callback is reporting an error. Use common_semi_cb to finish returning results. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 20 +++- 1 file changed, 11 insertions(+), 9

[PULL 15/60] semihosting: Remove GDB_O_BINARY

2022-06-28 Thread Richard Henderson
The value is zero, and gdb always opens files in binary mode. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/semihosting/arm-compat-semi.c

[PULL 22/60] semihosting: Split common_semi_flen_buf per target

2022-06-28 Thread Richard Henderson
We already have some larger ifdef blocks for ARM and RISCV; split out common_semi_stack_bottom per target. Reviewed-by: Peter Maydell Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 44 +-- 1 file changed, 21

Re: [PATCH v2 4/4] hw/nvme: add new never_ready parameter to test the DNR bit

2022-06-28 Thread Klaus Jensen
On Jun 27 13:47, Niklas Cassel wrote: > Since we verify that "ready_delay" parameter has to be smaller than CRWMT, > we know that the namespace will always become ready. > Therefore the "Namespace Not Ready" status code will never have the DNR > bit set. > > Add a new parameter "never_ready" that

[PULL 25/60] semihosting: Use env more often in do_common_semihosting

2022-06-28 Thread Richard Henderson
We've already loaded cs->env_ptr into a local variable; use it. Since env is unconditionally used, we don't need a dummy use. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 09/14] pmbus: Reset out buf after switching pages

2022-06-28 Thread Cédric Le Goater
On 6/27/22 21:55, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas is that a bug ? --- hw/i2c/pmbus_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 62885fa6a1..efddc36fd9 100644 --- a/hw/i2c/pmbus_device.c +++

Re: [PATCH 14/14] aspeed: Add I2C new register DMA slave mode support

2022-06-28 Thread Cédric Le Goater
On 6/28/22 00:27, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Some Intro would be welcome. Please move the patch after Klaus patches. Thanks, C. --- hw/i2c/aspeed_i2c.c | 133 include/hw/i2c/aspeed_i2c.h | 3 + 2 files

[PULL 33/60] semihosting: Split out semihost_sys_isatty

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_ISTTY to a reusable function. This handles all GuestFD. Add a common_semi_istty_cb helper to translate the Posix error return, 0+ENOTTY, to the Arm semihosting not-a-file success result. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson

Re: [PATCH 12/14] hw/misc: Add intel-me

2022-06-28 Thread Peter Delevoryas
> On Jun 27, 2022, at 11:58 PM, Cédric Le Goater wrote: > > On 6/28/22 00:27, Peter Delevoryas wrote: >> Signed-off-by: Peter Delevoryas > > Intro ? Yep, will do > > I would rather have 2 patches, one for the slave model and one adding > a device to the machine. Got it, I’ll split it. >

Re: [RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-28 Thread Sam Li
Stefan Hajnoczi 于2022年6月28日周二 14:52写道: > > On Mon, Jun 27, 2022 at 08:19:13AM +0800, Sam Li wrote: > > diff --git a/block/block-backend.c b/block/block-backend.c > > index e0e1aff4b1..786f964d02 100644 > > --- a/block/block-backend.c > > +++ b/block/block-backend.c > > @@ -1810,6 +1810,62 @@ int

[PULL 50/60] semihosting: Remove qemu_semihosting_console_outc

2022-06-28 Thread Richard Henderson
This function has been replaced by *_write. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/console.h | 13 - linux-user/semihost.c | 16 semihosting/console.c | 18 -- 3 files changed, 47

[PULL 55/60] target/m68k: Make semihosting system only

2022-06-28 Thread Richard Henderson
While we had a call to do_m68k_semihosting in linux-user, it wasn't actually reachable. We don't include DISAS_INSN(halt) as an instruction unless system mode. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/m68k/cpu_loop.c | 5 - target/m68k/m68k-semi.c|

Re: [PULL 22/33] migration: remove the QEMUFileOps 'get_buffer' callback

2022-06-28 Thread Daniel P . Berrangé
On Mon, Jun 27, 2022 at 04:32:00PM -0400, Peter Xu wrote: > On Mon, Jun 27, 2022 at 04:03:09PM +0100, Daniel P. Berrangé wrote: > > On Wed, Jun 22, 2022 at 03:34:52PM -0400, Peter Xu wrote: > > > On Wed, Jun 22, 2022 at 07:39:06PM +0100, Dr. David Alan Gilbert (git) > > > wrote: > > > > diff

Re: [PATCH v4 6/7] block/copy-before-write: implement cbw-timeout option

2022-06-28 Thread Vladimir Sementsov-Ogievskiy
While debugging my "[PULL 00/10] Block jobs & NBD patches", I found that we have bdrv_dec_in_flight() and bdrv_inc_in_flight(). So, this should be fixed: On 4/7/22 16:27, Vladimir Sementsov-Ogievskiy wrote: In some scenarios, when copy-before-write operations lasts too long time, it's better

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-06-28 Thread Ani Sinha
On Tue, Jun 28, 2022 at 12:55 PM Thomas Huth wrote: > > On 28/06/2022 09.10, Michael S. Tsirkin wrote: > > On Tue, Jun 28, 2022 at 09:03:33AM +0200, Thomas Huth wrote: > No problem with that. So that's venv. But do we need pip and pulling > packages from the net during testing?

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-06-28 Thread Thomas Huth
On 28/06/2022 09.49, Ani Sinha wrote: On Tue, Jun 28, 2022 at 12:55 PM Thomas Huth wrote: On 28/06/2022 09.10, Michael S. Tsirkin wrote: On Tue, Jun 28, 2022 at 09:03:33AM +0200, Thomas Huth wrote: No problem with that. So that's venv. But do we need pip and pulling packages from the net

Re: [PATCH 0/9] Preliminary patches for subproject split

2022-06-28 Thread Marc-André Lureau
Hi Markus On Thu, Jun 16, 2022 at 4:48 PM wrote: > From: Marc-André Lureau > > Hi, > > Here is another subset of the large "subproject(qga)"" series I intend to > send > soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga). > > Thanks > > Marc-André Lureau (9): > monitor: make

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-06-28 Thread Daniel P . Berrangé
On Tue, Jun 28, 2022 at 01:21:35PM +0530, Ani Sinha wrote: > On Tue, Jun 28, 2022 at 1:19 PM Daniel P. Berrangé > wrote: > > > > On Tue, Jun 28, 2022 at 09:25:35AM +0200, Thomas Huth wrote: > > > On 28/06/2022 09.10, Michael S. Tsirkin wrote: > > > > On Tue, Jun 28, 2022 at 09:03:33AM +0200,

Re: [RFC v3 3/5] file-posix: introduce get_sysfs_long_val for zoned device information.

2022-06-28 Thread Stefan Hajnoczi
On Mon, Jun 27, 2022 at 08:19:15AM +0800, Sam Li wrote: > Use sysfs attribute files to get the zoned device information in case > that ioctl() commands of zone management interface won't work. It can > return long type of value like chunk_sectors, zoned_append_max_bytes, > max_open_zones,

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-06-28 Thread Thomas Huth
On 28/06/2022 10.23, Daniel P. Berrangé wrote: On Tue, Jun 28, 2022 at 01:21:35PM +0530, Ani Sinha wrote: On Tue, Jun 28, 2022 at 1:19 PM Daniel P. Berrangé wrote: On Tue, Jun 28, 2022 at 09:25:35AM +0200, Thomas Huth wrote: On 28/06/2022 09.10, Michael S. Tsirkin wrote: On Tue, Jun 28,

Re: [PATCH] util: Return void on iova_tree_remove

2022-06-28 Thread Laurent Vivier
Le 27/04/2022 à 17:49, Eugenio Pérez a écrit : It always returns IOVA_OK so nobody uses it. Acked-by: Jason Wang Reviewed-by: Peter Xu Signed-off-by: Eugenio Pérez --- include/qemu/iova-tree.h | 4 +--- util/iova-tree.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)

Re: [PATCH 12/14] hw/misc: Add intel-me

2022-06-28 Thread Cédric Le Goater
On 6/28/22 00:27, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Intro ? I would rather have 2 patches, one for the slave model and one adding a device to the machine. Please replace the printf with trace events. Thanks, C. --- hw/arm/aspeed.c | 1 +

Re: [PATCH 00/12] Introduce new acpi/smbios qtests using biosbits

2022-06-28 Thread Ani Sinha
On Tue, Jun 28, 2022 at 1:39 PM Daniel P. Berrangé wrote: > > On Mon, Jun 27, 2022 at 12:58:44PM +0530, Ani Sinha wrote: > > Biosbits is a software written by Josh Triplett that can be downloaded by > > visiting https://biosbits.org/. The github codebase can be found here: > >

[PATCH v4 45/45] linux-user/aarch64: Add SME related hwcap entries

2022-06-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/elfload.c | 20 1 file changed, 20 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 163fc8a1ee..a496c37855 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -605,6 +605,18 @@ enum {

[PULL 12/60] semihosting: Clean up common_semi_open_cb

2022-06-28 Thread Richard Henderson
Use common_semi_cb to return results instead of calling set_swi_errno and common_semi_set_ret directly. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PULL 13/60] semihosting: Return void from do_common_semihosting

2022-06-28 Thread Richard Henderson
Perform the cleanup in the FIXME comment in common_semi_gdb_syscall. Do not modify guest registers until the syscall is complete, which in the gdbstub case is asynchronous. In the synchronous non-gdbstub case, use common_semi_set_ret to set the result. Merge set_swi_errno into common_semi_cb.

[PULL 40/60] gdbstub: Adjust gdb_syscall_complete_cb declaration

2022-06-28 Thread Richard Henderson
Change 'ret' to uint64_t. This resolves a FIXME in the m68k and nios2 semihosting that we've lost data. Change 'err' to int. There is nothing target-specific about the width of the errno value. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/exec/gdbstub.h| 3

[PULL 34/60] semihosting: Split out semihost_sys_flen

2022-06-28 Thread Richard Henderson
The ARM-specific SYS_FLEN isn't really something that can be reused by other semihosting apis, but there are parts that can reused for the implementation of semihost_sys_fstat. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 4 ++

[PULL 53/60] semihosting: Create semihost_sys_poll_one

2022-06-28 Thread Richard Henderson
This will be used for implementing the xtensa select_one system call. Choose "poll" over "select" so that we can reuse Glib's g_poll constants and to avoid struct timeval. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/console.h | 16

Re: [PATCH v2 7/8] aspeed: Make aspeed_board_init_flashes public

2022-06-28 Thread Cédric Le Goater
On 6/24/22 02:37, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed.c | 25 - hw/arm/aspeed_soc.c | 26 ++ include/hw/arm/aspeed_soc.h | 2 ++ 3

[PULL 54/60] target/m68k: Eliminate m68k_semi_is_fseek

2022-06-28 Thread Richard Henderson
Reorg m68k_semi_return_* to gdb_syscall_complete_cb. Use the 32-bit version normally, and the 64-bit version for HOSTED_LSEEK. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/m68k-semi.c | 55 + 1 file changed, 23

Re: [PATCH v2 3/4] hw/nvme: add support for ratified TP4084

2022-06-28 Thread Klaus Jensen
On Jun 27 13:47, Niklas Cassel wrote: > TP4084 adds a new mode, CC.CRIME, that can be used to mark a namespace > as ready independently from the controller. > > When CC.CRIME is 0 (default), things behave as before, all namespaces > are ready when CSTS.RDY gets set to 1. > > When CC.CRIME is 1,

[PULL 16/60] include/exec: Move gdb open flags to gdbstub.h

2022-06-28 Thread Richard Henderson
There were 3 copies of these flags. Place them in the file with gdb_do_syscall, with which they belong. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/gdbstub.h| 9 + semihosting/arm-compat-semi.c | 7 ---

Re: [PATCH 07/14] aspeed: Add PECI controller

2022-06-28 Thread Cédric Le Goater
On 6/27/22 21:54, Peter Delevoryas wrote: Could we have some short intro ? :) Signed-off-by: Peter Delevoryas --- hw/arm/aspeed_ast10x0.c | 11 ++ hw/misc/aspeed_peci.c | 225 ++ hw/misc/meson.build | 3 +-

Re: [RFC PATCH] qemu-options: bring the kernel and image options together

2022-06-28 Thread Cédric Le Goater
On 6/23/22 12:21, Alex Bennée wrote: Cédric Le Goater writes: On 6/22/22 16:50, Alex Bennée wrote: How to control the booting of QEMU is often a source of confusion for users. Bring the options that control this together in the manual pages and add some verbiage to describe when each option

[PULL 26/60] semihosting: Move GET_ARG/SET_ARG earlier in the file

2022-06-28 Thread Richard Henderson
Moving this to be useful for another function besides do_common_semihosting. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff

Re: [PATCH 09/14] pmbus: Reset out buf after switching pages

2022-06-28 Thread Peter Delevoryas
> On Jun 27, 2022, at 11:51 PM, Cédric Le Goater wrote: > > On 6/27/22 21:55, Peter Delevoryas wrote: >> Signed-off-by: Peter Delevoryas > > is that a bug ? I believe so yes, although I don’t really have any experience with real pmbus devices. But, I would assume that when you’re switching

[PULL 43/60] semihosting: Expand qemu_semihosting_console_inc to read

2022-06-28 Thread Richard Henderson
Allow more than one character to be read at one time. Will be used by m68k and nios2 semihosting for stdio. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/console.h | 12 +++- linux-user/semihost.c | 10 ++ semihosting/arm-compat-semi.c

Re: [PATCH 09/12] acpi/tests/bits: add acpi and smbios python tests that uses biosbits

2022-06-28 Thread Thomas Huth
On 28/06/2022 09.26, Ani Sinha wrote: On Tue, Jun 28, 2022 at 12:50 PM Thomas Huth wrote: On 27/06/2022 09.28, Ani Sinha wrote: This change adds python based qtest framework that can be used to run qtests from within a virtual environment. A bash script creates the virtual environment and

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-06-28 Thread Daniel P . Berrangé
On Tue, Jun 28, 2022 at 09:25:35AM +0200, Thomas Huth wrote: > On 28/06/2022 09.10, Michael S. Tsirkin wrote: > > On Tue, Jun 28, 2022 at 09:03:33AM +0200, Thomas Huth wrote: > > > > > > > > > No problem with that. So that's venv. But do we need pip and > > > > > > > > > pulling > > > > > > > > >

[PULL 49/60] semihosting: Use console_out_gf for SYS_WRITEC

2022-06-28 Thread Richard Henderson
Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 9d4d6d2812..d61b773f98 100644 ---

Re: [PATCH v1 2/2] migration/multifd: Warn user when zerocopy not working

2022-06-28 Thread Daniel P . Berrangé
On Mon, Jun 27, 2022 at 10:09:09PM -0300, Leonardo Bras wrote: > Some errors, like the lack of Scatter-Gather support by the network > interface(NETIF_F_SG) may cause sendmsg(...,MSG_ZEROCOPY) to fail on using > zero-copy, which causes it to fall back to the default copying mechanism. How common

[PATCH qemu v3] ppc: Define SETFIELD for the ppc target

2022-06-28 Thread Alexey Kardashevskiy
It keeps repeating, move it to the header. This uses __builtin_ffsll() to allow using the macros in #define. This is not using the QEMU's FIELD macros as this would require changing all such macros found in skiboot (the PPC PowerNV firmware). Signed-off-by: Alexey Kardashevskiy --- Changes: v3:

Re: [RFC v3 1/5] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls.

2022-06-28 Thread Damien Le Moal
On 6/28/22 17:05, Sam Li wrote: > Stefan Hajnoczi 于2022年6月28日周二 14:52写道: >> >> On Mon, Jun 27, 2022 at 08:19:13AM +0800, Sam Li wrote: >>> diff --git a/block/block-backend.c b/block/block-backend.c >>> index e0e1aff4b1..786f964d02 100644 >>> --- a/block/block-backend.c >>> +++

Re: [PATCH 04/14] aspeed: i2c: Fix DMA len write-enable bit handling

2022-06-28 Thread Peter Delevoryas
> On Jun 28, 2022, at 12:01 AM, Cédric Le Goater wrote: > > On 6/27/22 21:54, Peter Delevoryas wrote: >> I noticed i2c rx transfers were getting shortened to "1" on Zephyr. It >> seems to be because the Zephyr i2c driver sets the RX DMA len with the >> RX field write-enable bit set (bit 31) to

[PULL 29/60] semihosting: Split out semihost_sys_read

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_READ to a reusable function. This handles all GuestFD. Isolate the curious ARM-specific return value processing to a new callback, common_semi_rw_cb. Note that gdb_do_syscall %x reads target_ulong, not int. Reviewed-by: Luc Michel Signed-off-by:

[PATCH v7 1/4] Revert "target/riscv: Add dummy mcountinhibit CSR for priv spec v1.11 or higher"

2022-06-28 Thread Anup Patel
This reverts commit 33cc1c0b69e457f5c526f64297353cba6f7bfdb4 because commit eab4776b2badd4088a4f807c9bb3dc453c53dc23 already implements proper mcountinhibit CSR emulation. Signed-off-by: Anup Patel --- target/riscv/cpu_bits.h | 3 --- target/riscv/csr.c | 2 -- 2 files changed, 5

[PULL 23/60] semihosting: Split out common_semi_has_synccache

2022-06-28 Thread Richard Henderson
We already have some larger ifdef blocks for ARM and RISCV; split out a boolean test for SYS_SYNCCACHE. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- semihosting/arm-compat-semi.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git

[PULL 24/60] semihosting: Split out common-semi-target.h

2022-06-28 Thread Richard Henderson
Move the ARM and RISCV specific helpers into their own header file. Reviewed-by: Alex Bennée Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- target/arm/common-semi-target.h | 62 target/riscv/common-semi-target.h | 50

[PULL 36/60] semihosting: Split out semihost_sys_rename

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_RENAME to a reusable function. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/syscalls.h | 4 +++ semihosting/arm-compat-semi.c | 21 + semihosting/syscalls.c | 57

[PULL 32/60] semihosting: Split out semihost_sys_lseek

2022-06-28 Thread Richard Henderson
Split out the non-ARM specific portions of SYS_SEEK to a reusable function. This handles all GuestFD. Isolate the curious ARM-specific return value processing to a new callback, common_semi_seek_cb. Expand the internal type of the offset to int64_t, and provide the whence argument, which will

[PULL 00/60] semihosting patch queue

2022-06-28 Thread Richard Henderson
/pull-semi-20220628 for you to fetch changes up to ca97e0ef99045ce650b842f3bc8c89d76daaafae: target/nios2: Move nios2-semi.c to nios2_softmmu_ss (2022-06-28 10:18:57 +0530) Semihosting syscall reorg: * Split out semihosting

[PULL 52/60] semihosting: Remove qemu_semihosting_console_outs

2022-06-28 Thread Richard Henderson
This function has been replaced by *_write. Reviewed-by: Luc Michel Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/semihosting/console.h | 13 -- linux-user/semihost.c | 17 semihosting/console.c | 49

[PULL 58/60] target/mips: Drop pread and pwrite syscalls from semihosting

2022-06-28 Thread Richard Henderson
We don't implement it with _WIN32 hosts, and the syscalls are missing from the gdb remote file i/o interface. Since we can't implement them universally, drop them. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/sysemu/mips-semi.c | 39

  1   2   3   4   >