Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210311-pull-request' into...
[qemu/ar7.git] / tests / qtest / libqos / pci-pc.h
blob49ec9507f22de21a6c01f6023b39c2ac884cdc86
1 /*
2 * libqos PCI bindings for PC
4 * Copyright IBM, Corp. 2012-2013
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
13 #ifndef LIBQOS_PCI_PC_H
14 #define LIBQOS_PCI_PC_H
16 #include "pci.h"
17 #include "malloc.h"
18 #include "qgraph.h"
20 typedef struct QPCIBusPC {
21 QOSGraphObject obj;
22 QPCIBus bus;
23 } QPCIBusPC;
25 /* qpci_init_pc():
26 * @ret: A valid QPCIBusPC * pointer
27 * @qts: The %QTestState for this PC machine
28 * @alloc: A previously initialized @alloc providing memory for @qts
30 * This function initializes an already allocated
31 * QPCIBusPC object.
33 void qpci_init_pc(QPCIBusPC *ret, QTestState *qts, QGuestAllocator *alloc);
35 /* qpci_pc_new():
36 * @qts: The %QTestState for this PC machine
37 * @alloc: A previously initialized @alloc providing memory for @qts
39 * This function creates a new QPCIBusPC object,
40 * and properly initialize its fields.
42 * Returns the QPCIBus *bus field of a newly
43 * allocated QPCIBusPC.
45 QPCIBus *qpci_new_pc(QTestState *qts, QGuestAllocator *alloc);
47 void qpci_free_pc(QPCIBus *bus);
49 #endif