]> git.proxmox.com Git - mirror_qemu.git/blame - tests/libqos/libqos.h
libqos: Update QGuestAllocator to be opaque
[mirror_qemu.git] / tests / libqos / libqos.h
CommitLineData
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
8typedef struct QOSState {
9 QTestState *qts;
10 QGuestAllocator *alloc;
11} QOSState;
12
f1518d11 13QOSState *qtest_vboot(const char *cmdline_fmt, va_list ap);
dd0029c0
JS
14QOSState *qtest_boot(const char *cmdline_fmt, ...);
15void qtest_shutdown(QOSState *qs);
16
17static inline uint64_t qmalloc(QOSState *q, size_t bytes)
18{
19 return guest_alloc(q->alloc, bytes);
20}
21
22static inline void qfree(QOSState *q, uint64_t addr)
23{
24 guest_free(q->alloc, addr);
25}
26
27#endif