diff --git a/sys/linux/dev_kvm.txt b/sys/linux/dev_kvm.txt index 6d25e6041089..6873e7a9973e 100644 --- a/sys/linux/dev_kvm.txt +++ b/sys/linux/dev_kvm.txt @@ -593,11 +593,18 @@ kvm_msi { } kvm_one_reg [ - arm64_core kvm_one_reg_arm64[kvm_regs_arm64_core] - arm64_fp kvm_one_reg_arm64[kvm_regs_arm64_fp] - arm64_ccsidr kvm_one_reg_arm64[kvm_regs_arm64_ccsidr] +# Constants from https://docs.kernel.org/virt/kvm/api.html + arm64_core kvm_one_reg_arm64_srange[0x6030000000100000:0x6030000000100050, 2] + arm64_fp kvm_one_reg_arm64_range[0x6040000000100054:0x60400000001000d0] + arm64_fp_extra kvm_one_reg_arm64_range[0x60200000001000d4:0x60200000001000d5] +# Got 0x602000000011000d from KVM_GET_REG_LIST on QEMU + arm64_ccsidr kvm_one_reg_arm64_range[0x6020000000110000:0x602000000011000d] arm64_sys kvm_one_reg_arm64[kvm_regs_arm64_sys] arm64_extra kvm_one_reg_arm64[kvm_regs_arm64_extra] + arm64_bitmap kvm_one_reg_arm64_range[0x6030000000160000:0x6030000000160002] + arm64_fw kvm_one_reg_arm64_range[0x6030000000140000:0x6030000000140003] + arm64_sve kvm_one_reg_arm64_range[0x6080000000150000:0x6080000000150620] + arm64_sve_vls kvm_one_reg_arm64_range[0x606000000015ffff] other kvm_one_reg_other ] @@ -606,6 +613,16 @@ type kvm_one_reg_arm64[FTYPE] { addr ptr64[inout, int64] } +type kvm_one_reg_arm64_range[RANGE] { + id int64[RANGE] + addr ptr64[inout, int64] +} + +type kvm_one_reg_arm64_srange[RANGE, STEP] { + id int64[RANGE, STEP] + addr ptr64[inout, int64] +} + kvm_one_reg_other { id int64 addr ptr64[inout, int64] @@ -1087,10 +1104,7 @@ define KVM_DEASSIGN_DEV_IRQ 0x4040AE75 define KVM_DEASSIGN_PCI_DEVICE 0x4040AE72 # Register descriptions generated by tools/arm64/registers.go -kvm_regs_arm64_core = 0x6030000000100000, 0x6030000000100002, 0x6030000000100004, 0x6030000000100006, 0x6030000000100008, 0x603000000010000a, 0x603000000010000c, 0x603000000010000e, 0x6030000000100010, 0x6030000000100012, 0x6030000000100014, 0x6030000000100016, 0x6030000000100018, 0x603000000010001a, 0x603000000010001c, 0x603000000010001e, 0x6030000000100020, 0x6030000000100022, 0x6030000000100024, 0x6030000000100026, 0x6030000000100028, 0x603000000010002a, 0x603000000010002c, 0x603000000010002e, 0x6030000000100030, 0x6030000000100032, 0x6030000000100034, 0x6030000000100036, 0x6030000000100038, 0x603000000010003a, 0x603000000010003c, 0x603000000010003e, 0x6030000000100040, 0x6030000000100042, 0x6030000000100044, 0x6030000000100046, 0x6030000000100048, 0x603000000010004a, 0x603000000010004c, 0x603000000010004e, 0x6030000000100050 -kvm_regs_arm64_fp = 0x60200000001000d4, 0x60200000001000d5, 0x6040000000100054, 0x6040000000100058, 0x604000000010005c, 0x6040000000100060, 0x6040000000100064, 0x6040000000100068, 0x604000000010006c, 0x6040000000100070, 0x6040000000100074, 0x6040000000100078, 0x604000000010007c, 0x6040000000100080, 0x6040000000100084, 0x6040000000100088, 0x604000000010008c, 0x6040000000100090, 0x6040000000100094, 0x6040000000100098, 0x604000000010009c, 0x60400000001000a0, 0x60400000001000a4, 0x60400000001000a8, 0x60400000001000ac, 0x60400000001000b0, 0x60400000001000b4, 0x60400000001000b8, 0x60400000001000bc, 0x60400000001000c0, 0x60400000001000c4, 0x60400000001000c8, 0x60400000001000cc, 0x60400000001000d0 -kvm_regs_arm64_ccsidr = 0x6020000000110000, 0x6020000000110001, 0x6020000000110002, 0x6020000000110003, 0x6020000000110004, 0x6020000000110005, 0x6020000000110006, 0x6020000000110007, 0x6020000000110008, 0x6020000000110009, 0x602000000011000a, 0x602000000011000b, 0x602000000011000c, 0x602000000011000d +kvm_regs_arm64_sys = 0x6030000000138002, 0x6030000000138010, 0x6030000000138012, 0x603000000013801a, 0x6030000000138032, 0x6030000000138004, 0x603000000013800c, 0x6030000000138014, 0x603000000013801c, 0x6030000000138024, 0x603000000013802c, 0x6030000000138034, 0x603000000013803c, 0x6030000000138044, 0x603000000013804c, 0x6030000000138054, 0x603000000013805c, 0x6030000000138064, 0x603000000013806c, 0x6030000000138074, 0x603000000013807c, 0x6030000000138005, 0x603000000013800d, 0x6030000000138015, 0x603000000013801d, 0x6030000000138025, 0x603000000013802d, 0x6030000000138035, 0x603000000013803d, 0x6030000000138045, 0x603000000013804d, 0x6030000000138055, 0x603000000013805d, 0x6030000000138065, 0x603000000013806d, 0x6030000000138075, 0x603000000013807d, 0x6030000000138006, 0x603000000013800e, 0x6030000000138016, 0x603000000013801e, 0x6030000000138026, 0x603000000013802e, 0x6030000000138036, 0x603000000013803e, 0x6030000000138046, 0x603000000013804e, 0x6030000000138056, 0x603000000013805e, 0x6030000000138066, 0x603000000013806e, 0x6030000000138076, 0x603000000013807e, 0x6030000000138007, 0x603000000013800f, 0x6030000000138017, 0x603000000013801f, 0x6030000000138027, 0x603000000013802f, 0x6030000000138037, 0x603000000013803f, 0x6030000000138047, 0x603000000013804f, 0x6030000000138057, 0x603000000013805f, 0x6030000000138067, 0x603000000013806f, 0x6030000000138077, 0x603000000013807f, 0x6030000000138080, 0x6030000000138084, 0x603000000013808c, 0x603000000013809c, 0x60300000001380a4, 0x60300000001383c6, 0x60300000001383ce, 0x60300000001383f6, 0x6030000000139808, 0x6030000000139820, 0x6030000000139828, 0x6030000000139828, 0x603000000013a038, 0x603000000013c000, 0x603000000013c005, 0x603000000013c006, 0x603000000013c008, 0x603000000013c009, 0x603000000013c00a, 0x603000000013c00b, 0x603000000013c00c, 0x603000000013c00d, 0x603000000013c00e, 0x603000000013c00f, 0x603000000013c010, 0x603000000013c011, 0x603000000013c012, 0x603000000013c013, 0x603000000013c014, 0x603000000013c015, 0x603000000013c016, 0x603000000013c017, 0x603000000013c018, 0x603000000013c019, 0x603000000013c01a, 0x603000000013c01c, 0x603000000013c01d, 0x603000000013c01e, 0x603000000013c020, 0x603000000013c021, 0x603000000013c024, 0x603000000013c028, 0x603000000013c029, 0x603000000013c02c, 0x603000000013c02d, 0x603000000013c030, 0x603000000013c031, 0x603000000013c032, 0x603000000013c038, 0x603000000013c039, 0x603000000013c03a, 0x603000000013c080, 0x603000000013c081, 0x603000000013c082, 0x603000000013c085, 0x603000000013c086, 0x603000000013c090, 0x603000000013c091, 0x603000000013c100, 0x603000000013c101, 0x603000000013c102, 0x603000000013c108, 0x603000000013c109, 0x603000000013c10a, 0x603000000013c10b, 0x603000000013c110, 0x603000000013c111, 0x603000000013c112, 0x603000000013c113, 0x603000000013c118, 0x603000000013c119, 0x603000000013c200, 0x603000000013c201, 0x603000000013c208, 0x603000000013c210, 0x6030000000130205, 0x603000000013c212, 0x603000000013c213, 0x6030000000130204, 0x603000000013c214, 0x6030000000130203, 0x603000000013c230, 0x603000000013c288, 0x603000000013c289, 0x603000000013c290, 0x603000000013c298, 0x603000000013c299, 0x603000000013c2a0, 0x603000000013c2a1, 0x603000000013c2a2, 0x603000000013c2a3, 0x603000000013c2a4, 0x603000000013c2a5, 0x603000000013c2a6, 0x603000000013c2a8, 0x603000000013c2a9, 0x603000000013c2aa, 0x603000000013c2ab, 0x603000000013c2b0, 0x603000000013c2b1, 0x603000000013c300, 0x603000000013c3a0, 0x603000000013c4c8, 0x603000000013c4c9, 0x603000000013c4ca, 0x603000000013c4cb, 0x603000000013c4cc, 0x603000000013c4cd, 0x603000000013c4ce, 0x603000000013c4cf, 0x603000000013c4d0, 0x603000000013c4d1, 0x603000000013c4d3, 0x603000000013c4d7, 0x603000000013c4f1, 0x603000000013c4f2, 0x603000000013c4f6, 0x603000000013c510, 0x603000000013c518, 0x603000000013c520, 0x603000000013c521, 0x603000000013c522, 0x603000000013c523, 0x603000000013c524, 0x603000000013c527, 0x603000000013c528, 0x603000000013c529, 0x603000000013c600, 0x603000000013c601, 0x603000000013c602, 0x603000000013c608, 0x603000000013c609, 0x603000000013c640, 0x603000000013c641, 0x603000000013c642, 0x603000000013c643, 0x603000000013c644, 0x603000000013c645, 0x603000000013c646, 0x603000000013c647, 0x603000000013c648, 0x603000000013c649, 0x603000000013c64a, 0x603000000013c64b, 0x603000000013c659, 0x603000000013c65b, 0x603000000013c65d, 0x603000000013c65e, 0x603000000013c65f, 0x603000000013c660, 0x603000000013c661, 0x603000000013c662, 0x603000000013c663, 0x603000000013c664, 0x603000000013c665, 0x603000000013c666, 0x603000000013c667, 0x603000000013c681, 0x603000000013c684, 0x603000000013c685, 0x603000000013c687, 0x603000000013c708, 0x603000000013c800, 0x603000000013c801, 0x603000000013c802, 0x603000000013c804, 0x603000000013c807, 0x603000000013d000, 0x603000000013d801, 0x603000000013d807, 0x603000000013d920, 0x603000000013d921, 0x603000000013da10, 0x603000000013da11, 0x603000000013da15, 0x6030000000131a02, 0x603000000013da16, 0x6030000000131a01, 0x603000000013da17, 0x6030000000131a04, 0x603000000013da20, 0x603000000013da21, 0x603000000013da28, 0x603000000013da29, 0x603000000013dce0, 0x603000000013dce1, 0x603000000013dce2, 0x603000000013dce3, 0x603000000013dce4, 0x603000000013dce5, 0x603000000013dce6, 0x603000000013dce7, 0x603000000013dce8, 0x603000000013dce9, 0x603000000013dcea, 0x603000000013dcf0, 0x603000000013dcf3, 0x603000000013de82, 0x603000000013de83, 0x603000000013de87, 0x603000000013de90, 0x603000000013de91, 0x603000000013de92, 0x603000000013de93, 0x603000000013de94, 0x603000000013de95, 0x603000000013de96, 0x603000000013de98, 0x603000000013de99, 0x603000000013dea0, 0x603000000013dea1, 0x603000000013dea2, 0x603000000013dea3, 0x603000000013dea4, 0x603000000013dea5, 0x603000000013dea6, 0x603000000013dea7, 0x603000000013dea8, 0x603000000013dea9, 0x603000000013deaa, 0x603000000013deab, 0x603000000013deac, 0x603000000013dead, 0x603000000013deae, 0x603000000013deaf, 0x603000000013deb0, 0x603000000013deb1, 0x603000000013deb2, 0x603000000013deb3, 0x603000000013deb4, 0x603000000013deb5, 0x603000000013deb6, 0x603000000013deb7, 0x603000000013deb8, 0x603000000013deb9, 0x603000000013deba, 0x603000000013debb, 0x603000000013debc, 0x603000000013debd, 0x603000000013debe, 0x603000000013debf, 0x603000000013dee0, 0x603000000013dee1, 0x603000000013dee2, 0x603000000013dee3, 0x603000000013dee4, 0x603000000013dee5, 0x603000000013dee6, 0x603000000013dee7, 0x603000000013dee8, 0x603000000013dee9, 0x603000000013deea, 0x603000000013deeb, 0x603000000013deec, 0x603000000013deed, 0x603000000013deee, 0x603000000013deef, 0x603000000013def0, 0x603000000013def1, 0x603000000013def2, 0x603000000013def3, 0x603000000013def4, 0x603000000013def5, 0x603000000013def6, 0x603000000013def7, 0x603000000013def8, 0x603000000013def9, 0x603000000013defa, 0x603000000013defb, 0x603000000013defc, 0x603000000013defd, 0x603000000013defe, 0x603000000013deff, 0x603000000013df00, 0x603000000013df01, 0x603000000013df02, 0x603000000013df05, 0x603000000013df06, 0x603000000013df10, 0x603000000013df11, 0x603000000013df12, 0x603000000013df18, 0x603000000013df19, 0x603000000013df1a, 0x603000000013df40, 0x603000000013df41, 0x603000000013df42, 0x603000000013df43, 0x603000000013df44, 0x603000000013df45, 0x603000000013df46, 0x603000000013df47, 0x603000000013df48, 0x603000000013df49, 0x603000000013df4a, 0x603000000013df4b, 0x603000000013df4c, 0x603000000013df4d, 0x603000000013df4e, 0x603000000013df4f, 0x603000000013df50, 0x603000000013df51, 0x603000000013df52, 0x603000000013df53, 0x603000000013df54, 0x603000000013df55, 0x603000000013df56, 0x603000000013df57, 0x603000000013df58, 0x603000000013df59, 0x603000000013df5a, 0x603000000013df5b, 0x603000000013df5c, 0x603000000013df5d, 0x603000000013df5e, 0x603000000013df5f, 0x603000000013df7f, 0x603000000013df60, 0x603000000013df61, 0x603000000013df62, 0x603000000013df63, 0x603000000013df64, 0x603000000013df65, 0x603000000013df66, 0x603000000013df67, 0x603000000013df68, 0x603000000013df69, 0x603000000013df6a, 0x603000000013df6b, 0x603000000013df6c, 0x603000000013df6d, 0x603000000013df6e, 0x603000000013df6f, 0x603000000013df70, 0x603000000013df71, 0x603000000013df72, 0x603000000013df73, 0x603000000013df74, 0x603000000013df75, 0x603000000013df76, 0x603000000013df77, 0x603000000013df78, 0x603000000013df79, 0x603000000013df7a, 0x603000000013df7b, 0x603000000013df7c, 0x603000000013df7d, 0x603000000013df7e, 0x603000000013df7f, 0x603000000013e000, 0x603000000013e005, 0x603000000013e080, 0x603000000013e081, 0x603000000013e088, 0x603000000013e089, 0x603000000013e08a, 0x603000000013e08b, 0x603000000013e08c, 0x603000000013e08d, 0x603000000013e08e, 0x603000000013e08f, 0x603000000013e090, 0x603000000013e091, 0x603000000013e092, 0x603000000013e099, 0x603000000013e100, 0x603000000013e101, 0x603000000013e102, 0x603000000013e108, 0x603000000013e10a, 0x603000000013e110, 0x603000000013e130, 0x603000000013e132, 0x603000000013e180, 0x603000000013e18c, 0x603000000013e18d, 0x603000000013e18e, 0x603000000013e200, 0x603000000013e201, 0x603000000013e208, 0x603000000013e218, 0x603000000013e219, 0x603000000013e21a, 0x603000000013e21b, 0x603000000013e281, 0x603000000013e288, 0x603000000013e289, 0x603000000013e290, 0x603000000013e293, 0x603000000013e298, 0x603000000013e2b0, 0x603000000013e300, 0x603000000013e304, 0x603000000013e4c8, 0x603000000013e510, 0x603000000013e518, 0x603000000013e520, 0x603000000013e521, 0x603000000013e528, 0x603000000013e530, 0x603000000013e531, 0x603000000013e532, 0x603000000013e533, 0x603000000013e534, 0x603000000013e535, 0x603000000013e536, 0x603000000013e537, 0x603000000013e600, 0x603000000013e601, 0x603000000013e602, 0x603000000013e609, 0x603000000013e640, 0x603000000013e641, 0x603000000013e642, 0x603000000013e643, 0x603000000013e648, 0x603000000013e649, 0x603000000013e64a, 0x603000000013e64b, 0x603000000013e64d, 0x603000000013e658, 0x603000000013e659, 0x603000000013e65a, 0x603000000013e65b, 0x603000000013e65d, 0x603000000013e65f, 0x603000000013e660, 0x603000000013e661, 0x603000000013e662, 0x603000000013e663, 0x603000000013e664, 0x603000000013e665, 0x603000000013e666, 0x603000000013e667, 0x603000000013e668, 0x603000000013e669, 0x603000000013e66a, 0x603000000013e66b, 0x603000000013e66c, 0x603000000013e66d, 0x603000000013e66e, 0x603000000013e66f, 0x603000000013e681, 0x603000000013e682, 0x603000000013e687, 0x603000000013e6c0, 0x603000000013e6c1, 0x603000000013e6c2, 0x603000000013e6c3, 0x603000000013e6c4, 0x603000000013e6c5, 0x603000000013e6c6, 0x603000000013e6c7, 0x603000000013e6c8, 0x603000000013e6c9, 0x603000000013e6ca, 0x603000000013e6cb, 0x603000000013e6cc, 0x603000000013e6cd, 0x603000000013e6ce, 0x603000000013e6cf, 0x603000000013e6d0, 0x603000000013e6d1, 0x603000000013e6d2, 0x603000000013e6d3, 0x603000000013e6d4, 0x603000000013e6d5, 0x603000000013e6d6, 0x603000000013e6d7, 0x603000000013e6d8, 0x603000000013e6d9, 0x603000000013e6da, 0x603000000013e6db, 0x603000000013e6dc, 0x603000000013e6dd, 0x603000000013e6de, 0x603000000013e6df, 0x603000000013e703, 0x603000000013e706, 0x603000000013e708, 0x603000000013e710, 0x603000000013e711, 0x603000000013e712, 0x603000000013e718, 0x603000000013e719, 0x603000000013e71a, 0x603000000013e720, 0x603000000013e721, 0x603000000013e722, 0x603000000013e728, 0x603000000013e729, 0x603000000013e72a, 0x603000000013f080, 0x603000000013f081, 0x603000000013f088, 0x603000000013f089, 0x603000000013f08a, 0x603000000013f090, 0x603000000013f099, 0x603000000013f100, 0x603000000013f102, 0x603000000013f200, 0x603000000013f201, 0x603000000013f208, 0x603000000013f288, 0x603000000013f289, 0x603000000013f290, 0x603000000013f2b0, 0x603000000013f300, 0x603000000013f510, 0x603000000013f518, 0x603000000013f528, 0x603000000013f600, 0x603000000013f601, 0x603000000013f602, 0x603000000013f664, 0x603000000013f665, 0x603000000013f667, 0x603000000013f682, 0x603000000013f687, 0x603000000013ff10, 0x603000000013ff11, 0x603000000013ff12 # Extra registers that KVM_GET_REG_LIST prints on QEMU kvm_regs_arm64_extra = 0x603000000013c01b, 0x603000000013c01f, 0x603000000013c022, 0x603000000013c023, 0x603000000013c025, 0x603000000013c026, 0x603000000013c027, 0x603000000013c02a, 0x603000000013c02b, 0x603000000013c02e, 0x603000000013c02f, 0x603000000013c033, 0x603000000013c034, 0x603000000013c035, 0x603000000013c036, 0x603000000013c037, 0x603000000013c03b, 0x603000000013c03c, 0x603000000013c03d, 0x603000000013c03e, 0x603000000013c03f, 0x603000000013c103, 0x603000000013c512, 0x603000000013c513, 0x6030000000140000, 0x6030000000140001, 0x6030000000140002, 0x6030000000140003, 0x6030000000160000, 0x6030000000160001, 0x6030000000160002 -kvm_regs_arm64_sys = 0x6030000000138002, 0x6030000000138010, 0x6030000000138012, 0x603000000013801a, 0x6030000000138032, 0x6030000000138004, 0x603000000013800c, 0x6030000000138014, 0x603000000013801c, 0x6030000000138024, 0x603000000013802c, 0x6030000000138034, 0x603000000013803c, 0x6030000000138044, 0x603000000013804c, 0x6030000000138054, 0x603000000013805c, 0x6030000000138064, 0x603000000013806c, 0x6030000000138074, 0x603000000013807c, 0x6030000000138005, 0x603000000013800d, 0x6030000000138015, 0x603000000013801d, 0x6030000000138025, 0x603000000013802d, 0x6030000000138035, 0x603000000013803d, 0x6030000000138045, 0x603000000013804d, 0x6030000000138055, 0x603000000013805d, 0x6030000000138065, 0x603000000013806d, 0x6030000000138075, 0x603000000013807d, 0x6030000000138006, 0x603000000013800e, 0x6030000000138016, 0x603000000013801e, 0x6030000000138026, 0x603000000013802e, 0x6030000000138036, 0x603000000013803e, 0x6030000000138046, 0x603000000013804e, 0x6030000000138056, 0x603000000013805e, 0x6030000000138066, 0x603000000013806e, 0x6030000000138076, 0x603000000013807e, 0x6030000000138007, 0x603000000013800f, 0x6030000000138017, 0x603000000013801f, 0x6030000000138027, 0x603000000013802f, 0x6030000000138037, 0x603000000013803f, 0x6030000000138047, 0x603000000013804f, 0x6030000000138057, 0x603000000013805f, 0x6030000000138067, 0x603000000013806f, 0x6030000000138077, 0x603000000013807f, 0x6030000000138080, 0x6030000000138084, 0x603000000013808c, 0x603000000013809c, 0x60300000001380a4, 0x60300000001383c6, 0x60300000001383ce, 0x60300000001383f6, 0x6030000000139808, 0x6030000000139820, 0x6030000000139828, 0x6030000000139828, 0x603000000013a038, 0x603000000013c000, 0x603000000013c005, 0x603000000013c006, 0x603000000013c008, 0x603000000013c009, 0x603000000013c00a, 0x603000000013c00b, 0x603000000013c00c, 0x603000000013c00d, 0x603000000013c00e, 0x603000000013c00f, 0x603000000013c010, 0x603000000013c011, 0x603000000013c012, 0x603000000013c013, 0x603000000013c014, 0x603000000013c015, 0x603000000013c016, 0x603000000013c017, 0x603000000013c018, 0x603000000013c019, 0x603000000013c01a, 0x603000000013c01c, 0x603000000013c01d, 0x603000000013c01e, 0x603000000013c020, 0x603000000013c021, 0x603000000013c024, 0x603000000013c028, 0x603000000013c029, 0x603000000013c02c, 0x603000000013c02d, 0x603000000013c030, 0x603000000013c031, 0x603000000013c032, 0x603000000013c038, 0x603000000013c039, 0x603000000013c03a, 0x603000000013c080, 0x603000000013c081, 0x603000000013c082, 0x603000000013c085, 0x603000000013c086, 0x603000000013c090, 0x603000000013c091, 0x603000000013c100, 0x603000000013c101, 0x603000000013c102, 0x603000000013c108, 0x603000000013c109, 0x603000000013c10a, 0x603000000013c10b, 0x603000000013c110, 0x603000000013c111, 0x603000000013c112, 0x603000000013c113, 0x603000000013c118, 0x603000000013c119, 0x603000000013c200, 0x603000000013c201, 0x603000000013c208, 0x603000000013c210, 0x6030000000130205, 0x603000000013c212, 0x603000000013c213, 0x6030000000130204, 0x603000000013c214, 0x6030000000130203, 0x603000000013c230, 0x603000000013c288, 0x603000000013c289, 0x603000000013c290, 0x603000000013c298, 0x603000000013c299, 0x603000000013c2a0, 0x603000000013c2a1, 0x603000000013c2a2, 0x603000000013c2a3, 0x603000000013c2a4, 0x603000000013c2a5, 0x603000000013c2a6, 0x603000000013c2a8, 0x603000000013c2a9, 0x603000000013c2aa, 0x603000000013c2ab, 0x603000000013c2b0, 0x603000000013c2b1, 0x603000000013c300, 0x603000000013c3a0, 0x603000000013c4c8, 0x603000000013c4c9, 0x603000000013c4ca, 0x603000000013c4cb, 0x603000000013c4cc, 0x603000000013c4cd, 0x603000000013c4ce, 0x603000000013c4cf, 0x603000000013c4d0, 0x603000000013c4d1, 0x603000000013c4d3, 0x603000000013c4d7, 0x603000000013c4f1, 0x603000000013c4f2, 0x603000000013c4f6, 0x603000000013c510, 0x603000000013c518, 0x603000000013c520, 0x603000000013c521, 0x603000000013c522, 0x603000000013c523, 0x603000000013c524, 0x603000000013c527, 0x603000000013c528, 0x603000000013c529, 0x603000000013c600, 0x603000000013c601, 0x603000000013c602, 0x603000000013c608, 0x603000000013c609, 0x603000000013c640, 0x603000000013c641, 0x603000000013c642, 0x603000000013c643, 0x603000000013c644, 0x603000000013c645, 0x603000000013c646, 0x603000000013c647, 0x603000000013c648, 0x603000000013c649, 0x603000000013c64a, 0x603000000013c64b, 0x603000000013c659, 0x603000000013c65b, 0x603000000013c65d, 0x603000000013c65e, 0x603000000013c65f, 0x603000000013c660, 0x603000000013c661, 0x603000000013c662, 0x603000000013c663, 0x603000000013c664, 0x603000000013c665, 0x603000000013c666, 0x603000000013c667, 0x603000000013c681, 0x603000000013c684, 0x603000000013c685, 0x603000000013c687, 0x603000000013c708, 0x603000000013c800, 0x603000000013c801, 0x603000000013c802, 0x603000000013c804, 0x603000000013c807, 0x603000000013d000, 0x603000000013d801, 0x603000000013d807, 0x603000000013d920, 0x603000000013d921, 0x603000000013da10, 0x603000000013da11, 0x603000000013da15, 0x6030000000131a02, 0x603000000013da16, 0x6030000000131a01, 0x603000000013da17, 0x6030000000131a04, 0x603000000013da20, 0x603000000013da21, 0x603000000013da28, 0x603000000013da29, 0x603000000013dce0, 0x603000000013dce1, 0x603000000013dce2, 0x603000000013dce3, 0x603000000013dce4, 0x603000000013dce5, 0x603000000013dce6, 0x603000000013dce7, 0x603000000013dce8, 0x603000000013dce9, 0x603000000013dcea, 0x603000000013dcf0, 0x603000000013dcf3, 0x603000000013de82, 0x603000000013de83, 0x603000000013de87, 0x603000000013de90, 0x603000000013de91, 0x603000000013de92, 0x603000000013de93, 0x603000000013de94, 0x603000000013de95, 0x603000000013de96, 0x603000000013de98, 0x603000000013de99, 0x603000000013dea0, 0x603000000013dea1, 0x603000000013dea2, 0x603000000013dea3, 0x603000000013dea4, 0x603000000013dea5, 0x603000000013dea6, 0x603000000013dea7, 0x603000000013dea8, 0x603000000013dea9, 0x603000000013deaa, 0x603000000013deab, 0x603000000013deac, 0x603000000013dead, 0x603000000013deae, 0x603000000013deaf, 0x603000000013deb0, 0x603000000013deb1, 0x603000000013deb2, 0x603000000013deb3, 0x603000000013deb4, 0x603000000013deb5, 0x603000000013deb6, 0x603000000013deb7, 0x603000000013deb8, 0x603000000013deb9, 0x603000000013deba, 0x603000000013debb, 0x603000000013debc, 0x603000000013debd, 0x603000000013debe, 0x603000000013debf, 0x603000000013dee0, 0x603000000013dee1, 0x603000000013dee2, 0x603000000013dee3, 0x603000000013dee4, 0x603000000013dee5, 0x603000000013dee6, 0x603000000013dee7, 0x603000000013dee8, 0x603000000013dee9, 0x603000000013deea, 0x603000000013deeb, 0x603000000013deec, 0x603000000013deed, 0x603000000013deee, 0x603000000013deef, 0x603000000013def0, 0x603000000013def1, 0x603000000013def2, 0x603000000013def3, 0x603000000013def4, 0x603000000013def5, 0x603000000013def6, 0x603000000013def7, 0x603000000013def8, 0x603000000013def9, 0x603000000013defa, 0x603000000013defb, 0x603000000013defc, 0x603000000013defd, 0x603000000013defe, 0x603000000013deff, 0x603000000013df00, 0x603000000013df01, 0x603000000013df02, 0x603000000013df05, 0x603000000013df06, 0x603000000013df10, 0x603000000013df11, 0x603000000013df12, 0x603000000013df18, 0x603000000013df19, 0x603000000013df1a, 0x603000000013df40, 0x603000000013df41, 0x603000000013df42, 0x603000000013df43, 0x603000000013df44, 0x603000000013df45, 0x603000000013df46, 0x603000000013df47, 0x603000000013df48, 0x603000000013df49, 0x603000000013df4a, 0x603000000013df4b, 0x603000000013df4c, 0x603000000013df4d, 0x603000000013df4e, 0x603000000013df4f, 0x603000000013df50, 0x603000000013df51, 0x603000000013df52, 0x603000000013df53, 0x603000000013df54, 0x603000000013df55, 0x603000000013df56, 0x603000000013df57, 0x603000000013df58, 0x603000000013df59, 0x603000000013df5a, 0x603000000013df5b, 0x603000000013df5c, 0x603000000013df5d, 0x603000000013df5e, 0x603000000013df5f, 0x603000000013df7f, 0x603000000013df60, 0x603000000013df61, 0x603000000013df62, 0x603000000013df63, 0x603000000013df64, 0x603000000013df65, 0x603000000013df66, 0x603000000013df67, 0x603000000013df68, 0x603000000013df69, 0x603000000013df6a, 0x603000000013df6b, 0x603000000013df6c, 0x603000000013df6d, 0x603000000013df6e, 0x603000000013df6f, 0x603000000013df70, 0x603000000013df71, 0x603000000013df72, 0x603000000013df73, 0x603000000013df74, 0x603000000013df75, 0x603000000013df76, 0x603000000013df77, 0x603000000013df78, 0x603000000013df79, 0x603000000013df7a, 0x603000000013df7b, 0x603000000013df7c, 0x603000000013df7d, 0x603000000013df7e, 0x603000000013df7f, 0x603000000013e000, 0x603000000013e005, 0x603000000013e080, 0x603000000013e081, 0x603000000013e088, 0x603000000013e089, 0x603000000013e08a, 0x603000000013e08b, 0x603000000013e08c, 0x603000000013e08d, 0x603000000013e08e, 0x603000000013e08f, 0x603000000013e090, 0x603000000013e091, 0x603000000013e092, 0x603000000013e099, 0x603000000013e100, 0x603000000013e101, 0x603000000013e102, 0x603000000013e108, 0x603000000013e10a, 0x603000000013e110, 0x603000000013e130, 0x603000000013e132, 0x603000000013e180, 0x603000000013e18c, 0x603000000013e18d, 0x603000000013e18e, 0x603000000013e200, 0x603000000013e201, 0x603000000013e208, 0x603000000013e218, 0x603000000013e219, 0x603000000013e21a, 0x603000000013e21b, 0x603000000013e281, 0x603000000013e288, 0x603000000013e289, 0x603000000013e290, 0x603000000013e293, 0x603000000013e298, 0x603000000013e2b0, 0x603000000013e300, 0x603000000013e304, 0x603000000013e4c8, 0x603000000013e510, 0x603000000013e518, 0x603000000013e520, 0x603000000013e521, 0x603000000013e528, 0x603000000013e530, 0x603000000013e531, 0x603000000013e532, 0x603000000013e533, 0x603000000013e534, 0x603000000013e535, 0x603000000013e536, 0x603000000013e537, 0x603000000013e600, 0x603000000013e601, 0x603000000013e602, 0x603000000013e609, 0x603000000013e640, 0x603000000013e641, 0x603000000013e642, 0x603000000013e643, 0x603000000013e648, 0x603000000013e649, 0x603000000013e64a, 0x603000000013e64b, 0x603000000013e64d, 0x603000000013e658, 0x603000000013e659, 0x603000000013e65a, 0x603000000013e65b, 0x603000000013e65d, 0x603000000013e65f, 0x603000000013e660, 0x603000000013e661, 0x603000000013e662, 0x603000000013e663, 0x603000000013e664, 0x603000000013e665, 0x603000000013e666, 0x603000000013e667, 0x603000000013e668, 0x603000000013e669, 0x603000000013e66a, 0x603000000013e66b, 0x603000000013e66c, 0x603000000013e66d, 0x603000000013e66e, 0x603000000013e66f, 0x603000000013e681, 0x603000000013e682, 0x603000000013e687, 0x603000000013e6c0, 0x603000000013e6c1, 0x603000000013e6c2, 0x603000000013e6c3, 0x603000000013e6c4, 0x603000000013e6c5, 0x603000000013e6c6, 0x603000000013e6c7, 0x603000000013e6c8, 0x603000000013e6c9, 0x603000000013e6ca, 0x603000000013e6cb, 0x603000000013e6cc, 0x603000000013e6cd, 0x603000000013e6ce, 0x603000000013e6cf, 0x603000000013e6d0, 0x603000000013e6d1, 0x603000000013e6d2, 0x603000000013e6d3, 0x603000000013e6d4, 0x603000000013e6d5, 0x603000000013e6d6, 0x603000000013e6d7, 0x603000000013e6d8, 0x603000000013e6d9, 0x603000000013e6da, 0x603000000013e6db, 0x603000000013e6dc, 0x603000000013e6dd, 0x603000000013e6de, 0x603000000013e6df, 0x603000000013e703, 0x603000000013e706, 0x603000000013e708, 0x603000000013e710, 0x603000000013e711, 0x603000000013e712, 0x603000000013e718, 0x603000000013e719, 0x603000000013e71a, 0x603000000013e720, 0x603000000013e721, 0x603000000013e722, 0x603000000013e728, 0x603000000013e729, 0x603000000013e72a, 0x603000000013f080, 0x603000000013f081, 0x603000000013f088, 0x603000000013f089, 0x603000000013f08a, 0x603000000013f090, 0x603000000013f099, 0x603000000013f100, 0x603000000013f102, 0x603000000013f200, 0x603000000013f201, 0x603000000013f208, 0x603000000013f288, 0x603000000013f289, 0x603000000013f290, 0x603000000013f2b0, 0x603000000013f300, 0x603000000013f510, 0x603000000013f518, 0x603000000013f528, 0x603000000013f600, 0x603000000013f601, 0x603000000013f602, 0x603000000013f664, 0x603000000013f665, 0x603000000013f667, 0x603000000013f682, 0x603000000013f687, 0x603000000013ff10, 0x603000000013ff11, 0x603000000013ff12 # End of register descriptions generated by tools/arm64/registers.go diff --git a/tools/arm64/registers.go b/tools/arm64/registers.go index 357ada6559c6..945208647fed 100644 --- a/tools/arm64/registers.go +++ b/tools/arm64/registers.go @@ -28,8 +28,8 @@ func main() { } fmt.Printf("# Register descriptions generated by tools/arm64/registers.go\n") - printCoreRegs() printSysRegIDs(input) + printCoreRegs() fmt.Printf("# End of register descriptions generated by tools/arm64/registers.go\n") } @@ -147,14 +147,6 @@ const ( kvmRegArm64Sysreg int64 = (0x0013 << kvmRegArmCoprocShift) kvmRegSizeU64 int64 = 0x0030000000000000 kvmRegArm64 int64 = 0x6000000000000000 - // Constants from https://docs.kernel.org/virt/kvm/api.html - kvmFirstCoreReg int64 = 0x6030000000100000 - kvmLastCoreReg int64 = 0x6030000000100050 - kvmFirstFpVreg int64 = 0x6040000000100054 - kvmLastFpVreg int64 = 0x60400000001000d0 - kvmFirstCcsidrReg int64 = 0x6020000000110000 - // Got this one from KVM_GET_REG_LIST on QEMU. - kvmLastCcsidrReg int64 = 0x602000000011000d ) // Generate register ID from Op0, Op1, CRn, CRm, Op2. @@ -171,9 +163,6 @@ func arm64KVMRegID(operands []int) int64 { // Generate core register IDs. // See https://docs.kernel.org/virt/kvm/api.html for more details. func printCoreRegs() { - printFromTo("kvm_regs_arm64_core = ", kvmFirstCoreReg, kvmLastCoreReg, 2) - printFromTo("kvm_regs_arm64_fp = 0x60200000001000d4, 0x60200000001000d5, ", kvmFirstFpVreg, kvmLastFpVreg, 4) - printFromTo("kvm_regs_arm64_ccsidr = ", kvmFirstCcsidrReg, kvmLastCcsidrReg, 1) fmt.Printf("# Extra registers that KVM_GET_REG_LIST prints on QEMU\n") // Some of these register IDs do not have corresponding registers, yet the kernel returns them. // TODO(glider): figure out why this is happening. @@ -185,15 +174,3 @@ func printCoreRegs() { "0x6030000000140000, 0x6030000000140001, 0x6030000000140002, 0x6030000000140003, 0x6030000000160000, " + "0x6030000000160001, 0x6030000000160002\n") } - -func printFromTo(prefix string, from, to, step int64) { - fmt.Print(prefix) - for i := from; i <= to; i += step { - fmt.Printf("0x%x", i) - if i != to { - fmt.Printf(", ") - } else { - fmt.Printf("\n") - } - } -}