blob: a37791e5d0df9f830b92d781d91b6b0ab640c201 [file] [log] [blame]
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +02001#include "qemu/osdep.h"
2#include "libqos/libqos-spapr.h"
3#include "libqos/malloc-spapr.h"
Laurent Vivier2ecd7e22016-09-29 12:32:45 +02004#include "libqos/pci-spapr.h"
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +02005
6static QOSOps qos_ops = {
7 .init_allocator = spapr_alloc_init_flags,
Laurent Vivier2ecd7e22016-09-29 12:32:45 +02008 .uninit_allocator = spapr_alloc_uninit,
9 .qpci_init = qpci_init_spapr,
10 .qpci_free = qpci_free_spapr,
Laurent Vivier61ae5cf2016-09-29 12:32:46 +020011 .shutdown = qtest_spapr_shutdown,
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +020012};
13
14QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap)
15{
16 return qtest_vboot(&qos_ops, cmdline_fmt, ap);
17}
18
19QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...)
20{
21 QOSState *qs;
22 va_list ap;
23
24 va_start(ap, cmdline_fmt);
25 qs = qtest_vboot(&qos_ops, cmdline_fmt, ap);
26 va_end(ap);
27
28 return qs;
29}
30
31void qtest_spapr_shutdown(QOSState *qs)
32{
Laurent Vivier61ae5cf2016-09-29 12:32:46 +020033 return qtest_common_shutdown(qs);
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +020034}