From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Thierry Escande <thierry.escande@vates.tech>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Anthony PERARD <anthony.perard@vates.tech>,
Alexey Gerasimenko <x1917x@gmail.com>
Subject: Re: [PATCH 02/17] libacpi: new DSDT ACPI table for Q35
Date: Fri, 12 Jun 2026 15:24:18 +0200 [thread overview]
Message-ID: <aiwIgrerH933SPbC@macbook.local> (raw)
In-Reply-To: <1781258461.8631fc262581453bbf619ec5b2062170.19ebb4721b0000701b@vates.tech>
On Fri, Jun 12, 2026 at 12:01:00PM +0200, Thierry Escande wrote:
>
> On 4/28/26 12:17, Roger Pau Monné wrote:
> > On Fri, Mar 13, 2026 at 04:35:01PM +0000, Thierry Escande wrote:
> >> This patch adds the DSDT table for Q35 (new tools/libacpi/dsdt_q35.asl
> >> file). It only contains the specific Q35 parts that differ from i440).
> >> At the moment, these are:
> >>
> >> - BDF location of LPC Controller
> >> - Minor changes related to FDC detection
> >> - Addition of _OSC method to inform OSPM about PCIe features supported
> >>
> >> As we are still using 4 PCI router links and their corresponding
> >> device/register addresses are same (offset 0x60), no need to change PCI
> >> routing descriptions.
> >>
> >> Note that '15cpu' ACPI tables are only applicable to qemu-traditional
> >> (which have no support for Q35), so we need to use 'anycpu' version only.
> >
> > Is the above statement fully accurate? It seems like 15cpu tables are
> > used with rombios, so the dependency is not on qemu-trad, but rather
> > rombios?
> >
> > If it's truly only dependent on qemu-trad then we should remove those,
> > as we have removed qemu-trad.
>
> You're right, the dependency is on Rombios. And I though Rombios was
> only used for qemu-trad, my bad. So it implies to use Seabios or OVMF to
> have Q35 support. Is it something acceptable?
IIRC XenServer still uses RomBIOS with upstream QEMU, for
compatibility purposes. I'm fine with just adding Q35 support with
SeaBIOS and OVMF, it seems justified to request a newer firmware if
you want to use a newer chipset.
> >
> >>
> >> Signed-off-by: Alexey Gerasimenko <x1917x@gmail.com>
> >
> > If the first SoB if from Alexey, the From: should also match.
>
> Ok, I'll change authorship or signed-off order depending on how close it
> is from the original patch.
I'm not an expert, but I think as long as it's based on a patch from
Alexey you need to keep is SoB first.
> >
> >> Signed-off-by: Thierry Escande <thierry.escande@vates.tech>
> >> ---
> >> tools/firmware/hvmloader/Makefile | 2 +-
> >> tools/libacpi/Makefile | 2 +-
> >> tools/libacpi/dsdt.asl | 3 +
> >> tools/libacpi/dsdt_q35.asl | 130 ++++++++++++++++++++++++++++++
> >> 4 files changed, 135 insertions(+), 2 deletions(-)
> >> create mode 100644 tools/libacpi/dsdt_q35.asl
> >>
> >> diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
> >> index bdc33a877f..99f045efaa 100644
> >> --- a/tools/firmware/hvmloader/Makefile
> >> +++ b/tools/firmware/hvmloader/Makefile
> >> @@ -78,7 +78,7 @@ rombios.o: roms.inc
> >> smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
> >>
> >> ACPI_PATH = ../../libacpi
> >> -DSDT_FILES += dsdt_i440_anycpu_qemu_xen.c
> >> +DSDT_FILES += dsdt_i440_anycpu_qemu_xen.c dsdt_q35_anycpu_qemu_xen.c
> >> ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES)) build.o static_tables.o
> >> $(ACPI_OBJS): CFLAGS += -iquote . -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\"
> >> CFLAGS += -I$(ACPI_PATH)
> >> diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
> >> index d3d4bc9543..e6c4a3fd8b 100644
> >> --- a/tools/libacpi/Makefile
> >> +++ b/tools/libacpi/Makefile
> >> @@ -11,7 +11,7 @@ endif
> >>
> >> MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt
> >>
> >> -C_SRC-$(CONFIG_X86) = dsdt_anycpu.c dsdt_15cpu.c dsdt_i440_anycpu_qemu_xen.c dsdt_pvh.c
> >> +C_SRC-$(CONFIG_X86) = dsdt_anycpu.c dsdt_15cpu.c dsdt_i440_anycpu_qemu_xen.c dsdt_q35_anycpu_qemu_xen.c dsdt_pvh.c
> >> C_SRC-$(CONFIG_ARM_64) = dsdt_anycpu_arm.c
> >> DSDT_FILES ?= $(C_SRC-y)
> >> C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, $(DSDT_FILES))
> >> diff --git a/tools/libacpi/dsdt.asl b/tools/libacpi/dsdt.asl
> >> index 130826fdcc..dc764881c9 100644
> >> --- a/tools/libacpi/dsdt.asl
> >> +++ b/tools/libacpi/dsdt.asl
> >> @@ -201,6 +201,9 @@
> >> #ifdef MACHINE_TYPE_I440
> >> Name (_ADR, 0x00010000) /* device 1, fn 0 */
> >> #endif
> >> + #ifdef MACHINE_TYPE_Q35
> >> + Name (_ADR, 0x001f0000) /* device 31, fn 0 */
> >> + #endif
> >
> > You possibly want to do:
> >
> > #ifdef ...
> > #elif defined(...)
> > #else
> > #error ...
> > #endif
>
> Well, the iasl compiler doesn't support the defined() directive (at
> least the latest Debian version from 2025) so I'll rather use something
> like:
>
> #define MACHINE_TYPE MACHINE_TYPE_XXX
>
> #if MACHINE_TYPE == MACHINE_TYPE_XXX
> ...
> #elif MACHINE_TYPE == MACHINE_TYPE_YYY
> ...
> #endif
Oh, I see, I wasn't aware of it not supporting defined() when #ifdef
is available. Kind of weird to support one but not the other.
> >
> >> + {
> >> + /*
> >> + LPC ISA bridge
> >> +
> >> + PCI Interrupt Routing Register 2 (PIRQE..PIRQH) cannot be
> >> + used because of existing Xen IRQ limitations (4 PCI links
> >> + only)
> >> + */
> >
> > Right, and PIRQA..PIRQD is already defined in the generic dsdt.asl.
> > Might be worth mentioning, otherwise the block looks incomplete.
> >
> >> +
> >> + /* LPC_I/O: I/O Decode Ranges Register */
> >> + OperationRegion (LPCD, PCI_Config, 0x80, 0x2)
> >> + Field (LPCD, AnyAcc, NoLock, Preserve) {
> >> + COMA, 3,
> >> + , 1,
> >> + COMB, 3,
> >> +
> >> + Offset(0x01),
> >> + LPTD, 2,
> >> + , 2,
> >> + FDCD, 2
> >> + }
> >> +
> >> + /* LPC_EN: LPC I/F Enables Register */
> >> + OperationRegion(LPCE, PCI_Config, 0x82, 0x2)
> >> + Field(LPCE, AnyAcc, NoLock, Preserve) {
> >> + CAEN, 1,
> >> + CBEN, 1,
> >> + LPEN, 1,
> >> + FDEN, 1
> >> + }
> >> +
> >> + Device (FDC0)
> >> + {
> >> + Name (_HID, EisaId ("PNP0700"))
> >> + Method (_STA, 0, NotSerialized)
> >> + {
> >> + Store (FDEN, Local0)
> >> + If (LEqual (Local0, 0)) {
> >> + Return (0x00)
> >> + } Else {
> >> + Return (0x0F)
> >> + }
> >> + }
> >> +
> >> + Name (_CRS, ResourceTemplate ()
> >> + {
> >> + IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
> >> + IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
> >> + IRQNoFlags () {6}
> >> + DMA (Compatibility, NotBusMaster, Transfer8) {2}
> >> + })
> >> + }
> >> + }
> >
> > This seem to match the blocks in QEMU, so it's likely fine.
>
> I'll add qemu copyright header
>
> Would that be ok under the original copyright notice ?
> /******************************************************************
> * Q35 part heavily inspired by q35-acpi-dsdt.dsl from Qemu
> *
> * Copyright (c) 2010 Isaku Yamahata
> * yamahata at valinux co jp
> */
>
>
> Regards,
Seems fine.
Thanks, Roger.
next prev parent reply other threads:[~2026-06-12 13:25 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 16:35 [PATCH 00/17] Q35 initial support for HVM guests Thierry Escande
2026-03-13 16:35 ` [PATCH 01/17] libacpi: Split dsdt.asl file and extract i440 specific parts Thierry Escande
2026-04-28 9:05 ` Roger Pau Monné
2026-06-12 10:00 ` Thierry Escande
2026-05-04 14:34 ` Jan Beulich
2026-05-04 14:35 ` Jan Beulich
2026-06-12 10:00 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 05/17] hvmloader: add Q35 DSDT table loading Thierry Escande
2026-04-28 11:08 ` Roger Pau Monné
2026-06-12 10:01 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 02/17] libacpi: new DSDT ACPI table for Q35 Thierry Escande
2026-04-28 10:17 ` Roger Pau Monné
2026-06-12 10:01 ` Thierry Escande
2026-06-12 13:24 ` Roger Pau Monné [this message]
2026-05-04 14:39 ` Jan Beulich
2026-03-13 16:35 ` [PATCH 03/17] hvmloader: add function to set the emulated machine type (i440/Q35) Thierry Escande
2026-04-28 10:39 ` Roger Pau Monné
2026-05-04 10:58 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-06-12 10:01 ` Thierry Escande
2026-05-04 14:43 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-06-12 11:46 ` Jan Beulich
2026-03-13 16:35 ` [PATCH 06/17] hvmloader: Move pci devices setup to a separate function Thierry Escande
2026-04-28 12:48 ` Roger Pau Monné
2026-06-12 10:01 ` Thierry Escande
2026-05-04 14:52 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 08/17] hvmloader: Extend PCI BAR struct Thierry Escande
2026-04-28 13:31 ` Roger Pau Monné
2026-06-12 10:01 ` Thierry Escande
2026-05-04 15:01 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 07/17] hvmloader: add basic Q35 support Thierry Escande
2026-04-28 13:15 ` Roger Pau Monné
2026-05-10 23:32 ` Alexey G
2026-05-04 14:55 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 10/17] hvmloader: Add support for HVMOP_set|get_ecam_space hypercalls Thierry Escande
2026-04-28 14:14 ` Roger Pau Monné
2026-03-13 16:35 ` [PATCH 12/17] libxl: Q35 support (new option device_model_machine) Thierry Escande
2026-04-29 10:01 ` Roger Pau Monné
2026-03-13 16:35 ` [PATCH 11/17] hvmloader: allocate MMCONFIG area in the MMIO hole Thierry Escande
2026-04-29 9:29 ` Roger Pau Monné
2026-05-04 11:11 ` Jan Beulich
2026-05-04 12:23 ` Roger Pau Monné
2026-05-04 12:36 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-06-12 10:01 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 13/17] libxl: Add xen-platform device for Q35 machine Thierry Escande
2026-03-13 16:35 ` [PATCH 09/17] xev/hvm: Add HVMOP_get|set_ecam_space hypercalls Thierry Escande
2026-04-28 13:59 ` Roger Pau Monné
2026-05-04 11:09 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-05-04 15:12 ` Jan Beulich
2026-06-12 10:01 ` Thierry Escande
2026-06-12 11:49 ` Jan Beulich
2026-03-13 16:35 ` [PATCH 14/17] libacpi: build ACPI MCFG table if requested Thierry Escande
2026-04-29 10:13 ` Roger Pau Monné
2026-06-12 10:02 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 15/17] hvmloader: Set MCFG in ACPI table Thierry Escande
2026-04-29 12:33 ` Roger Pau Monné
2026-06-12 10:02 ` Thierry Escande
2026-03-13 16:35 ` [PATCH 16/17] Handle PCIe ECAM space access from guests Thierry Escande
2026-04-29 12:42 ` Roger Pau Monné
2026-06-12 10:02 ` Thierry Escande
2026-05-04 15:22 ` Jan Beulich
2026-03-13 16:35 ` [PATCH 04/17] hvmloader: add ACPI enabling for Q35 Thierry Escande
2026-04-28 10:48 ` Roger Pau Monné
2026-05-05 13:58 ` Alexey G
2026-05-05 14:25 ` Roger Pau Monné
2026-03-13 16:35 ` [PATCH 17/17] docs: provide description for device_model_machine option Thierry Escande
2026-04-29 12:43 ` Roger Pau Monné
2026-06-12 10:02 ` Thierry Escande
2026-03-15 22:43 ` [PATCH 00/17] Q35 initial support for HVM guests Alexey G
2026-04-28 7:48 ` Roger Pau Monné
2026-05-04 10:45 ` Jan Beulich
2026-05-05 5:48 ` Jan Beulich
2026-05-05 5:49 ` Jan Beulich
2026-05-05 13:29 ` Alexey G
2026-05-05 13:07 ` Alexey G
2026-05-05 14:15 ` Roger Pau Monné
2026-06-12 10:00 ` Thierry Escande
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aiwIgrerH933SPbC@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=thierry.escande@vates.tech \
--cc=x1917x@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.