aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/test
diff options
context:
space:
mode:
Diffstat (limited to 'sys/linux/test')
-rw-r--r--sys/linux/test/arm64-syz_kvm_setup_syzos_vm-vgicv3-its20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/linux/test/arm64-syz_kvm_setup_syzos_vm-vgicv3-its b/sys/linux/test/arm64-syz_kvm_setup_syzos_vm-vgicv3-its
index 7752a8f6e..bcc88bf54 100644
--- a/sys/linux/test/arm64-syz_kvm_setup_syzos_vm-vgicv3-its
+++ b/sys/linux/test/arm64-syz_kvm_setup_syzos_vm-vgicv3-its
@@ -4,27 +4,29 @@
r0 = openat$kvm(0, &AUTO='/dev/kvm\x00', 0x0, 0x0)
r1 = ioctl$KVM_CREATE_VM(r0, AUTO, 0x0)
r2 = syz_kvm_setup_syzos_vm(r1, &(0x7f0000c00000/0x400000)=nil)
-r3 = syz_kvm_add_vcpu(r2, &AUTO={0x0, &AUTO=[@irq_setup={AUTO, AUTO, {0x1, 0x20}}], AUTO}, 0x0, 0x0)
+r3 = syz_kvm_add_vcpu(r2, &AUTO={0x0, &AUTO=[@irq_setup={AUTO, AUTO, {0x1, 0x20}}, @its_setup={AUTO, AUTO, {0x1, 0x1, 0x1}}], AUTO}, 0x0, 0x0)
syz_kvm_vgic_v3_setup(r1, 0x1, 0x100)
#
-# Set up ITS device with redistributor at address 0x08080000 (declared at executor/kvm.h)
-# Create KVM_DEV_TYPE_ARM_VGIC_ITS.
+# Set up ITS device with redistributor at address 0x08080000 (declared at executor/kvm.h):
+# 1. Create KVM_DEV_TYPE_ARM_VGIC_ITS.
#
ioctl$KVM_CREATE_DEVICE(r1, AUTO, &AUTO={0x8, <r4=>0xffffffffffffffff, 0x0})
#
-# Set device attribute {KVM_DEV_ARM_VGIC_GRP_CTRL, KVM_DEV_ARM_VGIC_CTRL_INIT, 0}.
+# 2. Set device attribute {KVM_DEV_ARM_VGIC_GRP_ADDR, KVM_VGIC_ITS_ADDR_TYPE, &addr=0x08080000}.
#
-ioctl$KVM_SET_DEVICE_ATTR(r4, AUTO, &AUTO=@attr_arm64={0x0, 0x4, 0x0, 0x0})
+ioctl$KVM_SET_DEVICE_ATTR(r4, AUTO, &AUTO=@attr_arm64={0x0, 0x0, 0x4, &AUTO=0x08080000})
#
-# Set device attribute {KVM_DEV_ARM_VGIC_GRP_ADDR, KVM_VGIC_ITS_ADDR_TYPE, &addr=0x08080000}.
+# 3. Set device attribute {KVM_DEV_ARM_VGIC_GRP_CTRL, KVM_DEV_ARM_VGIC_CTRL_INIT, 0}.
#
-ioctl$KVM_SET_DEVICE_ATTR(r4, AUTO, &AUTO=@attr_arm64={0x0, 0x0, 0x4, &AUTO=0x08080000})
+ioctl$KVM_SET_DEVICE_ATTR(r4, AUTO, &AUTO=@attr_arm64={0x0, 0x4, 0x0, 0x0})
ioctl$KVM_RUN(r3, AUTO, 0x0)
#
# Calling KVM_RUN here again would result in infinite loop.
-# Instead, signal SPI 32 (0x1000020), so that the guest can execute another uexit in the IRQ handler.
+# Instead, signal LPI 0x2000 that is mapped to the event 0, so that the guest can execute another uexit in the IRQ handler.
+#
+# Address is GITS_BASE_GPA + GITS_TRANSLATER = 0x08080000 + 0x10040
#
-ioctl$KVM_IRQ_LINE(r1, AUTO, &AUTO={0x1000020, 0x1})
+ioctl$KVM_SIGNAL_MSI(r1, AUTO, &AUTO={0x8090040, 0x0, 0x0, 0x1, 0x0, ""})
ioctl$KVM_RUN(r3, AUTO, 0x0)