mirror of
https://github.com/qemu/qemu.git
synced 2024-12-25 13:13:45 +08:00
a27bd6c779
In my "build everything" tree, changing hw/qdev-properties.h triggers a recompile of some 2700 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). Many places including hw/qdev-properties.h (directly or via hw/qdev.h) actually need only hw/qdev-core.h. Include hw/qdev-core.h there instead. hw/qdev.h is actually pointless: all it does is include hw/qdev-core.h and hw/qdev-properties.h, which in turn includes hw/qdev-core.h. Replace the remaining uses of hw/qdev.h by hw/qdev-properties.h. While there, delete a few superfluous inclusions of hw/qdev-core.h. Touching hw/qdev-properties.h now recompiles some 1200 objects. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190812052359.30071-22-armbru@redhat.com>
61 lines
2.0 KiB
C
61 lines
2.0 KiB
C
#ifndef ACPI_DEV_INTERFACE_H
|
|
#define ACPI_DEV_INTERFACE_H
|
|
|
|
#include "qapi/qapi-types-misc.h"
|
|
#include "qom/object.h"
|
|
#include "hw/boards.h"
|
|
#include "hw/qdev-core.h"
|
|
|
|
/* These values are part of guest ABI, and can not be changed */
|
|
typedef enum {
|
|
ACPI_PCI_HOTPLUG_STATUS = 2,
|
|
ACPI_CPU_HOTPLUG_STATUS = 4,
|
|
ACPI_MEMORY_HOTPLUG_STATUS = 8,
|
|
ACPI_NVDIMM_HOTPLUG_STATUS = 16,
|
|
ACPI_VMGENID_CHANGE_STATUS = 32,
|
|
} AcpiEventStatusBits;
|
|
|
|
#define TYPE_ACPI_DEVICE_IF "acpi-device-interface"
|
|
|
|
#define ACPI_DEVICE_IF_CLASS(klass) \
|
|
OBJECT_CLASS_CHECK(AcpiDeviceIfClass, (klass), \
|
|
TYPE_ACPI_DEVICE_IF)
|
|
#define ACPI_DEVICE_IF_GET_CLASS(obj) \
|
|
OBJECT_GET_CLASS(AcpiDeviceIfClass, (obj), \
|
|
TYPE_ACPI_DEVICE_IF)
|
|
#define ACPI_DEVICE_IF(obj) \
|
|
INTERFACE_CHECK(AcpiDeviceIf, (obj), \
|
|
TYPE_ACPI_DEVICE_IF)
|
|
|
|
typedef struct AcpiDeviceIf AcpiDeviceIf;
|
|
|
|
void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
|
|
|
|
/**
|
|
* AcpiDeviceIfClass:
|
|
*
|
|
* ospm_status: returns status of ACPI device objects, reported
|
|
* via _OST method if device supports it.
|
|
* send_event: inject a specified event into guest
|
|
* madt_cpu: fills @entry with Interrupt Controller Structure
|
|
* for CPU indexed by @uid in @apic_ids array,
|
|
* returned structure types are:
|
|
* 0 - Local APIC, 9 - Local x2APIC, 0xB - GICC
|
|
*
|
|
* Interface is designed for providing unified interface
|
|
* to generic ACPI functionality that could be used without
|
|
* knowledge about internals of actual device that implements
|
|
* ACPI interface.
|
|
*/
|
|
typedef struct AcpiDeviceIfClass {
|
|
/* <private> */
|
|
InterfaceClass parent_class;
|
|
|
|
/* <public> */
|
|
void (*ospm_status)(AcpiDeviceIf *adev, ACPIOSTInfoList ***list);
|
|
void (*send_event)(AcpiDeviceIf *adev, AcpiEventStatusBits ev);
|
|
void (*madt_cpu)(AcpiDeviceIf *adev, int uid,
|
|
const CPUArchIdList *apic_ids, GArray *entry);
|
|
} AcpiDeviceIfClass;
|
|
#endif
|