Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-19 Thread Richard Henderson
On 1/19/24 09:40, Deepak Gupta wrote: On Thu, Jan 18, 2024 at 12:50 PM Richard Henderson wrote: At some point pointer masking will be in hardware, and the kernel will gain support for it, and there will likely be a prctl() added for it. At the point the kernel finalizes the API, you will be

Re: [PATCH 0/3] migration: some small cleanups

2024-01-19 Thread Peter Xu
On Wed, Jan 17, 2024 at 03:58:45PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > I found three tiny little patches lying around probably for a long time, > sending it out before deleting the branch. Review welcomed, thanks. > > Peter Xu (3): > migration: Make threshold_size an

Re: [PATCH v4 3/3] ci: Disable migration compatibility tests for aarch64

2024-01-19 Thread Peter Xu
On Fri, Jan 19, 2024 at 10:04:56AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, Jan 18, 2024 at 01:49:51PM -0300, Fabiano Rosas wrote: > >> Until 9.0 is out, we need to keep the aarch64 job disabled because the > >> tests always use the n-1 version of migration-test. That happens

[PATCH] fsl-imx6ul: Add various missing unimplemented devices

2024-01-19 Thread Guenter Roeck
Add MMDC, OCOTP, SQPI, CAAM, and USBMISC as unimplemented devices. This allows operating systems such as Linux to run emulations such as mcimx6ul-evk. Before commit 0cd4926b85 ("Refactor i.MX6UL processor code"), the affected memory ranges were covered by the unimplemented DAP device. The commit

[PATCH v1 3/7] ui/spice: Submit the gl_draw requests at 60 FPS for remote clients

2024-01-19 Thread Vivek Kasireddy
In the specific case where the display layer (virtio-gpu) is using dmabuf, and if remote clients are enabled (-spice gl=on,port=), it makes sense to limit the maximum (streaming) rate to 60 FPS using the GUI timer. This matches the behavior of GTK UI where the display updates are submitted at

[PATCH v1 5/7] ui/spice: Override the surface's glformat when gl=on is enabled

2024-01-19 Thread Vivek Kasireddy
When testing with gl=on on an Intel Host, it was noticed that the R and B channels were interchanged while the Guest FB image was displayed. This was only seen if the display layer (virtio-gpu) did not directly share the dmabuf fd with Spice (i.e, blob=false). One of the main differences in the

[PATCH v1 1/7] ui/spice: Add an option for users to provide a preferred codec

2024-01-19 Thread Vivek Kasireddy
Giving users an option to choose a particular codec will enable them to make an appropriate decision based on their hardware and use-case. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Frediano Ziglio Cc: Dongwon Kim Signed-off-by: Vivek Kasireddy --- v2: - Don't override the default Spice

[PATCH v1 4/7] ui/console-gl: Add an option to override a surface's glformat

2024-01-19 Thread Vivek Kasireddy
In some cases where a UI component (e.g, Spice) needs to choose a particular glformat for a surface while creating a texture, this new GLenum provides an option to do so. One situation where this needs to be done is when the Host endianness is causing issues such as interchanged R and B channels.

[PATCH v1 0/7] ui/spice: Enable gl=on option for non-local or remote clients

2024-01-19 Thread Vivek Kasireddy
To address the limitation that this option is incompatible with remote clients, this patch series adds an option to select a preferred codec and also enable gl=on option for clients that are connected via the network. In other words, with this option enabled (and the below linked Spice series

[PATCH v1 7/7] ui/spice: Create another texture with linear layout when gl=on is enabled

2024-01-19 Thread Vivek Kasireddy
Since most encoders (invoked by Spice) may not work with tiled memory associated with a texture, we need to create another texture that has linear memory layout and use that instead. Note that, there does not seem to be a direct way to indicate to the GL implementation that a texture's backing

[PATCH v1 2/7] ui/spice: Enable gl=on option for non-local or remote clients

2024-01-19 Thread Vivek Kasireddy
Newer versions of Spice server should be able to accept dmabuf fds from Qemu for clients that are connected via the network. In other words, when this option is enabled, Qemu would share a dmabuf fd with Spice which would encode and send the data associated with the fd to a client that could be

[PATCH v1 6/7] ui/console-gl: Add a helper to create a texture with linear memory layout

2024-01-19 Thread Vivek Kasireddy
There are cases where we do not want the memory layout of a texture to be tiled as the component processing the texture memory would not know how to de-tile either via software or hardware. Therefore, ensuring that the memory backing the texture has a linear layout is absolutely necessary in these

Re: [PATCH 1/5] migration: Fix use-after-free of migration state object

2024-01-19 Thread Fabiano Rosas
Fabiano Rosas writes: > We're currently allowing the process_incoming_migration_bh bottom-half > to run without holding a reference to the 'current_migration' object, > which leads to a segmentation fault if the BH is still live after > migration_shutdown() has dropped the last reference to >

[PATCH 4/5] migration: Add a wrapper to qemu_bh_schedule

2024-01-19 Thread Fabiano Rosas
Wrap qemu_bh_schedule() to ensure we always hold a reference to the current_migration object. Signed-off-by: Fabiano Rosas --- migration/migration.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/migration/migration.c

[PATCH 3/5] migration: Reference migration state around loadvm_postcopy_handle_run_bh

2024-01-19 Thread Fabiano Rosas
We need to hold a reference to the current_migration object around async calls to avoid it been freed while still in use. Even on this load-side function, we might still use the MigrationState, e.g to check for capabilities. Signed-off-by: Fabiano Rosas --- migration/savevm.c | 2 ++ 1 file

[PATCH 0/5] migration: Fix migration state reference counting

2024-01-19 Thread Fabiano Rosas
We currently have a bug when running migration code in bottom halves. The issue has already been reported in Gitlab[1] and it started happening very frequently on my machine for some reason. The issue is that we're dropping the last reference to the MigrationState object while the cleanup bottom

[PATCH 1/5] migration: Fix use-after-free of migration state object

2024-01-19 Thread Fabiano Rosas
We're currently allowing the process_incoming_migration_bh bottom-half to run without holding a reference to the 'current_migration' object, which leads to a segmentation fault if the BH is still live after migration_shutdown() has dropped the last reference to current_migration. In my system the

[PATCH 5/5] migration: Centralize BH creation and dispatch

2024-01-19 Thread Fabiano Rosas
Now that the migration state reference counting is correct, further wrap the bottom half dispatch process to avoid future issues. Move BH creation and scheduling together and wrap the dispatch with an intermediary function that will ensure we always keep the ref/unref balanced. Also move the

[PATCH 2/5] migration: Take reference to migration state around bg_migration_vm_start_bh

2024-01-19 Thread Fabiano Rosas
We need to hold a reference to the current_migration object around async calls to avoid it been freed while still in use. Signed-off-by: Fabiano Rosas --- migration/migration.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index

Re: [PATCH v3 15/38 6/6] target/s390x: Improve general case of disas_jcc

2024-01-19 Thread Philippe Mathieu-Daudé
On 20/1/24 00:23, Philippe Mathieu-Daudé wrote: From: Richard Henderson Avoid code duplication by handling 7 of the 14 cases by inverting the test for the other 7 cases. Use TCG_COND_TSTNE for cc in {1,3}. Use (cc - 1) <= 1 for cc in {1,2}. Signed-off-by: Richard Henderson Signed-off-by:

Re: [PATCH v3 15/38] target/s390x: Improve general case of disas_jcc

2024-01-19 Thread Philippe Mathieu-Daudé
On 17/1/24 04:19, Richard Henderson wrote: On 1/17/24 09:19, Philippe Mathieu-Daudé wrote: +    case 0x4 | 0x1: /* cc == 1 || cc == 3 => (cc & 1) != 0 */ +    cond = TCG_COND_TSTNE; +    c->u.s32.b = tcg_constant_i32(1); Don't we need to AND?    c->u.s32.a =

[PATCH v3 15/38 2/6] target/s390x: Reorder CC_OP_STATIC switch case in disas_jcc (2/5)

2024-01-19 Thread Philippe Mathieu-Daudé
Code movement to ease review, no logical change. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index

[PATCH v3 15/38 4/6] target/s390x: Reorder CC_OP_STATIC switch case in disas_jcc (4/5)

2024-01-19 Thread Philippe Mathieu-Daudé
Code movement to ease review, no logical change. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index fd1138c684..9224df867b 100644 ---

[PATCH v3 15/38 3/6] target/s390x: Reorder CC_OP_STATIC switch case in disas_jcc (3/5)

2024-01-19 Thread Philippe Mathieu-Daudé
Code movement to ease review, no logical change. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index

[PATCH v3 15/38 5/6] target/s390x: Reorder CC_OP_STATIC switch case in disas_jcc (5/5)

2024-01-19 Thread Philippe Mathieu-Daudé
Code movement to ease review, no logical change. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 9224df867b..93c64db33e 100644 ---

[PATCH v3 15/38 6/6] target/s390x: Improve general case of disas_jcc

2024-01-19 Thread Philippe Mathieu-Daudé
From: Richard Henderson Avoid code duplication by handling 7 of the 14 cases by inverting the test for the other 7 cases. Use TCG_COND_TSTNE for cc in {1,3}. Use (cc - 1) <= 1 for cc in {1,2}. Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v3 15/38 1/6] target/s390x: Reorder CC_OP_STATIC switch case in disas_jcc (1/5)

2024-01-19 Thread Philippe Mathieu-Daudé
Code movement to ease review, no logical change. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 2897880d88..e84c6459f0 100644 ---

Re: [PATCH v15 0/9] rutabaga_gfx + gfxstream

2024-01-19 Thread Gurchetan Singh
On Fri, Jan 19, 2024 at 1:13 PM Alyssa Ross wrote: > > Hi Gurchetan, > > > Thanks for the reminder. I did make a request to create the release > > tags, but changes were requested by Fedora packaging effort: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=2242058 > >

[PATCH v3 18/38 1/2] tcg/aarch64: Massage tcg_out_brcond()

2024-01-19 Thread Philippe Mathieu-Daudé
In order to ease next commit review, modify tcg_out_brcond() to switch over TCGCond. No logical change intended. Signed-off-by: Philippe Mathieu-Daudé --- tcg/aarch64/tcg-target.c.inc | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git

[PATCH v3 18/38 2/2] tcg/aarch64: Generate TBZ, TBNZ

2024-01-19 Thread Philippe Mathieu-Daudé
From: Richard Henderson Test the sign bit for LT/GE vs 0, and TSTNE/EQ vs a power of 2. Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tcg/aarch64/tcg-target.c.inc | 71 ++-- 1 file changed, 59 insertions(+), 12 deletions(-) diff

[PATCH] crypto/gcrypt: prefer kernel as direct source of entropy

2024-01-19 Thread Cristian Rodríguez
gcrypt by default uses an userspace RNG, which cannot know when it is time to discard/invalidate its buffer (suspend, resume, vm forks, other corner cases) as a "when to discard" event is unavailable to userspace. Set GCRYCTL_SET_PREFERRED_RNG_TYPE to GCRY_RNG_TYPE_SYSTEM which must be done

[PATCH] target/arm: fix exception syndrome for AArch32 bkpt insn

2024-01-19 Thread Jan Klötzke
Debug exceptions that target AArch32 Hyp mode are reported differently than on AAarch64. Internally, Qemu uses the AArch64 syndromes. Therefore such exceptions need to be either converted to a prefetch abort (breakpoints, vector catch) or a data abort (watchpoints). Signed-off-by: Jan Klötzke

Re: [PULL 39/41] hw/net/cadence_gem: use FIELD to describe PHYMNTNC register fields

2024-01-19 Thread Guenter Roeck
On Fri, Jan 19, 2024 at 02:32:47PM -0800, Guenter Roeck wrote: > Hi, > > On Fri, Oct 27, 2023 at 03:39:40PM +0100, Peter Maydell wrote: > > From: Luc Michel > > > > Use the FIELD macro to describe the PHYMNTNC register fields. > > > > Signed-off-by: Luc Michel > > Reviewed-by:

Re: [PULL 39/41] hw/net/cadence_gem: use FIELD to describe PHYMNTNC register fields

2024-01-19 Thread Guenter Roeck
Hi, On Fri, Oct 27, 2023 at 03:39:40PM +0100, Peter Maydell wrote: > From: Luc Michel > > Use the FIELD macro to describe the PHYMNTNC register fields. > > Signed-off-by: Luc Michel > Reviewed-by: sai.pavan.bo...@amd.com > Message-id: 20231017194422.4124691-10-luc.mic...@amd.com >

Re: [PATCH v3 34/38] tcg/ppc: Support TCG_COND_TST{EQ,NE}

2024-01-19 Thread Philippe Mathieu-Daudé
On 10/1/24 23:44, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 2 +- tcg/ppc/tcg-target.c.inc | 122 --- 2 files changed, 115 insertions(+), 9 deletions(-) diff --git a/tcg/ppc/tcg-target.h

Re: [PATCH v3 33/38] tcg/ppc: Add TCG_CT_CONST_CMP

2024-01-19 Thread Philippe Mathieu-Daudé
On 10/1/24 23:44, Richard Henderson wrote: Better constraint for tcg_out_cmp, based on the comparison. We can't yet remove the fallback to load constants into a scratch because of tcg_out_cmp2, but that path should not be as frequent. Signed-off-by: Richard Henderson ---

Re: [PATCH v3 17/38] tcg/aarch64: Support TCG_COND_TST{EQ,NE}

2024-01-19 Thread Philippe Mathieu-Daudé
On 10/1/24 23:43, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target-con-set.h | 5 +-- tcg/aarch64/tcg-target-con-str.h | 1 + tcg/aarch64/tcg-target.h | 2 +- tcg/aarch64/tcg-target.c.inc | 56 ++-- 4 files

Re: [PATCH 0/2] hw/arm: Unconditionally map MMIO-based USB host controllers

2024-01-19 Thread Philippe Mathieu-Daudé
On 19/1/24 17:51, Peter Maydell wrote: On Mon, 15 Jan 2024 at 16:56, Philippe Mathieu-Daudé wrote: When a chipset contain a USB controller, we can not simply remove it. We could disable it, but that requires more changes this series isn't aiming for. For more context:

Re: [PATCH v3 14/38] target/s390x: Use TCG_COND_TSTNE for CC_OP_{TM,ICM}

2024-01-19 Thread Philippe Mathieu-Daudé
On 10/1/24 23:43, Richard Henderson wrote: These are all test-and-compare type instructions. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/target/s390x/tcg/translate.c

Re: [PATCH 1/2] tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns

2024-01-19 Thread Philippe Mathieu-Daudé
On 17/1/24 22:36, Richard Henderson wrote: While the format names the second vector register 'v3', it is still in the second position (bits 12-15) and the argument to RXB must match. Example error: - e7 00 00 10 2a 33 verllf %v16,%v0,16 + e7 00 00 10 2c 33 verllf

[PATCH v2 2/2] hw/arm/nseries: Unconditionally map the TUSB6010 USB Host controller

2024-01-19 Thread Philippe Mathieu-Daudé
The TUSB6010 USB controller is solderer on the N800 and N810 tablets, thus is always present. This is a migration compatibility break for the n800/n810 machines started with the '-usb none' option. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 4 +--- 1 file changed, 1

[PATCH v2 0/2] hw/arm: Unconditionally map MMIO-based USB host controllers

2024-01-19 Thread Philippe Mathieu-Daudé
When a chipset contain a USB controller, we can not simply remove it. We could disable it, but that requires more changes this series isn't aiming for. For more context: https://lore.kernel.org/qemu-devel/56fde49f-7dc6-4f8e-9bbf-0336a20a9...@roeck-us.net/ Since v1: - Mention migration compat

[PATCH v2 1/2] hw/arm/allwinner-a10: Unconditionally map the USB Host controllers

2024-01-19 Thread Philippe Mathieu-Daudé
The USB Controllers are part of the chipset, thus are always present and mapped in memory. This is a migration compatibility break for the cubieboard machine started with the '-usb none' option. Reported-by: Guenter Roeck Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Guenter Roeck

Re: [PATCH] MAINTAINERS: Drop myself as VT-d maintainers

2024-01-19 Thread Philippe Mathieu-Daudé
On 18/1/24 10:10, pet...@redhat.com wrote: From: Peter Xu Due to my own limitation on bandwidth, I noticed that unfortunately I won't have time to review VT-d patches at least in the near future. Meanwhile I expect a lot of possibilities could actually happen in this area in the near future.

Re: [PATCH v15 0/9] rutabaga_gfx + gfxstream

2024-01-19 Thread Alyssa Ross
Hi Gurchetan, > Thanks for the reminder. I did make a request to create the release > tags, but changes were requested by Fedora packaging effort: > > https://bugzilla.redhat.com/show_bug.cgi?id=2242058 > https://bugzilla.redhat.com/show_bug.cgi?id=2241701 > > So the request was canceled, but

Re: [PATCH v2 3/3] s390x/pci: drive ISM reset from subsystem reset

2024-01-19 Thread Halil Pasic
On Thu, 18 Jan 2024 13:51:51 -0500 Matthew Rosato wrote: > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index eaf61d3640..c99682b07d 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -118,6 +118,14 @@ static void subsystem_reset(void) >

[PATCH 2/2] target/xtensa: tidy TLB way variability logic

2024-01-19 Thread Max Filippov
Whether TLB ways 5 and 6 are variable is not a property of the TLB instance or a TLB entry instance, it's a property of the xtensa core configuration. Remove 'varway56' field from the xtensa_tlb structure and remove 'variable' field from the xtensa_tlb_entry structure. Add 'tlb_variable_way' array

[PATCH 0/2] target/xtensa: tidy xtensa memory management

2024-01-19 Thread Max Filippov
Hello, this series separates xtensa MMU and MPU states and improves variable TLB way logic. Max Filippov (2): target/xtensa: wrap MMU and MPU state into structures target/xtensa: tidy TLB way variability logic target/xtensa/cpu.h | 21 +++--- target/xtensa/mmu_helper.c | 74

[PATCH 1/2] target/xtensa: wrap MMU and MPU state into structures

2024-01-19 Thread Max Filippov
Make separation of alternative xtensa memory management options state explicit. Signed-off-by: Max Filippov --- target/xtensa/cpu.h| 18 + target/xtensa/mmu_helper.c | 40 +++--- 2 files changed, 34 insertions(+), 24 deletions(-) diff

[PATCH v13 5/9] hw/arm: Add GMAC devices to NPCM7XX SoC

2024-01-19 Thread Nabih Estefan
From: Hao Wu Change-Id: Id8a3461fb5042adc4c3fd6f4fbd1ca0d33e22565 Signed-off-by: Hao Wu Signed-off-by: Nabih Estefan Reviewed-by: Tyrone Ting --- hw/arm/npcm7xx.c | 36 ++-- include/hw/arm/npcm7xx.h | 2 ++ 2 files changed, 36 insertions(+), 2

[PATCH v13 2/9] hw/arm: Add PCI mailbox module to Nuvoton SoC

2024-01-19 Thread Nabih Estefan
From: Hao Wu This patch wires the PCI mailbox module to Nuvoton SoC. Change-Id: I14c42c628258804030f0583889882842bde0d972 Signed-off-by: Hao Wu Signed-off-by: Nabih Estefan Reviewed-by: Tyrone Ting --- docs/system/arm/nuvoton.rst | 2 ++ hw/arm/npcm7xx.c| 17 -

[PATCH v13 4/9] hw/net: Add NPCMXXX GMAC device

2024-01-19 Thread Nabih Estefan
From: Hao Wu This patch implements the basic registers of GMAC device and sets registers for networking functionalities. Squashed IRQ Implementation patch into this one for compliation. Tested: The following message shows up with the change: Broadcom BCM54612E stmmac-0:00: attached PHY driver

[PATCH v13 9/9] tests/qtest: Adding PCS Module test to GMAC Qtest

2024-01-19 Thread Nabih Estefan
From: Nabih Estefan Diaz - Add PCS Register check to npcm_gmac-test Change-Id: I34821beb5e0b1e89e2be576ab58eabe41545af12 Signed-off-by: Nabih Estefan Reviewed-by: Tyrone Ting --- tests/qtest/npcm_gmac-test.c | 132 +++ 1 file changed, 132 insertions(+) diff

[PATCH v13 8/9] hw/net: GMAC Tx Implementation

2024-01-19 Thread Nabih Estefan
From: Nabih Estefan Diaz - Implementation of Transmit function for packets - Implementation for reading and writing from and to descriptors in memory for Tx Added relevant trace-events NOTE: This function implements the steps detailed in the datasheet for transmitting messages from the GMAC.

[PATCH v13 6/9] tests/qtest: Creating qtest for GMAC Module

2024-01-19 Thread Nabih Estefan
From: Nabih Estefan Diaz - Created qtest to check initialization of registers in GMAC Module. - Implemented test into Build File. Change-Id: I8b2fe152d3987a7eec4cf6a1d25ba92e75a5391d Signed-off-by: Nabih Estefan Reviewed-by: Tyrone Ting --- tests/qtest/meson.build | 1 +

[PATCH v13 3/9] hw/misc: Add qtest for NPCM7xx PCI Mailbox

2024-01-19 Thread Nabih Estefan
From: Hao Wu This patches adds a qtest for NPCM7XX PCI Mailbox module. It sends read and write requests to the module, and verifies that the module contains the correct data after the requests. Change-Id: I2e1dbaecf8be9ec7eab55cb54f7fdeb0715b8275 Signed-off-by: Hao Wu Signed-off-by: Nabih

[PATCH v13 1/9] hw/misc: Add Nuvoton's PCI Mailbox Module

2024-01-19 Thread Nabih Estefan
From: Hao Wu The PCI Mailbox Module is a high-bandwidth communcation module between a Nuvoton BMC and CPU. It features 16KB RAM that are both accessible by the BMC and core CPU. and supports interrupt for both sides. This patch implements the BMC side of the PCI mailbox module. Communication

[PATCH v13 7/9] hw/net: GMAC Rx Implementation

2024-01-19 Thread Nabih Estefan
From: Nabih Estefan Diaz - Implementation of Receive function for packets - Implementation for reading and writing from and to descriptors in memory for Rx When RX starts, we need to flush the queued packets so that they can be received by the GMAC device. Without this it won't work with TAP

[PATCH v13 0/9] Implementation of NPI Mailbox and GMAC Networking Module

2024-01-19 Thread Nabih Estefan
From: Nabih Estefan Diaz [Changes since v12] Fix errors found when testing in big-endian host. [Changes since v11] Branch couldn't be merged with master because of issues in patchset 6. Fixed. [Changes since v10] Fixed macOS build issue. Changed imports to not be linux-specific. [Changes

[PULL 02/14] string-output-visitor: Fix (pseudo) struct handling

2024-01-19 Thread Kevin Wolf
Commit ff32bb53 tried to get minimal struct support into the string output visitor by just making it return "". Unfortunately, it forgot that the caller will still make more visitor calls for the content of the struct. If the struct is contained in a list, such as IOThreadVirtQueueMapping, in the

[PULL 04/14] stream: Allow users to request only format driver names in backing file format

2024-01-19 Thread Kevin Wolf
From: Peter Krempa Introduce a new flag 'backing-mask-protocol' for the block-stream QMP command which instructs the internals to use 'raw' instead of the protocol driver in case when a image is used without a dummy 'raw' wrapper. The flag is designed such that it can be always asserted by

[PULL 10/14] virtio-blk: rename dataplane to ioeventfd

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi The dataplane code is really about using ioeventfd. It's used both for IOThreads (what we think of as dataplane) and for the core virtio-pci code's ioeventfd feature (which is enabled by default and used when no IOThread has been specified). Rename the code to reflect this.

[PULL 05/14] iotests: add filter_qmp_generated_node_ids()

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi Add a filter function for QMP responses that contain QEMU's automatically generated node ids. The ids change between runs and must be masked in the reference output. The next commit will use this new function. Signed-off-by: Stefan Hajnoczi Message-ID:

[PULL 01/14] block/blklogwrites: Fix a bug when logging "write zeroes" operations.

2024-01-19 Thread Kevin Wolf
From: Ari Sundholm There is a bug in the blklogwrites driver pertaining to logging "write zeroes" operations, causing log corruption. This can be easily observed by setting detect-zeroes to something other than "off" for the driver. The issue is caused by a concurrency bug pertaining to the

[PULL 14/14] block/blklogwrites: Protect mutable driver state with a mutex.

2024-01-19 Thread Kevin Wolf
From: Ari Sundholm During the review of a fix for a concurrency issue in blklogwrites, it was found that the driver needs an additional fix when enabling multiqueue, which is a new feature introduced in QEMU 9.0, as the driver state may be read and written by multiple threads at the same time,

[PULL 09/14] virtio-blk: rename dataplane create/destroy functions

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi virtio_blk_data_plane_create() and virtio_blk_data_plane_destroy() are actually about s->vq_aio_context[] rather than managing dataplane-specific state. As a prerequisite to using s->vq_aio_context[] in all code paths (even when dataplane is not used), rename these

[PULL 08/14] virtio-blk: move dataplane code into virtio-blk.c

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi The dataplane code used to be significantly different from the non-dataplane code and therefore had a separate source file. Over time the difference has gotten smaller because the I/O code paths were unified. Nowadays the distinction between the VirtIOBlock and

[PULL 07/14] monitor: only run coroutine commands in qemu_aio_context

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi monitor_qmp_dispatcher_co() runs in the iohandler AioContext that is not polled during nested event loops. The coroutine currently reschedules itself in the main loop's qemu_aio_context AioContext, which is polled during nested event loops. One known problem is that QMP

[PULL 11/14] virtio-blk: restart s->rq reqs in vq AioContexts

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi A virtio-blk device with the iothread-vq-mapping parameter has per-virtqueue AioContexts. It is not thread-safe to process s->rq requests in the BlockBackend AioContext since that may be different from the virtqueue's AioContext to which this request belongs. The code

[PULL 06/14] iotests: port 141 to Python for reliable QMP testing

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi The common.qemu bash functions allow tests to interact with the QMP monitor of a QEMU process. I spent two days trying to update 141 when the order of the test output changed, but found it would still fail occassionally because printf() and QMP events race with synchronous

[PULL 13/14] virtio-blk: always set ioeventfd during startup

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi When starting ioeventfd it is common practice to set the event notifier so that the ioeventfd handler is triggered to run immediately. There may be no requests waiting to be processed, but the idea is that if a request snuck in then we guarantee that it will be detected.

[PULL 00/14] Block layer patches

2024-01-19 Thread Kevin Wolf
The following changes since commit 3f2a357b95845ea0bf7463eff6661e43b97d1afc: Merge tag 'hw-cpus-20240119' of https://github.com/philmd/qemu into staging (2024-01-19 11:39:38 +) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch

[PULL 03/14] commit: Allow users to request only format driver names in backing file format

2024-01-19 Thread Kevin Wolf
From: Peter Krempa Introduce a new flag 'backing-mask-protocol' for the block-commit QMP command which instructs the internals to use 'raw' instead of the protocol driver in case when a image is used without a dummy 'raw' wrapper. The flag is designed such that it can be always asserted by

[PULL 12/14] virtio-blk: tolerate failure to set BlockBackend AioContext

2024-01-19 Thread Kevin Wolf
From: Stefan Hajnoczi We no longer rely on setting the AioContext since the block layer IO_CODE APIs can be called from any thread. Now it's just a hint to help block jobs and other operations co-locate themselves in a thread with the guest I/O requests. Keep going if setting the AioContext

Re: [PATCH 00/20] arm: Rework target/ headers to build various hw/ files once

2024-01-19 Thread Peter Maydell
On Thu, 18 Jan 2024 at 20:06, Philippe Mathieu-Daudé wrote: > > Hi, > > In order to fix a bug noticed [*] by Cédric and Fabiano in my > "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series, > I ended reusing commits from other branches and it grew quite > a lot. This is the first

Re: [PATCH v15 0/9] rutabaga_gfx + gfxstream

2024-01-19 Thread Gurchetan Singh
On Tue, Jan 16, 2024 at 2:42 AM Alyssa Ross wrote: > > Hi Gurchetan, > > Gurchetan Singh writes: > > > - As mentioned in v14: > > * AEMU: d6e6b99 "Delete VpxFrameParser.cpp" > > * gfxstream: 2131f78d Merge "gfxstream: add egl & gles deps.." > > > > are the proposed v.0.1.2 release

Re: [PATCH v3] block/blklogwrites: Protect mutable driver state with a mutex.

2024-01-19 Thread Kevin Wolf
Am 19.01.2024 um 17:29 hat Ari Sundholm geschrieben: > During the review of a fix for a concurrency issue in blklogwrites, > it was found that the driver needs an additional fix when enabling > multiqueue, which is a new feature introduced in QEMU 9.0, as the > driver state may be read and written

Re: [PATCH 3/3] tests/acpi: Update virt/SSDT.memhp

2024-01-19 Thread Peter Maydell
On Fri, 19 Jan 2024 at 17:19, Laszlo Ersek wrote: > > On 1/19/24 15:29, Peter Maydell wrote: > > On Mon, 15 Jan 2024 at 04:35, Bin Meng wrote: > >> > >> The Arm dtb changes caused an address change: > >> > >> DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x0001) > >> { > >> [

Re: [PATCH v2] block/blklogwrites: Protect mutable driver state with a mutex.

2024-01-19 Thread Kevin Wolf
Am 19.01.2024 um 17:55 hat Ari Sundholm geschrieben: > On 1/18/24 21:18, Kevin Wolf wrote: > > Am 11.01.2024 um 17:32 hat Ari Sundholm geschrieben: > > > During the review of a fix for a concurrency issue in blklogwrites, > > > it was found that the driver needs an additional fix when enabling > >

Re: QEMU's tests/unit/test-iov times out on NetBSD and OpenBSD

2024-01-19 Thread Daniel P . Berrangé
On Fri, Jan 19, 2024 at 05:13:25PM +0100, Thomas Huth wrote: > On 19/01/2024 17.07, Daniel P. Berrangé wrote: > > On Fri, Jan 19, 2024 at 03:55:49PM +, Thomas Huth wrote: > > > > > > Hi, > > > > > > since we recently introduced test timouts in QEMU's meson set up, I > > > noticed > > >

Re: [PATCH 3/3] tests/acpi: Update virt/SSDT.memhp

2024-01-19 Thread Laszlo Ersek
On 1/19/24 15:29, Peter Maydell wrote: > On Mon, 15 Jan 2024 at 04:35, Bin Meng wrote: >> >> The Arm dtb changes caused an address change: >> >> DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x0001) >> { >> [ ... ] >> -Name (MEMA, 0x43C8) >> +Name (MEMA, 0x43D8)

Re: [PATCH 0/6] virtio-blk: iothread-vq-mapping cleanups

2024-01-19 Thread Kevin Wolf
Am 19.01.2024 um 14:57 hat Stefan Hajnoczi geschrieben: > Kevin Wolf identified some issues with the virtio-blk iothread-vq-mapping > patch > series that was merged at the end of 2023: > 1. s->rq is restarted from one AioContext and races with the other >iothread-vq-mapping AioContexts. > 2.

Re: Why invtsc (CPUID_APM_INVTSC) is unmigratable?

2024-01-19 Thread Marcelo Tosatti
On Fri, Jan 19, 2024 at 02:46:22PM +0800, Xiaoyao Li wrote: > I'm wondering why CPUID_APM_INVTSC is set as unmigratable_flags. Could > anyone explain it? commit 68bfd0ad4a1dcc4c328d5db85dc746b49c1ec07e Author: Marcelo Tosatti Date: Wed May 14 16:30:09 2014 -0300 target-i386: block

Re: [PATCH v2 5/5] hw/xen: convert stderr prints to error/warn reports

2024-01-19 Thread Philippe Mathieu-Daudé
On 19/1/24 14:24, Manos Pitsidianakis wrote: According to the QEMU Coding Style document: Do not use printf(), fprintf() or monitor_printf(). Instead, use error_report() or error_vreport() from error-report.h. This ensures the error is reported in the right place (current monitor or stderr),

Re: [PATCH v2 0/3] hw/arm: Add support for USB, SATA, and watchdog to Allwinner R40

2024-01-19 Thread Peter Maydell
On Mon, 15 Jan 2024 at 18:28, Guenter Roeck wrote: > > Add support for > > - USB 2.0 EHCI/OHCI > - SATA/AHCI > - Watchdog > > to Allwinner R40. The hardware is quite similar to Allwinner A10 and H3, > so the code is derived from the implementations for those SOCs. > > Tested with bpim2u emulation

Re: [PATCH v2] block/blklogwrites: Protect mutable driver state with a mutex.

2024-01-19 Thread Ari Sundholm
On 1/18/24 21:18, Kevin Wolf wrote: Am 11.01.2024 um 17:32 hat Ari Sundholm geschrieben: During the review of a fix for a concurrency issue in blklogwrites, it was found that the driver needs an additional fix when enabling multiqueue, which is a new feature introduced in QEMU 9.0, as the

Re: [PATCH v3 00/14] hw/arm: Prefer arm_feature() over object_property_find()

2024-01-19 Thread Peter Maydell
On Tue, 16 Jan 2024 at 16:43, Peter Maydell wrote: > > On Tue, 16 Jan 2024 at 16:20, Philippe Mathieu-Daudé > wrote: > > > > On 13/1/24 14:36, Peter Maydell wrote: > > > On Wed, 10 Jan 2024 at 19:53, Philippe Mathieu-Daudé > > > wrote: > > >> > > >> Since v2 [2]: > > >> - Dropped "Simplify

Re: [PATCH 0/2] hw/arm: Unconditionally map MMIO-based USB host controllers

2024-01-19 Thread Peter Maydell
On Mon, 15 Jan 2024 at 16:56, Philippe Mathieu-Daudé wrote: > > When a chipset contain a USB controller, we can not simply > remove it. We could disable it, but that requires more changes > this series isn't aiming for. For more context: >

Re: [PATCH] target/xtensa: fix OOB TLB entry access

2024-01-19 Thread Peter Maydell
On Thu, 18 Jan 2024 at 08:01, Michael Tokarev wrote: > > 15.12.2023 15:03, Max Filippov : > > r[id]tlb[01], [iw][id]tlb opcodes use TLB way index passed in a register > > by the guest. The host uses 3 bits of the index for ITLB indexing and 4 > > bits for DTLB, but there's only 7 entries in the

Re: [PULL 00/36] HW core patches for 2024-01-19

2024-01-19 Thread Peter Maydell
gt; 12:48:17 +) > > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/hw-cpus-20240119 > > for you to fetch changes up to 7ec5d7d91215815e885d2b38e62256e8fd8e2bce: > > configure: Add linux header compile support f

Re: [PULL 00/16] VGA, x86 TCG, misc changes for 2024-01-18

2024-01-19 Thread Peter Maydell
On Thu, 18 Jan 2024 at 12:26, Paolo Bonzini wrote: > > The following changes since commit 977542ded7e6b28d2bc077bcda24568c716e393c: > > Merge tag 'pull-testing-updates-120124-2' of > https://gitlab.com/stsquad/qemu into staging (2024-01-12 14:02:53 +) > > are available in the Git

[PATCH 2/5] vmbus: Switch bus reset to 3-phase-reset

2024-01-19 Thread Peter Maydell
Switch vmbus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell --- hw/hyperv/vmbus.c

[PATCH 0/5] buses: switch to 3-phase-reset

2024-01-19 Thread Peter Maydell
This patchset switches the handful of bus types that implement a reset method over to using the 3-phase-reset APIs, and then removes the transitional infrastructure from the core bus class that was supporting the ability to have bus types that use old-style reset. I wrote this ages ago and

[PATCH 3/5] adb: Switch bus reset to 3-phase-reset

2024-01-19 Thread Peter Maydell
Switch the ADB bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell ---

[PATCH 5/5] hw/core: Remove transitional infrastructure from BusClass

2024-01-19 Thread Peter Maydell
BusClass currently has transitional infrastructure to support subclasses which implement the legacy BusClass::reset method rather than the Resettable interface. We have now removed all the users of BusClass::reset in the tree, so we can remove the transitional infrastructure. Signed-off-by:

[PATCH 1/5] pci: Switch bus reset to 3-phase-reset

2024-01-19 Thread Peter Maydell
Switch the PCI bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell --- hw/pci/pci.c

[PATCH 4/5] hw/s390x/css-bridge: switch virtual-css bus to 3-phase-reset

2024-01-19 Thread Peter Maydell
Switch the s390x virtual-css bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell ---

[PATCH v3] block/blklogwrites: Protect mutable driver state with a mutex.

2024-01-19 Thread Ari Sundholm via
During the review of a fix for a concurrency issue in blklogwrites, it was found that the driver needs an additional fix when enabling multiqueue, which is a new feature introduced in QEMU 9.0, as the driver state may be read and written by multiple threads at the same time, which was not the case

Re: how do the iotests pick a machine model to run on ?

2024-01-19 Thread Peter Maydell
On Fri, 19 Jan 2024 at 15:26, Peter Maydell wrote: > (Also, we should probably put an entry for sh4 in machine_map, > because the default board type (shix) is about to be deprecated, > and the r2d board type is thus a better choice.) The good news is if we add r2d to the machine_map, then only 3

Re: QEMU's tests/unit/test-iov times out on NetBSD and OpenBSD

2024-01-19 Thread Thomas Huth
On 19/01/2024 17.07, Daniel P. Berrangé wrote: On Fri, Jan 19, 2024 at 03:55:49PM +, Thomas Huth wrote: Hi, since we recently introduced test timouts in QEMU's meson set up, I noticed that the tests/unit/test-iov times out when doing "make vm-build-netbsd BUILD_TARGET=check-unit" (or

  1   2   3   >