Re: [PATCH v2] target/i386: Export GDS_NO bit to guests

2023-08-14 Thread Xiaoyao Li
On 8/15/2023 12:54 PM, Pawan Gupta wrote: Gather Data Sampling (GDS) is a side-channel attack using Gather instructions. Some Intel processors will set ARCH_CAP_GDS_NO bit in MSR IA32_ARCH_CAPABILITIES to report that they are not vulnerable to GDS. Make this bit available to guests. Closes: ht

Re: [PULL 0/1] late tcg fix

2023-08-14 Thread Richard Henderson
ository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230814 for you to fetch changes up to d3b41127c205062ca6c29c89c9542c4112c39ca0: tcg/i386: Output %gs prefix in tcg_out_vex_opc (2023-08-12 08:51:12 -0700) tcg/i386:

Re: [PATCH] trace-events: Fix the name of the tracing.rst file

2023-08-14 Thread Michael Tokarev
14.08.2023 20:12, Thomas Huth wrote: The file has been converted to .rst a while ago - make sure that the references in the trace-events files are pointing to the right location now. Applied to my trivial-patches tree, thanks! /mjt

[RFC PATCH] tcg/ppc: Enable direct branching tcg_out_goto_tb with TCG_REG_TB

2023-08-14 Thread Jordan Niethe
Direct branch patching was disabled when using TCG_REG_TB in commit 736a1588c1 ("tcg/ppc: Fix race in goto_tb implementation"). Commit 7502f89c74 ("tcg/ppc: Use prefixed instructions for tcg_out_goto_tb") used the support for pc relative ISAv3.1 instructions to re-enable direct branch patching on P

[PATCH v2] target/i386: Export GDS_NO bit to guests

2023-08-14 Thread Pawan Gupta
Gather Data Sampling (GDS) is a side-channel attack using Gather instructions. Some Intel processors will set ARCH_CAP_GDS_NO bit in MSR IA32_ARCH_CAPABILITIES to report that they are not vulnerable to GDS. Make this bit available to guests. Closes: https://lore.kernel.org/qemu-devel/camgffemg6t

[PATCH] target/riscv: Update CSR bits name for svadu extension

2023-08-14 Thread Weiwei Li
The Svadu specification updated the name of the *envcfg bit from HADE to ADUE. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c| 4 ++-- target/riscv/cpu_bits.h | 8 target/riscv/cpu_helper.c | 4 ++-- target/riscv/csr.c| 12 ++--

[PULL 0/1] late tcg fix

2023-08-14 Thread Richard Henderson
s/pull-tcg-20230814 for you to fetch changes up to d3b41127c205062ca6c29c89c9542c4112c39ca0: tcg/i386: Output %gs prefix in tcg_out_vex_opc (2023-08-12 08:51:12 -0700) tcg/i386: Output %gs prefix in tcg_o

[PULL 1/1] tcg/i386: Output %gs prefix in tcg_out_vex_opc

2023-08-14 Thread Richard Henderson
Missing the segment prefix means that user-only fails to add guest_base for some 128-bit load/store. Fixes: 098d0fc10d2 ("tcg/i386: Support 128-bit load/store") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1763 Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 3 +++ 1

Re: [PATCH v2] virtio: don't zero out memory region cache for indirect descriptors

2023-08-14 Thread Jason Wang
On Fri, Aug 11, 2023 at 10:33 PM Ilya Maximets wrote: > > Lots of virtio functions that are on a hot path in data transmission > are initializing indirect descriptor cache at the point of stack > allocation. It's a 112 byte structure that is getting zeroed out on > each call adding unnecessary ov

Re: [PATCH QEMU v2 0/3] provide a smooth upgrade solution for multi-queues disk

2023-08-14 Thread Yong Huang
On Tue, Aug 15, 2023 at 12:28 AM Stefan Hajnoczi wrote: > On Fri, Aug 11, 2023 at 10:31:51AM +0800, Yong Huang wrote: > > Hi, Stefan, thank you for your interest in this series. > > I'm trying to explain my point, if you think my explanation > > doesn't stand up, please let me know. > > > > On F

[PATCH v5 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-14 Thread Gurchetan Singh
This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering graphics in the Android

[PATCH v5 8/9] gfxstream + rutabaga: enable rutabaga

2023-08-14 Thread Gurchetan Singh
This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- v3: Whitespace fix (Akihiko) hw/display/virtio-gpu-base.c | 3 ++- hw/display/virtio-gpu.c | 5 +++-- softmmu/qdev-monitor.c | 3 +++ softmmu

[PATCH v5 7/9] gfxstream + rutabaga: meson support

2023-08-14 Thread Gurchetan Singh
- Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- v3: Fix alignment issues (Akihiko) hw/display/meson.build| 22 ++ meson.build |

[PATCH v5 0/9] gfxstream + rutabaga_gfx

2023-08-14 Thread Gurchetan Singh
From: Gurchetan Singh Prior versions: v4: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg01566.html v3: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00565.html v2: https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg05801.html v1: https://lists.gnu.org/archive/html/

[PATCH v5 3/9] virtio-gpu: hostmem

2023-08-14 Thread Gurchetan Singh
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Acked-by: Michael S. Tsirkin --- hw/display/virtio-gpu-pci.c| 14 ++ hw/display/virtio-gpu.c| 1 + hw/display/virtio-vga.c| 33

[PATCH v5 9/9] docs/system: add basic virtio-gpu documentation

2023-08-14 Thread Gurchetan Singh
This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh --- v2: - Incorporated suggestions by Akihiko Odaki - Listed the currently supported capset_names (Bernard) v3: - Incorporated suggestions by Akihiko Odaki and Alyssa Ross v4: - Incorpo

[PATCH v5 1/9] virtio: Add shared memory capability

2023-08-14 Thread Gurchetan Singh
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David A

[PATCH v5 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-08-14 Thread Gurchetan Singh
This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. The command to run these would be: Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- -device virtio-vga-rutabaga,capset_names=gfxstream-vulkan:cross-domain, \

[PATCH v5 2/9] virtio-gpu: CONTEXT_INIT feature

2023-08-14 Thread Gurchetan Singh
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki --- hw/display/virtio-gpu-base.c

[PATCH v5 4/9] virtio-gpu: blob prep

2023-08-14 Thread Gurchetan Singh
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- hw/display/virtio-gpu.c | 10 +++--- in

Re: [PATCH for-8.2] hw/s390x/s390-virtio-ccw: Remove superfluous code to set the NIC model

2023-08-14 Thread Halil Pasic
On Fri, 4 Aug 2023 09:35:25 +0200 Thomas Huth wrote: > The check for nd->model being NULL was originally required, but in > commit e11f463295d95aba ("s390x/virtio: use qemu_check_nic_model()") > the corresponding code had been replaced by a call to the function > qemu_check_nic_model() - and thi

Re: [PATCH for-8.2 v2 1/2] qapi/migration: Deduplicate migration parameter field comments

2023-08-14 Thread Peter Xu
On Tue, Aug 08, 2023 at 04:03:46PM -0400, Peter Xu wrote: > On Sun, Aug 06, 2023 at 11:49:46AM -0400, Peter Xu wrote: > > > I think we have a tradeoff here. If perpetuating the unclean and ugly > > > use of "" is what it takes to de-triplicate migration parameters, we may > > > decide to accept th

[PATCH for-8.2 3/4] migration/qapi: Replace @MigrateSetParameters with @MigrationParameters

2023-08-14 Thread Peter Xu
These two structs are mostly identical besides some fields (quote from Daniel P. Berrangé in his reply): 1c1 < { 'struct': 'MigrationParameters', --- > { 'struct': 'MigrateSetParameters', 14,16c14,16 < '*tls-creds': 'str', < '*tls-hostname': 'str', <

[PATCH for-8.2 2/4] tests/migration-test: Add a test for null parameter setups

2023-08-14 Thread Peter Xu
Add a test for StrOrNull parameters (tls-*). Signed-off-by: Peter Xu --- tests/qtest/migration-test.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 62d3f37021..12e72580a6 100644 --- a/tests/qtest/mi

[PATCH for-8.2 4/4] migration/qapi: Drop @MigrationParameter enum

2023-08-14 Thread Peter Xu
Drop the enum in qapi because it is never used in QMP APIs. Instead making it an internal definition for QEMU so that we can decouple it from QAPI. One of the important things is we can deduplicate the documentations on the various migration parameters. Signed-off-by: Peter Xu --- qapi/migratio

[PATCH for-8.2 1/4] migration/qmp: Fix crash on setting tls-authz with null

2023-08-14 Thread Peter Xu
QEMU will crash if anyone tries to set tls-authz (which is a type StrOrNull) with 'null' value. Fix it in the easy way by converting it to qstring just like the other two tls parameters. Cc: qemu-sta...@nongnu.org # v4.0+ Fixes: d2f1d29b95 ("migration: add support for a "tls-authz" migration par

[PATCH for-8.2 0/4] qapi/migration: Dedup migration parameter objects and fix tls-authz crash

2023-08-14 Thread Peter Xu
Patch 1 fixes the tls-authz crashing when someone specifies "null" parameter for tls-authz. Patch 2 added a test case for all three tls-auth parameters specifying "null" to make sure nothing will crash ever with 'null' passed into it. Patch 3-4 are the proposed patches to deduplicate the three mi

Re: [PATCH v2] migration: refactor migration_completion

2023-08-14 Thread Isaku Yamahata
On Fri, Aug 04, 2023 at 05:30:53PM +0800, Wei Wang wrote: > Current migration_completion function is a bit long. Refactor the long > implementation into different subfunctions: > - migration_completion_precopy: completion code related to precopy > - migration_completion_postcopy: completion code

Re: [RFC PATCH 00/19] QEMU gmem implemention

2023-08-14 Thread Isaku Yamahata
On Thu, Aug 10, 2023 at 10:58:09AM -0500, Michael Roth via wrote: > On Tue, Aug 01, 2023 at 09:45:41AM +0800, Xiaoyao Li wrote: > > On 8/1/2023 12:51 AM, Daniel P. Berrangé wrote: > > > On Mon, Jul 31, 2023 at 12:21:42PM -0400, Xiaoyao Li wrote: > > > > This is the first RFC version of enabling K

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-08-14 Thread Peter Xu
On Mon, Aug 14, 2023 at 02:53:56PM -0400, Steven Sistare wrote: > > Can we just call vm_state_notify() earlier? > > We cannot. The guest is not running yet, and will not be until later. > We cannot call notifiers that perform actions that complete, or react to, > the guest entering a running sta

[PATCH] qxl: don't assert() if device isn't yet initialized

2023-08-14 Thread marcandre . lureau
From: Marc-André Lureau If the PCI BAR isn't yet mapped or was unmapped, QXL_IO_SET_MODE will assert(). Instead, report a guest bug and keep going. This can be reproduced with: cat << EOF | ./qemu-system-x86_64 -vga qxl -m 2048 -nodefaults -qtest stdio outl 0xcf8 0x8000101c outl 0xcfc 0xc000 ou

[PATCH for-8.2] target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix synchronization code

2023-08-14 Thread Thomas Huth
KVM_SYNC_GPRS, KVM_SYNC_ACRS, KVM_SYNC_CRS and KVM_SYNC_PREFIX are available since kernel 3.10. Since we already require at least kernel 3.15 in the s390x KVM code, we can assume that the KVM_CAP_SYNC_REGS sync code is always possible for these registers, and remove the related checks and fallbacks

[PATCH V3 06/10] tests/qtest: migration events

2023-08-14 Thread Steve Sistare
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas --- tests/qtest/migration-helpers.c

[PATCH V3 05/10] migration: preserve suspended for bg_migration

2023-08-14 Thread Steve Sistare
Do not wake a suspended guest during bg_migration. Signed-off-by: Steve Sistare --- migration/migration.c | 12 +--- softmmu/runstate.c| 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 1a5484a..e6b8024 100644 --

[PATCH V3 00/10] fix migration of suspended runstate

2023-08-14 Thread Steve Sistare
Migration of a guest in the suspended runstate is broken. The incoming migration code automatically tries to wake the guest, which is wrong; the guest should end migration in the same runstate it started. Further, for a restored snapshot, the automatic wakeup fails. The runstate is RUNNING, but

[PATCH V3 08/10] tests/qtest: precopy migration with suspend

2023-08-14 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-helpers.c | 3 ++ tests/qtest/migration-helpers.h | 3 +- tests/qtest/migrati

[PATCH V3 03/10] migration: add runstate function

2023-08-14 Thread Steve Sistare
Create a subroutine for preserving the runstate after migration, to be used in a subsequent patch. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas --- migration/migration.c | 14 ++ migration/migration.h | 1 + migration/savevm.c| 11 +--

[PATCH V3 02/10] migration: preserve suspended runstate

2023-08-14 Thread Steve Sistare
A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root causes is that the outgoing migration code automatically wakes the guest, then saves the RUNNING runstate in global_stat

[PATCH V3 10/10] tests/qtest: background migration with suspend

2023-08-14 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by a background migration. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 21 + 1 file changed, 21 insertions(+) diff --git a/t

[PATCH V3 07/10] tests/qtest: option to suspend during migration

2023-08-14 Thread Steve Sistare
Add an option to suspend the src in a-b-bootblock.S, which puts the guest in S3 state after one round of writing to memory. The option is enabled by poking a 1 into the suspend_me word in the boot block prior to starting the src vm. Generate symbol offsets in a-b-bootblock.h so that the suspend_m

[PATCH V3 09/10] tests/qtest: postcopy migration with suspend

2023-08-14 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by live migration postcopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 26 -- 1 file changed, 24 insertions(+), 2 deleti

[PATCH V3 01/10] vl: start on wakeup request

2023-08-14 Thread Steve Sistare
If qemu starts and loads a VM in the suspended state, then a later wakeup request directly sets the state to running. This skips vm_start() and its initialization steps, which is fatal for the guest. See qemu_system_wakeup_request(), and qemu_system_wakeup() in main_loop_should_exit(). Remember

[PATCH V3 04/10] migration: preserve suspended for snapshot

2023-08-14 Thread Steve Sistare
Restoring a snapshot can break a suspended guest. If a guest is suspended and saved to a snapshot using savevm, and qemu is terminated and restarted with the -S option, then loadvm does not restore the guest. The runstate is running, but the guest is not, because vm_start was not called. The roo

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-08-14 Thread Steven Sistare
On 7/26/2023 4:18 PM, Peter Xu wrote: > On Fri, Jun 30, 2023 at 09:50:41AM -0400, Steven Sistare wrote: >> On 6/26/2023 2:27 PM, Peter Xu wrote: >>> On Fri, Jun 23, 2023 at 02:25:05PM -0400, Steven Sistare wrote: On 6/21/2023 4:28 PM, Peter Xu wrote: > On Wed, Jun 21, 2023 at 03:15:42PM -0

[PATCH] trace-events: Fix the name of the tracing.rst file

2023-08-14 Thread Thomas Huth
The file has been converted to .rst a while ago - make sure that the references in the trace-events files are pointing to the right location now. Signed-off-by: Thomas Huth --- bsd-user/trace-events | 2 +- ebpf/trace-events | 2 +- hw/nubus/trace-events | 2 +- targe

[PATCH 3/4] replay: allow runstate shutdown->running when replaying trace

2023-08-14 Thread Nicholas Piggin
When replaying a trace, it is possible to go from shutdown to running with a reverse-debugging step. This can be useful if the problem being debugged triggers a reset or shutdown. Signed-off-by: Nicholas Piggin --- include/sysemu/runstate.h | 1 + replay/replay.c | 2 ++ softmmu/runs

[PATCH 1/4] scripts/replay_dump.sh: Update to current rr record format

2023-08-14 Thread Nicholas Piggin
This thing seems to have fallen by the wayside. This gets it working with the current format, although does not quite implement all events. Signed-off-by: Nicholas Piggin --- My python skills are not good. Any help on this or patch 2 is appreciated. Thanks, Nick scripts/replay-dump.py | 107 ++

[PATCH 4/4] replay: simple auto-snapshot mode for record

2023-08-14 Thread Nicholas Piggin
record makes an initial snapshot when the machine is created, to enable reverse-debugging. Often the issue being debugged appears near the end of the trace, so it is important for performance to keep snapshots close to the end. This implements a periodic snapshot mode that keeps a rolling set of r

[PATCH 2/4] tests/avocado: replay_linux.py add replay-dump.py test

2023-08-14 Thread Nicholas Piggin
This runs replay-dump.py after recording a trace, and fails the test if the script fails. replay-dump.py is modified to exit with non-zero if an error is encountered while parsing. Signed-off-by: Nicholas Piggin --- It's possible this could introduce failures to existing test if an unimplemented

[PATCH for-8.2 0/4] Assorted replay patches

2023-08-14 Thread Nicholas Piggin
Hi, These are a few small things I have found helpful while trying to implement and test rr changes. Patch 2 depends on 1, but otherwise the patches are independent. Thanks, Nick Nicholas Piggin (4): scripts/replay_dump.sh: Update to current rr record format tests/avocado: replay_linux.py ad

Re: [PATCH v2] virtio: don't zero out memory region cache for indirect descriptors

2023-08-14 Thread Stefan Hajnoczi
On Fri, Aug 11, 2023 at 04:34:23PM +0200, Ilya Maximets wrote: > Lots of virtio functions that are on a hot path in data transmission > are initializing indirect descriptor cache at the point of stack > allocation. It's a 112 byte structure that is getting zeroed out on > each call adding unnecess

Re: [PATCH QEMU v2 0/3] provide a smooth upgrade solution for multi-queues disk

2023-08-14 Thread Stefan Hajnoczi
On Fri, Aug 11, 2023 at 10:31:51AM +0800, Yong Huang wrote: > Hi, Stefan, thank you for your interest in this series. > I'm trying to explain my point, if you think my explanation > doesn't stand up, please let me know. > > On Fri, Aug 11, 2023 at 2:33 AM Stefan Hajnoczi wrote: > > > On Thu, Au

Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-08-14 Thread Moger, Babu
Hi Zhao, On 8/14/23 03:22, Zhao Liu wrote: > Hi Babu, > > On Fri, Aug 04, 2023 at 10:48:29AM -0500, Moger, Babu wrote: >> Date: Fri, 4 Aug 2023 10:48:29 -0500 >> From: "Moger, Babu" >> Subject: Re: [PATCH v3 14/17] i386: Use CPUCacheInfo.share_level to encode >> CPUID[4] >> >> Hi Zhao, >> >> O

Re: [PATCH for-8.2] s390x: Convert DPRINTF to trace events

2023-08-14 Thread Thomas Huth
On 04/08/2023 10.04, Cédric Le Goater wrote: Output message are slightly modified to ease selection with wildcards and to report extra parameters. Signed-off-by: Cédric Le Goater --- ... diff --git a/hw/s390x/trace-events b/hw/s390x/trace-events index 8b9213eab90c31d1eb37816d350bf76e902ccd10

Re: [RFC PATCH 00/24] plugins: Allow to read registers

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > I and other people in the University of Tokyo, where I research processor > design, found TCG plugins are very useful for processor design > exploration. Thanks for the submission - I've finished my initial review pass. I think introducing register introspection into t

Re: [RFC PATCH 24/24] contrib/plugins: Add cc plugin

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This demonstrates how to write a plugin in C++. > > Signed-off-by: Akihiko Odaki > --- > docs/devel/tcg-plugins.rst | 8 > configure | 15 --- > contrib/plugins/Makefile | 5 + > contrib/plugins/cc.cc | 15

Re: [RFC PATCH 22/24] contrib/plugins: Allow to log registers

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This demonstrates how a register can be read from a plugin. I think it would be a little more useful as a demo if it tracked changes to the register state rather than dumping it for every line executed. > > Signed-off-by: Akihiko Odaki > --- > docs/devel/tcg-plugins.

Re: [RFC PATCH 21/24] plugins: Allow to read registers

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > It is based on GDB protocol to ensure interface stability. See comments bellow. > The timing of the vcpu init hook is also changed so that the hook will > get called after GDB features are initialized. This might be worth splitting to a separate patch for cleaner bise

Re: [PATCH v2] ui/dbus: implement damage regions for GL

2023-08-14 Thread Marc-André Lureau
Hi On Mon, Aug 14, 2023 at 5:08 PM Bilal Elmoussaoui wrote: > > That is fine, it is not something we need urgently as we still need a kernel > patch to make virtio gpu use the KMS atomic API in Mutter. Am I supposed to > send a new patch with the "Reviewed-by" part in the commit message or? >

Re: [RFC PATCH 15/24] target/arm: Fill new members of GDBFeature

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > These members will be used to help plugins to identify registers. > > Signed-off-by: Akihiko Odaki > --- > target/arm/gdbstub.c | 46 +++--- > target/arm/gdbstub64.c | 42 +- > 2 files changed, 5

Re: [PATCH] migrate/multifd: fix coredump when the multifd thread cleanup

2023-08-14 Thread Fabiano Rosas
"chenyuhui (A)" via writes: > On 2023/7/26 0:53, Peter Xu wrote: >> On Tue, Jul 25, 2023 at 04:43:28PM +0800, chenyuhui (A) wrote: >>> @Peter Xu @Fabiano Rosas >>> Kindly ping on this. >> >> Ah I see what's missing - please copy maintainer (Juan) for any migration >> patches, especially multifd

[PATCH] tests/qemu-iotests/183: Fix timeout issue when running tests in parallel

2023-08-14 Thread Thomas Huth
When running "make check-block SPEED=slow -j$(nproc)", the test 183 fails due to the very low default timeout value since the system is quite loaded and thus slower in this case. We need a much higher value when running tests in parallel, so let's try to detect this situation by looking for "-j..."

Re: [PATCH v2 1/3] linux-headers: update asm-s390/kvm.h

2023-08-14 Thread Thomas Huth
Sorry, I should have mentioned this for v1 already, but better late than never: We need to replace this patch with a proper header update later (via the scripts/update-linux-headers.sh script) - so in case you respin, please mark it with NOTFORMERGE or PLACEHOLDER or something similar in the

Re: [PATCH 2/5] qemu-nbd: fix regression with qemu-nbd --fork run over ssh

2023-08-14 Thread Kevin Wolf
Am 17.07.2023 um 16:55 hat Denis V. Lunev geschrieben: > Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d > Author: Hanna Reitz > Date: Wed May 8 23:18:18 2019 +0200 > qemu-nbd: Do not close stderr > has introduced an interesting regression. Original behavior of > ssh somehost qem

Re: [PATCH] qemu_cleanup: begin drained section after vm_shutdown()

2023-08-14 Thread Kevin Wolf
Am 06.07.2023 um 16:43 hat Paolo Bonzini geschrieben: > Queued, thanks. This patch broke qemu-iotests 109 (for raw images), some block jobs get now paused once more. This is probably okay, but please double check and fix either the reference output or the code. Kevin

Re: [RFC PATCH 14/24] gdbstub: Add members to identify registers to GDBFeature

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > These members will be used to help plugins to identify registers. I'm wary of exposing gdb'isms directly to plugins. However making stuff easier for the gdbstub internals is ok. I shall reserve judgement until I've read the rest of the series. > The added members in i

Re: [RFC PATCH 12/24] gdbstub: Simplify XML lookup

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > Now we know all instances of GDBFeature that is used in CPU so we can > traverse them to find XML. This removes the need for a CPU-specific > lookup function for dynamic XMLs. > > Signed-off-by: Akihiko Odaki > --- > gdbstub/gdbstub.c | 28 +---

Re: [RFC PATCH 13/24] hw/core/cpu: Remove gdb_get_dynamic_xml member

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This function is no longer used. > > Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This is a tree-wide change to replace gdb_core_xml_file, the path to > GDB XML file with gdb_core_feature, the pointer to GDBFeature. This > also replaces the values assigned to gdb_num_core_regs with the > num_regs member of GDBFeature where applicable to remove magic n

Re: [RFC PATCH 10/24] gdbstub: Use GDBFeature for gdb_register_coprocessor

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This is a tree-wide change to introduce GDBFeature parameter to > gdb_register_coprocessor(). The new parameter just replaces num_regs > and xml parameters for now. GDBFeature will be utilized to simplify XML > lookup in a following change. > > Signed-off-by: Akihiko Oda

Re: [RFC PATCH 07/24] target/arm: Use GDBFeature for dynamic XML

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > In preparation for a change to use GDBFeature as a parameter of > gdb_register_coprocessor(), convert the internal representation of > dynamic feature from plain XML to GDBFeature. FWIW one of the aims I had with my stalled rewrite of the register API was to move all th

Re: [PATCH v2] ui/dbus: implement damage regions for GL

2023-08-14 Thread Bilal Elmoussaoui
That is fine, it is not something we need urgently as we still need a kernel patch to make virtio gpu use the KMS atomic API in Mutter. Am I supposed to send a new patch with the "Reviewed-by" part in the commit message or? On Mon, Aug 14, 2023 at 3:02 PM Marc-André Lureau < marcandre.lur...@redha

Re: [PATCH v2] ui/dbus: implement damage regions for GL

2023-08-14 Thread Marc-André Lureau
Hi On Mon, Aug 14, 2023 at 4:58 PM Bilal Elmoussaoui wrote: > > Currently, when using `-display dbus,gl=on` all updates to the client > become "full scanout" updates, meaning there is no way for the client to > limit damage regions to the display server. > > Instead of using an "update count", th

Re: [PATCH] ui/dbus: implement damage regions for GL

2023-08-14 Thread Bilal Elmoussaoui
Thanks for the quick review! I have sent a v2 with the requested changes. On Mon, Aug 14, 2023 at 2:41 PM Marc-André Lureau < marcandre.lur...@gmail.com> wrote: > Hi > > On Mon, Aug 14, 2023 at 4:10 PM Bilal Elmoussaoui > wrote: > > > > Currently, when using `-display dbus,gl=on` all updates to

[PATCH v2] ui/dbus: implement damage regions for GL

2023-08-14 Thread Bilal Elmoussaoui
Currently, when using `-display dbus,gl=on` all updates to the client become "full scanout" updates, meaning there is no way for the client to limit damage regions to the display server. Instead of using an "update count", this patch tracks the damage region and propagates it to the client. This

Re: [RFC PATCH 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This is a tree-wide change to replace gdb_core_xml_file, the path to > GDB XML file with gdb_core_feature, the pointer to GDBFeature. This > also replaces the values assigned to gdb_num_core_regs with the > num_regs member of GDBFeature where applicable to remove magic n

qemu-system-riscv64 -cpu host uses wrong privilege spec version

2023-08-14 Thread Andreas Schwab
When running a KVM enabled qemu inside a qemu instance, I get these warnings: $ qemu-system-riscv64 -cpu host -machine virt,accel=kvm qemu-system-riscv64: warning: disabling h extension for hart 0x because privilege spec version does not match qemu-system-riscv64: warning: disabli

Re: [PATCH] ui/dbus: implement damage regions for GL

2023-08-14 Thread Marc-André Lureau
Hi On Mon, Aug 14, 2023 at 4:10 PM Bilal Elmoussaoui wrote: > > Currently, when using `-display dbus,gl=on` all updates to the client > become "full scanout" updates, meaning there is no way for the client to > limit damage regions to the display server. > > Instead of using an "update count", th

Re: [PATCH] i386/xen: Don't advertise XENFEAT_supervisor_mode_kernel

2023-08-14 Thread Paul Durrant
On 08/08/2023 18:08, David Woodhouse wrote: From: David Woodhouse XENFEAT_supervisor_mode_kernel shouldn't be set for HVM guests. It confuses lscpu into thinking it's running in PVH mode. No non-cosmetic effects have been observed so far. Signed-off-by: David Woodhouse --- Only really cosmet

Re: [RFC PATCH post-8.1] hw/xen: Clean up event channel 'type_val' handling to use union

2023-08-14 Thread Paul Durrant
On 03/08/2023 16:28, David Woodhouse wrote: From: David Woodhouse A previous implementation of this stuff used a 64-bit field for all of the port information (vcpu/type/type_val) and did atomic exchanges on them. When I implemented that in Qemu I regretted my life choices and just kept it simpl

Re: [PATCH 1/2] vhost-user: fix lost reconnect

2023-08-14 Thread Raphael Norwitz
Why can’t we rather fix this by adding a “event_cb” param to vhost_user_async_close and then call qemu_chr_fe_set_handlers in vhost_user_async_close_bh()? Even if calling vhost_dev_cleanup() twice is safe today I worry future changes may easily stumble over the reconnect case and introduce cras

Re: [PATCH 2/2] vhost: Add Error parameter to vhost_scsi_common_start()

2023-08-14 Thread Raphael Norwitz
Thanks for the cleanup! A few comments. > On Aug 4, 2023, at 1:29 AM, Li Feng wrote: > > Add a Error parameter to report the real error, like vhost-user-blk. > > Signed-off-by: Li Feng > --- > hw/scsi/vhost-scsi-common.c | 17 ++--- > hw/scsi/vhost-scsi.c

[PATCH] ui/dbus: implement damage regions for GL

2023-08-14 Thread Bilal Elmoussaoui
Currently, when using `-display dbus,gl=on` all updates to the client become "full scanout" updates, meaning there is no way for the client to limit damage regions to the display server. Instead of using an "update count", this patch tracks the damage region and propagates it to the client. This

Re: [RFC PATCH 04/24] gdbstub: Introduce gdb_find_static_feature()

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > This function is useful to determine the number of registers exposed to > GDB from the XML name. > > Signed-off-by: Akihiko Odaki > --- > include/exec/gdbstub.h | 2 ++ > gdbstub/gdbstub.c | 13 + > 2 files changed, 15 insertions(+) > > diff --git a/i

Re: [RFC PATCH 03/24] gdbstub: Add num_regs member to GDBFeature

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > Currently the number of registers exposed to GDB is written as magic > numbers in code. Derive the number of registers GDB actually see from > XML files to replace the magic numbers in code later. > > Signed-off-by: Akihiko Odaki Reviewed-by: Alex Bennée -- Alex Ben

Re: [RFC PATCH 02/24] gdbstub: Introduce GDBFeature structure

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > Before this change, the information from a XML file was stored in an > array that is not descriptive. Introduce a dedicated structure type to > make it easier to understand and to extend with more fields. > > Signed-off-by: Akihiko Odaki with Phillipe's suggested updat

Re: qemu-system-m68k: ../hw/scsi/scsi-disk.c:557: scsi_write_data: Assertion `r->req.aiocb == NULL' failed.

2023-08-14 Thread Thomas Huth
On 13/08/2023 09.46, Waldemar Brodkorb wrote: Hi, I am using Qemu 8.0.3 and getting this error: qemu-system-m68k: ../hw/scsi/scsi-disk.c:557: scsi_write_data: Assertion `r->req.aiocb == NULL' failed. It happens f.e. when I extract the glibc source code inside Linux. Linux 6.1.44, glibc 2.38 is

Re: [RFC PATCH 01/24] contrib/plugins: Use GRWLock in execlog

2023-08-14 Thread Alex Bennée
Akihiko Odaki writes: > execlog had the following comment: >> As we could have multiple threads trying to do this we need to >> serialise the expansion under a lock. Threads accessing already >> created entries can continue without issue even if the ptr array >> gets reallocated during resize.

Re: [PATCH] Add api to read CPU registers in TCG plugins

2023-08-14 Thread Alex Bennée
Mikhail Tyutin writes: > From: Aleksandr Anenkov > > This commit: > - adds a plugin API to read the registers of the current CPU > - introduces qemu_plugin_reg_ctx structure for faster data gathering of > a set of registers without memory reallocation > - adds an example plugin showing how t

Re: [RFC PATCH 2/5] HACK: target/arm/tcg: Add some more caches to cpu=max

2023-08-14 Thread Alex Bennée
Jonathan Cameron writes: > Used to drive the MPAM cache intialization and to exercise more > of the PPTT cache entry generation code. Perhaps a default > L3 cache is acceptable for max? > > Signed-off-by: Jonathan Cameron > --- > target/arm/tcg/cpu64.c | 12 > 1 file changed, 12

Re: [PATCH v3 00/15] linux-user: Implement VDSOs

2023-08-14 Thread Alex Bennée
Richard Henderson writes: > It's time for another round on implementing the VDSO for linux-user. > We are now seeing applications built that absolutely require it, > and have no fallback for the VDSO to be absent. Something broke configure for me: ../../configure --disable-docs --disable-s

Re: [RFC PATCH 1/5] hw/acpi: Add PPTT cache descriptions

2023-08-14 Thread Zhao Liu
Hi Jonathan, On Tue, Aug 08, 2023 at 12:57:09PM +0100, Jonathan Cameron via wrote: > Date: Tue, 8 Aug 2023 12:57:09 +0100 > From: Jonathan Cameron via > Subject: [RFC PATCH 1/5] hw/acpi: Add PPTT cache descriptions > X-Mailer: git-send-email 2.39.2 > > Current PPTT tables generated by QEMU only

[PATCH v2 4/4] iotests: test the zoned format feature for qcow2 file

2023-08-14 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check zoned-qcow2 Signed-off-by: Sam Li --- tests/qemu-iotests/tests/zoned-qcow2 | 135 ++ tests/qemu-iotests/tests/zoned-qcow2.out | 140 +++ 2 files changed, 275 insertions(+) create mo

[PATCH v2 0/4] Add full zoned storage emulation to qcow2 driver

2023-08-14 Thread Sam Li
This patch series add a new extension - zoned format - to the qcow2 driver thereby allowing full zoned storage emulation on the qcow2 img file. Users can attach such a qcow2 file to the guest as a zoned device. To create a qcow2 file with zoned format, use command like this: $ qemu-img create -f q

[PATCH v2 1/4] docs/qcow2: add the zoned format feature

2023-08-14 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. If the zoned_profile is set to `zbc`, then the qcow2 file can be taken as zoned device and passed through by virtio-blk device to the guest. If it's `zns`, then it can be passed through by virtio-blk device or NVMe ZNS device as a ZNS

Re: [PATCH v5 08/11] target/loongarch: Reject la64-only instructions in la32 mode

2023-08-14 Thread gaosong
在 2023/8/11 下午11:18, Richard Henderson 写道: On 8/11/23 01:12, gaosong wrote: +TRANS_64(sra_d, gen_rrr, EXT_NONE, EXT_NONE, EXT_NONE, gen_sra_d)   TRANS(rotr_w, gen_rrr, EXT_ZERO, EXT_NONE, EXT_SIGN, gen_rotr_w) TRANS_64(rotr_w, ...) ...   TRANS(rotri_w, gen_rri_v, EXT_NONE, EXT_NONE, gen_rotr_

[PATCH v2 3/4] qcow2: add zoned emulation capability

2023-08-14 Thread Sam Li
By adding zone operations and zoned metadata, the zoned emulation capability enables full emulation support of zoned device using a qcow2 file. The zoned device metadata includes zone type, zoned device state and write pointer of each zone, which is stored to an array of unsigned integers. Each zo

[PATCH v2 2/4] qcow2: add configurations for zoned format extension

2023-08-14 Thread Sam Li
To configure the zoned format feature on the qcow2 driver, it requires following arguments: the device size, zoned profile, zoned model, zone size, zone capacity, number of conventional zones, limits on zone resources (max append sectors, max open zones, and max_active_zones). The zoned profile opt

Re: [PATCH 5/5] target/arm: Implement cortex-a710

2023-08-14 Thread Marcin Juszkiewicz
W dniu 10.08.2023 o 19:12, Peter Maydell pisze: On Thu, 10 Aug 2023 at 18:05, Richard Henderson On 8/10/23 08:49, Peter Maydell wrote: On Thu, 10 Aug 2023 at 03:36, Richard Henderson Will sbsa-ref want this core ? It only has 40 PA bits, and I think sbsa-ref requires 48. Yes, it does w

Re: [PATCH v5 1/5] ebpf: Added eBPF map update through mmap.

2023-08-14 Thread Andrew Melnichenko
Hi, all. I've researched an issue a bit. And what can we do? In the case of an "old" kernel 5.4, we need to load RSS eBPF without BPF_F_MAPPABLE and use bpf syscall to update the maps. This requires additional capabilities, and the libvirtd will never give any capabilities to Qemu. So, the only ca

  1   2   >