xref: /qemu/include/hw/ppc/xics_spapr.h (revision 9db8c551c98c285bad2ed19ce28a721d33c20d2f)
1a51d5afcSThomas Huth /*
2a51d5afcSThomas Huth  * QEMU PowerPC pSeries Logical Partition (aka sPAPR) hardware System Emulator
3a51d5afcSThomas Huth  *
4a51d5afcSThomas Huth  * PAPR Virtualized Interrupt System, aka ICS/ICP aka xics
5a51d5afcSThomas Huth  *
6a51d5afcSThomas Huth  * Copyright (c) 2010, 2011 David Gibson, IBM Corporation.
7a51d5afcSThomas Huth  *
8a51d5afcSThomas Huth  * Permission is hereby granted, free of charge, to any person obtaining a copy
9a51d5afcSThomas Huth  * of this software and associated documentation files (the "Software"), to deal
10a51d5afcSThomas Huth  * in the Software without restriction, including without limitation the rights
11a51d5afcSThomas Huth  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12a51d5afcSThomas Huth  * copies of the Software, and to permit persons to whom the Software is
13a51d5afcSThomas Huth  * furnished to do so, subject to the following conditions:
14a51d5afcSThomas Huth  *
15a51d5afcSThomas Huth  * The above copyright notice and this permission notice shall be included in
16a51d5afcSThomas Huth  * all copies or substantial portions of the Software.
17a51d5afcSThomas Huth  *
18a51d5afcSThomas Huth  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19a51d5afcSThomas Huth  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20a51d5afcSThomas Huth  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21a51d5afcSThomas Huth  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22a51d5afcSThomas Huth  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23a51d5afcSThomas Huth  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24a51d5afcSThomas Huth  * THE SOFTWARE.
25a51d5afcSThomas Huth  */
26a51d5afcSThomas Huth 
27a51d5afcSThomas Huth #ifndef XICS_SPAPR_H
28a51d5afcSThomas Huth #define XICS_SPAPR_H
29a51d5afcSThomas Huth 
30a51d5afcSThomas Huth #include "hw/ppc/spapr.h"
31a51d5afcSThomas Huth 
32743ed566SGreg Kurz #define XICS_NODENAME "interrupt-controller"
33743ed566SGreg Kurz 
34*9db8c551SDavid Gibson #define TYPE_ICS_SPAPR "ics-spapr"
35*9db8c551SDavid Gibson #define ICS_SPAPR(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_SPAPR)
36*9db8c551SDavid Gibson 
37ce2918cbSDavid Gibson void spapr_dt_xics(SpaprMachineState *spapr, uint32_t nr_servers, void *fdt,
38a51d5afcSThomas Huth                    uint32_t phandle);
39eab9f191SGreg Kurz int xics_kvm_connect(SpaprMachineState *spapr, Error **errp);
4056b11587SCédric Le Goater void xics_kvm_disconnect(SpaprMachineState *spapr, Error **errp);
417abc0c6dSGreg Kurz bool xics_kvm_has_broken_disconnect(SpaprMachineState *spapr);
42a51d5afcSThomas Huth 
43a51d5afcSThomas Huth #endif /* XICS_SPAPR_H */
44