/kvm-unit-tests/x86/ |
H A D | lam.c | 24 int vector; in test_cr4_lam_set_clear() local 27 vector = write_cr4_safe(read_cr4() | X86_CR4_LAM_SUP); in test_cr4_lam_set_clear() 28 report(has_lam ? !vector : vector == GP_VECTOR, in test_cr4_lam_set_clear() 31 vector = write_cr4_safe(read_cr4() & ~X86_CR4_LAM_SUP); in test_cr4_lam_set_clear() 32 report(!vector, "Expected CR4.LAM_SUP=0 to succeed"); in test_cr4_lam_set_clear() 139 int vector; in test_invpcid() local 153 vector = invpcid_safe(0, desc_ptr); in test_invpcid() 154 report(!vector, in test_invpcid() 156 vector); in test_invpcid() 159 vector = invpcid_safe(0, desc_ptr); in test_invpcid() [all …]
|
H A D | msr.c | 90 unsigned char vector = wrmsr_safe(msr, val); in test_wrmsr() local 92 report(!vector, in test_wrmsr() 94 name, val, vector); in test_wrmsr() 99 unsigned char vector = wrmsr_safe(msr, val); in test_wrmsr_fault() local 101 report(vector == GP_VECTOR, in test_wrmsr_fault() 103 name, val, vector); in test_wrmsr_fault() 109 unsigned char vector = rdmsr_safe(msr, &ignored); in test_rdmsr_fault() local 111 report(vector == GP_VECTOR, in test_rdmsr_fault() 112 "Expected #GP on RDMSR(%s), got vector %d", name, vector); in test_rdmsr_fault() 118 unsigned char vector = wrmsr_fep_safe(msr, val); in test_wrmsr_fep_fault() local [all …]
|
H A D | apic.c | 682 static int test_fixed_ipi(u32 dest_mode, u8 dest, u8 vector, in test_fixed_ipi() argument 700 apic_icr_write(dest_mode | APIC_DM_FIXED | vector, dest); in test_fixed_ipi() 718 u8 vector) in test_logical_ipi_single_target() argument 727 return test_fixed_ipi(APIC_DEST_LOGICAL, dest, vector, 1, in test_logical_ipi_single_target() 732 bool cluster, u8 dest, u8 vector) in test_logical_ipi_multi_target() argument 741 return test_fixed_ipi(APIC_DEST_LOGICAL, dest, vector, 2, in test_logical_ipi_multi_target() 748 u8 vector = 0xf1; in test_logical_ipi_xapic() local 760 handle_irq(vector, handle_ipi); in test_logical_ipi_xapic() 780 BIT(i) | k, vector); in test_logical_ipi_xapic() 795 c << 4 | BIT(i) | k, vector); in test_logical_ipi_xapic() [all …]
|
H A D | emulator.c | 548 unsigned int vector; in test_illegal_lea() local 555 vector = exception_vector(); in test_illegal_lea() 556 report(vector == UD_VECTOR, in test_illegal_lea() 557 "Wanted #UD on LEA with /reg, got vector = %u", vector); in test_illegal_lea() 699 unsigned int vector; in test_illegal_movbe() local 711 vector = exception_vector(); in test_illegal_movbe() 712 report(vector == UD_VECTOR, in test_illegal_movbe() 713 "Wanted #UD on MOVBE with /reg, got vector = %u", vector); in test_illegal_movbe()
|
H A D | ioapic.c | 399 .vector = 0x84, in test_ioapic_self_reconfigure() 426 .vector = 0x85, in test_ioapic_physical_destination_mode() 459 .vector = 0x86, in test_ioapic_logical_destination_mode()
|
H A D | la57.c | 325 int vector = write_cr4_safe(read_cr4() | X86_CR4_LA57); in main() local 329 report(vector == expected, "%s when CR4.LA57 %ssupported (in %u-bit mode)", in main()
|
H A D | svm_tests.c | 3235 u8 vector; member 3255 report(regs->vector == svm_exception_test_vector, in svm_exception_handler() 3261 static void handle_exception_in_l2(u8 vector) in handle_exception_in_l2() argument 3263 handler old_handler = handle_exception(vector, svm_exception_handler); in handle_exception_in_l2() 3264 svm_exception_test_vector = vector; in handle_exception_in_l2() 3267 "%s handled by L2", exception_mnemonic(vector)); in handle_exception_in_l2() 3269 handle_exception(vector, old_handler); in handle_exception_in_l2() 3272 static void handle_exception_in_l1(u32 vector) in handle_exception_in_l1() argument 3276 vmcb->control.intercept_exceptions |= (1ULL << vector); in handle_exception_in_l1() 3278 report(svm_vmrun() == (SVM_EXIT_EXCP_BASE + vector), in handle_exception_in_l1() [all …]
|
H A D | vmx_tests.c | 1719 int vector = vmcs_read(EXI_INTR_INFO) & 0xff; in interrupt_exit_handler() local 1720 handle_external_interrupt(vector); in interrupt_exit_handler() 10731 u8 vector; member 10751 report(regs->vector == vmx_exception_test_vector, in vmx_exception_handler() 10757 static void handle_exception_in_l2(u8 vector) in handle_exception_in_l2() argument 10759 handler old_handler = handle_exception(vector, vmx_exception_handler); in handle_exception_in_l2() 10761 vmx_exception_test_vector = vector; in handle_exception_in_l2() 10765 "%s handled by L2", exception_mnemonic(vector)); in handle_exception_in_l2() 10767 handle_exception(vector, old_handler); in handle_exception_in_l2() 10770 static void handle_exception_in_l1(u32 vector) in handle_exception_in_l1() argument [all …]
|
H A D | vmx.c | 393 unsigned int vector; in __test_vmread_vmwrite_pf() local 418 vector = exception_vector(); in __test_vmread_vmwrite_pf() 419 report(vector == PF_VECTOR, in __test_vmread_vmwrite_pf() 421 vmread ? "VMREAD" : "VMWRITE", vector); in __test_vmread_vmwrite_pf()
|
/kvm-unit-tests/lib/arm64/asm/ |
H A D | processor.h | 15 enum vector { enum 37 typedef void (*vector_fn)(enum vector v, struct pt_regs *regs, 41 extern void install_vector_handler(enum vector v, vector_fn fn); 42 extern void install_exception_handler(enum vector v, unsigned int ec, 44 extern void install_irq_handler(enum vector v, irq_handler_fn fn); 45 extern void default_vector_sync_handler(enum vector v, struct pt_regs *regs, 47 extern void default_vector_irq_handler(enum vector v, struct pt_regs *regs,
|
/kvm-unit-tests/lib/x86/ |
H A D | intel-iommu.c | 64 uint32_t vector:8; /* Interrupt Vector */ member 246 int vector, int dest_id, trigger_mode_t trigger) in vtd_setup_irte() argument 255 irte->vector = vector; in vtd_setup_irte() 281 uint64_t vector:8; member 302 bool vtd_setup_msi(struct pci_dev *dev, int vector, int dest_id) in vtd_setup_msi() argument 313 vtd_setup_irte(dev, irte + index, vector, in vtd_setup_msi() 330 void vtd_setup_ioapic_irq(struct pci_dev *dev, int vector, in vtd_setup_ioapic_irq() argument 342 vtd_setup_irte(dev, irte + index, vector, in vtd_setup_ioapic_irq() 345 entry.vector = vector; in vtd_setup_ioapic_irq()
|
H A D | apic.h | 13 uint8_t vector; member 65 void apic_setup_timer(int vector, u32 mode); 86 static inline u8 task_priority_class(u8 vector) in task_priority_class() argument 88 return vector >> 4; in task_priority_class()
|
H A D | processor.h | 465 int vector; \ 467 vector = __asm_safe_out2(fep, insn, "=a"(a), "=d"(d), "c"(index));\ 469 if (vector) \ 473 vector; \ 517 int vector = rdpmc_safe(index, &val); in rdpmc() local 519 assert_msg(!vector, "Unexpected %s on RDPMC(%" PRId32 ")", in rdpmc() 520 exception_mnemonic(vector), index); in rdpmc() 541 int vector = write_cr0_safe(val); in write_cr0() local 543 assert_msg(!vector, "Unexpected fault '%d' writing CR0 = %lx", in write_cr0() 544 vector, val); in write_cr0() [all …]
|
H A D | desc.c | 110 const char* exception_mnemonic(int vector) in exception_mnemonic() argument 112 switch(vector) { in exception_mnemonic() 145 cpu ? "cpu " : "", regs->vector, in unhandled_exception() 146 exception_mnemonic(regs->vector), regs->rip); in unhandled_exception() 147 if (regs->vector == 14) in unhandled_exception() 182 this_cpu_write_exception_vector(regs->vector); in check_exception_table() 212 if (regs->vector < 32 && exception_handlers[regs->vector]) { in do_handle_exception() 213 exception_handlers[regs->vector](regs); in do_handle_exception()
|
H A D | isr.c | 95 void handle_external_interrupt(int vector) in handle_external_interrupt() argument 97 idt_entry_t *idt = &boot_idt[vector]; in handle_external_interrupt()
|
H A D | desc.h | 87 unsigned long vector; member 258 const char* exception_mnemonic(int vector); 335 int vector = asm_safe(insn, inputs); \ 337 report(vector == want, "Expected %s on '%s', got %s", \ 340 vector ? exception_mnemonic(vector) : "SUCCESS"); \
|
H A D | isr.h | 13 void handle_external_interrupt(int vector);
|
H A D | intel-iommu.h | 144 bool vtd_setup_msi(struct pci_dev *dev, int vector, int dest_id); 145 void vtd_setup_ioapic_irq(struct pci_dev *dev, int vector,
|
H A D | apic.c | 217 .vector = vec, in ioapic_set_redir() 260 void apic_setup_timer(int vector, u32 mode) in apic_setup_timer() argument 267 apic_write(APIC_LVTT, vector | mode); in apic_setup_timer()
|
/kvm-unit-tests/lib/arm64/ |
H A D | processor.c | 105 static void bad_exception(enum vector v, struct pt_regs *regs, in bad_exception() 140 void install_exception_handler(enum vector v, unsigned int ec, exception_fn fn) in install_exception_handler() 148 void install_irq_handler(enum vector v, irq_handler_fn fn) in install_irq_handler() 156 void default_vector_sync_handler(enum vector v, struct pt_regs *regs, in default_vector_sync_handler() 176 void default_vector_irq_handler(enum vector v, struct pt_regs *regs, in default_vector_irq_handler() 207 void do_handle_exception(enum vector v, struct pt_regs *regs, unsigned int esr); 209 void do_handle_exception(enum vector v, struct pt_regs *regs, unsigned int esr) in do_handle_exception() 227 void install_vector_handler(enum vector v, vector_fn fn) in install_vector_handler()
|
/kvm-unit-tests/lib/arm/asm/ |
H A D | processor.h | 12 enum vector { enum 27 extern void install_exception_handler(enum vector v, exception_fn fn);
|
/kvm-unit-tests/lib/arm/ |
H A D | processor.c | 68 void install_exception_handler(enum vector v, exception_fn fn) in install_exception_handler() 77 void do_handle_exception(enum vector v, struct pt_regs *regs); 79 void do_handle_exception(enum vector v, struct pt_regs *regs) in do_handle_exception()
|
/kvm-unit-tests/arm/ |
H A D | selftest.c | 296 static enum vector check_vector_prep(void) in check_vector_prep() 316 enum vector v = check_vector_prep(); in check_und() 338 enum vector v = check_vector_prep(); in check_svc() 363 enum vector v = check_vector_prep(); in check_pabt()
|
H A D | unittests.cfg | 21 # Test vector setup and exception handling (kernel mode). 27 # Test vector setup and exception handling (user mode).
|
/kvm-unit-tests/s390x/ |
H A D | Makefile | 14 tests += $(TEST_DIR)/vector.elf
|