[llvm] [AArch64][llvm] Add GICv5 ICH_PPI_HVIR{0,1}_EL2 system registers (PR #191818)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 07:02:47 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Jonathan Thackray (jthackray)
<details>
<summary>Changes</summary>
Add GICv5 `ICH_PPI_HVIR{0,1}_EL2` system registers (Interrupt
Controller PPI Hide Virtual Interrupt Registers). These registers
are added because a hypervisor may want to only expose a subset of the
PPIs to the virtual machine and hide the remaining PPIs.
The only way the hypervisor can do this is by trapping all the PPI ICV
registers which leads to additional code complexity and adds performance
overhead especially for nested virtualization.
These are documented here:
https://developer.arm.com/documentation/111107/latest/AArch64-Registers/ICH-PPI-HVIR-n--EL2--Interrupt-Controller-PPI-Hide-Virtual-Interrupt-Registers
---
Full diff: https://github.com/llvm/llvm-project/pull/191818.diff
2 Files Affected:
- (modified) llvm/lib/Target/AArch64/AArch64SystemOperands.td (+1)
- (modified) llvm/test/MC/AArch64/armv9.7a-gcie.s (+20)
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64SystemOperands.td b/llvm/lib/Target/AArch64/AArch64SystemOperands.td
index e5a8844f078f4..fb1f58d854135 100644
--- a/llvm/lib/Target/AArch64/AArch64SystemOperands.td
+++ b/llvm/lib/Target/AArch64/AArch64SystemOperands.td
@@ -2636,6 +2636,7 @@ foreach n=0-1 in {
def : RWSysReg<"ICH_PPI_ACTIVER"#n#"_EL2", 0b11, 0b100, 0b1100, 0b1010, {0b11,nb}>;
def : RWSysReg<"ICH_PPI_DVIR"#n#"_EL2", 0b11, 0b100, 0b1100, 0b1010, {0b00,nb}>;
def : RWSysReg<"ICH_PPI_ENABLER"#n#"_EL2", 0b11, 0b100, 0b1100, 0b1010, {0b01,nb}>;
+def : RWSysReg<"ICH_PPI_HVIR"#n#"_EL2", 0b11, 0b100, 0b1100, 0b0111, {0b00,nb}>;
def : RWSysReg<"ICH_PPI_PENDR"#n#"_EL2", 0b11, 0b100, 0b1100, 0b1010, {0b10,nb}>;
}
diff --git a/llvm/test/MC/AArch64/armv9.7a-gcie.s b/llvm/test/MC/AArch64/armv9.7a-gcie.s
index 74e95015f6c86..053f7495080ba 100644
--- a/llvm/test/MC/AArch64/armv9.7a-gcie.s
+++ b/llvm/test/MC/AArch64/armv9.7a-gcie.s
@@ -554,6 +554,16 @@ MRS x3, ICH_PPI_ENABLER1_EL2
// CHECK-ENCODING: [0x63,0xca,0x3c,0xd5]
// CHECK-UNKNOWN: d53cca63
+MRS x3, ICH_PPI_HVIR0_EL2
+// CHECK-INST: mrs x3, ICH_PPI_HVIR0_EL2
+// CHECK-ENCODING: [0x03,0xc7,0x3c,0xd5]
+// CHECK-UNKNOWN: d53cc703
+
+MRS x3, ICH_PPI_HVIR1_EL2
+// CHECK-INST: mrs x3, ICH_PPI_HVIR1_EL2
+// CHECK-ENCODING: [0x23,0xc7,0x3c,0xd5]
+// CHECK-UNKNOWN: d53cc723
+
MRS x3, ICH_PPI_PENDR0_EL2
// CHECK-INST: mrs x3, ICH_PPI_PENDR0_EL2
// CHECK-ENCODING: [0x83,0xca,0x3c,0xd5]
@@ -706,6 +716,16 @@ MSR ICH_PPI_ENABLER1_EL2, x3
// CHECK-ENCODING: [0x63,0xca,0x1c,0xd5]
// CHECK-UNKNOWN: d51cca63
+MSR ICH_PPI_HVIR0_EL2, x3
+// CHECK-INST: msr ICH_PPI_HVIR0_EL2, x3
+// CHECK-ENCODING: [0x03,0xc7,0x1c,0xd5]
+// CHECK-UNKNOWN: d51cc703
+
+MSR ICH_PPI_HVIR1_EL2, x3
+// CHECK-INST: msr ICH_PPI_HVIR1_EL2, x3
+// CHECK-ENCODING: [0x23,0xc7,0x1c,0xd5]
+// CHECK-UNKNOWN: d51cc723
+
MSR ICH_PPI_PENDR0_EL2, x3
// CHECK-INST: msr ICH_PPI_PENDR0_EL2, x3
// CHECK-ENCODING: [0x83,0xca,0x1c,0xd5]
``````````
</details>
https://github.com/llvm/llvm-project/pull/191818
More information about the llvm-commits
mailing list