Re: [PATCH v8 3/3] target/riscv: Add vstimecmp support

2022-08-09 Thread Atish Kumar Patra
On Tue, Aug 9, 2022 at 6:33 PM Weiwei Li wrote: > > 在 2022/8/10 上午3:34, Atish Kumar Patra 写道: > > > > > On Tue, Aug 9, 2022 at 12:01 AM Weiwei Li wrote: > >> >> 在 2022/8/9 上午1:20, Atish Kumar Patra 写道: >> >> >> >> On Sun, Aug 7, 2022 at 6:50 PM Weiwei Li wrote: >> >>> >>> 在 2022/8/4 上午9:42,

Re: [PATCH v8 11/12] vdpa: Add virtio-net mac address via CVQ at start

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 1:40 AM Eugenio Pérez wrote: > > This is needed so the destination vdpa device see the same state a the > guest set in the source. > > Signed-off-by: Eugenio Pérez > --- > v8: > * Delete unneeded copy from device's in buffer. > > v6: > * Map and unmap command buffers at

Re: [PATCH v8 07/12] vdpa: add net_vhost_vdpa_cvq_info NetClientInfo

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 1:39 AM Eugenio Pérez wrote: > > Next patches will add a new info callback to restore NIC status through > CVQ. Since only the CVQ vhost device is needed, create it with a new > NetClientInfo. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > v5: Create a

Re: [PATCH v8 10/12] vhost_net: add NetClientState->load() callback

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 1:40 AM Eugenio Pérez wrote: > > It allows per-net client operations right after device's successful > start. In particular, to load the device status. > > Vhost-vdpa net will use it to add the CVQ buffers to restore the device > status. > > Signed-off-by: Eugenio Pérez

Re: AST2600 support in QEMU

2022-08-09 Thread Joel Stanley
Hello Shivi, I've added others to cc who may have some input. On Tue, 9 Aug 2022 at 21:38, Shivi Fotedar wrote: > > Hello, we are looking for support for few features for AST2600 in QEMU, > specifically > > PCIe RC support so BMC can talk to downstream devices for management > functions. I

Re: [PATCH v8 3/3] target/riscv: Add vstimecmp support

2022-08-09 Thread Weiwei Li
在 2022/8/10 上午3:34, Atish Kumar Patra 写道: On Tue, Aug 9, 2022 at 12:01 AM Weiwei Li > wrote: 在 2022/8/9 上午1:20, Atish Kumar Patra 写道: On Sun, Aug 7, 2022 at 6:50 PM Weiwei Li mailto:liwei...@iscas.ac.cn>> wrote: 在 2022/8/4 上午9:42, Atish

Re: [PATCH v8 05/12] vhost_net: Add NetClientInfo prepare callback

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 1:39 AM Eugenio Pérez wrote: > > This is used by the backend to perform actions before the device is > started. > > In particular, vdpa net use it to map CVQ buffers to the device, so it > can send control commands using them. > > Signed-off-by: Eugenio Pérez > --- So

Re: AST2600 support in QEMU

2022-08-09 Thread Cédric Le Goater
Hello, On 8/10/22 04:37, Joel Stanley wrote: Hello Shivi, I've added others to cc who may have some input. On Tue, 9 Aug 2022 at 21:38, Shivi Fotedar wrote: Hello, we are looking for support for few features for AST2600 in QEMU, specifically PCIe RC support so BMC can talk to downstream

Re: [PATCH v8 08/12] vdpa: Move command buffers map to start of net device

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 1:39 AM Eugenio Pérez wrote: > > As this series will reuse them to restore the device state at the end of > a migration (or a device start), let's allocate only once at the device > start so we don't duplicate their map and unmap. > > Signed-off-by: Eugenio Pérez

Re: [PATCH v8 06/12] vhost_net: Add NetClientInfo stop callback

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 1:39 AM Eugenio Pérez wrote: > > Used by the backend to perform actions after the device is stopped. > > In particular, vdpa net use it to unmap CVQ buffers to the device, > cleaning the actions performend in prepare(). Should be "performed". Other than this, Acked-by:

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

2022-08-09 Thread Jason Wang
On Tue, Aug 9, 2022 at 11:05 AM 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

Re: [PATCH] tests/avocado: fix replay-linux test

2022-08-09 Thread Alex Bennée
Pavel Dovgalyuk writes: > Last line of the test is missing by accident. > This patch fixes the script. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/avocado/replay_linux.py |1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/avocado/replay_linux.py

[PATCH v4 2/2] Update test code of AVX512 support for xbzrle_encode

2022-08-09 Thread ling xu
Signed-off-by: ling xu Co-authored-by: Zhou Zhao Co-authored-by: Jun Jin --- tests/unit/test-xbzrle.c | 458 ++- 1 file changed, 457 insertions(+), 1 deletion(-) diff --git a/tests/unit/test-xbzrle.c b/tests/unit/test-xbzrle.c index ef951b6e54..2676123ce3

[PATCH V4] net/colo.c: Fix the pointer issue reported by Coverity.

2022-08-09 Thread Zhang Chen
When enabled 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

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

2022-08-09 Thread Zhang, Chen
Please review the V4 RESEND version. Thanks Chen > -Original Message- > From: Zhang, Chen > Sent: Tuesday, August 9, 2022 4:45 PM > To: Jason Wang ; Peter Maydell > ; Li Zhijian ; qemu-dev > > Cc: Zhang, Chen > Subject: [PATCH V4] net/colo.c: Fix the pointer issue reported by

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

2022-08-09 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 07:29:29PM +0200, Paolo Bonzini wrote: > On 8/5/22 13:08, Ard Biesheuvel wrote: > > > > > > Does it work to place setup_data at the end of the cmdline file instead > > > of having it at the end of the kernel file? This way the first item > > > will be at 0x2 +

Re: [PATCH v3 07/22] ppc/ppc405: QOM'ify CPU

2022-08-09 Thread Cédric Le Goater
On 8/8/22 19:25, BALATON Zoltan wrote: On Mon, 8 Aug 2022, Peter Maydell wrote: On Mon, 8 Aug 2022 at 18:05, BALATON Zoltan wrote: But the handler we register here just calls cpu_reset which seems to just call the reset method of the CPU object. If we have nothing else to do here do we need

[PULL] hw/net/rocker: Avoid undefined shifts with more than 31 ports

2022-08-09 Thread Jason Wang
From: Peter Maydell In rocker_port_phys_link_status() and rocker_port_phys_enable_read() we construct a 64-bit value with one bit per front-panel port. However we accidentally do the shift as 32-bit arithmetic, which means that if there are more than 31 front-panel ports this is undefined

Re: [PATCH] tests/qtest: misc tweaks to readconfig

2022-08-09 Thread Marc-André Lureau
On Tue, Aug 9, 2022 at 1:39 PM Daniel P. Berrangé wrote: > The property name parameter is ignored when visiting a top > level type, but the obvious typo should be fixed to avoid > confusion. A few indentation issues were tidied up. We > can break out of the loop when finding the RNG device. >

Re: [PATCH for-7.1] tests: acpi: silence applesmc warning about invalid key

2022-08-09 Thread Igor Mammedov
On Thu, 28 Jul 2022 09:37:13 -0400 Igor Mammedov wrote: > OSK value is irrelevant for ACPI test case. > Supply fake OSK explicitly to prevent QEMU complaining about > invalid key when it fallbacks to default_osk. > > Suggested-by: Daniel P. Berrangé > Signed-off-by: Igor Mammedov Michael,

[PULL 0/1] target-arm queue

2022-08-09 Thread Peter Maydell
/pmaydell/qemu-arm.git tags/pull-target-arm-20220809 for you to fetch changes up to c7f26ded6d5065e4116f630f6a490b55f6c5f58e: icount: Take iothread lock when running QEMU timers (2022-08-09 10:55:14 +0100) target-arm queue

[PULL 1/1] icount: Take iothread lock when running QEMU timers

2022-08-09 Thread Peter Maydell
The function icount_prepare_for_run() is called with the iothread unlocked, but it can call icount_notify_aio_contexts() which will run qemu timer handlers. Those are supposed to be run only with the iothread lock held, so take the lock while we do that. Since icount mode runs everything on a

Re: [PATCH v7 08/12] vdpa: Move command buffers map to start of net device

2022-08-09 Thread Jason Wang
On Tue, Aug 9, 2022 at 4:04 PM Eugenio Perez Martin wrote: > > On Tue, Aug 9, 2022 at 9:49 AM Jason Wang wrote: > > > > On Tue, Aug 9, 2022 at 3:34 PM Eugenio Perez Martin > > wrote: > > > > > > On Tue, Aug 9, 2022 at 9:04 AM Jason Wang wrote: > > > > > > > > On Fri, Aug 5, 2022 at 2:29 AM

[PULL] Net patches

2022-08-09 Thread Jason Wang
The following changes since commit ca5f3d4df1b47d7f66a109cdb504e83dfd7ec433: Merge tag 'pull-la-20220808' of https://gitlab.com/rth7680/qemu into staging (2022-08-08 19:51:12 -0700) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you

Re: how long do we need to retain gitlab CI job stdout logs?

2022-08-09 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Aug 08, 2022 at 08:42:28PM +0200, Thomas Huth wrote: >> On 08/08/2022 19.47, Peter Maydell wrote: >> > Hi; I just reduced QEMU's storage usage on gitlab by 130GB (no typo!) >> > using https://gitlab.com/eskultety/gitlab_cleaner, which Dan helpfully >> >

Re: [PATCH] linux-user: Don't assume 0 is not a valid host timer_t value

2022-08-09 Thread Peter Maydell
Laurent, ping ? thanks -- PMM On Mon, 1 Aug 2022 at 12:43, Peter Maydell wrote: > > On Mon, 25 Jul 2022 at 12:13, Daniel P. Berrangé wrote: > > > > On Mon, Jul 25, 2022 at 12:00:35PM +0100, Peter Maydell wrote: > > > For handling guest POSIX timers, we currently use an array > > >

Re: how long do we need to retain gitlab CI job stdout logs?

2022-08-09 Thread Daniel P . Berrangé
On Tue, Aug 09, 2022 at 11:44:52AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Mon, Aug 08, 2022 at 08:42:28PM +0200, Thomas Huth wrote: > >> On 08/08/2022 19.47, Peter Maydell wrote: > >> > Hi; I just reduced QEMU's storage usage on gitlab by 130GB (no typo!) > >> >

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

2022-08-09 Thread Joao Martins
On 7/21/22 13: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

[PATCH] linux-user: fix readlinkat handling with magic exe symlink

2022-08-09 Thread Jameson Nash
Exactly the same as f17f4989fa193fa8279474c5462289a3cfe69aea before was for readlink. I suppose this was simply missed at the time. Signed-off-by: Jameson Nash --- linux-user/syscall.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c

[PATCH V4 RESEND] net/colo.c: Fix the pointer issue reported by Coverity.

2022-08-09 Thread Zhang Chen
When enabled 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

[PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers

2022-08-09 Thread Lei Xiang
From: Lei Xiang proxy->vector_irqfd did not free when set guest notifier failed. Signed-off-by: Lei Xiang Tested-by: Zeng Chi Suggested-by: Xie Ming --- hw/virtio/virtio-pci.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[PATCH v4 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-09 Thread ling xu
This commit update code of avx512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. Compared with C version of xbzrle_encode_buffer function, avx512 version can achieve almost 60%-70% performance improvement on unit test provided by Qemu. In addition, we provide one

[PATCH v4 0/2] This patch updates AVX512 support for xbzrle

2022-08-09 Thread ling xu
This patch updates code of AVX512 support for xbzrle_encode_buffer fucntion to accelerate xbzrle encoding speed. The runtime check code is kept in meson.build and meson_options.txt without modifying. The updated AVX512 algorithm is provided in ram.c, xbzrle.c and xbzrle.h. The test code is

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

2022-08-09 Thread Jason Wang
On Tue, Aug 9, 2022 at 4:29 PM Zhang, Chen wrote: > > > > > -Original Message- > > From: Jason Wang > > Sent: Tuesday, August 9, 2022 4:12 PM > > To: Zhang, Chen > > Cc: Peter Maydell ; Li Zhijian > > ; qemu-dev > > Subject: Re: [PATCH V3] net/colo.c: Fix the pointer issue reported by

Re: how long do we need to retain gitlab CI job stdout logs?

2022-08-09 Thread Daniel P . Berrangé
On Mon, Aug 08, 2022 at 08:42:28PM +0200, Thomas Huth wrote: > On 08/08/2022 19.47, Peter Maydell wrote: > > Hi; I just reduced QEMU's storage usage on gitlab by 130GB (no typo!) > > using https://gitlab.com/eskultety/gitlab_cleaner, which Dan helpfully > > pointed me at. This script removes old

Re: [PATCH for-7.1] tests: acpi: silence applesmc warning about invalid key

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 01:40:24PM +0200, Igor Mammedov wrote: > On Thu, 28 Jul 2022 09:37:13 -0400 > Igor Mammedov wrote: > > > OSK value is irrelevant for ACPI test case. > > Supply fake OSK explicitly to prevent QEMU complaining about > > invalid key when it fallbacks to default_osk. > > > >

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

2022-08-09 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Tuesday, August 9, 2022 4:12 PM > To: Zhang, Chen > Cc: Peter Maydell ; Li Zhijian > ; qemu-dev > Subject: Re: [PATCH V3] net/colo.c: Fix the pointer issue reported by > Coverity. > > On Tue, Aug 9, 2022 at 11:05 AM Zhang Chen wrote:

Re: [PATCH] tests/avocado: fix replay-linux test

2022-08-09 Thread Alex Bennée
ignore that - I see Thomas has already merged it. On Tue, 9 Aug 2022 at 09:23, Alex Bennée wrote: > > Pavel Dovgalyuk writes: > > > Last line of the test is missing by accident. > > This patch fixes the script. > > > > Signed-off-by: Pavel Dovgalyuk > > --- > > tests/avocado/replay_linux.py

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

2022-08-09 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Tuesday, August 9, 2022 4:43 PM > To: Zhang, Chen > Cc: Peter Maydell ; Li Zhijian > ; qemu-dev > Subject: Re: [PATCH V3] net/colo.c: Fix the pointer issue reported by > Coverity. > > On Tue, Aug 9, 2022 at 4:29 PM Zhang, Chen wrote:

[PATCH] tests/qtest: misc tweaks to readconfig

2022-08-09 Thread Daniel P . Berrangé
The property name parameter is ignored when visiting a top level type, but the obvious typo should be fixed to avoid confusion. A few indentation issues were tidied up. We can break out of the loop when finding the RNG device. Finally, close the temp FD immediately when no longer needed.

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

2022-08-09 Thread Jason A. Donenfeld
Hey Paolo, On Fri, Aug 05, 2022 at 02:47:27PM +0200, Jason A. Donenfeld wrote: > Hi Paolo, > > On Fri, Aug 05, 2022 at 10:10:02AM +0200, Paolo Bonzini wrote: > > On 8/5/22 01:04, Jason A. Donenfeld wrote: > > > +/* Nothing else uses this part of the hardware mapped region */ > > > +

Re: [BUG] cxl can not create region

2022-08-09 Thread Bobo WL
Hi Jonathan Thanks for your reply! On Mon, Aug 8, 2022 at 8:37 PM Jonathan Cameron wrote: > > Probably not related to your problem, but there is a disconnect in QEMU / > kernel assumptionsaround the presence of an HDM decoder when a HB only > has a single root port. Spec allows it to be

Re: KVM call for 2022-08-09

2022-08-09 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please, send any topic that you are interested in covering. > > At the end of Monday I will send an email with the agenda or the > cancellation of the call, so hurry up. > > After discussions on the QEMU Summit, we are going to have always open a > KVM call where you

Re: [BUG] cxl can not create region

2022-08-09 Thread Bobo WL
Hi Dan, Thanks for your reply! On Mon, Aug 8, 2022 at 11:58 PM Dan Williams wrote: > > What is the output of: > > cxl list -MDTu -d decoder0.0 > > ...? It might be the case that mem1 cannot be mapped by decoder0.0, or > at least not in the specified order, or that validation check is

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

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 02:17:23PM +0200, Jason A. Donenfeld wrote: > Hey Paolo, > > On Fri, Aug 05, 2022 at 02:47:27PM +0200, Jason A. Donenfeld wrote: > > Hi Paolo, > > > > On Fri, Aug 05, 2022 at 10:10:02AM +0200, Paolo Bonzini wrote: > > > On 8/5/22 01:04, Jason A. Donenfeld wrote: > > > > +

[PATCH v7 1/2] target/s390x: support SHA-512 extensions

2022-08-09 Thread Jason A. Donenfeld
In order to fully support MSA_EXT_5, we have to 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 is quite short and compact, which is what we're going for.

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

2022-08-09 Thread Daniel P . Berrangé
On Tue, Aug 09, 2022 at 10:07:44AM -0400, Michael S. Tsirkin wrote: > On Tue, Aug 09, 2022 at 02:17:23PM +0200, Jason A. Donenfeld wrote: > > Hey Paolo, > > > > On Fri, Aug 05, 2022 at 02:47:27PM +0200, Jason A. Donenfeld wrote: > > > Hi Paolo, > > > > > > On Fri, Aug 05, 2022 at 10:10:02AM

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

2022-08-09 Thread Paolo Bonzini
On 8/9/22 11:17, Michael S. Tsirkin wrote: 1) if we believe "build setup_data in QEMU" is a feasible design that only needs more yak shaving, we can keep the code in, but disabled by default, and sort it out in 7.2. 2) if we go for an alternative design, it needs to be reverted. For example

Re: [PATCH 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-09 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 6:57 PM Bin Meng wrote: > From: Bin Meng > > The maximum number of wait objects for win32 should be > MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. > > Signed-off-by: Bin Meng > Nack, if wait_objects.num reaches MAXIMUM_WAIT_OBJECTS, then

[PATCH v7 2/2] target/s390x: support PRNO_TRNG instruction

2022-08-09 Thread Jason A. Donenfeld
In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19. Cc: Thomas Huth Cc: David Hildenbrand Cc: Christian

Re: [BUG] cxl can not create region

2022-08-09 Thread Dan Williams
Bobo WL wrote: > Hi Dan, > > Thanks for your reply! > > On Mon, Aug 8, 2022 at 11:58 PM Dan Williams wrote: > > > > What is the output of: > > > > cxl list -MDTu -d decoder0.0 > > > > ...? It might be the case that mem1 cannot be mapped by decoder0.0, or > > at least not in the specified

[PATCH v4 03/24] ppc/ppc405: Move devices under the ref405ep machine

2022-08-09 Thread Cédric Le Goater
Reviewed-by: Daniel Henrique Barboza Reviewed-by: BALATON Zoltan Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index

[PATCH v4 12/24] ppc/ppc405: QOM'ify GPIO

2022-08-09 Thread Cédric Le Goater
The GPIO controller is currently modeled as a simple SysBus device with a unique memory region. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h | 21 +++ hw/ppc/ppc405_uc.c | 51 +

[PATCH v4 11/24] ppc/ppc405: QOM'ify OCM

2022-08-09 Thread Cédric Le Goater
The OCM controller is currently modeled as a simple DCR device with a couple of memory regions. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 16 ++ hw/ppc/ppc405_uc.c | 73 +++--- 2 files changed,

[PATCH v4 19/24] ppc/ppc405: QOM'ify FPGA

2022-08-09 Thread Cédric Le Goater
Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 55 +- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 3677793adc75..4ff6715f3533

[PATCH v4 23/24] ppc/ppc405: QOM'ify SDRAM

2022-08-09 Thread Cédric Le Goater
This is an initial change of the SDRAM controller preserving the compatibility with the current modeling. Further cleanup will be possible after conversion of the ppc4xx_sdram_banks() and ppc4xx_sdram_init() routines of the sam460ex and bamboo machines. The size and base address of the RAM banks

Re: [PATCH 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-09 Thread Bin Meng
On Fri, Aug 5, 2022 at 11:09 PM Stefan Weil wrote: > > Am 05.08.22 um 16:56 schrieb Bin Meng: > > > From: Bin Meng > > > > WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS > > object handles. Correct the event array size in aio_poll() and > > add a assert() to ensure it does not

[PULL 0/2] Trivial branch for 7.1 patches

2022-08-09 Thread Laurent Vivier
-for-7.1-pull-request for you to fetch changes up to 9390da5ef29a5e0f98e5b482dceeeb287c452f17: xlnx_dp: drop unsupported AUXCommand in xlnx_dp_aux_set_command (2022-08-08 11:40:06 +0200) Pull request trivial branch 20220809

Re: [PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-09 Thread BALATON Zoltan
On Tue, 9 Aug 2022, Cédric Le Goater wrote: The Device Control Registers (DCR) of on-SoC devices are accessed by software through the use of the mtdcr and mfdcr instructions. These are converted in transactions on a side band bus, the DCR bus, which connects the on-SoC devices to the CPU.

Re: [PATCH v4 07/24] ppc/ppc405: QOM'ify CPU

2022-08-09 Thread BALATON Zoltan
Since maybe there will be another version, this patch is still misnamed, I think it's not QOMifying but embeds the cpu in the soc. Regards, BALATON Zoltan On Tue, 9 Aug 2022, Cédric Le Goater wrote: Drop the use of ppc4xx_init() and duplicate a bit of code related to clocks in the SoC

[PATCH v8 10/12] vhost_net: add NetClientState->load() callback

2022-08-09 Thread Eugenio Pérez
It allows per-net client operations right after device's successful start. In particular, to load the device status. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez --- v5: Rename start / load, naming it more specifically. ---

[PATCH v8 03/12] vhost: Delete useless read memory barrier

2022-08-09 Thread Eugenio Pérez
As discussed in previous series [1], this memory barrier is useless with the atomic read of used idx at vhost_svq_more_used. Deleting it. [1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02616.html Signed-off-by: Eugenio Pérez Acked-by: Jason Wang ---

[PATCH v8 02/12] vhost: use SVQ element ndescs instead of opaque data for desc validation

2022-08-09 Thread Eugenio Pérez
Since we're going to allow SVQ to add elements without the guest's knowledge and without its own VirtQueueElement, it's easier to check if an element is a valid head checking a different thing than the VirtQueueElement. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang ---

[PATCH v4 05/24] ppc/ppc405: Introduce a PPC405 SoC

2022-08-09 Thread Cédric Le Goater
It is an initial model to start QOMification of the PPC405 board. QOM'ified devices will be reintroduced one by one. Start with the memory regions, which name prefix is changed to "ppc405". Also, initialize only one RAM bank. The second bank is a dummy one (zero size) which is here to match the

[PATCH v4 01/24] ppc/ppc405: Remove taihu machine

2022-08-09 Thread Cédric Le Goater
It has been deprecated since 7.0. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- docs/about/deprecated.rst | 9 -- docs/about/removed-features.rst | 6 + docs/system/ppc/embedded.rst| 1 - hw/ppc/ppc405_boards.c | 232

[PATCH v4 20/24] ppc/ppc405: Use an embedded PPCUIC model in SoC state

2022-08-09 Thread Cédric Le Goater
Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 3 ++- hw/ppc/ppc405_uc.c | 26 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/ppc/ppc405.h b/hw/ppc/ppc405.h index 31c94e474209..8e67ad0b72c3 100644

[PATCH v4 16/24] ppc/ppc405: QOM'ify POB

2022-08-09 Thread Cédric Le Goater
POB is currently modeled as a simple DCR device. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 12 +++ hw/ppc/ppc405_uc.c | 51 ++ 2 files changed, 41 insertions(+), 22 deletions(-) diff --git

[PATCH v4 13/24] ppc/ppc405: QOM'ify DMA

2022-08-09 Thread Cédric Le Goater
The DMA controller is currently modeled as a DCR device with a couple of IRQs. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 19 ++ hw/ppc/ppc405_uc.c | 142 - 2 files changed, 82 insertions(+), 79

[PATCH v4 18/24] ppc/ppc405: QOM'ify MAL

2022-08-09 Thread Cédric Le Goater
The Memory Access Layer (MAL) controller is currently modeled as a DCR device with 4 IRQs. Also drop the ppc4xx_mal_init() helper and adapt the sam460ex machine. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h | 1 + include/hw/ppc/ppc4xx.h |

[PATCH v4 21/24] ppc/ppc405: Use an explicit I2C object

2022-08-09 Thread Cédric Le Goater
Having an explicit I2C model object will help if one day we want to add I2C devices on the bus from the machine init routine. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 2 ++ hw/ppc/ppc405_uc.c | 10 -- 2 files changed, 10

Re: [PATCH v4 04/24] ppc/ppc405: Move SRAM under the ref405ep machine

2022-08-09 Thread BALATON Zoltan
On Tue, 9 Aug 2022, Cédric Le Goater wrote: It doesn't belong to the generic machine nor the SoC. Fix a typo in the name while we are at it. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [PATCH v2 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-09 Thread Marc-André Lureau
On Tue, Aug 9, 2022 at 8:43 PM Bin Meng wrote: > From: Bin Meng > > WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS > object handles. Correct the event array size in aio_poll() and > add a assert() to ensure it does not cause out of bound access. > > Signed-off-by: Bin Meng >

Re: [PATCH v4 21/24] ppc/ppc405: Use an explicit I2C object

2022-08-09 Thread BALATON Zoltan
On Tue, 9 Aug 2022, Cédric Le Goater wrote: Having an explicit I2C model object will help if one day we want to add I2C devices on the bus from the machine init routine. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 2 ++ hw/ppc/ppc405_uc.c | 10

Re: [PATCH v4 23/24] ppc/ppc405: QOM'ify SDRAM

2022-08-09 Thread BALATON Zoltan
On Tue, 9 Aug 2022, Cédric Le Goater wrote: This is an initial change of the SDRAM controller preserving the compatibility with the current modeling. Further cleanup will be possible after conversion of the ppc4xx_sdram_banks() and ppc4xx_sdram_init() routines of the sam460ex and bamboo

[PATCH v4 00/24] ppc: QOM'ify 405 board

2022-08-09 Thread Cédric Le Goater
Hello, Here is large series QOM'ifying the PPC405 board. It introduces a new generic machine and SoC models, converts the current device models to QOM and populates the SoC. The process is quite mechanical without too much issues to handle. The noisy part is the initial patch introducing the SoC

[PATCH v4 07/24] ppc/ppc405: QOM'ify CPU

2022-08-09 Thread Cédric Le Goater
Drop the use of ppc4xx_init() and duplicate a bit of code related to clocks in the SoC realize routine. We will clean that up in the following patches. ppc_dcr_init() simply allocates default DCR handlers for the CPU. Maybe this could be done in model initializer of the CPU families needing it.

[PATCH v4 06/24] ppc/ppc405: Start QOMification of the SoC

2022-08-09 Thread Cédric Le Goater
This moves all the code previously done in the ppc405ep_init() routine under ppc405_soc_realize(). We can also adjust the number of banks now that we have control on ppc4xx_sdram_init(). Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 12 ++-- hw/ppc/ppc405_boards.c | 12 ++--

[PATCH v4 02/24] ppc/ppc405: Introduce a PPC405 generic machine

2022-08-09 Thread Cédric Le Goater
We will use this machine as a base to define the ref405ep and possibly the PPC405 hotfoot board as found in the Linux kernel. Reviewed-by: BALATON Zoltan Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 31 --- 1 file changed, 28 insertions(+), 3

[PATCH v4 08/24] ppc/ppc4xx: Introduce a DCR device model

2022-08-09 Thread Cédric Le Goater
The Device Control Registers (DCR) of on-SoC devices are accessed by software through the use of the mtdcr and mfdcr instructions. These are converted in transactions on a side band bus, the DCR bus, which connects the on-SoC devices to the CPU. Ideally, we should model these accesses with a DCR

[PATCH v4 15/24] ppc/ppc405: QOM'ify OPBA

2022-08-09 Thread Cédric Le Goater
The OPB arbitrer is currently modeled as a simple SysBus device with a unique memory region. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h | 12 hw/ppc/ppc405_uc.c | 48 +++--

[PATCH v4 10/24] ppc/ppc405: QOM'ify GPT

2022-08-09 Thread Cédric Le Goater
The GPT controller is currently modeled as a SysBus device with a unique memory region, a couple of IRQs and a timer. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h | 22 +++ hw/ppc/ppc405_uc.c | 91

[PATCH v4 22/24] ppc/ppc4xx: Fix sdram trace events

2022-08-09 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/ppc4xx_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index 8a8a87b03b28..c06c20b195cd 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/ppc/ppc4xx_devs.c @@ -143,7 +143,7 @@ static void

[PATCH v4 14/24] ppc/ppc405: QOM'ify EBC

2022-08-09 Thread Cédric Le Goater
EBC is currently modeled as a DCR device. Also drop the ppc405_ebc_init() helper and adapt the sam460ex machine. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 17 +- hw/ppc/ppc405_uc.c | 57

Re: [PATCH 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-09 Thread Bin Meng
On Tue, Aug 9, 2022 at 9:15 PM Marc-André Lureau wrote: > > Hi > > On Fri, Aug 5, 2022 at 6:57 PM Bin Meng wrote: >> >> From: Bin Meng >> >> The maximum number of wait objects for win32 should be >> MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. >> >> Signed-off-by: Bin Meng > > > Nack, >

Re: Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-08-09 Thread 樊金昊
The driver will create the cq with an allocated vector, but it's not activated until after the driver wires it up to a handler. I think that's what you're observing with the incomplete MSIx table entry on creation. Agreed. I digged through pci_request_irq()'s call chain and found

[PATCH v2 2/2] util/aio-win32: Correct the event array size in aio_poll()

2022-08-09 Thread Bin Meng
From: Bin Meng WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS object handles. Correct the event array size in aio_poll() and add a assert() to ensure it does not cause out of bound access. Signed-off-by: Bin Meng Reviewed-by: Stefan Weil --- Changes in v2: - change 'count'

[PULL 1/2] contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement

2022-08-09 Thread Laurent Vivier
From: Markus Armbruster We allocate VuVirtqElement with g_malloc() in virtqueue_alloc_element(), but free it with free() in vhost-user-blk.c. Harmless, but use g_free() anyway. One of the calls is guarded by a "not null" condition. Useless, because it cannot be null (it's dereferenced right

Re: [PATCH v2 1/2] util/main-loop: Fix maximum number of wait objects for win32

2022-08-09 Thread Marc-André Lureau
Hi On Tue, Aug 9, 2022 at 8:43 PM Bin Meng wrote: > From: Bin Meng > > The maximum number of wait objects for win32 should be > MAXIMUM_WAIT_OBJECTS, not MAXIMUM_WAIT_OBJECTS + 1. > > Fix the logic in qemu_add_wait_object() to avoid adding > the same HANDLE twice. > > Please make that a

Re: Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-08-09 Thread Keith Busch
On Wed, Aug 10, 2022 at 12:48:53AM +0800, 樊金昊 wrote: >> The driver will create the cq with an allocated vector, but it's not >> activated >> until after the driver wires it up to a handler. I think that's what you're >> observing with the incomplete MSIx table entry on creation. > > Also, I'm

Re: [PATCH v4 18/24] ppc/ppc405: QOM'ify MAL

2022-08-09 Thread BALATON Zoltan
On Tue, 9 Aug 2022, Cédric Le Goater wrote: The Memory Access Layer (MAL) controller is currently modeled as a DCR device with 4 IRQs. Also drop the ppc4xx_mal_init() helper and adapt the sam460ex machine. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater ---

[PATCH v8 00/12] NIC vhost-vdpa state restore via Shadow CVQ

2022-08-09 Thread Eugenio Pérez
CVQ of net vhost-vdpa devices can be intercepted since the addition of x-svq. The virtio-net device model is updated. The migration was blocked because although the state can be megrated between VMM it was not possible to restore on the destination NIC. This series add support for SVQ to inject

[PATCH v8 06/12] vhost_net: Add NetClientInfo stop callback

2022-08-09 Thread Eugenio Pérez
Used by the backend to perform actions after the device is stopped. In particular, vdpa net use it to unmap CVQ buffers to the device, cleaning the actions performend in prepare(). Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 3 +++ 2 files changed, 5

[PATCH v8 09/12] vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail

2022-08-09 Thread Eugenio Pérez
So we can reuse it to inject state messages. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang -- v7: * Remove double free error v6: * Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack) v5: * Do not use an artificial !NULL VirtQueueElement * Use only out size instead of

[PATCH v8 11/12] vdpa: Add virtio-net mac address via CVQ at start

2022-08-09 Thread Eugenio Pérez
This is needed so the destination vdpa device see the same state a the guest set in the source. Signed-off-by: Eugenio Pérez --- v8: * Delete unneeded copy from device's in buffer. v6: * Map and unmap command buffers at the start and end of device usage. v5: * Rename s/start/load/ * Use

[PATCH v8 05/12] vhost_net: Add NetClientInfo prepare callback

2022-08-09 Thread Eugenio Pérez
This is used by the backend to perform actions before the device is started. In particular, vdpa net use it to map CVQ buffers to the device, so it can send control commands using them. Signed-off-by: Eugenio Pérez --- v8: Rename NetClientInfo prepare callback to start, so it aligns with

[PATCH v8 07/12] vdpa: add net_vhost_vdpa_cvq_info NetClientInfo

2022-08-09 Thread Eugenio Pérez
Next patches will add a new info callback to restore NIC status through CVQ. Since only the CVQ vhost device is needed, create it with a new NetClientInfo. Signed-off-by: Eugenio Pérez --- v5: Create a new NetClientInfo instead of reusing the dataplane one. --- net/vhost-vdpa.c | 12

Re: Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-08-09 Thread 樊金昊
In this version I left irqfd initialization to the first assertion of an irq. But I think it is better to initialize irqfd at cq creation time so we won’t bother checking it at each irq assertion. However if I put these code in nvme_init_cq(), irqfd does not work properly. After adding some

[PATCH v4 04/24] ppc/ppc405: Move SRAM under the ref405ep machine

2022-08-09 Thread Cédric Le Goater
It doesn't belong to the generic machine nor the SoC. Fix a typo in the name while we are at it. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_boards.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index

[PATCH v4 09/24] ppc/ppc405: QOM'ify CPC

2022-08-09 Thread Cédric Le Goater
The CPC controller is currently modeled as a DCR device. Now that all clock settings are handled at the CPC level, change the SoC "sys-clk" property to be an alias on the same property in the CPC model. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h

[PATCH v4 17/24] ppc/ppc405: QOM'ify PLB

2022-08-09 Thread Cédric Le Goater
PLB is currently modeled as a simple DCR device. Also drop the ppc4xx_plb_init() helper and adapt the sam460ex machine. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 14 +-- hw/ppc/ppc405_uc.c | 59

  1   2   >