[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN v4 01/11] xen/Arm: vGICv3: Sysreg emulation is applicable for AArch64 only


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Date: Mon, 28 Nov 2022 15:56:39 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • 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=m0n8FAPk7U+uUmU83VhWA4RfQh2mMZ9KZJGNylb/20U=; b=MVtgSFk+HMDwepQIivWUgxmAfxiYRsd9X0G6fpffvGA2fQXx70D+Zh+v+LlX6FPtoyaus0HvLgzOWdQ7q08s10SUiYd4aGy9nTkfa4e8rTIdq0+1etygcQDepPsIMAoLagycGjCUBwTEGNOGoF7YcSkSL69xW6Oh/0t8sSqAWnVECUN3PTBIPoEwcF3mJHjvhG4uj7eJFNLBRrYWVaUSg+5Bs7f50fxvRpXK5SFSKo0R6cKCpAfNif7uYTkBoExhLDhQisryWI0HQE/QJBVO/PxPUM0stwLQ1GGbVeq1uvmx1N3+LgZ4i3Bs8qDAgB10VDe4/8OpVcKHs3K9bxmZlA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M6dVD3rMT0wqr3FDqJnw0VknGPV7rGjDHpAGHQBwQDHRvna5mzfZMWrs22Wtsestr+QqlwnzRlcG0wgpamYK+rgQR+mjkirlHzlot1oJ+T755QBFEgxYVUmjrZrPepF3+UAqteKvF31RlsxeyifwVQaKDh4CWLHrm3lKuhb1/pUPyFQIyFJ4MkqSV6eBy2HVgl4kFmDLxUHixBaqY93srH4tklQ/VMEbu2HHArhD6KT45Z1OdGELkWsP52gnzFOm91eMncL+KJYk0va/l/PzybgJjVZ0t4Dqjw+I6OinF8nsD2aT6qEEls97iDeySNApiz0fwohzL4I/l0mZyx3ycw==
  • Cc: <sstabellini@xxxxxxxxxx>, <stefanos@xxxxxxxxxx>, <julien@xxxxxxx>, <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <michal.orzel@xxxxxxx>, <jgrall@xxxxxxxxxx>, <burzalodowa@xxxxxxxxx>, "Ayan Kumar Halder" <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Mon, 28 Nov 2022 15:57:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Sysreg emulation is 64-bit specific, so guard the calls to
vgic_v3_emulate_sysreg() as well as the function itself with
"#ifdef CONFIG_ARM_64".

Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
Acked-by: Julien Grall <julien@xxxxxxx>
---

Changes from -
v1 - 1. Updated the commit message.

v2 - 1. Updated the commit message (removed the reference to Arm ARM as it is
not required).

v3 - No changes. Added Rb and Ack.

 xen/arch/arm/vgic-v3.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c
index 015446be17..3f4509dcd3 100644
--- a/xen/arch/arm/vgic-v3.c
+++ b/xen/arch/arm/vgic-v3.c
@@ -1519,6 +1519,7 @@ static bool vgic_v3_emulate_sgi1r(struct cpu_user_regs 
*regs, uint64_t *r,
     }
 }
 
+#ifdef CONFIG_ARM_64
 static bool vgic_v3_emulate_sysreg(struct cpu_user_regs *regs, union hsr hsr)
 {
     struct hsr_sysreg sysreg = hsr.sysreg;
@@ -1539,6 +1540,7 @@ static bool vgic_v3_emulate_sysreg(struct cpu_user_regs 
*regs, union hsr hsr)
         return false;
     }
 }
+#endif
 
 static bool vgic_v3_emulate_cp64(struct cpu_user_regs *regs, union hsr hsr)
 {
@@ -1562,8 +1564,10 @@ static bool vgic_v3_emulate_reg(struct cpu_user_regs 
*regs, union hsr hsr)
 {
     switch (hsr.ec)
     {
+#ifdef CONFIG_ARM_64
     case HSR_EC_SYSREG:
         return vgic_v3_emulate_sysreg(regs, hsr);
+#endif
     case HSR_EC_CP15_64:
         return vgic_v3_emulate_cp64(regs, hsr);
     default:
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.