Home
last modified time | relevance | path

Searched full:to (Results 1 – 25 of 303) sorted by relevance

12345678910>>...13

/kvm-unit-tests/
H A DLICENSE6 Everyone is permitted to copy and distribute verbatim copies
11 The licenses for most software are designed to take away your
12 freedom to share and change it. By contrast, the GNU General Public
13 License is intended to guarantee your freedom to share and change free
14 software--to make sure the software is free for all its users. This
15 General Public License applies to most of the Free Software
16 Foundation's software and to any other program whose authors commit to
18 the GNU Lesser General Public License instead.) You can apply it to
21 When we speak of free software, we are referring to freedom, not
22 price. Our General Public Licenses are designed to make sure that you
[all …]
H A DREADME.md1 # Welcome to kvm-unit-tests
11 To create the test images do:
30 clang may be used as an alternative to gcc.
44 The tests can be built as standalone. To create and use standalone tests do:
49 (go to somewhere)
58 Then use the runner script to detect the correct invocation and
66 to run them all.
72 To select a specific QEMU binary though, specify the QEMU=path/to/binary
77 To select an accelerator, for example "kvm", "hvf" or "tcg", specify the
82 For running tests that involve migration from one QEMU instance to another
[all …]
H A DREADME1 # Welcome to kvm-unit-tests
11 To create the test images do:
30 clang may be used as an alternative to gcc.
44 The tests can be built as standalone. To create and use standalone tests do:
49 (go to somewhere)
58 Then use the runner script to detect the correct invocation and
66 to run them all.
72 To select a specific QEMU binary though, specify the QEMU=path/to/binary
77 To select an accelerator, for example "kvm", "hvf" or "tcg", specify the
82 For running tests that involve migration from one QEMU instance to another
[all …]
H A DREADME.macOS.md3 The tests can be used to validate TCG or HVF accel on macOS.
7 GNU getopt and coreutils should be installed prior to building and running the
14 A cross-compiler with ELF support is required to build kvm-unit-tests on macOS.
46 Out-of-tree build can be used to make tests for both architectures
51 An alternative is to build cross-compiler toolchain from source using
59 A case-sensitive APFS/HFS+ volume has to be created using Disk Utility as a
74 Once compiled, the cross-compiler can be used to build the tests:
H A DMAINTAINERS4 The intention of this file is not to establish who owns what portions of the
5 code base, but to provide a set of names that developers can consult when they
6 have a question about a particular subset and also to provide a set of names
7 to be CC'd when submitting a patch to obtain appropriate review.
15 M: Mail patches to: FullName <address@domain>
18 L: Mailing list that is relevant to this area
23 Supported: Someone is actually paid to look after this.
25 Odd Fixes: It has a maintainer but they don't have time to do
44 K: Keyword perl extended regex pattern to match content in a
/kvm-unit-tests/lib/libfdt/
H A Dlibfdt.h24 /* FDT_ERR_EXISTS: Attempted to create a node or property which
27 /* FDT_ERR_NOSPACE: Operation needed to expand the device
28 * tree, but its buffer did not have sufficient space to
29 * contain the expanded tree. Use fdt_open_into() to move the
30 * device tree to a buffer with more space. */
35 * offset which is out-of-bounds, or which points to an
57 /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a
64 * required to convert the tree to the expected version. */
73 * then strings). Use fdt_open_into() to reorganize the tree
89 * value. For example: a property expected to contain a string list
[all …]
H A Dfdt_overlay.c16 * @fdto: pointer to the device tree overlay blob
65 /* Try first to do a phandle based lookup */ in overlay_get_target()
95 /* return pointer to path (if available) */ in overlay_get_target()
106 * @name: Name of the property to modify (phandle or linux,phandle)
107 * @delta: offset to apply
144 * @node: Offset of the node we want to adjust
145 * @delta: Offset to shift the phandles of
147 * overlay_adjust_node_phandles() adds a constant to all the phandles
149 * application process, when we want to update all the overlay
150 * phandles to not conflict with the overlays of the base device tree.
[all …]
H A Dlibfdt_internal.h50 * Internal helpers to access tructural elements of the device tree
86 * For situations where security is not a concern it may be safe to enable
94 * passed to libfdt may do the same.
99 * being added to the string table even though the property itself is
100 * not added to the struct section.
103 * the latest supported version and wish to minimise code size.
113 * complete garbage may cause libfdt to behave badly or crash. Truncated
117 * Note: Only checks that relate exclusively to the device tree itself
118 * (not the parameters passed to libfdt) are disabled by this
130 * It doesn't make sense to enable this assumption unless
[all …]
/kvm-unit-tests/lib/s390x/
H A Dmmu.h22 * Splits the pagetables down to the given DAT tables level.
23 * Returns a pointer to the DAT table entry of the given level.
25 * @vaddr address whose page tables are to split
31 * Applies the given protection bits to the given DAT tables level,
34 * @vaddr address whose protection bits are to be changed
35 * @prot the protection bits to set
44 * @vaddr address whose protection bits are to be changed
45 * @prot the protection bits to clear
51 * Applies the given protection bits to the given 4kB pages range,
53 * @start starting address whose protection bits are to be changed
[all …]
H A Dsnippet.h16 /* This macro cuts down the length of the pointers to snippets */
34 * Some of the UV memory needs to be allocated with >31 bit
46 * C snippet instructions start at 0x4000 due to the prefix and the
63 * @vm: VM that this function will populated, has to be initialized already
66 * @off: Offset from guest absolute 0x0 where snippet is copied to
73 /* Copy test image to guest memory */ in snippet_init()
80 * We want to exit on PGM exceptions so we don't need in snippet_init()
91 * @vm: VM that this function will populated, has to be initialized already
96 * @off: Offset from guest absolute 0x0 where snippet is copied to
140 * to run a PV guest. in snippet_setup_guest()
/kvm-unit-tests/docs/
H A Dunittests.txt6 directory, and how to run it. This way, for example, a single file can
8 and/or different parameters passed to it.
36 directory to run. Typically this is <name>.flat or <name>.elf, depending
42 the test to the specified arch. By default, the test will run on any
48 the test to the specified machine. By default, the test will run on
50 environment variable, and defaults to the architecture's default.)
56 Optional, the number of processors created in the machine to run the test.
57 Defaults to 1. $MAX_SMP can be used to specify the maximum supported.
63 Optional, will be used to pass arguments into the test case argv. If multiple,
64 space separated, arguments need to be passed to a test, wrap them in quotes.
[all …]
/kvm-unit-tests/x86/efi/
H A DREADME.md5 This dir provides code to build kvm-unit-tests test cases and run them under
12 - [UEFI firmware](https://github.com/tianocore/edk2): to run test cases in QEMU
16 To build:
23 To run a test case with UEFI:
28 please install UEFI firmware to this path, or specify the correct path through
31 EFI_UEFI=/path/to/OVMF.fd ./x86/efi/run ./x86/msr.efi
40 - elf_x86_64_efi.lds: linker script to build an EFI application
43 EFI application binaries should be relocatable as UEFI loads binaries to dynamic
44 runtime addresses. To build such relocatable binaries, GNU-EFI utilizes the
48 `elf_x86_64_efi.lds` to organize the sections in a way UEFI recognizes
[all …]
/kvm-unit-tests/x86/
H A DREADME4 The infrastructure initialize the system/cpus, switches to long-mode, and
10 These invocations run the msr test case and outputs to stdio.
27 emulator: move to/from regs, cmps, push, pop, to/from cr8, smsw and lmsw
29 msr: write to msr (only KERNEL_GS_BASE for now)
30 realmode: goes back to realmode, shld, push/pop, mov immediate, cmp
35 smptest: run smp_id() on every cpu and compares return value to number
36 tsc: write to tsc(0) and write to tsc(100000000000) and read it back
46 The run script converts the qemu-system exit status to 0 (SUCCESS), and
47 treats the legacy exit status of 0 as an error, converting it to an exit
H A Dlam.c30 "Expected CR4.LAM_SUP=1 to %s", has_lam ? "succeed" : "#GP"); in test_cr4_lam_set_clear()
33 report(!vector, "Expected CR4.LAM_SUP=0 to succeed"); in test_cr4_lam_set_clear()
36 /* Refer to emulator.c */
53 * Use LAM57_MASK as mask to construct non-canonical address if LAM is in get_lam_mask()
91 report(!fault, "Expected access to untagged address for %s to succeed", in test_ptr()
96 report(fault != lam_active, "Expected access to tagged address for %s %s LAM to %s", in test_ptr()
107 report(fault, "Expected access to non-LAM-canonical address for %s to #GP", in test_ptr()
129 report_pass("Expected %sINVLPG with tagged addr to succeed", fep ? "fep: " : ""); in test_invlpg()
132 /* LAM doesn't apply to the linear address in the descriptor of invpcid */
156 "Expected INVPCID with untagged pointer + untagged addr to succeed, got vector %u", in test_invpcid()
[all …]
H A Dsyscall.c30 * "race" to force the emulation of syscall/sysret.
56 " syscall\n" /* jumps back to test_syscall_tf's body */
73 * sysret to syscall_tf_user32 in test_syscall_tf()
75 * syscall to syscall32_target -> TF cleared and no singlestep in test_syscall_tf()
77 * handle_db sets code_segment_upon_db to USER_CS32 and clears TF in test_syscall_tf()
78 * syscall to syscall32_target in test_syscall_tf()
79 * syscall32_target jumps to back_to_test in test_syscall_tf()
82 * sysret to syscall_tf_user32 in test_syscall_tf()
84 * syscall to syscall32_target, TF cleared and wrong singlestep exception in test_syscall_tf()
85 * handle_db sets code_segment_upon_db to KERNEL_CS64 in test_syscall_tf()
[all …]
H A Dtrampolines.S2 * Common bootstrapping code to transition from 16-bit to 32-bit code, and to
3 * transition from 32-bit to 64-bit code (x86-64 only)
12 /* EFI provides it's own SIPI sequence to handle relocation. */
48 * but 32-bit code doesn't have that luxury. Make a dummy CALL to get RIP into
49 * a GPR in order to emulate RIP-relative for 32-bit transition code.
H A Deventinj.c123 printf("Sending nested NMI to self\n"); in nmi_isr()
126 printf("After nested NMI to self\n"); in nmi_isr()
141 // Return to same privilege level won't pop SS or SP, so
154 "xchg %"R "dx, %"R "sp \n\t" // point to new stack
161 "cmpb $0, no_test_device\n\t" // see if need to flush
167 "cmpb $0, %bl\n\t" // see if need to flush
173 "2: xchg %"R "dx, %"R "sp \n\t" // point to old stack
183 printf("Sending nested NMI to self\n"); in nmi_iret_isr()
185 printf("After nested NMI to self\n"); in nmi_iret_isr()
230 printf("Try to divide by 0\n"); in main()
[all …]
/kvm-unit-tests/lib/
H A Dalloc_page.h30 * n is the number of the area to initialize
31 * base_pfn is the physical frame number of the start of the area to initialize
33 * the end of the area to initialize
49 * Equivalent to memalign_pages_flags(alignment, size, AREA_ANY).
58 * Equivalent to memalign_pages_flags(1ull << order, 1ull << order, flags).
65 * Equivalent to alloc_pages_flags(order, AREA_ANY);
74 * Equivalent to alloc_pages(0);
84 * The pointer must point to the start of the block.
90 * Equivalent to free_pages(mem).
99 * Equivalent to free_pages(mem).
[all …]
H A Dmigrate.c12 * Initiate migration and wait for it to complete.
16 puts("Now migrate the VM, then press a key to continue...\n"); in migrate()
33 * Initiate migration and wait for it to complete.
49 * skipped and no migration point is reached, this can be used to tell the
50 * harness not to mark it as a failure to migrate.
74 * output files, print twice and match once to always cope with in migrate_end_continuous()
H A Dacpi.h7 * All tables and structures must be byte-packed to match the ACPI
32 u8 checksum; /* To make sum of struct == 0 */
46 u8 checksum; /* To make sum of entire table == 0 */ \
84 u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
85 u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
86 u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
104 u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
105 u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
106 u16 flush_size; /* Size of area read to flush caches */
110 u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
[all …]
H A Delf.h30 Elf64_Addr r_offset; /* Location at which to apply the action */
35 Elf32_Addr r_offset; /* Location at which to apply the action */
37 Elf32_Sxword r_addend; /* Constant addend used to compute value */
41 Elf64_Addr r_offset; /* Location at which to apply the action */
43 Elf64_Sxword r_addend; /* Constant addend used to compute value */
46 /* This is the info that is needed to parse the dynamic section of the file */
/kvm-unit-tests/s390x/
H A Dex.c16 * Accesses to the operand of execute-type instructions are instruction fetches.
27 * to the first register. No branch is taken in this test, because 0 is
53 * According to PoP (Branch-Address Generation), the address calculated relative
54 * to the instruction address is relative to BRAS when it is the target of an
55 * execute-type instruction, not relative to the execute-type instruction.
73 * In case the address calculation is correct, we jump by the relative offset 1b-0b from 0b to 1b. in test_bras()
74 * In case the address calculation is relative to the exrl (i.e. a test failure), in test_bras()
99 report(after_target == branch_addr, "address calculated relative to BRAS"); in test_bras()
107 * to the LARL.
124 report(target == addr, "address calculated relative to LARL"); in test_larl()
[all …]
H A Dspec_ex.c11 * Can be extended by adding triggers to spec_ex_triggers, see comments below.
21 /* toggled to signal occurrence of invalid psw fixup */
31 * The PSW to return to is set by load_psw.
99 /* Since the fixup sets this to false we check for false here. */ in check_invalid_psw()
111 report_fail("Expected exception due to invalid PSW"); in check_invalid_psw()
116 /* For normal PSWs bit 12 has to be 0 to be a valid PSW*/
162 /* A short PSW needs to have bit 12 set to be valid. */
183 int to = 0, from = 0x0dd; in odd_ex_target() local
189 " lr %[to],%[from]\n" in odd_ex_target()
195 [to] "+d" (to) in odd_ex_target()
[all …]
/kvm-unit-tests/powerpc/
H A Demulator.c21 /* the result is bit 16 to 19 of SRR1 in program_check_handler()
106 * lswi is supposed to cause an alignment exception in little endian in test_lswi()
107 * mode, but to be able to check this, we also have to specify the in test_lswi()
156 * we should modify 32/4 = 8 regs, from r11 to r18 in test_lswi()
169 /* check wrap around to r0 */ in test_lswi()
180 /* modify two registers from r31, wrap around to r0 */ in test_lswi()
184 "wrap around to r0"); in test_lswi()
200 /* loading three registers from r31 wraps around to r1, in test_lswi()
201 * r1 is saved to r29, as adding it to the clobber in test_lswi()
206 /* doc says it is invalid, real proc stops when it comes to in test_lswi()
[all …]
/kvm-unit-tests/lib/x86/
H A Dsmp.c181 * On i386, place the gdt descriptor to be loaded from SIPI vector right after in setup_rm_gdt()
202 * After relocating to the lowmem address pointed to by realmode_trampoline, in setup_rm_gdt()
203 * the realmode GDT descriptor needs to contain the relocated address of in setup_rm_gdt()
214 * 16-bit mode, the relocated address of ap_rm_gdt_descr needs to be stored at in setup_rm_gdt()
215 * a location known to / accessible from the trampoline. in setup_rm_gdt()
217 * Use the last two bytes of the trampoline page (REALMODE_GDT_LOWMEM) to store in setup_rm_gdt()
218 * a pointer to relocated ap_rm_gdt_descr addr. This way, the trampoline code can in setup_rm_gdt()
220 * and this relocated descriptor points to the relocated GDT. in setup_rm_gdt()
225 * Set up a call gate to the 32-bit entrypoint (ap_start32) within GDT, since in setup_rm_gdt()
227 * to be reachable from the SIPI vector. in setup_rm_gdt()
[all …]

12345678910>>...13