- 19 Dec, 2016 10 commits
-
-
Calculate the numbers of cycles per instruction (CPI) implied by ARM PMU cycle counter values. The code includes a strict checking facility intended for the -icount option in TCG mode in the configuration file. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Wei Huang <wei@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Wei Huang <wei@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Wei Huang <wei@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
This patch adds two new macros to support read/write operations of ARMv7 and ARMv8 system registers. As part of the change, xstr() is revised to support variable arguments. With it, ARMv7 system register can be defined with __ACCESS_CP15() or __ACCESS_CP15_64() depending if it is 32-bit or 64-bit. get_mpidr() is re-written with new macros. Suggested-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Wei Huang <wei@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
To prepare for future support of ARMv8 system register, rename cp15.h file to sysreg.h, with _ASMARM_CP15_H_ renamed to _ASMARM_SYSREG_H_ in header file. Signed-off-by:
Wei Huang <wei@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
As distro compilers move towards defaults for build hardening for things like ASLR we need to force -fno-pic. Failure to do can lead to weird relocation problems when we build our "lat" binaries. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Failing to translate the PCI address obtained from the bar means something isn't right with the PCI setup. As this should never happen, assert when it does. Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> [Added commit message] Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Function pci_host_bridge_get_paddr() returns zero in case no mapping for a passed PCI address is found. All ones is a better choice, since zero may be a legitimate physical address. Suggested-by:
Andrew Jones <drjones@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> [squashed in INVALID_PHYS_ADDR use] Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
PCI I/O and Memory must be allocated to a device in a naturally aligned way. For example, if a device asks for 0xB0 of PCI I/O space then it must be aligned on an address that is a multiple of 0xB0 (http://www.tldp.org/LDP/tlk/dd/pci.html ) Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Reported-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Size of a BAR is naturally aligned so there is no need to align it explicitly. Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
- 16 Dec, 2016 1 commit
-
-
Jim Mattson authored
Int3 (#BP) and INTO (#OF) are unusual, in that they are reported as "software exception" rather than "hardware exception" in the VM-exit interruption information field of the VMCS. Signed-off-by:
Jim Mattson <jmattson@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 30 Nov, 2016 1 commit
-
-
Kyle Huey authored
This test checks that single stepping through CPUID and RDMSR works. Both instructions trigger VM exits and are emulated by the hypervisor. Signed-off-by:
Kyle Huey <khuey@kylehuey.com> [Fixed dr6 indices to check even dr6[5] and dr6[6].] Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 22 Nov, 2016 2 commits
-
-
Andrew Jones authored
Test writers sometimes want to output informational messages, but they don't want to use printf because they want the prefixes as well. Rather than creating "fake" tests that always pass, with report(fmt, true, ...), provide report_info(fmt, ...). This generates 'INFO: prefixes...: message' Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 21 Nov, 2016 3 commits
-
-
Jim Mattson authored
This test disables and re-enables the local APIC and ensures that CPUID.1H:EDX.APIC[bit 9] mirrors IA32_APIC_BASE[11]. Signed-off-by:
Jim Mattson <jmattson@google.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Adding pci-test to arm allowed us to see that a virtio-net-pci device was getting added to our machine by default. Unit tests should configure the most minimal machines they can, only adding devices necessary for the tests. Let's add -nodefaults to all the run scripts. I tested all arches (powerpc and arm on tcg). There were no unexpected changes. Signed-off-by:
Andrew Jones <drjones@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> [powerpc] Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Add two changes to run_qemu. The first saves/restores terminal settings. This solves an annoying loss of terminal echo when QEMU aborts during a test run. The second ensures we see a message about the abort, because the "Aborted (core dumped)" message we should see gets eaten. We also add a message to run()'s failure cases in its exit code processing to handle signals in general. Note, the first change is necessary because QEMU modifies the terminal settings when using '-serial stdio', but calling abort() invokes exit without first calling qemu_chr_free(serial_hds[0]) to restore them. (Additionally we fixup the premature failure check to only capture the last line, like it says it's doing.) Reported-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrew Jones <drjones@redhat.com> [Redirected the abort message to stderr and moved it below `stty`.] Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 15 Nov, 2016 1 commit
-
-
Radim Krčmář authored
Not doing so hid stderr output when the test was stuck and subsequently killed with ^C. Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 08 Nov, 2016 13 commits
-
-
Alexander Gordeev authored
Suggested-by:
Andrew Jones <drjones@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <7d7e8f320a5de2f9201c3d21f88dc63520ea41aa.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <aa209d81d593909bfaf89bb3a91ff7f33f8441a8.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Unlike x86, other architectures using generic ECAM PCI host do not have a luxury of PCI bus initialized by a BIOS and ready to use at start. Thus, we need allocate and assign resources to all devices, much like an architecture's firmware would do. There is no any sort of resource management for memory and io spaces, since only ones-per-BAR allocations are expected and no deallocations at all. Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Suggested-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <6488b060e4cbbead5a5ec525a53d65773ceb5f87.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Suggested-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <b261e0c3fbfafaa4c38793d4ae632a667f46fb16.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <bbe2afcf1701fa8905d910e141c922e2b058073f.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Because the counterpart to pci_bar_set_addr() setter is pci_bar_addr() getter, these names become inconsistent. Rename pci_bar_addr() to pci_bar_get_addr() also to make the resulting names conform to each other. Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <ce732680ee4989d1b2b26361a2c02d24b8bef37b.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
This update makes pci_bar_addr() interface 64 bit BARs aware and introduces a concept of PCI address translation. An architecutre should implement pci_translate_addr() interface in order to provide mapping between PCI bus address and CPU physical address. Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <11145b9c19a61b4f585b3fabf5b2c64299aa89ff.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <1173859894ae623b5324ad04fc6417a4591ad450.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <df1dee9ef0ff2740835e0690f84b849315ee7885.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <24c5c29c3bbd3fed9091efa8586c90068037f168.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <c13b07e15d2ffa2823894bc83be62de400f29e98.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Cc: Thomas Huth <thuth@redhat.com> Cc: Andrew Jones <drjones@redhat.com> Cc: Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Message-Id: <6bb1283e3dfd4c3e8c4b1ebcdd4e08485bc4c507.1478512824.git.agordeev@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <1477939540-28370-1-git-send-email-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 03 Nov, 2016 5 commits
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Q35 resets the wakeup reasons at startup (it is a bug that i440FX machine types do not do that, but it probably cannot be changed for backwards compatibility reasons). For the S3 test to work with the Q35 machine types, we have to enable RTC wakeup manually. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
launched is a bool, and thus its size is one byte. If we are lucky the compiler places nothing interesting close to it and a cmpl just works. But if we are unlucky, we read a nonzero value and do a vmresume on a non-launched VMCS. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
CF corresponds to VMfailInvalid, ZF corresponds to VMfailValid. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
With gcc 6.2.1 (gcc-6.2.1-2.fc24.x86_64) hitting an assert() in x86 code causes an infinite loop. This is due to a null dereference in backtrace_frame. Let's not do that. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 25 Oct, 2016 4 commits
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Not all targets have -Wframe-address, and those that don't will report an error if -Wno-frame-address is passed (because of -Werror). So autodetect it.
-
Peter Xu authored
smp_init() will setup idt as default. No need to call it twice. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Signed-off-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-