[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build V
From: |
Igor Mammedov |
Subject: |
Re: [PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors |
Date: |
Fri, 11 Nov 2022 10:43:30 +0100 |
On Thu, 10 Nov 2022 09:28:44 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:
> On Wed, 9 Nov 2022 at 21:42, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> > > > diff --git a/hw/display/meson.build b/hw/display/meson.build
> > > > index adc53dd8b6..7a725ed80e 100644
> > > > --- a/hw/display/meson.build
> > > > +++ b/hw/display/meson.build
> > > > @@ -38,10 +38,21 @@ softmmu_ss.add(when: 'CONFIG_NEXTCUBE', if_true:
> > > > files('next-fb.c'))
> > > > specific_ss.add(when: 'CONFIG_VGA', if_true: files('vga.c'))
> > > > +if (config_all_devices.has_key('CONFIG_VGA_CIRRUS') or
> > > > + config_all_devices.has_key('CONFIG_VGA_PCI') or
> > > > + config_all_devices.has_key('CONFIG_VMWARE_VGA') or
> > > > + config_all_devices.has_key('CONFIG_ATI_VGA')
> > > > + )
> > > > + softmmu_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-vga.c'),
> > > > + if_false:
> > > > files('acpi-vga-stub.c'))
> > > > +endif
> >
> > Igor what does CONFIG_ACPI mean? It depends on the target but this
> > library is target independent. Is this just always built then?
>
> That kind of config symbol means "some machine we want to build needs
> ACPI, so build it". So if you build at least one machine that needs
> ACPI, CONFIG_ACPI gets defined, and the acpi-specific files are built.
> If your QEMU configure line and possibly any custom config file
> mean you're not building any ACPI machines, then CONFIG_ACPI is
> not defined, and we don't need to build in the acpi-specifics,
> which makes the binary smaller. For instance if you set
> --target-list=or1k-softmmu then no machine wants ACPI and
> CONFIG_ACPI won't get set. If you set
> --target-list=or1k-softmmu,x86_64-softmmu
> then the PC machine types want ACPI and CONFIG_ACPI is set.
>
> (Essentially we're opting to make the build faster by building the
> object file once rather than per-target, at the cost of the
> executables for the target architectures which don't use the
> feature being a bit bigger with code they aren't going to use.)
>
> Note that this means that for a machine type which does not use ACPI, it
> may either:
> (1) be being built in the same build as a machine that does use
> ACPI, so be linked against the "real" ACPI source files
> (2) be being built in a build with no ACPI machines, so be
> linked against the stub files
>
> and it also means that the code in the "real" ACPI source files
> cannot assume that it's being used in a machine which is actually
> using ACPI.
Stubs only work because we create per target binaries,
so I'd expect acpi-vga.o and acpi-vga-stub.o being built and
linked accordingly.
Even if it were not the case linking 'real' code in this case
shouldn't have caused issues on machine that do not actually
invoke it.
Michael has already fixed issue removing pixman dependency in stub,
which I haven't noticed (my machines have the library installed
and CI at time of posting was green as well).
> thanks
> -- PMM
>
- [PULL v4 39/83] virtio-net: support queue_enable, (continued)
- [PULL v4 39/83] virtio-net: support queue_enable, Michael S. Tsirkin, 2022/11/07
- [PULL v4 37/83] virtio-net: introduce flush_or_purge_queued_packets(), Michael S. Tsirkin, 2022/11/07
- [PULL v4 40/83] vhost: vhost-kernel: enable vq reset feature, Michael S. Tsirkin, 2022/11/07
- [PULL v4 41/83] virtio-net: enable vq reset feature, Michael S. Tsirkin, 2022/11/07
- [PULL v4 43/83] vhost-user: Fix out of order vring host notification handling, Michael S. Tsirkin, 2022/11/07
- [PULL v4 42/83] virtio-rng-pci: Allow setting nvectors, so we can use MSI-X, Michael S. Tsirkin, 2022/11/07
- [PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors, Michael S. Tsirkin, 2022/11/07
- Re: [PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors, Ani Sinha, 2022/11/09
[PULL v4 45/83] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically, Michael S. Tsirkin, 2022/11/07
[PULL v4 47/83] tests: acpi: update expected DSDT after ISA bridge is moved directly under PCI host bridge, Michael S. Tsirkin, 2022/11/07
[PULL v4 48/83] tests: acpi: whitelist DSDT before generating ICH9_SMB AML automatically, Michael S. Tsirkin, 2022/11/07