]>
Commit | Line | Data |
---|---|---|
dd0029c0 JS |
1 | #ifndef __libqos_h |
2 | #define __libqos_h | |
3 | ||
4 | #include "libqtest.h" | |
5 | #include "libqos/pci.h" | |
6 | #include "libqos/malloc-pc.h" | |
7 | ||
8 | typedef struct QOSState { | |
9 | QTestState *qts; | |
10 | QGuestAllocator *alloc; | |
11 | } QOSState; | |
12 | ||
f1518d11 | 13 | QOSState *qtest_vboot(const char *cmdline_fmt, va_list ap); |
dd0029c0 JS |
14 | QOSState *qtest_boot(const char *cmdline_fmt, ...); |
15 | void qtest_shutdown(QOSState *qs); | |
16 | ||
17 | static inline uint64_t qmalloc(QOSState *q, size_t bytes) | |
18 | { | |
19 | return guest_alloc(q->alloc, bytes); | |
20 | } | |
21 | ||
22 | static inline void qfree(QOSState *q, uint64_t addr) | |
23 | { | |
24 | guest_free(q->alloc, addr); | |
25 | } | |
26 | ||
27 | #endif |