From nobody Tue Apr 7 21:50:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1775137510; cv=none; d=zohomail.com; s=zohoarc; b=NYEljK+f8cfFKXJrezBghVeJJffN8Fghfi8FRKPkDiAr5XB+c5Uo1WnqUtJ9bT48cLGNzTz5YNYV00rwULjlZcpmoAnf0DXhj6lRfb7jZDJbkTJmVEhMqInNFiEVNqZo73e88QYYhVMu5mCHpZyU9OzskQqWENTanuo6D/Yxt8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775137510; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6q4UfRU/uNzF6gX/u55VyAfKGDcltvG8skg+piojXoU=; b=W3sC+BnNnJDguklligCcgbGdlOUabtk97vo6CnHjjost2gw8EGvXUyMnUUoXsLYiIOjBAgmn1zL5IIycPI2cEhow8TDYPaiAS6Agr/ZZVV9j/6UQDCra8WjwQ95E0enRWxJXl6qkIhQzAMPPich+mNcbL7LD5azDekl/8yWlgSo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775137510639286.33378989240407; Thu, 2 Apr 2026 06:45:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w8IL2-00082u-Sr; Thu, 02 Apr 2026 09:44:01 -0400 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 1w8IKt-0004lE-La; Thu, 02 Apr 2026 09:43:51 -0400 Received: from linux.microsoft.com ([13.77.154.182]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w8HYD-0008T0-GI; Thu, 02 Apr 2026 08:53:36 -0400 Received: from localhost (unknown [131.107.147.136]) by linux.microsoft.com (Postfix) with ESMTPSA id D146620B6F08; Thu, 2 Apr 2026 05:53:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D146620B6F08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1775134386; bh=6q4UfRU/uNzF6gX/u55VyAfKGDcltvG8skg+piojXoU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EbER5pjnPA3lYo+NEwudBLBmWlXPG6KrZsYC09xfVDhHNRyZSaPerOGwDdBkatNUV nRZEVbDte/vcTm28OaNJf3F/8Bhfcb3+ukdkan1n18VwPqSFnC4Eg1nuiUa2jSHKzu Ms5j5lT3Y6haFz+bjcsuRuSQk7uyiSGMgOefRIuA= From: Aastha Rawat Date: Thu, 02 Apr 2026 12:52:39 +0000 Subject: [PATCH v2 12/14] include/hw/hyperv: adjust hv_interrupt_control structure for arm64 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260402-mshv_accel_arm64_supp-v2-12-754895c15e9e@linux.microsoft.com> References: <20260402-mshv_accel_arm64_supp-v2-0-754895c15e9e@linux.microsoft.com> In-Reply-To: <20260402-mshv_accel_arm64_supp-v2-0-754895c15e9e@linux.microsoft.com> To: qemu-devel@nongnu.org Cc: Magnus Kulke , Wei Liu , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Anirudh Rayabharam , Aastha Rawat , Magnus Kulke , qemu-arm@nongnu.org, Alexander Graf , Pedro Barbuda , Mohamed Mediouni X-Mailer: b4 0.15.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=13.77.154.182; envelope-from=aastharawat@linux.microsoft.com; helo=linux.microsoft.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linux.microsoft.com) X-ZM-MESSAGEID: 1775137512790158500 From: "Anirudh Rayabharam (Microsoft)" Add the arm64 specific fields to the hv_interrupt_control struct and adjust the existing usage accordingly. mshv_request_interrupt is only needed only for x86 so compile it out entirely for arm64. Signed-off-by: Anirudh Rayabharam (Microsoft) --- accel/mshv/irq.c | 2 ++ include/hw/hyperv/hvgdk_mini.h | 25 +++++++++++++++++++++++++ include/system/mshv.h | 2 ++ 3 files changed, 29 insertions(+) diff --git a/accel/mshv/irq.c b/accel/mshv/irq.c index 3c238c33c3..a391d7db86 100644 --- a/accel/mshv/irq.c +++ b/accel/mshv/irq.c @@ -310,6 +310,7 @@ int mshv_irqchip_update_msi_route(int virq, MSIMessage = msg, PCIDevice *dev) return 0; } =20 +#if defined(__x86_64__) int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type,= uint32_t vector, uint32_t vp_index, bool logical_dest_mode, bool level_triggered) @@ -346,6 +347,7 @@ int mshv_request_interrupt(MshvState *mshv_state, uint3= 2_t interrupt_type, uint3 } return 0; } +#endif =20 void mshv_irqchip_commit_routes(void) { diff --git a/include/hw/hyperv/hvgdk_mini.h b/include/hw/hyperv/hvgdk_mini.h index 84b3c6af5f..eb766734d6 100644 --- a/include/hw/hyperv/hvgdk_mini.h +++ b/include/hw/hyperv/hvgdk_mini.h @@ -506,13 +506,38 @@ typedef struct hv_input_set_vp_registers { struct hv_register_assoc elements[]; } hv_input_set_vp_registers; =20 +enum hv_interrupt_type { +#if defined(__x86_64__) + HV_X64_INTERRUPT_TYPE_FIXED =3D 0x0000, + HV_X64_INTERRUPT_TYPE_LOWESTPRIORITY =3D 0x0001, + HV_X64_INTERRUPT_TYPE_SMI =3D 0x0002, + HV_X64_INTERRUPT_TYPE_REMOTEREAD =3D 0x0003, + HV_X64_INTERRUPT_TYPE_NMI =3D 0x0004, + HV_X64_INTERRUPT_TYPE_INIT =3D 0x0005, + HV_X64_INTERRUPT_TYPE_SIPI =3D 0x0006, + HV_X64_INTERRUPT_TYPE_EXTINT =3D 0x0007, + HV_X64_INTERRUPT_TYPE_LOCALINT0 =3D 0x0008, + HV_X64_INTERRUPT_TYPE_LOCALINT1 =3D 0x0009, + HV_X64_INTERRUPT_TYPE_MAXIMUM =3D 0x000A, +#elif defined(__aarch64__) + HV_ARM64_INTERRUPT_TYPE_FIXED =3D 0x0000, + HV_ARM64_INTERRUPT_TYPE_MAXIMUM =3D 0x0008, +#endif +}; + union hv_interrupt_control { uint64_t as_uint64; struct { uint32_t interrupt_type; /* enum hv_interrupt type */ +#if defined(__x86_64__) uint32_t level_triggered:1; uint32_t logical_dest_mode:1; uint32_t rsvd:30; +#elif defined(__aarch64__) + uint32_t rsvd1:2; + uint32_t asserted:1; + uint32_t rsvd2:29; +#endif }; }; =20 diff --git a/include/system/mshv.h b/include/system/mshv.h index 75286baf16..0db18fcee9 100644 --- a/include/system/mshv.h +++ b/include/system/mshv.h @@ -47,10 +47,12 @@ extern bool mshv_allowed; typedef struct MshvState MshvState; extern MshvState *mshv_state; =20 +#if defined(__x86_64__) /* interrupt */ int mshv_request_interrupt(MshvState *mshv_state, uint32_t interrupt_type,= uint32_t vector, uint32_t vp_index, bool logical_destination_mod= e, bool level_triggered); +#endif =20 int mshv_irqchip_add_msi_route(int vector, PCIDevice *dev); int mshv_irqchip_update_msi_route(int virq, MSIMessage msg, PCIDevice *dev= ); --=20 2.45.4