[PATCH 3/3] target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list

2024-04-19 Thread Thomas Huth
Printing a "PowerPC" in front of each CPU name is not helpful at all: It is confusing for the users since they don't know whether they have to specify these letters for the "-cpu" parameter, too, and it also takes some precious space in the dense output of the CPU entries. Let's simply remove this

[PATCH 1/3] target/i386/cpu: Remove "x86" prefix from the CPU list

2024-04-19 Thread Thomas Huth
Printing an "x86" in front of each CPU name is not helpful at all: It is confusing for the users since they don't know whether they have to specify these letters for the "-cpu" parameter, too, and it also takes some precious space in the dense output of the CPU entries. Let's simply remove this now

[PATCH 0/3] Remove useless architecture prefix from the CPU list

2024-04-19 Thread Thomas Huth
Printing an architecture prefix in front of each CPU name is not helpful at all: It is confusing for the users since they don't know whether they have to specify these letters for the "-cpu" parameter, too, and it also takes some precious space in the dense output of the CPU entries. Let's simply r

[PATCH 2/3] target/s390x/cpu_models: Rework the output of "-cpu help"

2024-04-19 Thread Thomas Huth
Printing an "s390x" in front of each CPU name is not helpful at all: It is confusing for the users since they don't know whether they have to specify these letters for the "-cpu" parameter, too, and it also takes some precious space in the dense output of the CPU entries. Let's simply remove this n

Re: [PATCH 4/5] docs/system/target-sparc: Improve the Sparc documentation

2024-04-19 Thread Mark Cave-Ayland
On 20/04/2024 00:14, Brad Smith wrote: On 2024-04-18 4:27 p.m., Mark Cave-Ayland wrote: On 07/03/2024 17:43, Thomas Huth wrote: Add some words about how to enable or disable boolean features, and remove the note about a Linux kernel being available on the QEMU website (they have been removed

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-19 Thread Mark Cave-Ayland
On 20/04/2024 02:21, Richard Henderson wrote: On 4/19/24 12:51, Mark Cave-Ayland wrote: The various Intel CPU manuals claim that SGDT and SIDT can write either 24-bits or 32-bits depending upon the operand size, but this is incorrect. Not only do the Intel CPU manuals give contradictory informa

[PATCH v9 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-04-19 Thread dongwon . kim
From: Dongwon Kim New header and source files are added for containing QemuDmaBuf struct definition and newly introduced helpers for creating/freeing the struct and accessing its data. Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signe

[PATCH v9 3/6] ui/console: Use qemu_dmabuf_get_..() helpers instead

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This commit updates all instances where fields within the QemuDmaBuf struct are directly accessed, replacing them with calls to these new helper functions. v6: fix typos in helper names in ui/spice-display.c v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of h

[PATCH v9 5/6] ui/console: Use qemu_dmabuf_new() and free() helpers instead

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This commit introduces utility functions for the creation and deallocation of QemuDmaBuf instances. Additionally, it updates all relevant sections of the codebase to utilize these new utility functions. v7: remove prefix, "dpy_gl_" from all helpers qemu_dmabuf_free() return

[PATCH v9 0/6] ui/console: Private QemuDmaBuf struct

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This series introduces privacy enhancements to the QemuDmaBuf struct and its contained data to bolster security. it accomplishes this by introducing of helper functions for allocating, deallocating, and accessing individual fields within the struct and replacing all direct refer

[PATCH v9 6/6] ui/console: move QemuDmaBuf struct def to dmabuf.c

2024-04-19 Thread dongwon . kim
From: Dongwon Kim To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def is moved to dmabuf.c Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/dmabuf.h | 19 +-- ui/

[PATCH v9 1/6] ui/gtk: Check if fence_fd is equal to or greater than 0

2024-04-19 Thread dongwon . kim
From: Dongwon Kim 'fence_fd' needs to be validated always before being referenced And the passing condition should include '== 0' as 0 is a valid value for the file descriptor. Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signed-off-by

[PATCH v9 4/6] ui/console: Use qemu_dmabuf_set_..() helpers instead

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This commit updates all occurrences where these fields were set directly have been updated to utilize helper functions. v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of helpers was removed as those were already added by the previous commit Suggested-by:

Re: [PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-19 Thread Richard Henderson
On 4/19/24 12:51, Mark Cave-Ayland wrote: The various Intel CPU manuals claim that SGDT and SIDT can write either 24-bits or 32-bits depending upon the operand size, but this is incorrect. Not only do the Intel CPU manuals give contradictory information between processor revisions, but this infor

Re: [RFC 1/2] iova_tree: add an id member to DMAMap

2024-04-19 Thread Si-Wei Liu
On 4/19/2024 1:29 AM, Eugenio Perez Martin wrote: On Thu, Apr 18, 2024 at 10:46 PM Si-Wei Liu wrote: On 4/10/2024 3:03 AM, Eugenio Pérez wrote: IOVA tree is also used to track the mappings of virtio-net shadow virtqueue. This mappings may not match with the GPA->HVA ones. This causes a

Re: [PATCH 4/5] docs/system/target-sparc: Improve the Sparc documentation

2024-04-19 Thread Brad Smith
On 2024-04-18 4:27 p.m., Mark Cave-Ayland wrote: On 07/03/2024 17:43, Thomas Huth wrote: Add some words about how to enable or disable boolean features, and remove the note about a Linux kernel being available on the QEMU website (they have been removed long ago already). Signed-off-by: Thomas

Issue#414 and qemu_mutex_lock() API Conversion

2024-04-19 Thread Vilhelm Gyda
Hi, I am new here, so I found some issues suitable for beginners at [1]. I am currently looking at the API Conversion task of replacing `qemu_mutex_lock()` and `qemu_mutex_unlock()` with `QEMU_LOCK_GUARD()` After reading the macro definition of `QEMU_LOCK_GUARD()` and `WITH_QEMU_LOCK_GUARD()`, I

[PATCH] target/i386/translate.c: always write 32-bits for SGDT and SIDT

2024-04-19 Thread Mark Cave-Ayland
The various Intel CPU manuals claim that SGDT and SIDT can write either 24-bits or 32-bits depending upon the operand size, but this is incorrect. Not only do the Intel CPU manuals give contradictory information between processor revisions, but this information doesn't even match real-life behaviou

[PATCH v8 2/6] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

2024-04-19 Thread dongwon . kim
From: Dongwon Kim New header and source files are added for containing QemuDmaBuf struct definition and newly introduced helpers for creating/freeing the struct and accessing its data. Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signe

[PATCH v8 5/6] ui/console: Use qemu_dmabuf_new() and free() helpers instead

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This commit introduces utility functions for the creation and deallocation of QemuDmaBuf instances. Additionally, it updates all relevant sections of the codebase to utilize these new utility functions. v7: remove prefix, "dpy_gl_" from all helpers qemu_dmabuf_free() return

[PATCH v8 1/6] ui/gtk: Check if fence_fd is equal to or greater than 0

2024-04-19 Thread dongwon . kim
From: Dongwon Kim 'fence_fd' needs to be validated always before being referenced And the passing condition should include '== 0' as 0 is a valid value for the file descriptor. Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signed-off-by

[PATCH v8 6/6] ui/console: move QemuDmaBuf struct def to dmabuf.c

2024-04-19 Thread dongwon . kim
From: Dongwon Kim To complete privatizing process of QemuDmaBuf, QemuDmaBuf struct def is moved to dmabuf.c Suggested-by: Marc-André Lureau Cc: Philippe Mathieu-Daudé Cc: Daniel P. Berrangé Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/dmabuf.h | 19 +-- ui/

[PATCH v8 0/6] ui/console: Private QemuDmaBuf struct

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This series introduces privacy enhancements to the QemuDmaBuf struct and its contained data to bolster security. it accomplishes this by introducing of helper functions for allocating, deallocating, and accessing individual fields within the struct and replacing all direct refer

[PATCH v8 4/6] ui/console: Use qemu_dmabuf_set_..() helpers instead

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This commit updates all occurrences where these fields were set directly have been updated to utilize helper functions. v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of helpers was removed as those were already added by the previous commit Suggested-by:

[PATCH v8 3/6] ui/console: Use qemu_dmabuf_get_..() helpers instead

2024-04-19 Thread dongwon . kim
From: Dongwon Kim This commit updates all instances where fields within the QemuDmaBuf struct are directly accessed, replacing them with calls to these new helper functions. v6: fix typos in helper names in ui/spice-display.c v7: removed prefix, "dpy_gl_" from all helpers v8: Introduction of h

[PATCH 0/3] target/arm: Make the counter frequency default 1GHz for new CPUs, machines

2024-04-19 Thread Peter Maydell
In previous versions of the Arm architecture, the frequency of the generic timers as reported in CNTFRQ_EL0 could be any IMPDEF value, and for QEMU we picked 62.5MHz, giving a timer tick period of 16ns. In Armv8.6, the architecture standardized this frequency to 1GHz. Because there is no ID regist

[PATCH 1/3] hw: Add compat machines for 9.1

2024-04-19 Thread Peter Maydell
From: Paolo Bonzini Add 9.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Cc: Cornelia Huck Cc: Thomas Huth Cc: Harsh Prateek Bora Cc: Gavin Shan Signed-off-by: Paolo Bonzini Acked-by: Thomas Huth Reviewed-by: Cornelia Huck Reviewed-by: Harsh Prateek Bora Reviewed-by: Zhao Liu [PMM

[PATCH 2/3] target/arm: Refactor default generic timer frequency handling

2024-04-19 Thread Peter Maydell
The generic timer frequency is settable by board code via a QOM property "cntfrq", but otherwise defaults to 62.5MHz. The way this is done includes some complication resulting from how this was originally a fixed value with no QOM property. Clean it up: * always set cpu->gt_cntfrq_hz to some se

[PATCH 3/3] target/arm: Default to 1GHz cntfrq for 'max' and new CPUs

2024-04-19 Thread Peter Maydell
In previous versions of the Arm architecture, the frequency of the generic timers as reported in CNTFRQ_EL0 could be any IMPDEF value, and for QEMU we picked 62.5MHz, giving a timer tick period of 16ns. In Armv8.6, the architecture standardized this frequency to 1GHz. Because there is no ID regist

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-04-19 Thread fan
On Fri, Apr 19, 2024 at 02:24:36PM -0400, Gregory Price wrote: > On Thu, Apr 18, 2024 at 04:10:51PM -0700, nifan@gmail.com wrote: > > A git tree of this series can be found here (with one extra commit on top > > for printing out accepted/pending extent list): > > https://github.com/moking/qemu

[PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-04-19 Thread Dorjoy Chowdhury
Some ARM CPUs advertise themselves as SMT by having the MT[24] bit set to 1 in the MPIDR register. These CPUs have the thread id in Aff0[7:0] bits, CPU id in Aff1[15:8] bits and cluster id in Aff2[23:16] bits in MPIDR. On the other hand, ARM CPUs without SMT have the MT[24] bit set to 0, CPU id in

Re: [PATCH v7 00/12] Enabling DCD emulation support in Qemu

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:51PM -0700, nifan@gmail.com wrote: > A git tree of this series can be found here (with one extra commit on top > for printing out accepted/pending extent list): > https://github.com/moking/qemu/tree/dcd-v7 > > v6->v7: > > 1. Fixed the dvsec range register issue

Re: [PATCH v2 3/4] docs/system/target-sparc: Improve the Sparc documentation

2024-04-19 Thread Peter Maydell
On Fri, 19 Apr 2024 at 09:49, Thomas Huth wrote: > > Add some words about how to enable or disable boolean features, > and remove the note about a Linux kernel being available on the > QEMU website (they have been removed long ago already), and the > note about NetBSD and OpenBSD still having issu

Re: [PATCH v7 12/12] hw/mem/cxl_type3: Allow to release extent superset in QMP interface

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:11:03PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Before the change, the QMP interface used for add/release DC extents > only allows to release an extent whose DPA range is contained by a single > accepted extent in the device. > > With the change, we relax

Re: [PATCH v7 11/12] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:11:02PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > With the change, we extend the extent release mailbox command processing > to allow more flexible release. As long as the DPA range of the extent to > release is covered by accepted extent(s) in the device, th

Re: [PATCH v7 08/12] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:59PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Per CXL spec 3.1, two mailbox commands are implemented: > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.9.9.3, and > Release Dynamic Capacity (Opcode 4803h) 8.2.9.9.9.4. > > For the process of the above

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:11:00PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > To simulate FM functionalities for initiating Dynamic Capacity Add > (Opcode 5604h) and Dynamic Capacity Release (Opcode 5605h) as in CXL spec > r3.1 7.6.7.6.5 and 7.6.7.6.6, we implemented two QMP interfaces

Re: [PATCH v2 3/4] docs/system/target-sparc: Improve the Sparc documentation

2024-04-19 Thread Mark Cave-Ayland
On 19/04/2024 09:48, Thomas Huth wrote: Add some words about how to enable or disable boolean features, and remove the note about a Linux kernel being available on the QEMU website (they have been removed long ago already), and the note about NetBSD and OpenBSD still having issues (they should w

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 18:36, Ard Biesheuvel wrote: > > On Fri, 19 Apr 2024 at 18:09, Jonathan Cameron via groups.io > wrote: > > > > On Fri, 19 Apr 2024 13:52:07 +0200 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > Gerd, any ideas? Maybe I needs something subtly different in my > > > >

Re: [PATCH 1/5] docs/system/arm/emulation.rst: Add missing implemented features

2024-04-19 Thread Peter Maydell
On Thu, 18 Apr 2024 at 16:20, Peter Maydell wrote: > > As of version DDI0487K.a of the Arm ARM, some architectural features > which previously didn't have official names have been named. Add > these to the list of features which QEMU's TCG emulation supports. > Mostly these are features which we

Re: [PATCH v5 0/3] Add support for the RAPL MSRs series

2024-04-19 Thread Paolo Bonzini
On Wed, Apr 17, 2024 at 7:58 PM Daniel P. Berrangé wrote: > > > However, one question remains unanswered pointing the issue with the > > > location of "/var/local/run/qemu-vmsr-helper.sock", created by > > > compute_default_paths(). QEMU is not allowed to reach the socket here. > > > > If I unders

Re: [PATCH v7 06/12] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:57PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Add (file/memory backed) host backend for DCD. All the dynamic capacity > regions will share a single, large enough host backend. Set up address > space for DC regions to support read/write operations to dynam

Re: Add 'info pg' command to monitor

2024-04-19 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Tue, 16 Apr 2024 at 19:11, Don Porter wrote: > > > > On 4/16/24 13:03, Peter Maydell wrote: > > > On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: > > >> There is still a lot I am learning about the code base, but it seems > > >> that qemu_get

Re: [PATCH 24/27] docs/qapi-domain: add type cross-refs to field lists

2024-04-19 Thread John Snow
On Fri, Apr 19, 2024 at 12:38 AM John Snow wrote: > > This commit, finally, adds cross-referencing support to various field > lists; modeled tightly after Sphinx's own Python domain code. > > Cross-referencing support is added to type names provided to :arg:, > :memb:, :returns: and :choice:. > >

Re: [PATCH v7 10/12] hw/mem/cxl_type3: Add DPA range validation for accesses to DC regions

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:11:01PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > All DPA ranges in the DC regions are invalid to access until an extent > covering the range has been successfully accepted by the host. A bitmap > is added to each region to record whether a DC block in the re

Re: [PATCH v7 07/12] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:58PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Add dynamic capacity extent list representative to the definition of > CXLType3Dev and implement get DC extent list mailbox command per > CXL.spec.3.1:.8.2.9.9.9.2. > > Reviewed-by: Jonathan Cameron > Signed

Re: [PATCH v7 04/12] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:55PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > With the change, when setting up memory for type3 memory device, we can > create DC regions. > A property 'num-dc-regions' is added to ct3_props to allow users to pass the > number of DC regions to create. To

Re: [PATCH v7 03/12] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:54PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Rename mem_size as static_mem_size for type3 memdev to cover static RAM and > pmem capacity, preparing for the introduction of dynamic capacity to support > dynamic capacity devices. > > Reviewed-by: Jonathan

Re: [PATCH v7 02/12] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:53PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Per cxl spec r3.1, add dynamic capacity region representative based on > Table 8-165 and extend the cxl type3 device definition to include DC region > information. Also, based on info in 8.2.9.9.9.1, add 'Get

Re: [PATCH v7 01/12] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:52PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > Based on CXL spec r3.1 Table 8-127 (Identify Memory Device Output > Payload), dynamic capacity event log size should be part of > output of the Identify command. > Add dc_event_log_size to the output payload f

Re: [PATCH v7 05/12] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size instead of mr as argument

2024-04-19 Thread Gregory Price
On Thu, Apr 18, 2024 at 04:10:56PM -0700, nifan@gmail.com wrote: > From: Fan Ni > > The function ct3_build_cdat_entries_for_mr only uses size of the passed > memory region argument, refactor the function definition to make the passed > arguments more specific. > > Reviewed-by: Jonathan Camer

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 18:09, Jonathan Cameron via groups.io wrote: > > On Fri, 19 Apr 2024 13:52:07 +0200 > Gerd Hoffmann wrote: > > > Hi, > > > > > Gerd, any ideas? Maybe I needs something subtly different in my > > > edk2 build? I've not looked at this bit of the qemu infrastructure > > >

Re: [PATCH 00/27] Add qapi-domain Sphinx extension

2024-04-19 Thread John Snow
On Fri, Apr 19, 2024, 10:45 AM Markus Armbruster wrote: > John Snow writes: > > > This series adds a new qapi-domain extension for Sphinx, which adds a > > series of custom directives for documenting QAPI definitions. > > > > GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/1259566476 > > >

Re: [PATCH] hw/core/clock: always iterate through childs in clock_propagate_period

2024-04-19 Thread Philippe Mathieu-Daudé
On 19/4/24 18:08, Raphael Poggi wrote: Hi Peter, Le ven. 19 avr. 2024 à 16:08, Peter Maydell a écrit : On Thu, 18 Apr 2024 at 21:39, Raphael Poggi wrote: Hi Philippe, Le jeu. 18 avr. 2024 à 20:43, Philippe Mathieu-Daudé a écrit : Hi Raphael, On 18/4/24 21:16, Raphael Poggi wrote: Whe

[PATCH] hw/core/clock: remove assert in clock_propagate

2024-04-19 Thread Raphael Poggi
This commit allows childs clock to propagate their new frequency, for example, after setting a new multiplier/diviser. Signed-off-by: Raphael Poggi --- hw/core/clock.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/clock.c b/hw/core/clock.c index 85421f8b55..174c8be095 100644 --- a/h

Re: [PATCH v2 02/22] target/arm: Add confidential guest support

2024-04-19 Thread Daniel P . Berrangé
On Fri, Apr 19, 2024 at 04:56:50PM +0100, Jean-Philippe Brucker wrote: > Add a new RmeGuest object, inheriting from ConfidentialGuestSupport, to > support the Arm Realm Management Extension (RME). It is instantiated by > passing on the command-line: > > -M virt,confidential-guest-support= > -o

Re: [PATCH] hw/core/clock: always iterate through childs in clock_propagate_period

2024-04-19 Thread Peter Maydell
On Fri, 19 Apr 2024 at 17:09, Raphael Poggi wrote: > > Hi Peter, > > Le ven. 19 avr. 2024 à 16:08, Peter Maydell a > écrit : > > > > On Thu, 18 Apr 2024 at 21:39, Raphael Poggi > > wrote: > > > There is an assert "assert(clk->source == NULL);" in clock_propagate(). > > > If I am not wrong, clk-

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Jonathan Cameron via
On Fri, 19 Apr 2024 13:52:07 +0200 Gerd Hoffmann wrote: > Hi, > > > Gerd, any ideas? Maybe I needs something subtly different in my > > edk2 build? I've not looked at this bit of the qemu infrastructure > > before - is there a document on how that image is built? > > There is roms/Makefil

Re: [PATCH] hw/core/clock: always iterate through childs in clock_propagate_period

2024-04-19 Thread Raphael Poggi
Hi Peter, Le ven. 19 avr. 2024 à 16:08, Peter Maydell a écrit : > > On Thu, 18 Apr 2024 at 21:39, Raphael Poggi > wrote: > > > > Hi Philippe, > > > > Le jeu. 18 avr. 2024 à 20:43, Philippe Mathieu-Daudé > > a écrit : > > > > > > Hi Raphael, > > > > > > On 18/4/24 21:16, Raphael Poggi wrote: > >

[PATCH v2 06/22] hw/arm/virt: Disable DTB randomness for confidential VMs

2024-04-19 Thread Jean-Philippe Brucker
The dtb-randomness feature, which adds random seeds to the DTB, isn't really compatible with confidential VMs since it randomizes the Realm Initial Measurement. Enabling it is not an error, but it prevents attestation. It also isn't useful to a Realm, which doesn't trust host input. Currently the

[PATCH v2 18/22] target/arm/kvm: Disable Realm reboot

2024-04-19 Thread Jean-Philippe Brucker
A realm cannot be reset, it must be recreated from scratch. The RMM specification defines states of a Realm as NEW -> ACTIVE -> SYSTEM_OFF, after which the Realm can only be destroyed. A PCSI_SYSTEM_RESET call, which normally reboots the system, puts the Realm in SYSTEM_OFF state. QEMU does not su

[PATCH v2 19/22] target/arm/cpu: Inform about reading confidential CPU registers

2024-04-19 Thread Jean-Philippe Brucker
The host cannot access registers of a Realm. Instead of showing all registers as zero in "info registers", display a message about this restriction. Signed-off-by: Jean-Philippe Brucker --- v1->v2: new --- target/arm/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/arm/cpu.c

[PATCH v2 13/22] hw/arm/boot: Register Linux BSS section for confidential guests

2024-04-19 Thread Jean-Philippe Brucker
Although the BSS section is not currently part of the kernel blob, it needs to be registered as guest RAM for confidential guest support, because the kernel needs to access it before it is able to setup its RAM regions. It would be tempting to simply add the BSS as part of the ROM blob (ie pass ke

[PATCH v2 15/22] target/arm/kvm-rme: Add measurement algorithm property

2024-04-19 Thread Jean-Philippe Brucker
This option selects which measurement algorithm to use for attestation. Supported values are SHA256 and SHA512. Default to SHA512 arbitrarily. SHA512 is generally faster on 64-bit architectures. On a few arm64 CPUs I tested SHA256 is much faster, but that's most likely because they only support ac

[PATCH v2 04/22] target/arm/kvm-rme: Initialize realm

2024-04-19 Thread Jean-Philippe Brucker
The machine code calls kvm_arm_rme_vm_type() to get the VM flag and KVM calls kvm_arm_rme_init() to issue KVM hypercalls: * create the realm descriptor, * load images into Realm RAM (in another patch), * finalize the REC (vCPU) after the registers are reset, * activate the realm at the end, at whi

[PATCH v2 09/22] target/arm/kvm-rme: Initialize vCPU

2024-04-19 Thread Jean-Philippe Brucker
The target code calls kvm_arm_vcpu_init() to mark the vCPU as part of a Realm. For a Realm vCPU, only x0-x7 can be set at runtime. Before boot, the PC can also be set, and is ignored at runtime. KVM also accepts a few system register changes during initial configuration, as returned by KVM_GET_REG_

[PATCH v2 16/22] target/arm/cpu: Set number of breakpoints and watchpoints in KVM

2024-04-19 Thread Jean-Philippe Brucker
Add "num-breakpoints" and "num-watchpoints" CPU parameters to configure the debug features that KVM presents to the guest. The KVM vCPU configuration is modified by calling SET_ONE_REG on the ID register. This is needed for Realm VMs, whose parameters include breakpoints and watchpoints, and influ

[PATCH v2 11/22] hw/core/loader: Add ROM loader notifier

2024-04-19 Thread Jean-Philippe Brucker
Add a function to register a notifier, that is invoked after a ROM gets loaded into guest memory. It will be used by Arm confidential guest support, in order to register all blobs loaded into memory with KVM, so that their content is part of the initial VM measurement and contribute to the guest a

[PATCH v2 21/22] hw/arm/virt: Move virt_flash_create() to machvirt_init()

2024-04-19 Thread Jean-Philippe Brucker
For confidential VMs we'll want to skip flash device creation. Unfortunately, in virt_instance_init() the machine->cgs member has not yet been initialized, so we cannot check whether confidential guest is enabled. Move virt_flash_create() to machvirt_init(), where we can access the machine->cgs mem

[PATCH v2 12/22] target/arm/kvm-rme: Populate Realm memory

2024-04-19 Thread Jean-Philippe Brucker
Collect the images copied into guest RAM into a sorted list, and issue POPULATE_REALM KVM ioctls once we've created the Realm Descriptor. The images are part of the Realm Initial Measurement. Signed-off-by: Jean-Philippe Brucker --- v1->v2: Use a ROM loader notifier --- target/arm/kvm-rme.c | 97

[PATCH v2 17/22] target/arm/cpu: Set number of PMU counters in KVM

2024-04-19 Thread Jean-Philippe Brucker
Add a "num-pmu-counters" CPU parameter to configure the number of counters that KVM presents to the guest. This is needed for Realm VMs, whose parameters include the number of PMU counters and influence the Realm Initial Measurement. Signed-off-by: Jean-Philippe Brucker --- v1->v2: new --- targe

[PATCH v2 20/22] target/arm/kvm-rme: Enable guest memfd

2024-04-19 Thread Jean-Philippe Brucker
Request that RAM block uses the KVM guest memfd call to allocate guest memory. With RME, guest memory is not accessible by the host, and using guest memfd ensures that the host kernel is aware of this and doesn't attempt to access guest pages. Done in a separate patch because ms->require_guest_mem

[PATCH v2 22/22] hw/arm/virt: Use RAM instead of flash for confidential guest firmware

2024-04-19 Thread Jean-Philippe Brucker
The flash device that holds firmware code relies on read-only stage-2 mappings. Read accesses behave as RAM and write accesses as MMIO. Since the RMM does not support read-only mappings we cannot use the flash device as-is. That isn't a problem because the firmware does not want to disclose any in

[PATCH v2 00/22] arm: Run CCA VMs with KVM

2024-04-19 Thread Jean-Philippe Brucker
These patches enable launching a confidential guest with QEMU KVM on Arm. The KVM changes for CCA have now been posted as v2 [1]. Launching a confidential VM requires two additional command-line parameters: -M confidential-guest-support=rme0 -object rme-guest,id=rme0 Since the RFC

[PATCH v2 03/22] target/arm/kvm: Return immediately on error in kvm_arch_init()

2024-04-19 Thread Jean-Philippe Brucker
Returning an error to kvm_init() is fatal anyway, no need to continue the initialization. Signed-off-by: Jean-Philippe Brucker --- v1->v2: new --- target/arm/kvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 3371ffa401..a5673241

[PATCH v2 01/22] kvm: Merge kvm_check_extension() and kvm_vm_check_extension()

2024-04-19 Thread Jean-Philippe Brucker
The KVM_CHECK_EXTENSION ioctl can be issued either on the global fd (/dev/kvm), or on the VM fd obtained with KVM_CREATE_VM. For most extensions, KVM returns the same value with either method, but for some of them it can refine the returned value depending on the VM type. The KVM documentation [1]

[PATCH v2 14/22] target/arm/kvm-rme: Add Realm Personalization Value parameter

2024-04-19 Thread Jean-Philippe Brucker
The Realm Personalization Value (RPV) is provided by the user to distinguish Realms that have the same initial measurement. The user provides up to 64 hexadecimal bytes. They are stored into the RPV in the same order, zero-padded on the right. Cc: Eric Blake Cc: Markus Armbruster Cc: Daniel P.

[PATCH v2 05/22] hw/arm/virt: Add support for Arm RME

2024-04-19 Thread Jean-Philippe Brucker
When confidential-guest-support is enabled for the virt machine, call the RME init function, and add the RME flag to the VM type. Signed-off-by: Jean-Philippe Brucker --- v1->v2: * Don't explicitly disable steal_time, it's now done through KVM capabilities * Split patch --- hw/arm/virt.c | 15 ++

[PATCH v2 07/22] hw/arm/virt: Reserve one bit of guest-physical address for RME

2024-04-19 Thread Jean-Philippe Brucker
When RME is enabled, the upper GPA bit is used to distinguish protected from unprotected addresses. Reserve it when setting up the guest memory map. Signed-off-by: Jean-Philippe Brucker --- v1->v2: separate patch --- hw/arm/virt.c | 14 -- 1 file changed, 12 insertions(+), 2 deletion

[PATCH v2 10/22] target/arm/kvm: Create scratch VM as Realm if necessary

2024-04-19 Thread Jean-Philippe Brucker
Some ID registers have a different value for a Realm VM, for example ID_AA64DFR0_EL1 contains the number of breakpoints/watchpoints implemented by RMM instead of the hardware. Even though RMM is in charge of setting up most Realm registers, KVM still provides GET_ONE_REG interface on a Realm VM to

[PATCH v2 08/22] target/arm/kvm: Split kvm_arch_get/put_registers

2024-04-19 Thread Jean-Philippe Brucker
The confidential guest support in KVM limits the number of registers that we can read and write. Split the get/put_registers function to prepare for it. Signed-off-by: Jean-Philippe Brucker --- target/arm/kvm.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-)

[PATCH v2 02/22] target/arm: Add confidential guest support

2024-04-19 Thread Jean-Philippe Brucker
Add a new RmeGuest object, inheriting from ConfidentialGuestSupport, to support the Arm Realm Management Extension (RME). It is instantiated by passing on the command-line: -M virt,confidential-guest-support= -object guest-rme,id=[,options...] This is only the skeleton. Support will be added

Re: [PATCH 0/3] hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean

2024-04-19 Thread Philippe Mathieu-Daudé
On 18/4/24 12:04, Zhao Liu wrote: From: Zhao Liu --- Zhao Liu (3): hw/cxl/cxl-cdat: Make ct3_load_cdat() return boolean hw/cxl/cxl-cdat: Make ct3_build_cdat() return boolean hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean Since Jonathan Ack'ed the series, I'm queuing it v

Re: [PATCH v5 3/3] Add support for RAPL MSRs in KVM/Qemu

2024-04-19 Thread Zhao Liu
Hi Anthony, On Thu, Apr 18, 2024 at 12:52:14PM +0200, Anthony Harivel wrote: > Date: Thu, 18 Apr 2024 12:52:14 +0200 > From: Anthony Harivel > Subject: Re: [PATCH v5 3/3] Add support for RAPL MSRs in KVM/Qemu > > > The package energy consumption includes core part and uncore part, where > > unco

Re: [PATCH RFC 00/26] Multifd 🔀 device state transfer support with VFIO consumer

2024-04-19 Thread Peter Xu
On Fri, Apr 19, 2024 at 11:07:21AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 18, 2024 at 04:02:49PM -0400, Peter Xu wrote: > > On Thu, Apr 18, 2024 at 08:14:15PM +0200, Maciej S. Szmigiero wrote: > > > I think one of the reasons for these results is that mixed (RAM + device > > > state) multif

Re: [PATCH 00/27] Add qapi-domain Sphinx extension

2024-04-19 Thread Markus Armbruster
Markus Armbruster writes: [...] >> The purpose of sending this series in its current form is largely to >> solicit feedback on general aesthetics, layout, and features. Sphinx is >> a wily beast, and feedback at this stage will dictate how and where >> certain features are implemented. > > I'd a

Re: [PATCH] hw/core/clock: always iterate through childs in clock_propagate_period

2024-04-19 Thread Peter Maydell
On Thu, 18 Apr 2024 at 21:39, Raphael Poggi wrote: > > Hi Philippe, > > Le jeu. 18 avr. 2024 à 20:43, Philippe Mathieu-Daudé > a écrit : > > > > Hi Raphael, > > > > On 18/4/24 21:16, Raphael Poggi wrote: > > > When dealing with few clocks depending with each others, sometimes > > > we might only

Re: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-04-19 Thread Cord Amfmgm
Hi Michael, This just got lost somehow. It is still an issue (see https://gitlab.com/qemu-project/qemu/-/issues/1510 ). I believe this change fixes the issue. On Thu, Apr 18, 2024 at 10:43 AM Michael Tokarev wrote: > 06.02.2024 10:13, Cord Amfmgm wrote: > > This changes the ohci validation to n

Re: Add 'info pg' command to monitor

2024-04-19 Thread Peter Maydell
On Tue, 16 Apr 2024 at 19:11, Don Porter wrote: > > On 4/16/24 13:03, Peter Maydell wrote: > > On Tue, 16 Apr 2024 at 17:53, Don Porter wrote: > >> There is still a lot I am learning about the code base, but it seems > >> that qemu_get_guest_memory_mapping() does most of what one would need. > >>

Re: [PATCH 00/27] Add qapi-domain Sphinx extension

2024-04-19 Thread Markus Armbruster
John Snow writes: > This series adds a new qapi-domain extension for Sphinx, which adds a > series of custom directives for documenting QAPI definitions. > > GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/1259566476 > > (Link to a demo HTML page at the end of this cover letter, but I want >

Re: [PATCH v3 0/5] hw/char: Implement the STM32L4x5 USART, UART and LPUART

2024-04-19 Thread Peter Maydell
On Fri, 5 Apr 2024 at 15:27, Peter Maydell wrote: > > On Fri, 29 Mar 2024 at 17:44, Arnaud Minier > wrote: > > > > This patch adds the STM32L4x5 USART > > (Universal Synchronous/Asynchronous Receiver/Transmitter) > > device and is part of a series implementing the > > STM32L4x5 with a few periphe

Re: [PATCH] hw/dma: prevent overflow in soc_dma_set_request

2024-04-19 Thread Peter Maydell
On Tue, 9 Apr 2024 at 14:38, Peter Maydell wrote: > > On Tue, 9 Apr 2024 at 14:32, Anastasia Belova wrote: > > > > > > > > 09/04/24 15:02, Peter Maydell пишет: > > > On Tue, 9 Apr 2024 at 12:54, Anastasia Belova > > > wrote: > > >> ch->num can reach values up to 31. Add casting to > > >> a larg

Re: [PATCH v11 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-04-19 Thread Jonathan Cameron via
On Fri, 5 Apr 2024 00:07:06 + "Ho-Ren (Jack) Chuang" wrote: > The current implementation treats emulated memory devices, such as > CXL1.1 type3 memory, as normal DRAM when they are emulated as normal memory > (E820_TYPE_RAM). However, these emulated devices have different > characteristics t

Re: [PATCH v3 07/16] aspeed/smc: fix dma moving incorrect data length issue

2024-04-19 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: DMA length is from 1 byte to 32MB for AST2600 and AST10x0 and DMA length is from 4 bytes to 32MB for AST2500. In other words, if "R_DMA_LEN" is 0, it should move at least 1 byte data for AST2600 and AST10x0 and 4 bytes data for AST2500. To support all ASPEED S

Re: [PATCH v13 00/24] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-04-19 Thread Peter Maydell
On Sun, 7 Apr 2024 at 09:19, Jinjie Ruan wrote: > > This patch set implements FEAT_NMI and FEAT_GICv3_NMI for ARMv8. These > introduce support for a new category of interrupts in the architecture > which we can use to provide NMI like functionality. I had one last loose end I wanted to tidy up, a

Re: [PATCH v3 09/13] block/gluster: Use URI parsing code from glib

2024-04-19 Thread Eric Blake
On Thu, Apr 18, 2024 at 12:10:52PM +0200, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. > > Since g_uri_get_path() returns a const pointer, we also need to > tweak th

Re: [PATCH v3 04/13] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-04-19 Thread Eric Blake
On Thu, Apr 18, 2024 at 12:10:47PM +0200, Thomas Huth wrote: > RHEL 9 (and thus also the derivatives) are available since two years > now, so according to QEMU's support policy, we can drop the active Grammar suggestion: RHEL 9 (and thus also the derivatives) have been available for two years now

Re: [PATCH] tests/unit: Remove debug statements in test-nested-aio-poll.c

2024-04-19 Thread Eric Blake
On Fri, Apr 19, 2024 at 10:58:19AM +0200, Philippe Mathieu-Daudé wrote: > We are running this test since almost a year; it is Grammar suggestion: We have been running this test for almost a year; > safe to remove its debug statements, which clutter > CI jobs output: > > ▶ 88/100 /nested-aio-

Re: [PATCH v3 01/13] tests: Remove Ubuntu 20.04 container

2024-04-19 Thread Eric Blake
On Thu, Apr 18, 2024 at 12:10:44PM +0200, Thomas Huth wrote: > Since Ubuntu 22.04 is now available since two years, we can stop Grammar suggestion: Since Ubuntu 22.04 has now been available for more than two years, > actively supporting the previous LTS version of Ubuntu now. > > Reviewed-by: P

Re: Deprecation/removal of nios2 target support

2024-04-19 Thread Dinh Nguyen
On 4/18/24 13:41, Arnd Bergmann wrote: On Thu, Apr 18, 2024, at 17:44, Joseph Myers wrote: On Wed, 17 Apr 2024, Sandra Loosemore wrote: Therefore I'd like to mark Nios II as obsolete in GCC 14 now, and remove support from all toolchain components after the release is made. I'm not sure the

  1   2   >