From patchwork Tue Dec 19 14:09:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mykyta Poturai X-Patchwork-Id: 1877963 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=epam.com header.i=@epam.com header.a=rsa-sha256 header.s=selector2 header.b=FSqkDz8J; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Svdsk4C1Hz20H4 for ; Wed, 20 Dec 2023 01:11:37 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFanz-0004n0-HS; Tue, 19 Dec 2023 09:10:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFans-0004jl-9K; Tue, 19 Dec 2023 09:10:39 -0500 Received: from mx0a-0039f301.pphosted.com ([148.163.133.242]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFanj-0005LW-7L; Tue, 19 Dec 2023 09:10:32 -0500 Received: from pps.filterd (m0174678.ppops.net [127.0.0.1]) by mx0a-0039f301.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BJCnnqL003504; Tue, 19 Dec 2023 14:10:20 GMT Received: from eur01-db5-obe.outbound.protection.outlook.com (mail-db5eur01lp2050.outbound.protection.outlook.com [104.47.2.50]) by mx0a-0039f301.pphosted.com (PPS) with ESMTPS id 3v37dpsfmp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 14:10:18 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTDgVSnWqgVvArgEZDKKhAi32s7kGOkHMHZVz1sIWyysq+NqUei5TwsXi10viiuFLQCy6ce9qdtQsdZY6cz+E/WNkXZ/y7oN0PgRDXf3EQWWkdD33FFOvCc7H183pxw7fQcr27uRWa4ifXAgbqD1TU7JhkstIg02tgUKIAU25mn6jHNaSR6I462nfHtagZsA6Y7lBbfRUo1Y4WNNtn7v6Emt0VvM/sfwFgNJadOPjURcJuIcnOsEDXwkrvIx+dVjCXzhRF+BiiJgRS+MmmKJhk694vCY/K2aiV/Ak4YakVzsvMuI6XbKCLbAMkuaLWbJT6gyCOJMtn+R9EzRNOCcFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a23FITDTAx1sJkgoZyW47skK1vW+hljud755Kt7J/9s=; b=ckZVafD9Eza4lVFSKeGutdytbdeNe6jxI/S8weXS9Qbh1rQsp2+6kRblVoYs+fNUFJt3LqzqWZ4PkjjRb5+Y6J+2A9kzfujfruQNLliyV465Kc17/fPOY1iasy3jSnLBh2GrXEblZ+difceeJz751yucXFmeZim4vTzrq/LhWcssDcMT7A5Fo4H4M9xRD6WEXRYwCcLxVgH6vACBxBLfhqysyvn7B/OgBpvWE8dRzV9INFwjeHt6Ox91Icm58AD90p+FNjf/ABQePie17LvyYZwnNUlPIYJbMjHoljavRwoV+fbPh3nFIW1z/IWGg3btV+Flk5oyTvrEAsYsorRDEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a23FITDTAx1sJkgoZyW47skK1vW+hljud755Kt7J/9s=; b=FSqkDz8JJRLXJAtVacNQ+XaaesmT3YR0ufbYN5Ouqhc/PUaLs59hwDOsoXBpCHX17HMZzXeYU2G2e+9H1pb9cTbu6FSyrVhZCRAncJl5LHNNdPYYYGTfGPBD1oe+xQxT6tFFsY1C15aVgBpNhzn8+empH1nnktfPkf+rfxde8t6inoUoHuvkdTE2lri8u7+Impvoqr5kXGqW8Ete13HGb/jPyceT/gftmw9clilZXyCWin/SqJr49kYs6gIhZFQKUWSsDh14Xywa03sDPG3ovDebom88usp17qSMfDkAyuBtjeCv3kSlFC5JkyDZ7wth3u9iyj4Ql28MdIW15vhEuQ== Received: from PAVPR03MB10102.eurprd03.prod.outlook.com (2603:10a6:102:30d::12) by PAWPR03MB8937.eurprd03.prod.outlook.com (2603:10a6:102:331::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Tue, 19 Dec 2023 14:09:52 +0000 Received: from PAVPR03MB10102.eurprd03.prod.outlook.com ([fe80::3776:9f2d:8305:b645]) by PAVPR03MB10102.eurprd03.prod.outlook.com ([fe80::3776:9f2d:8305:b645%6]) with mapi id 15.20.7091.028; Tue, 19 Dec 2023 14:09:52 +0000 From: Mykyta Poturai To: "qemu-devel@nongnu.org" CC: Mykyta Poturai , Peter Maydell , "open list:ARM TCG CPUs" Subject: [RFC PATCH] xen_arm: its: Introduce arm_gicv3_its_xen Thread-Topic: [RFC PATCH] xen_arm: its: Introduce arm_gicv3_its_xen Thread-Index: AQHaMoUIMwx7bYR/c0usBD9ndQcGqQ== Date: Tue, 19 Dec 2023 14:09:52 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAVPR03MB10102:EE_|PAWPR03MB8937:EE_ x-ms-office365-filtering-correlation-id: 495bfe57-680a-461d-fa41-08dc009c2b4f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PsozmHuXu0grm5s9VqIhodACTq/o5uCfUcYRnXHl+3FzvdTUzvjbcmgzgAh9U9w++LE0KZtytMpl9p90AxNwT3XdOuUAtZ73dcYZC6UZAGLYjYrVKvCXG0odFQ0oCAE/6WZlQ8WX2VM+T1bA2ZkiBZOmDkqK9iLi1Jv3o5gdeCaF+6ezrbHTLEkay+1qbUSuIyjqRPpLvtZdzIbtAyQi8dtCHkHWbwtFFWSEB1crQBPbPgltf8aRAen5YW3qHwJnr07EkERwmW6uLmGBP8/+Dmqhy75LZ7n7+rzzkr5yb9enfihhK64ALfYhOi+TzFHqp1rcSloY6nclyCBYa4WfTVPC3L1ws0nZd6aQy8IvN5i/exofsnr+AGqPtFf5nMA87pPAOsoQQIK4L/CuiWARvWhRAaaqJkKf7Zw8Gi1A3nZhSB9+gn7CE5JTNgykVB7Udq2kCtY7vRjd1EQZP35GabMxS4TIshsCp4nQnpZLn77zCcx71QsFzfSCJ2uM2UOH5n+WPyJTcrDgHS5PRjFGt2RTy/nkBzlBa6ScloDzayErx+ofsw39xOk8CkJF1wFWKNkXUh2sP/w3z8LCjTLXNHNKCbEEkXRlp4xt9XKCJhaiF+8uRY/CFpBm1RQO0N4s x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAVPR03MB10102.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(136003)(396003)(39860400002)(346002)(230922051799003)(451199024)(64100799003)(186009)(1800799012)(478600001)(2906002)(5660300002)(41300700001)(38070700009)(86362001)(36756003)(122000001)(19627235002)(26005)(6486002)(966005)(83380400001)(2616005)(66556008)(66946007)(66446008)(91956017)(76116006)(64756008)(6916009)(54906003)(316002)(66476007)(6506007)(38100700002)(71200400001)(6512007)(4326008)(8676002)(8936002)(2004002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?+zdW5pRqv6VgzDEd5+kLMrv?= =?iso-8859-1?q?eFJhwWZCSaiVKfXlWQ8J8mUkqgfgzTKLqa5/V2dWgqPmVOBUvLwOAGvNftmT?= =?iso-8859-1?q?4jxvFXG9hQPiVckXSvbNOoAtsn4pCQ8zvtF1uk5LiKiBIpb/GuMAwBfDZP4l?= =?iso-8859-1?q?wjo/zV/4SCiWvH5PVi/46tdz1uG/1i+n5hKK0cOk5bZU+dzcmF2pZxjDH4As?= =?iso-8859-1?q?QjVyGLYGiDpCu8hUOGUdiTUxJ6AkGkLv/5v0pRHA+TnoVy0tQ8+kOIF0QhQu?= =?iso-8859-1?q?IpSLtGd51HuDBRduZBwkgMaDYl22/O9b4Hts6ezUtqioFA+xCRe8L/2EPdTP?= =?iso-8859-1?q?Olx4ilBw7Jdt4DYQOLqzN7xdUNia+zE+CKyoMCW97VqQSir1IJJ8IgtsvIsy?= =?iso-8859-1?q?eXWzXriWxabpXFf86TFgW/bYljmQkIVKwoRFj/CQRk0McJMWsM+dDbIOWpOb?= =?iso-8859-1?q?EouLVwr0rawND1zKtdK4GMrp+vUsXZP3maYbiwnPXQKY9yN+ETMNxA++4V74?= =?iso-8859-1?q?RcIf1liyjO9Tu/r5OFq2MC7e7rPD0xiWZfyRWkrd8HqMQA7B/QSeWjCLWnYy?= =?iso-8859-1?q?F341BKDmsqatJD+/IRSJbRQva6GKAf9vZgxoK0E4r2kkx8LC1QKS1NK9nQ9V?= =?iso-8859-1?q?yqKEil9z4i5CamHtu4F/zNmF9tRAnTZVScDTfjxMBmn6VKROQbskZgAOMHBq?= =?iso-8859-1?q?aNGnYCWn7SZ7PGJvbt/lPh+CSMr9X6iM4BdoD9x+4vLM1fxg1E6D9z3xVLn9?= =?iso-8859-1?q?U0cmJzaLgK7oHRFPOlrH/wryrTVaGtUFPFkD0wfy5pfrhli2MnWbvnqWwdei?= =?iso-8859-1?q?QtaoSC5R7Cv5b/ac3m2gzXSlehYpPQTOg+cNX4GTnik+5BcX/cNvKaRg40hK?= =?iso-8859-1?q?ism9SauZUPeh9pHV5TQXA/vMguAC5plHKW3pshutaMckknOnj9Hkvle1epp7?= =?iso-8859-1?q?2POchGPSSDI10PKD4H05s6aOgvVZ+HJ4ziBQd50B1g8mwItGDQJpdBeGwhIc?= =?iso-8859-1?q?1gBUA6KERMuEIHZOJjhehP1WQZBKNvCyYFicG7q/wVd03BkRlsdWEvXTofUs?= =?iso-8859-1?q?X8JdpP0rNajR3cJoX09eM3xcDLYGVTElAhCeTnfInGpXela+HQd7lCD5ygH2?= =?iso-8859-1?q?uvfX4xZ/4A4KOCCYCkwUprts+FchEHmOhHFB4ksxLvCRqnYC9ptTc1xFc0x+?= =?iso-8859-1?q?Fo0jpvm9v44zTO2Q3Atv+xwEb6tm91qQ38gT9pntE0uAunzik5PihkcEwM+R?= =?iso-8859-1?q?SCjDTdXj+HLqsKuMcAumiCsFzHulKn1c8Yj2+ASHlSRJ9xrz5QFHqN45kMKT?= =?iso-8859-1?q?5qh/xx2tp9dgW1bGgx4uxkHq3aDuWg50klQs3byCcTWDN5DZgqLlfJLUyGky?= =?iso-8859-1?q?oBVqljZ7llnCY5e3+D5AgcYyODNKiXEVYLt1nzuMNt0M1yA6L78Sw+TokfKK?= =?iso-8859-1?q?jNGB5JAkYftZ9J/PerxF85HRdC95WpnvIib1fqwyEggvpBC2f/kHAg5FeLBb?= =?iso-8859-1?q?IFhlZ0FUWVhLtZApjJQ2x3YMEf37yo1hcbHhDvoQgvwgk9M2dJBE1mUrDcu3?= =?iso-8859-1?q?WyGjt9xUs6+tRCGsnIbLqQCmKaQtjn+5e+BOIVVAZJDYERqL8JGCXTrFqyBd?= =?iso-8859-1?q?hKYVCaDttuOfBZn1DN37sjYaXoglJ1JNl2rKrjQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAVPR03MB10102.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 495bfe57-680a-461d-fa41-08dc009c2b4f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2023 14:09:52.1196 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pUbUSZ06SPOh6qSaSaPgHmObjf7Byg0PCDIaNRzUMtJdfiNuQvYipfowNxIaXm8ZDp92YrqBPUr8T5z6NwHFDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR03MB8937 X-Proofpoint-GUID: GrBwZSuZecMyDmDfJbI2uilofU3I0BJJ X-Proofpoint-ORIG-GUID: GrBwZSuZecMyDmDfJbI2uilofU3I0BJJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 phishscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 clxscore=1011 spamscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312190106 Received-SPF: pass client-ip=148.163.133.242; envelope-from=prvs=6717fc9f42=mykyta_poturai@epam.com; helo=mx0a-0039f301.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Introduce the Xen variant of Arm ITS. It is hooked into the mmio subsystem and recieves MSI messages. Upon receiving the MSI messages it gets transfered to the Xen hypervisor with the new device model call for further processing. This change will allow for virtio-pci backends to send MSI interrupts to the Xen guests. Change marked as RFC to get some feedback on the approach while the relevant Xen changes are being reviewed. Link to relevant Xen changes: https://patchwork.kernel.org/project/xen-devel/patch/6a631756a126e73390f95b9e86c69e3286c92f59.1702991909.git.mykyta_poturai@epam.com Signed-off-by: Mykyta Poturai --- hw/arm/xen_arm.c | 6 ++ hw/intc/Kconfig | 5 ++ hw/intc/arm_gicv3_its_xen.c | 115 ++++++++++++++++++++++++++++++++++++ hw/intc/meson.build | 1 + 4 files changed, 127 insertions(+) create mode 100644 hw/intc/arm_gicv3_its_xen.c diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index 684973328a..ff7397edca 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -374,6 +374,7 @@ static void xen_enable_tpm(void) static void xen_arm_init(MachineState *machine) { XenArmState *xam = XEN_ARM(machine); + DeviceState *dev; int rc; if (!xen_enabled()) { @@ -405,6 +406,11 @@ static void xen_arm_init(MachineState *machine) xen_enable_tpm(); + dev = qdev_new("arm-its-xen"); + + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, GUEST_GICV3_ITS_BASE); + msi_nonbroken = true; return; } diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig index a7cf301eab..5bc0f5ec18 100644 --- a/hw/intc/Kconfig +++ b/hw/intc/Kconfig @@ -35,6 +35,11 @@ config ARM_GIC_KVM default y depends on ARM_GIC && KVM +config ARM_GIC_XEN + bool + default y + depends on ARM_GIC && XEN + config XICS bool diff --git a/hw/intc/arm_gicv3_its_xen.c b/hw/intc/arm_gicv3_its_xen.c new file mode 100644 index 0000000000..e05b761802 --- /dev/null +++ b/hw/intc/arm_gicv3_its_xen.c @@ -0,0 +1,115 @@ +/* + * Xen-based ITS implementation for a GICv3-based system + * + * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Written by Pavel Fedin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qemu/module.h" +#include "hw/intc/arm_gicv3_its_common.h" +#include "hw/xen/xen-hvm-common.h" +#include "hw/qdev-properties.h" +#include "sysemu/runstate.h" +#include "migration/blocker.h" +#include "qom/object.h" +#include "hw/pci/msi.h" +#include "qemu/log.h" + +#define TYPE_XEN_ARM_ITS "arm-its-xen" + +static MemTxResult gicv3_its_trans_read(void *opaque, hwaddr offset, + uint64_t *data, unsigned size, + MemTxAttrs attrs) +{ + printf("ITS read at offset 0x%"PRIx64"\n", offset); + *data = 0; + return MEMTX_OK; +} + +static MemTxResult gicv3_its_trans_write(void *opaque, hwaddr offset, + uint64_t value, unsigned size, + MemTxAttrs attrs) +{ + if (offset == 0x0040 && ((size == 2) || (size == 4))) { + GICv3ITSState *s = ARM_GICV3_ITS_COMMON(opaque); + GICv3ITSCommonClass *c = ARM_GICV3_ITS_COMMON_GET_CLASS(s); + int ret = c->send_msi(s, le64_to_cpu(value), attrs.requester_id); + + if (ret < 0) { + qemu_log_mask(LOG_GUEST_ERROR, + "ITS: Error sending MSI: %s\n", strerror(-ret)); + } + } else { + qemu_log_mask(LOG_GUEST_ERROR, + "ITS: Error sending MSI: %s\n", strerror(EINVAL)); + } + return MEMTX_OK; +} +static const MemoryRegionOps gicv3_its_trans_ops = { + .read_with_attrs = gicv3_its_trans_read, + .write_with_attrs = gicv3_its_trans_write, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +static int xen_its_send_msi(GICv3ITSState *s, uint32_t value, uint16_t devid) +{ + xendevicemodel_arm_inject_msi(xen_dmod, xen_domid, s->gits_translater_gpa, value, devid); + return 0; +} + +static void xen_arm_its_realize(DeviceState *dev, Error **errp) +{ + GICv3ITSState *s = ARM_GICV3_ITS_COMMON(dev); + SysBusDevice *sbd = SYS_BUS_DEVICE(s); + + memory_region_init_io(&s->iomem_its_translation, OBJECT(s), + &gicv3_its_trans_ops, s, + "translation", ITS_TRANS_SIZE); + + memory_region_init(&s->iomem_main, OBJECT(s), "gicv3_its", ITS_SIZE); + memory_region_add_subregion(&s->iomem_main, ITS_CONTROL_SIZE, + &s->iomem_its_translation); + sysbus_init_mmio(sbd, &s->iomem_main); + + printf("init mmio done\n"); + msi_nonbroken = true; + return; +} + +static void xen_arm_its_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + GICv3ITSCommonClass *icc = ARM_GICV3_ITS_COMMON_CLASS(klass); + + dc->realize = xen_arm_its_realize; + icc->send_msi = xen_its_send_msi; +} + +static const TypeInfo xen_arm_its_info = { + .name = TYPE_XEN_ARM_ITS, + .parent = TYPE_ARM_GICV3_ITS_COMMON, + .instance_size = sizeof(GICv3ITSState), + .class_init = xen_arm_its_class_init, +}; + +static void xen_arm_its_register_types(void) +{ + type_register_static(&xen_arm_its_info); +} + +type_init(xen_arm_its_register_types) diff --git a/hw/intc/meson.build b/hw/intc/meson.build index d6d012fb26..7c32c2886e 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -31,6 +31,7 @@ specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_common.c specific_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: files('arm_gicv3_cpuif.c')) specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c')) specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) +specific_ss.add(when: 'CONFIG_ARM_GIC_XEN', if_true: files('arm_gicv3_its_xen.c')) specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c')) specific_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c')) specific_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', 'exynos4210_combiner.c'))