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

[XEN v5 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, 5 Dec 2022 13:26:27 +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=IfUXAZQrIKkiNagnHJ7wx2BrbdiMgcEKOEdkkFLHNBg=; b=ZCe0oI5AYCFt/kZpqYoCOOo7BBnSn7jzVwq8tEMfPH1PF+Prlr8pfZBA/RJR9WEIBGvKF0yowcXeVv0G3VzxIx1S7xsd6HXwfzu8qOiRC3ZXHC4duGpPMELOF/Ua8SuR7O9hf8mF1vZ9IkkuawSorSDl1UyOVL+Xe+IJv0qqyrNiswXG254bQ7dYQgCKIcc4QSvyDANmNfvLhSH5cPu5w6o4G/l8non5ubVoZ6fIUWqRbzWclr6tcfU7NR8LSsMDKoLJNPl+1IdJortOvKO0sqQ8ASmGxGunIH5StzSRQl06957X++SJ0/SHNfggu/Tt6cn0845tT73d92PCZlNtag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cFyJLuYHDAIn48Sy2YpkbkjA4jezam42kxGxPe73uLF5ebb88lLvbg+3boSSvEPrMT7QOZDe0yLwsKknpBqfdwmHhinYiXwdJLxqpu4C5lxQ7kmOM1KsZgjH7puWNUWPmygSWqIfrwl0of3M6KTuk53K5PF7b0bHLwo+wVW1kaCQThm2J76AXPFLtsDuqi8T8EP5iByDrt8D86g29FjZiFowTCi8qd2crKUHhTviEbJnQkZlWvraCCRm5q63a4Lc5rxjwXUh2vIw5vUiWkrCkHhSEqlsGmUHaMM3Xxg+uXDMTLYFnLuKXVUzHPurX8SLF6PcRzoHJ9oe7s4XhlZKaA==
  • 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, 05 Dec 2022 13:27:11 +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.

v4 - No changes.

 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®.