Re: [PATCH 0/5] Building PPTT with root node and identical implementation flag

2024-10-04 Thread Jonathan Cameron via
On Thu, 26 Sep 2024 19:33:18 +0800 Yicong Yang wrote: > From: Yicong Yang > > OS like Linux is using PPTT processor node's identical implementation > flag [1] to infer whether the whole system or a certain CPU cluster is > homogeneous or not [2]. QEMU currently only support building homogeneous

Re: [PATCH 15/15] docs: acpi_hest_ghes: fix documentation for CPER size

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:20 +0200 Mauro Carvalho Chehab wrote: > While the spec defines a CPER size of 4KiB for each record, > currently it is set to 1KiB. Fix the documentation and add > a pointer to the macro name there, as this may help to keep > it updated. > > Signed-off-by: Mauro Carvalho

Re: [PATCH 14/15] better name the offset of the hardware error firmware

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:19 +0200 Mauro Carvalho Chehab wrote: > The hardware error firmware is where HEST error structures are > stored. Those can be GHESv2, but they can also be other types. > > Better name the location of the hardware error. > > No functional changes. > > Signed-off-by: Ma

Re: [PATCH 13/15] acpi/ghes: rename etc/hardware_error file macros

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:18 +0200 Mauro Carvalho Chehab wrote: > Now that we have also have a file to store HEST data location, > which is part of GHES, better name the file where CPER records > are stored. > > No functional changes. > > Reviewed-by: Igor Mammedov > Signed-off-by: Mauro Carva

Re: [PATCH 12/15] acpi/ghes: don't crash QEMU if ghes GED is not found

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:17 +0200 Mauro Carvalho Chehab wrote: > Instead, produce an error and continue working > > Signed-off-by: Mauro Carvalho Chehab Make sense as defense in depth. Can we actually hit this for existing systems, or is the injection stuff disabled if the ged isn't configured

Re: [PATCH 11/15] acpi/ghes: better name GHES memory error function

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:16 +0200 Mauro Carvalho Chehab wrote: > The current function used to generate GHES data is specific for > memory errors. Give a better name for it, as we now have a generic > function as well. > > Reviewed-by: Igor Mammedov > Signed-off-by: Mauro Carvalho Chehab In ge

Re: [PATCH 10/15] acpi/ghes: move offset calculus to a separate function

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:15 +0200 Mauro Carvalho Chehab wrote: > Currently, CPER address location is calculated as an offset of > the hardware_errors table. It is also badly named, as the > offset actually used is the address where the CPER data starts, > and not the beginning of the error sourc

Re: [PATCH 09/15] acpi/ghes: make the GHES record generation more generic

2024-09-26 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:14 +0200 Mauro Carvalho Chehab wrote: > Split the code into separate functions to allow using the > common CPER filling code by different error sources. > > The generic code was moved to ghes_record_cper_errors(), > and ghes_gen_err_data_uncorrectable_recoverable() now

Re: [PATCH 08/15] acpi/ghes: Prepare to support multiple sources on ghes

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:13 +0200 Mauro Carvalho Chehab wrote: > The current code is actually dependent on having just one > error structure with a single source. > > As the number of sources should be arch-dependent, as it > will depend on what kind of synchronous/assynchronous > notifications

Re: [PATCH 07/15] acpi/ghes: Change the type for source_id

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:12 +0200 Mauro Carvalho Chehab wrote: > HEST source ID is actually a 16-bit value Indeed. Reviewed-by: Jonathan Cameron > > Signed-off-by: Mauro Carvalho Chehab > --- > hw/acpi/ghes-stub.c| 2 +- > hw/acpi/ghes.c | 2 +- > include/hw/acpi/ghes.h | 2 +- >

Re: [PATCH 06/15] acpi/ghes: Remove a duplicated out of bounds check

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:11 +0200 Mauro Carvalho Chehab wrote: > acpi_ghes_record_errors() has an assert() at the beginning > to ensure that source_id will be lower than > ACPI_GHES_ERROR_SOURCE_COUNT. Remove a duplicated check. > > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Igor Mamm

Re: [PATCH 05/15] acpi/ghes: Fix acpi_ghes_record_errors() argument

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:10 +0200 Mauro Carvalho Chehab wrote: > The first argument is source ID and not notification type. Maybe call out that the header already differs from the two implementations in naming this parameter. This just corrects that. > > Signed-off-by: Mauro Carvalho Chehab R

Re: [PATCH 04/15] acpi/ghes: better handle source_id and notification

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:09 +0200 Mauro Carvalho Chehab wrote: > GHES has two fields that are stored on HEST error source > blocks: > > - notification type, which is a number defined at the ACPI spec > containing several arch-specific synchronous and assynchronous > types; > - source id, wh

Re: [PATCH 03/15] acpi/ghes: simplify the per-arch caller to build HEST table

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:08 +0200 Mauro Carvalho Chehab wrote: > The GHES driver requires not only a HEST table, but also a > separate firmware file to store Error Structure records. > It can't do one without the other. > > Simplify the caller logic for it to require one function. > > This pre

Re: [PATCH 02/15] acpi/ghes: simplify acpi_ghes_record_errors() code

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:07 +0200 Mauro Carvalho Chehab wrote: > Reduce the ident of the function and prepares it for > the next changes. > > No functional changes. > > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Igor Mammedov Some of the alignment doesn't seem to match local style w

Re: [PATCH 01/15] acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED

2024-09-25 Thread Jonathan Cameron via
On Wed, 25 Sep 2024 06:04:06 +0200 Mauro Carvalho Chehab wrote: > This is just duplicating ACPI_GHES_ERROR_SOURCE_COUNT, which > has a better name. So, drop the duplication. > > Signed-off-by: Mauro Carvalho Chehab > Reviewed-by: Igor Mammedov FWIW Reviewed-by: Jonathan Cameron

RE: [RFC] Virtualizing tagged disaggregated memory capacity (app specific, multi host shared)

2024-09-17 Thread Jonathan Cameron via
Plan is currently to meet at lpc registration desk 2pm tomorrow Wednesday and we will find a room. J Jonathan Cameron Mobile: +44-7870588074 Mail: jonathan.came...@huawei.com From:Jonathan Cameron mailto:jonathan.came...@huawei.com>> To:John Groves mailto:j.

Re: [PATCH] hw/cxl: fix uint32 overflow cxl-mailbox-utils.c

2024-09-17 Thread Jonathan Cameron via
On Tue, 17 Sep 2024 11:09:16 +0300 Dmitry Frolov wrote: > The sum offset + length may overflow uint32. Since this sum is > compared with uint64_t return value of get_lsa_size(), it makes > sense to choose uint64_t type for offset and length. > > Found by Linux Verification Center (linuxtesting.o

[PATCH v6 15/15] bios-tables-test: Add data for complex numa test (GI, GP etc)

2024-09-16 Thread Jonathan Cameron via
Given this is a new configuration, there are affects on APIC, CEDT and DSDT, but the key elements are in SRAT (plus related data in HMAT). The configuration has node to exercise many different combinations. 0) CPUs + Memory 1) GI only 2) GP only 3) CPUS only 4) Memory only 5) CPUs + HP memory GI

[PATCH v6 14/15] bios-tables-test: Add complex SRAT / HMAT test for GI GP

2024-09-16 Thread Jonathan Cameron via
Add a test with 6 nodes to exercise most interesting corner cases of SRAT and HMAT generation including the new Generic Initiator and Generic Port Affinity structures. More details of the set up in the following patch adding the table data. Signed-off-by: Jonathan Cameron --- tests/qtest/bios-t

[PATCH v6 13/15] bios-tables-test: Allow for new acpihmat-generic-x test data.

2024-09-16 Thread Jonathan Cameron via
The test to be added exercises many corner cases of the SRAT and HMAT table generation. Signed-off-by: Jonathan Cameron --- tests/qtest/bios-tables-test-allowed-diff.h | 5 + tests/data/acpi/x86/q35/APIC.acpihmat-generic-x | 0 tests/data/acpi/x86/q35/CEDT.acpihmat-generic-x | 0 tests/d

[PATCH v6 12/15] hw/acpi: Generic Initiator - add missing object class property descriptions.

2024-09-16 Thread Jonathan Cameron via
>From review of the Generic Ports support. These properties had no description set so add one. Signed-off-by: Jonathan Cameron --- v6: New patch based on Igor's review of Generic Ports patch. --- hw/acpi/pci.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/acpi/pci.c b/hw/acpi/pci.c

[PATCH v6 11/15] hw/acpi: Make storage of node id uint32_t to reduce fragility

2024-09-16 Thread Jonathan Cameron via
>From review of generic port introduction. The value is handled as a uint32_t so store it in that type. The value cannot in reality exceed MAX_NODES which is currently 128 but if the types are matched there is no need to rely on that restriction. Signed-off-by: Jonathan Cameron --- v6: New patch

[PATCH v6 10/15] hw/acpi: Generic Port Affinity Structure support

2024-09-16 Thread Jonathan Cameron via
These are very similar to the recently added Generic Initiators but instead of representing an initiator of memory traffic they represent an edge point beyond which may lie either targets or initiators. Here we add these ports such that they may be targets of hmat_lb records to describe the latenc

[PATCH 6/6] hw/pci-bridge/cxl-upstream: Add properties to control link speed and width

2024-09-16 Thread Jonathan Cameron via
To establish performance characteristics of a CXL device when used via a particular CXL topology (root ports, switches, end points) it is necessary to set the appropriate link speed and width in the PCI Express capability structure. Provide x-speed and x-link properties for this. Signed-off-by: J

[PATCH 5/6] hw/mem/cxl-type3: Add properties to control link speed and width

2024-09-16 Thread Jonathan Cameron via
To establish performance characteristics of a CXL device when used via a particular CXL topology (root ports, switches, end points) it is necessary to set the appropriate link speed and width in the PCI Express capability structure. Provide x-speed and x-link properties for this. Signed-off-by: J

[PATCH 4/6] hw/pcie: Provide a utility function for control of EP / SW USP link

2024-09-16 Thread Jonathan Cameron via
Whilst similar to existing PCIESlot link configuration a few registers need to be set differently so that the downstream device presents a 'configured' state that is then used to 'train' the upstream port on the link. Basically that means setting the status register to reflect it succeeding in tra

[PATCH 3/6] hw/pcie: Factor out PCI Express link register filling common to EP.

2024-09-16 Thread Jonathan Cameron via
Whilst not all link related registers are common between RP / Switch DSP and EP / Switch USP many of them are. Factor that group out to save on duplication when adding EP / Swtich USP configurability. Signed-off-by: Jonathan Cameron --- hw/pci/pcie.c | 87 ---

[PATCH 2/6] hw/pci-bridge/cxl_upstream: Provide x-speed and x-width properties.

2024-09-16 Thread Jonathan Cameron via
Copied from gen_pcie_root_port.c Drop the previous code that ensured a valid value in s->width, s->speed as now a default is provided so this will always be set. Note this changes the default settings but it is unlikely to have a negative effect on software as will only affect ports with now downs

[PATCH 1/6] hw/pci-bridge/cxl_root_port: Provide x-speed and x-width properties.

2024-09-16 Thread Jonathan Cameron via
Approach copied from gen_pcie_root_port.c Previously the link defaulted to a maximum of 2.5GT/s and 1x. Enable setting it's maximum values. The actual value after 'training' will depend on the downstream device configuration. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_root_port.c |

[PATCH qemu 0/6] hw/cxl: Link speed and width control

2024-09-16 Thread Jonathan Cameron via
Changes since RFC: - rebase Question: - I could enable this for all PCIe device (including ports). Does that makes sense, or is it better to limit this to my cases? It is quite easy to build broken setups (downstream device reports faster link than the port etc) because QEMU 'link' training'

[PATCH v6 09/15] hw/pci-host/gpex-acpi: Use acpi_uid property.

2024-09-16 Thread Jonathan Cameron via
Reduce the direct use of PCI internals inside ACPI table creation. Suggested-by: Igor Mammedov Tested-by: "Huang, Ying" Reviewed-by: Igor Mammedov Signed-off-by: Jonathan Cameron --- hw/pci-host/gpex-acpi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/gp

[PATCH v6 08/15] hw/i386/acpi: Use TYPE_PXB_BUS property acpi_uid for DSDT

2024-09-16 Thread Jonathan Cameron via
Rather than relying on PCI internals, use the new acpi_property to obtain the ACPI _UID values. These are still the same as the PCI Bus numbers so no functional change. Suggested-by: Igor Mammedov Tested-by: "Huang, Ying" Reviewed-by: Igor Mammedov Signed-off-by: Jonathan Cameron --- hw/i386

[PATCH v6 07/15] hw/pci-bridge: Add acpi_uid property to TYPE_PXB_BUS

2024-09-16 Thread Jonathan Cameron via
Enable ACPI table creation for PCI Expander Bridges to be independent of PCI internals. Note that the UID is currently the PCI bus number. This is motivated by the forthcoming ACPI Generic Port SRAT entries which can be made completely independent of PCI internals. Suggested-by: Igor Mammedov Te

[PATCH v6 06/15] acpi/pci: Move Generic Initiator object handling into acpi/pci.*

2024-09-16 Thread Jonathan Cameron via
Whilst ACPI SRAT Generic Initiator Afinity Structures are able to refer to both PCI and ACPI Device Handles, the QEMU implementation only implements the PCI Device Handle case. For now move the code into the existing hw/acpi/pci.c file and header. If support for ACPI Device Handles is added in th

[PATCH v6 05/15] hw/pci: Add a busnr property to pci_props and use for acpi/gi

2024-09-16 Thread Jonathan Cameron via
Using a property allows us to hide the internal details of the PCI device from the code to build a SRAT Generic Initiator Affinity Structure with PCI Device Handle. Suggested-by: Igor Mammedov Reviewed-by: Igor Mammedov Signed-off-by: Jonathan Cameron --- hw/acpi/acpi_generic_initiator.c | 14

[PATCH v6 04/15] hw/acpi: Rename build_all_acpi_generic_initiators() to build_acpi_generic_initiator()

2024-09-16 Thread Jonathan Cameron via
Igor noted that this function only builds one instance, so was rather misleadingly named. Fix that. Suggested-by: Igor Mammedov Reviewed-by: Igor Mammedov Tested-by: "Huang, Ying" Signed-off-by: Jonathan Cameron --- hw/acpi/acpi_generic_initiator.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v6 03/15] hw/acpi: Move AML building code for Generic Initiators to aml_build.c

2024-09-16 Thread Jonathan Cameron via
Rather than attempting to create a generic function with mess of the two different device handle types, use a PCI handle specific variant. If the ACPI handle form is needed then that can be introduced alongside this with little duplicated code. Drop the PCIDeviceHandle in favor of just passing th

[PATCH v6 02/15] hw/acpi/GI: Fix trivial parameter alignment issue.

2024-09-16 Thread Jonathan Cameron via
Before making additional modification, tidy up this misleading indentation. Reviewed-by: Ankit Agrawal Reviewed-by: Igor Mammedov Tested-by: "Huang, Ying" Signed-off-by: Jonathan Cameron --- hw/acpi/acpi_generic_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h

[PATCH v6 01/15] hw/acpi: Fix ordering of BDF in Generic Initiator PCI Device Handle.

2024-09-16 Thread Jonathan Cameron via
The ordering in ACPI specification [1] has bus number in the lowest byte. As ACPI tables are little endian this is the reverse of the ordering used by PCI_BUILD_BDF(). As a minimal fix split the QEMU BDF up into bus and devfn and write them as single bytes in the correct order. [1] ACPI Spec 6.3,

[PATCH v6 00/15] acpi: NUMA nodes for CXL HB as GP + complex NUMA test

2024-09-16 Thread Jonathan Cameron via
v6 changes: - 2 new patches (11 and 12) to improve things in existing code after Igor pointed them out in the new code. - More detailed example provided for docs for control of Generic Ports. This has proved a difficult concept to convey. Note there is one question Igor raised for Markus: -

Re: [PATCH 2/5] i386/cpu: add IsDefined flag to smp-cache property

2024-09-13 Thread Jonathan Cameron via
On Thu, 12 Sep 2024 14:38:26 +0100 Alireza Sanaee wrote: > This commit adds IsDefined flag to the object and this helps in avoiding > extra checks for every single layer of caches in both x86 and ARM. Hi Ali, You mention x86 here, but no code changes to support that? Jonathan > > Signed-off-b

Re: [PATCH v8 06/13] acpi/ghes: add support for generic error injection via QAPI

2024-09-13 Thread Jonathan Cameron via
On Fri, 13 Sep 2024 07:20:25 +0200 Mauro Carvalho Chehab wrote: > Em Thu, 12 Sep 2024 14:42:33 +0200 > Igor Mammedov escreveu: > > > On Wed, 11 Sep 2024 16:34:36 +0100 > > Jonathan Cameron wrote: > > > > > On Wed, 11 Sep 2024 15:21:32 +0200 > > > Igor Mammedov wrote: > > > > > > > On Su

Re: [PATCH v8 06/13] acpi/ghes: add support for generic error injection via QAPI

2024-09-11 Thread Jonathan Cameron via
On Wed, 11 Sep 2024 15:21:32 +0200 Igor Mammedov wrote: > On Sun, 25 Aug 2024 05:29:23 +0200 > Mauro Carvalho Chehab wrote: > > > Em Mon, 19 Aug 2024 14:51:36 +0200 > > Igor Mammedov escreveu: > > > > > > +read_ack = 1; > > > > +cpu_physical_memory_write(read_ack_start_addr,

Re: [PATCH RFC V3 01/29] arm/virt,target/arm: Add new ARMCPU {socket,cluster,core,thread}-id property

2024-09-11 Thread Jonathan Cameron via
On Tue, 10 Sep 2024 12:01:05 +0100 Salil Mehta wrote: > HI Zhao, A few trivial comments inline. > > > From: Zhao Liu > > Sent: Monday, September 9, 2024 4:28 PM > > To: Salil Mehta > > > > On Wed, Sep 04, 2024 at 05:37:21PM +, Salil Mehta wrote: > > > Date: Wed, 4 Sep 2024 17:37

Re: [RFC PATCH 0/2] Sbsa-ref CXL Enablement

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 12:15:55 +0800 Yuquan Wang wrote: > RFC because > - Many contents are ported from Jonathan' patch on qemu virt design > > - Bring plenty of PCDs values and modifying the original PCIE values > > - Less experience and not particularly confident in ACPI area so this might be >

Re: [RFC PATCH 1/1] MdePkg/IndustryStandard: add definitions for ACPI 6.4 CEDT

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 10:11:17 +0800 Yuquan Wang wrote: One request - when cross posting to multiple lists, it is useful to add something to the patch title to make it clear what is EDK2, what is QEMU etc. [RFC EDK2 PATCH 1/1] It might irritate the EDK2 folk but it is useful for everyone else to

Re: [RFC PATCH edk2-platforms 1/2] SbsaQemu: Add acpi0016 & acpi0017 objects into DSDT

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 11:15:44 +0800 Yuquan Wang wrote: > This adds relevant definitions and descriptions of acpi0016 and > acpi0017 to support CXL. > > With the implementation of pxb-cxl on the original pcie host bridge, > the previous space layout of mmio32 & mmio64 have to be divided to > provi

Re: [RFC PATCH edk2-platforms 2/2] SbsaQemu: AcpiTables: Add CEDT Table

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 11:15:45 +0800 Yuquan Wang wrote: > Provide CXL Early Discovery Table that describes the static CXL > Platform Components of sbsa-ref. > > This adds a static CXL Host Bridge structure and a CXL Fixed Memory > Window structure which are implemented as two independent space on

Re: [RFC PATCH 2/2] hw/arm/sbsa-ref: Support CXL Fixed Memory Window

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 12:15:57 +0800 Yuquan Wang wrote: > In order to provide CFMWs on sbsa-ref, this extends 1TB space > from the hole above RAM Memory [SBSA_MEM] for CXL Fixed Memory > Window. 0xA00 is chosen as the base address of this > space because of 3 reasons: > > 1) It is more sui

Re: [RFC PATCH 1/2] hw/arm/sbsa-ref: Enable CXL Host Bridge by pxb-cxl

2024-08-30 Thread Jonathan Cameron via
On Fri, 30 Aug 2024 12:15:56 +0800 Yuquan Wang wrote: > The memory layout places 1M space for 16 host bridge register regions > in the sbsa-ref memmap. In addition, this creates a default pxb-cxl > (bus_nr=0xfe) bridge with one cxl-rp on sbsa-ref. If you are only supporting 1 host bridge you cou

Re: [RFC qemu 0/6] hw/cxl: Link speed and width control

2024-08-28 Thread Jonathan Cameron via
On Fri, 12 Jul 2024 13:24:08 +0100 Jonathan Cameron wrote: > Based-on: [PATCH v5 00/13] acpi: NUMA nodes for CXL HB as GP + complex NUMA > test > Based-on: Message-ID: 20240712110837.1439736-1-jonathan.came...@huawei.com Hi All, I'd like to get this missing piece in 9.2. So if anyone has time

Re: [PATCH v5 10/13] hw/acpi: Generic Port Affinity Structure support

2024-08-28 Thread Jonathan Cameron via
On Mon, 15 Jul 2024 16:48:41 +0200 Igor Mammedov wrote: > On Fri, 12 Jul 2024 12:08:14 +0100 > Jonathan Cameron wrote: > > > These are very similar to the recently added Generic Initiators > > but instead of representing an initiator of memory traffic they > > represent an edge point beyond whi

Re: [PATCH 1/2] hw/mem/cxl_type3: Fix More flag setting for dynamic capacity event records

2024-08-28 Thread Jonathan Cameron via
On Tue, 27 Aug 2024 09:40:04 -0700 nifan@gmail.com wrote: > From: Fan Ni > > Per cxl spec r3.1, for multiple dynamic capacity event records grouped via > the More flag, the last record in the sequence should clear the More flag. > > Before the change, the More flag of the event record is cl

Re: [PATCH 2/2] hw/cxl/cxl_event: Fix interrupt triggering for dynamic capacity events grouped via More flag

2024-08-28 Thread Jonathan Cameron via
On Tue, 27 Aug 2024 09:40:05 -0700 nifan@gmail.com wrote: > From: Fan Ni > > When inserting multiple dynamic capacity event records grouped via More flag, > we should only trigger interrupt after the last record is inserted into the > event log. Achieving the goal by letting cxl_event_insert

Re: [EXT] Re: [PATCH] hw/cxl: Fix background completion percentage calculation

2024-08-27 Thread Jonathan Cameron via
On Tue, 27 Aug 2024 16:01:54 + ajay.opensrc wrote: > > From: Davidlohr Bueso > > > > On Mon, 29 Jul 2024, ajay.open...@micron.com wrote:\n > > >From: Ajay Joshi > > > > > >The current completion percentage calculation does not account for the > > >relative time since the start of the bac

Re: [PATCH] hw/cxl: Support aborting background commands

2024-08-27 Thread Jonathan Cameron via
On Tue, 13 Aug 2024 15:12:55 -0700 Davidlohr Bueso wrote: > As of 3.1 spec, background commands can be canceled with a new > abort command. Implement the support, which is advertised in > the CEL. No ad-hoc context undoing is necessary as all the > command logic of the running bg command is done

Re: [PATCH v10 02/18] tap: Remove qemu_using_vnet_hdr()

2024-08-16 Thread Jonathan Cameron via
On Sun, 28 Apr 2024 16:00:45 +0900 Akihiko Odaki wrote: > Since qemu_set_vnet_hdr_len() is always called when > qemu_using_vnet_hdr() is called, we can merge them and save some code. > > For consistency, express that the virtio-net header is not in use by > returning 0 with qemu_get_vnet_hdr_len

Re: [PATCH v7 01/10] acpi/generic_event_device: add an APEI error device

2024-08-16 Thread Jonathan Cameron via
On Fri, 16 Aug 2024 07:53:24 +0200 Mauro Carvalho Chehab wrote: > Em Wed, 14 Aug 2024 13:33:21 +0100 > Jonathan Cameron escreveu: > > > On Wed, 14 Aug 2024 01:23:23 +0200 > > Mauro Carvalho Chehab wrote: > > > > > Adds a generic error device to handle generic hardware error > > > events as

Re: [PATCH v7 04/10] qapi/acpi-hest: add an interface to do generic CPER error injection

2024-08-14 Thread Jonathan Cameron via
On Wed, 14 Aug 2024 01:23:26 +0200 Mauro Carvalho Chehab wrote: > Creates a QMP command to be used for generic ACPI APEI hardware error > injection (HEST) via GHESv2. > > The actual GHES code will be added at the followup patch. > > Signed-off-by: Mauro Carvalho Chehab > Signed-off-by: Shiju J

Re: [PATCH v7 03/10] acpi/ghes: Add support for GED error device

2024-08-14 Thread Jonathan Cameron via
On Wed, 14 Aug 2024 01:23:25 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > As a GED error device is now defined, add another type > of notification. > > Add error notification to GHES v2 using a GED error device GED > triggered via interrupt. > > [mchehab: do some cleanups a

Re: [PATCH v7 02/10] arm/virt: Wire up a GED error device for ACPI / GHES

2024-08-14 Thread Jonathan Cameron via
On Wed, 14 Aug 2024 01:23:24 +0200 Mauro Carvalho Chehab wrote: > Adds support to ARM virtualization to allow handling > generic error ACPI Event via GED & error source device. > > It is aligned with Linux Kernel patch: > https://lore.kernel.org/lkml/1272350481-27951-8-git-send-email-ying.hu...@

Re: [PATCH v7 01/10] acpi/generic_event_device: add an APEI error device

2024-08-14 Thread Jonathan Cameron via
On Wed, 14 Aug 2024 01:23:23 +0200 Mauro Carvalho Chehab wrote: > Adds a generic error device to handle generic hardware error > events as specified at ACPI 6.5 specification at 18.3.2.7.2: > https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.html#event-notification-for-generic-error-so

Re: CxlCorErrorType member @retry-threshold is undocumented

2024-08-09 Thread Jonathan Cameron via
On Thu, 08 Aug 2024 19:51:26 +0200 Markus Armbruster wrote: > Hi Jonathan, > > You added the type in commit 415442a1b4a (hw/mem/cxl_type3: Add CXL RAS > Error Injection Support.) The doc comment is missing a description of > @retry-threshold. Can you supply me one? I'm happy to do the actual

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-07 Thread Jonathan Cameron via
On Tue, 6 Aug 2024 16:31:13 +0200 Igor Mammedov wrote: > On Fri, 2 Aug 2024 23:44:01 +0200 > Mauro Carvalho Chehab wrote: > > > Provide a generic interface for error injection via GHESv2. > > > > This patch is co-authored: > > - original ghes logic to inject a simple ARM record by Shiju J

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-07 Thread Jonathan Cameron via
On Wed, 7 Aug 2024 09:47:50 +0200 Mauro Carvalho Chehab wrote: > Em Tue, 6 Aug 2024 16:31:13 +0200 > Igor Mammedov escreveu: > > > PS: > > looking at the code, ACPI_GHES_MAX_RAW_DATA_LENGTH is 1K > > and it is the total size of a error block for a error source. > > > > However acpi_hest_ghes.r

Re: [PATCH v5 6/7] acpi/ghes: add support for generic error injection via QAPI

2024-08-05 Thread Jonathan Cameron via
On Fri, 2 Aug 2024 23:44:01 +0200 Mauro Carvalho Chehab wrote: > Provide a generic interface for error injection via GHESv2. > > This patch is co-authored: > - original ghes logic to inject a simple ARM record by Shiju Jose; > - generic logic to handle block addresses by Jonathan Camero

Re: [PATCH v5 5/7] qapi/ghes-cper: add an interface to do generic CPER error injection

2024-08-05 Thread Jonathan Cameron via
On Fri, 2 Aug 2024 23:44:00 +0200 Mauro Carvalho Chehab wrote: > Creates a QMP command to be used for generic ACPI APEI hardware error > injection (HEST) via GHESv2. > > The actual GHES code will be added at the followup patch. > > Signed-off-by: Mauro Carvalho Chehab Looks good to me. Review

Re: [PATCH v5 4/7] acpi/ghes: Support GPIO error source

2024-08-05 Thread Jonathan Cameron via
On Fri, 2 Aug 2024 23:43:59 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > Add error notification to GHES v2 using the GPIO source. The gpio / external interrupt follows through. > > [mchehab: do some cleanups at ACPI_HEST_SRC_ID_* checks] > > Signed-off-by: Jonathan Camer

Re: [PATCH v5 3/7] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-08-05 Thread Jonathan Cameron via
On Fri, 2 Aug 2024 23:43:58 +0200 Mauro Carvalho Chehab wrote: Do we need to rename this now there is a GED involved? Is it even technically a GPIO any more? Spec says in 18.3.2.7 HW-reduced ACPI platforms signal the error using a GPIO interrupt or another interrupt declared under a generic eve

Re: [PATCH v5 2/7] acpi/generic_event_device: add an APEI error device

2024-08-05 Thread Jonathan Cameron via
On Fri, 2 Aug 2024 23:43:57 +0200 Mauro Carvalho Chehab wrote: > Adds a Generic Event Device to handle generic hardware error > events, supporting General Purpose Event (GPE) as specified at > ACPI 6.5 specification at 18.3.2.7.2: > https://uefi.org/specs/ACPI/6.5/18_Platform_Error_Interfaces.ht

Re: [PATCH v2] hw/mem/cxl_type3: reset dvsecs in ct3d_reset()

2024-08-02 Thread Jonathan Cameron via
On Fri, 26 Apr 2024 03:36:07 + "Zhijian Li (Fujitsu)" wrote: > ping > > Hi. I'm going to drop this again from my tree as it breaks the CDAT DOE (I was testing Dave's patches with Mike's numa memblk and access0/1 were empty :( I haven't looked in detail but it's probably because each PCIe

Re: [PATCH v3 3/7] acpi/ghes: Support GPIO error source.

2024-08-01 Thread Jonathan Cameron via
On Thu, 1 Aug 2024 14:56:37 +0200 Mauro Carvalho Chehab wrote: > Em Tue, 30 Jul 2024 10:40:28 +0200 > Igor Mammedov escreveu: > > > > diff --git a/include/hw/acpi/ghes.h b/include/hw/acpi/ghes.h > > > index 674f6958e905..4f1ab1a73a06 100644 > > > --- a/include/hw/acpi/ghes.h > > > +++ b/include

Re: [PATCH v3 4/7] acpi/ghes: Add a logic to handle block addresses and FW first ARM processor error injection

2024-07-31 Thread Jonathan Cameron via
On Wed, 31 Jul 2024 09:11:33 +0200 Mauro Carvalho Chehab wrote: > Em Tue, 30 Jul 2024 13:17:09 +0200 > Igor Mammedov escreveu: > > > On Mon, 22 Jul 2024 08:45:56 +0200 > > Mauro Carvalho Chehab wrote: > > > > that's quite a bit of code that in 99% won't ever be used > > (assuming error inject

Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-30 Thread Jonathan Cameron via
On Tue, 30 Jul 2024 07:13:30 +0200 Mauro Carvalho Chehab wrote: > Em Mon, 29 Jul 2024 17:08:40 +0100 > Jonathan Cameron escreveu: > > > On Mon, 29 Jul 2024 15:21:06 +0200 > > Mauro Carvalho Chehab wrote: > > > > > From: Jonathan Cameron > > > > > > Creates a Generic Event Device (GED) as

Re: [PATCH v4 6/6] acpi/ghes: Add a logic to inject ARM processor CPER

2024-07-29 Thread Jonathan Cameron via
On Mon, 29 Jul 2024 15:21:10 +0200 Mauro Carvalho Chehab wrote: > Add an ACPI APEI GHES error injection logic for ARM > processor CPER, allowing to set fields at from > UEFI spec 2.10 tables N.16 and N.17 to any valid > value. > > As some GHES functions require handling addresses, add > a helper

Re: [PATCH v4 2/6] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-29 Thread Jonathan Cameron via
On Mon, 29 Jul 2024 15:21:06 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > Creates a Generic Event Device (GED) as specified at I wrote this a while back and wasn't aware of the naming mess around GED in the ACPI spec. This one is just referred to as 'error device' whereas t

Re: [PATCH] ptp: Add vDSO-style vmclock support

2024-07-26 Thread Jonathan Cameron via
On Thu, 25 Jul 2024 14:50:50 +0100 David Woodhouse wrote: > On Thu, 2024-07-25 at 08:33 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 25, 2024 at 01:31:19PM +0100, David Woodhouse wrote: > > > On Thu, 2024-07-25 at 08:29 -0400, Michael S. Tsirkin wrote: > > > > On Thu, Jul 25, 2024 at 01:2

Re: [PATCH v3 7/7] acpi/ghes: extend arm error injection logic

2024-07-26 Thread Jonathan Cameron via
On Mon, 22 Jul 2024 08:45:59 +0200 Mauro Carvalho Chehab wrote: > Enrich CPER error injection logic for ARM processor to allow > setting values to from UEFI 2.10 tables N.16 and N.17. > > It should be noticed that, with such change, all arguments are > now optional, so, once QMP is negotiated w

Re: [PATCH v3 5/7] target/arm: preserve mpidr value

2024-07-26 Thread Jonathan Cameron via
On Mon, 22 Jul 2024 08:45:57 +0200 Mauro Carvalho Chehab wrote: > There is a logic at helper to properly fill the mpidr information. > This is needed for ARM Processor error injection, so store the > value inside a cpu opaque value, to allow it to be used. > > Signed-off-by: Mauro Carvalho Cheha

Re: [PATCH v3 4/7] acpi/ghes: Add a logic to handle block addresses and FW first ARM processor error injection

2024-07-26 Thread Jonathan Cameron via
A few quick replies from me. I'm sure Mauro will add more info. > > + 'tlb-error', > > + 'bus-error', > > + 'micro-arch-error'] > > +} > > + > > +## > > +# @arm-inject-error: > > +# > > +# Inject ARM Processor error. > > +# > > +# @errortypes: ARM processor error type

Re: [PATCH v3 4/7] acpi/ghes: Add a logic to handle block addresses and FW first ARM processor error injection

2024-07-26 Thread Jonathan Cameron via
On Mon, 22 Jul 2024 08:45:56 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > 1. Some GHES functions require handling addresses. Add a helper function >to support it. > > 2. Add support for ACPI CPER (firmware-first) ARM processor error injection. > > Compliance with N.2.4.

Re: [PATCH v3 2/7] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-26 Thread Jonathan Cameron via
On Mon, 22 Jul 2024 08:45:54 +0200 Mauro Carvalho Chehab wrote: > From: Jonathan Cameron > > Creates a GED - Generic Event Device and set a GPIO to The wonder of confusing names in ACPI. I thought I'd fixed this but clearly not. This GED isn't a Generic Event Device, it's a Generic Error (De

Re: [PATCH v1 6/9] Add CPUID enumeration for RDT

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:26 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Add CPUID enumeration for intel RDT monitoring and allocation, as well > as the flags used in the enumeration code. > > Signed-off-by: Hendrik Wüthrich > --- > hw/i386/rdt.c | 29 ++

Re: [PATCH v1 5/9] Add RDT device interface through MSRs

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:25 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Implement rdmsr and wrmsr for the following MSRs: > * MSR_IA32_PQR_ASSOC > * MSR_IA32_QM_EVTSEL > * MSR_IA32_QM_CTR > * IA32_L3_QOS_Mask_n > * IA32_L2_QOS_Mask_n > * IA32_L2_QoS_Ext_BW_Thrtl_n > > This al

Re: [PATCH v1 4/9] Add RDT functionality

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:24 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Add RDT code to Associate CLOSID with RMID / set RMID for monitoring, > write COS, and read monitoring data. This patch does not add code for > the guest to interact through these things with MSRs, only th

Re: [PATCH v1 3/9] Add init and realize funciontality for RDT device.

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:23 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Add code to initialize all necessary state for the RDT device. > > Signed-off-by: Hendrik Wüthrich > --- > hw/i386/rdt.c | 28 > 1 file changed, 28 insertions(+) > > diff -

Re: [PATCH v1 3/9] Add init and realize funciontality for RDT device.

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:23 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Add code to initialize all necessary state for the RDT device. > > Signed-off-by: Hendrik Wüthrich Spell check (typo in patch title).

Re: [PATCH v1 2/9] Add state for RDT device.

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:22 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Add structures and variables needed to emulate Intel RDT, including > module-internal sturctures and state in ArchCPU. No functionality yet. > > Signed-off-by: Hendrik Wüthrich A few general comments inl

Re: [PATCH v1 1/9] Add Intel RDT device to config.

2024-07-26 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 16:29:21 + Hendrik Wuethrich wrote: > From: ‪Hendrik Wüthrich > > Change config to show RDT, add minimal code to the rdt.c module to make > sure things still compile. > > Signed-off-by: Hendrik Wüthrich Hi Hendrik Great to see emulation of this. Will be handy for tes

Re: [PATCH v2 1/3] hw/cxl/cxl-host: Fix segmentation fault when getting cxl-fmw property

2024-07-25 Thread Jonathan Cameron via
On Wed, 24 Jul 2024 07:53:48 +0300 Michael Tokarev wrote: > 05.07.2024 14:39, Jonathan Cameron via wrote: > > From: Zhao Liu > > > > QEMU crashes (Segmentation fault) when getting cxl-fmw property via > > qmp: > > > > (QEMU) qom-get path=machine propert

Re: [PATCH 2/8] qapi/qom: Introduce smp-cache object

2024-07-25 Thread Jonathan Cameron via
On Thu, 25 Jul 2024 11:50:59 +0100 Jonathan Cameron wrote: Resending as this bounced due (I think) to an address typo. > Hi Markus, Zhao Liu > > From the ARM server side this is something I want to see as well. > So I can comment on why we care. > > > >> This series adds a way to configure cac

Re: [PATCH] docs: add more information about CXL2.0 device type

2024-07-22 Thread Jonathan Cameron via
On Fri, 19 Jul 2024 12:57:33 +0800 luzhixing12345 wrote: > Add more information with CXL type1 and type2 devices. > > Original doc says "May also have device private memory accessible > via means such as PCI memory reads and writes to BARs.", but actually > CXL type1 devices doesn't have device

Re: [PATCH] mem/cxl_type3: Fix overlapping region validation error

2024-07-18 Thread Jonathan Cameron via
On Thu, 18 Jul 2024 05:07:53 -0400 Yao Xingtao wrote: > When injecting a new poisoned region through qmp_cxl_inject_poison(), > the newly injected region should not overlap with existing poisoned > regions. > > The current validation method does not consider the following > overlapping region: >

Re: [PATCH v5 10/13] hw/acpi: Generic Port Affinity Structure support

2024-07-17 Thread Jonathan Cameron via
On Wed, 17 Jul 2024 11:11:06 -0400 "Michael S. Tsirkin" wrote: > On Wed, Jul 17, 2024 at 04:02:58PM +0100, Jonathan Cameron wrote: > > On Mon, 15 Jul 2024 16:48:41 +0200 > > Igor Mammedov wrote: > > > > > On Fri, 12 Jul 2024 12:08:14 +0100 > > > Jonathan Cameron wrote: > > > > > > > These

Re: [PATCH v2 1/7] arm/virt: place power button pin number on a define

2024-07-17 Thread Jonathan Cameron via
On Fri, 12 Jul 2024 15:15:08 +0200 Mauro Carvalho Chehab wrote: > Having magic numbers inside the code is not a good idea, as it > is error-prone. So, instead, create a macro with the number > definition. > > Signed-off-by: Mauro Carvalho Chehab Seems sensible to me. Reviewed-by: Jonathan Cam

Re: [PATCH v5 10/13] hw/acpi: Generic Port Affinity Structure support

2024-07-17 Thread Jonathan Cameron via
On Mon, 15 Jul 2024 16:48:41 +0200 Igor Mammedov wrote: > On Fri, 12 Jul 2024 12:08:14 +0100 > Jonathan Cameron wrote: > > > These are very similar to the recently added Generic Initiators > > but instead of representing an initiator of memory traffic they > > represent an edge point beyond whi

Re: [PATCH v6 4/4] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-07-12 Thread Jonathan Cameron via
On Fri, 5 Jul 2024 13:30:38 +0100 Jonathan Cameron wrote: > From: Shiju Jose > > CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS) > control feature. Hi Michael / all, Silly stray white space issue inline that checkpatch will catch. > diff --git a/hw/mem/cxl_type3.

[RFC qemu 6/6] hw/pci-bridge/cxl-upstream: Add properties to control link speed and width

2024-07-12 Thread Jonathan Cameron via
To establish performance characteristics of a CXL device when used via a particular CXL topology (root ports, switches, end points) it is necessary to set the appropriate link speed and width in the PCI Express capability structure. Provide x-speed and x-link properties for this. Signed-off-by: J

[RFC qemu 5/6] hw/mem/cxl-type3: Add properties to control link speed and width

2024-07-12 Thread Jonathan Cameron via
To establish performance characteristics of a CXL device when used via a particular CXL topology (root ports, switches, end points) it is necessary to set the appropriate link speed and width in the PCI Express capability structure. Provide x-speed and x-link properties for this. Signed-off-by: J

  1   2   3   4   5   6   7   8   9   10   >