On Tue, Sep 05, 2023 at 05:05:33PM +0200, Marcello Sylverster Bauer wrote:
> Greetings,
> 
> I'm currently working on a project to support Intel IPU6 in QEMU via VFIO so
> that the guest system can access the camera. This requires extending the
> ACPI device definition so that the guest knows how to access the camera.
> 
> However, I cannot extend the PCI devices because their names are not 4
> characters long and therefore do not follow the ACPI specification.
> 
> When I use '-acpitable' to include my own SSDT for the IPU6 PCI device, it
> does not allow me to declare the device as an External Object because it
> automatically adds padding underscores.
> 
> e.g.
> Before:
> ```
> External(_SB.PCI0.S18.SA0, DeviceObj)
> ```
> After:
> ```
> External(_SB.PCI0.S18_.SA0_, DeviceObj)
> ```
> 
> Adding the underscore padding is hard coded in iASL and also in QEMU when
> parsing an ASL file. (see: build_append_nameseg())
> 
> So here are my questions:
> 1. Is there a solution to extend the ACPI PCI device using '-acpitable'
> without having to patch iASL or QEMU?
> 2. Are there any plans to change the names to comply with the ACPI spec?
> (e.g. use "S%.03X" format string instead)
> 
> Thanks
> Marcello


1.  All names in ACPI are always exactly 4 characters long. _ is a legal 
character
    but names beginning with _ are reserved. There's no rule in ACPI
    spec that says they need to follow S%.03X or any other specific format.
    I'm pretty sure we do follow the ACPI specification in this but feel free to
    prove me wrong.
2.  You can probably add something to existing ACPI devices using Scope().
    I would not advise relying on this - current names are not a stable
    interface that we guarantee across QEMU versions.
    If adding this functionality is desirable, I think we'll need some new 
interface
    to set a stable ACPI name. Maybe using aliases.


-- 
MST


Reply via email to