mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hw/virtio/virtio-mem: Remove CONFIG_DEVICES include
Rather than checking ACPI availability at compile time by checking the CONFIG_ACPI definition from CONFIG_DEVICES, check at runtime via acpi_builtin(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250307223949.54040-5-philmd@linaro.org>
This commit is contained in:
parent
bb99b92a6b
commit
f410d702e4
1 changed files with 2 additions and 4 deletions
|
@ -28,7 +28,7 @@
|
|||
#include "migration/misc.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include CONFIG_DEVICES
|
||||
#include "hw/acpi/acpi.h"
|
||||
#include "trace.h"
|
||||
|
||||
static const VMStateDescription vmstate_virtio_mem_device_early;
|
||||
|
@ -883,10 +883,8 @@ static uint64_t virtio_mem_get_features(VirtIODevice *vdev, uint64_t features,
|
|||
MachineState *ms = MACHINE(qdev_get_machine());
|
||||
VirtIOMEM *vmem = VIRTIO_MEM(vdev);
|
||||
|
||||
if (ms->numa_state) {
|
||||
#if defined(CONFIG_ACPI)
|
||||
if (ms->numa_state && acpi_builtin()) {
|
||||
virtio_add_feature(&features, VIRTIO_MEM_F_ACPI_PXM);
|
||||
#endif
|
||||
}
|
||||
assert(vmem->unplugged_inaccessible != ON_OFF_AUTO_AUTO);
|
||||
if (vmem->unplugged_inaccessible == ON_OFF_AUTO_ON) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue