~ubuntu-branches/ubuntu/wily/qemu-kvm-spice/wily

« back to all changes in this revision

Viewing changes to hw/pci_internals.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-10-19 10:44:56 UTC
  • Revision ID: james.westby@ubuntu.com-20111019104456-xgvskumk3sxi97f4
Tags: upstream-0.15.0+noroms
ImportĀ upstreamĀ versionĀ 0.15.0+noroms

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef QEMU_PCI_INTERNALS_H
 
2
#define QEMU_PCI_INTERNALS_H
 
3
 
 
4
/*
 
5
 * This header files is private to pci.c and pci_bridge.c
 
6
 * So following structures are opaque to others and shouldn't be
 
7
 * accessed.
 
8
 *
 
9
 * For pci-to-pci bridge needs to include this header file to embed
 
10
 * PCIBridge in its structure or to get sizeof(PCIBridge),
 
11
 * However, they shouldn't access those following members directly.
 
12
 * Use accessor function in pci.h, pci_bridge.h
 
13
 */
 
14
 
 
15
extern struct BusInfo pci_bus_info;
 
16
 
 
17
struct PCIBus {
 
18
    BusState qbus;
 
19
    uint8_t devfn_min;
 
20
    pci_set_irq_fn set_irq;
 
21
    pci_map_irq_fn map_irq;
 
22
    pci_hotplug_fn hotplug;
 
23
    DeviceState *hotplug_qdev;
 
24
    void *irq_opaque;
 
25
    PCIDevice *devices[PCI_SLOT_MAX * PCI_FUNC_MAX];
 
26
    PCIDevice *parent_dev;
 
27
    target_phys_addr_t mem_base;
 
28
 
 
29
    QLIST_HEAD(, PCIBus) child; /* this will be replaced by qdev later */
 
30
    QLIST_ENTRY(PCIBus) sibling;/* this will be replaced by qdev later */
 
31
 
 
32
    /* The bus IRQ state is the logical OR of the connected devices.
 
33
       Keep a count of the number of devices with raised IRQs.  */
 
34
    int nirq;
 
35
    int *irq_count;
 
36
};
 
37
 
 
38
struct PCIBridge {
 
39
    PCIDevice dev;
 
40
 
 
41
    /* private member */
 
42
    PCIBus sec_bus;
 
43
    pci_map_irq_fn map_irq;
 
44
    const char *bus_name;
 
45
};
 
46
 
 
47
#endif /* QEMU_PCI_INTERNALS_H */