Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190714' into staging
[qemu/ar7.git] / tests / libqos / pci-pc.h
blob4690005232342636a6bd01fc5a0838ca9b146b7b
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 "libqos/pci.h"
17 #include "libqos/malloc.h"
18 #include "libqos/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