8 typedef struct QOSState QOSState
;
10 typedef struct QOSOps
{
11 void (*alloc_init
)(QGuestAllocator
*, QTestState
*, QAllocOpts
);
12 QPCIBus
*(*qpci_new
)(QTestState
*qts
, QGuestAllocator
*alloc
);
13 void (*qpci_free
)(QPCIBus
*bus
);
14 void (*shutdown
)(QOSState
*);
19 QGuestAllocator alloc
;
24 QOSState
*qtest_vboot(QOSOps
*ops
, const char *cmdline_fmt
, va_list ap
);
25 QOSState
*qtest_boot(QOSOps
*ops
, const char *cmdline_fmt
, ...);
26 void qtest_common_shutdown(QOSState
*qs
);
27 void qtest_shutdown(QOSState
*qs
);
28 bool have_qemu_img(void);
29 void mkimg(const char *file
, const char *fmt
, unsigned size_mb
);
30 void mkqcow2(const char *file
, unsigned size_mb
);
31 void migrate(QOSState
*from
, QOSState
*to
, const char *uri
);
32 void prepare_blkdebug_script(const char *debug_fn
, const char *event
);
33 void generate_pattern(void *buffer
, size_t len
, size_t cycle_len
);
35 static inline uint64_t qmalloc(QOSState
*q
, size_t bytes
)
37 return guest_alloc(&q
->alloc
, bytes
);
40 static inline void qfree(QOSState
*q
, uint64_t addr
)
42 guest_free(&q
->alloc
, addr
);