aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi/acpi_interface.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-06-16 19:12:26 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 18:44:22 +0300
commit521b3673ac16ec7fa33b1ec2cdfe75ec708f073e (patch)
tree5126aa874621807f4aaa7cd45f5d8bacc6afed9e /hw/acpi/acpi_interface.c
parent6f2e27301d8cfea0a40dda7ec8a6dc1b9d0e228e (diff)
acpi: introduce TYPE_ACPI_DEVICE_IF interface
... it will be used to abstract generic ACPI bits from device that implements ACPI interface. ACPIOSTInfo type is used for passing-through raw _OST event/status codes reported by guest OS to a management layer. It lets management tools interpret values as specified by ACPI spec if it is interested in it. QEMU doesn't encode these values as enum, since it doesn't need to handle them and it allows interface to scale well without any changes in QEMU while guest OS and management evolves in time. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi/acpi_interface.c')
-rw-r--r--hw/acpi/acpi_interface.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/acpi/acpi_interface.c b/hw/acpi/acpi_interface.c
new file mode 100644
index 0000000000..c181bb2262
--- /dev/null
+++ b/hw/acpi/acpi_interface.c
@@ -0,0 +1,15 @@
+#include "hw/acpi/acpi_dev_interface.h"
+#include "qemu/module.h"
+
+static void register_types(void)
+{
+ static const TypeInfo acpi_dev_if_info = {
+ .name = TYPE_ACPI_DEVICE_IF,
+ .parent = TYPE_INTERFACE,
+ .class_size = sizeof(AcpiDeviceIfClass),
+ };
+
+ type_register_static(&acpi_dev_if_info);
+}
+
+type_init(register_types)