2016-02-08 21:08:51 +03:00
|
|
|
#include "qemu/osdep.h"
|
2015-01-19 23:15:55 +03:00
|
|
|
#include "libqos/libqos-pc.h"
|
|
|
|
#include "libqos/malloc-pc.h"
|
2016-09-29 13:32:45 +03:00
|
|
|
#include "libqos/pci-pc.h"
|
2015-01-19 23:15:55 +03:00
|
|
|
|
|
|
|
static QOSOps qos_ops = {
|
|
|
|
.init_allocator = pc_alloc_init_flags,
|
2016-09-29 13:32:45 +03:00
|
|
|
.uninit_allocator = pc_alloc_uninit,
|
|
|
|
.qpci_init = qpci_init_pc,
|
|
|
|
.qpci_free = qpci_free_pc,
|
2016-09-29 13:32:46 +03:00
|
|
|
.shutdown = qtest_pc_shutdown,
|
2015-01-19 23:15:55 +03:00
|
|
|
};
|
|
|
|
|
2015-04-28 22:27:51 +03:00
|
|
|
QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap)
|
|
|
|
{
|
|
|
|
return qtest_vboot(&qos_ops, cmdline_fmt, ap);
|
|
|
|
}
|
|
|
|
|
2015-01-19 23:15:55 +03:00
|
|
|
QOSState *qtest_pc_boot(const char *cmdline_fmt, ...)
|
|
|
|
{
|
|
|
|
QOSState *qs;
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, cmdline_fmt);
|
|
|
|
qs = qtest_vboot(&qos_ops, cmdline_fmt, ap);
|
|
|
|
va_end(ap);
|
|
|
|
|
2016-09-13 15:52:44 +03:00
|
|
|
qtest_irq_intercept_in(global_qtest, "ioapic");
|
|
|
|
|
2015-01-19 23:15:55 +03:00
|
|
|
return qs;
|
|
|
|
}
|
|
|
|
|
|
|
|
void qtest_pc_shutdown(QOSState *qs)
|
|
|
|
{
|
2016-09-29 13:32:46 +03:00
|
|
|
return qtest_common_shutdown(qs);
|
2015-01-19 23:15:55 +03:00
|
|
|
}
|