aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi/utils.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-06-17 11:55:14 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-06-17 11:55:14 +0100
commit5d0e5694470d2952b4f257bc985cac8c89b4fd92 (patch)
treea045f8e047841645d1422ba1e2649199980414ab /hw/acpi/utils.c
parent53defa05701b4915dfbce0829e4fc0aef853af2d (diff)
parent5f6b3561bf58395fd6c906d7064a1a5693a2e426 (diff)
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, acpi: fixes, cleanups A bunch of minor fixes all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 16 Jun 2019 21:46:31 BST # gpg: using RSA key 281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: tests/rebuild-expected-aml.sh: blow out difflist q35: update DSDT q35: fix mmconfig and PCI0._CRS hw/acpi: extract acpi_add_rom_blob() vhost: fix vhost_log size overflow during migration docs/vhost-user.json: some firmware.json copy leftovers vhost-user-gpu: initialize msghdr & iov at declaration vhost-user-input: check ioctl(EVIOCGNAME) return value vhost-user: improve error report vhost-user: check unix_listen() return value vhost-user-gpu: do not send scanout update if no GPU socket Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/acpi/utils.c')
-rw-r--r--hw/acpi/utils.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/hw/acpi/utils.c b/hw/acpi/utils.c
new file mode 100644
index 0000000000..a134a4d554
--- /dev/null
+++ b/hw/acpi/utils.c
@@ -0,0 +1,35 @@
+/*
+ * Utilities for generating ACPI tables and passing them to Guests
+ *
+ * Copyright (C) 2019 Intel Corporation
+ * Copyright (C) 2019 Red Hat Inc
+ *
+ * Author: Wei Yang <richardw.yang@linux.intel.com>
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "qemu/osdep.h"
+#include "hw/acpi/aml-build.h"
+#include "hw/acpi/utils.h"
+#include "hw/loader.h"
+
+MemoryRegion *acpi_add_rom_blob(FWCfgCallback update, void *opaque,
+ GArray *blob, const char *name,
+ uint64_t max_size)
+{
+ return rom_add_blob(name, blob->data, acpi_data_len(blob), max_size, -1,
+ name, update, opaque, NULL, true);
+}