aboutsummaryrefslogtreecommitdiff
path: root/include/hw/acpi/acpi_dev_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/acpi/acpi_dev_interface.h')
-rw-r--r--include/hw/acpi/acpi_dev_interface.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
index f245f8d236..a0c4a336f2 100644
--- a/include/hw/acpi/acpi_dev_interface.h
+++ b/include/hw/acpi/acpi_dev_interface.h
@@ -4,6 +4,13 @@
#include "qom/object.h"
#include "qapi-types.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,
+} AcpiEventStatusBits;
+
#define TYPE_ACPI_DEVICE_IF "acpi-device-interface"
#define ACPI_DEVICE_IF_CLASS(klass) \
@@ -22,11 +29,14 @@ typedef struct AcpiDeviceIf {
Object Parent;
} 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
*
* Interface is designed for providing unified interface
* to generic ACPI functionality that could be used without
@@ -39,5 +49,6 @@ typedef struct AcpiDeviceIfClass {
/* <public> */
void (*ospm_status)(AcpiDeviceIf *adev, ACPIOSTInfoList ***list);
+ void (*send_event)(AcpiDeviceIf *adev, AcpiEventStatusBits ev);
} AcpiDeviceIfClass;
#endif