Add qemu 2.4.0
[kvmfornfv.git] / qemu / include / hw / cpu / icc_bus.h
1 /* icc_bus.h
2  * emulate x86 ICC (Interrupt Controller Communications) bus
3  *
4  * Copyright (c) 2013 Red Hat, Inc
5  *
6  * Authors:
7  *     Igor Mammedov <imammedo@redhat.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, see <http://www.gnu.org/licenses/>
21  */
22 #ifndef ICC_BUS_H
23 #define ICC_BUS_H
24
25 #include "exec/memory.h"
26 #include "hw/qdev-core.h"
27
28 #define TYPE_ICC_BUS "icc-bus"
29
30 #ifndef CONFIG_USER_ONLY
31
32 /**
33  * ICCBus:
34  *
35  * ICC bus
36  */
37 typedef struct ICCBus {
38     /*< private >*/
39     BusState parent_obj;
40     /*< public >*/
41
42     MemoryRegion *apic_address_space;
43 } ICCBus;
44
45 #define ICC_BUS(obj) OBJECT_CHECK(ICCBus, (obj), TYPE_ICC_BUS)
46
47 /**
48  * ICCDevice:
49  *
50  * ICC device
51  */
52 typedef struct ICCDevice {
53     /*< private >*/
54     DeviceState qdev;
55     /*< public >*/
56 } ICCDevice;
57
58 /**
59  * ICCDeviceClass:
60  * @init: Initialization callback for derived classes.
61  *
62  * ICC device class
63  */
64 typedef struct ICCDeviceClass {
65     /*< private >*/
66     DeviceClass parent_class;
67     /*< public >*/
68
69     DeviceRealize realize;
70 } ICCDeviceClass;
71
72 #define TYPE_ICC_DEVICE "icc-device"
73 #define ICC_DEVICE(obj) OBJECT_CHECK(ICCDevice, (obj), TYPE_ICC_DEVICE)
74 #define ICC_DEVICE_CLASS(klass) \
75      OBJECT_CLASS_CHECK(ICCDeviceClass, (klass), TYPE_ICC_DEVICE)
76 #define ICC_DEVICE_GET_CLASS(obj) \
77      OBJECT_GET_CLASS(ICCDeviceClass, (obj), TYPE_ICC_DEVICE)
78
79 #define TYPE_ICC_BRIDGE "icc-bridge"
80
81 #endif /* CONFIG_USER_ONLY */
82 #endif