- 02 Mar, 2017 18 commits
-
-
Andrew Jones authored
Give x86 unit tests access to environment variables. The environment variables are passed to the unit test with '-initrd env-file'. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Give powerpc unit tests access to environment variables. The environment variables are passed to the unit test with '-initrd env-file'. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Give arm/arm64 unit tests access to environment variables. The environment variables are passed to the unit test with '-initrd env-file'. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Provide a function that imports an environ (a list of key=value environment variables). The list may be delimited by either '\0' or '\n'. If the list is delimited by '\n', then we assume it's user input and do additional sanity checking, as well as allow variables to be commented out with '#'. We also provide getenv() to lookup the variables. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
The next patch will double the amount of code in the file, so let's fix its coding style first. No functional change. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
If an initrd is provided on the qemu command line, then set a pointer to it during setup. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Treating mbi-cmdline as an 8 byte addr includes mbi-mods-count, which only works as long as there are no mods. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
If an initrd is provided on the qemu command line, then "import" it by copying it to a safe location during setup. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
If an initrd is provided on the qemu command line, then "import" it by copying it to a safe location during setup. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
To prepare for another region illustrate where we move the FDT. No functional change. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
To prepare for another region illustrate where we move the FDT. No functional change. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Allow DT users to find the initrd if one is passed on the QEMU command line. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Don't lie to callers when bootargs wasn't found, they can check for themselves. Also document that when a failure occurs @bootargs will be NULL. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Alexander Gordeev authored
Complete conversion of PCI API so all functions that imply the underlying device does exist would use struct pci_dev as a handle, not pcidevaddr_t. 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> Signed-off-by:
Radim Krčmář <rkrcmar@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> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Alexander Gordeev authored
Currently struct pci_dev is used for caching PCI device info used by some functions. This update turns the struct into device handle that will be used by nearly all existing and future APIs. As result of this change a pci_dev should be initialized with pci_dev_init() and pci_scan_bars() becomes redundant. 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> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Alexander Gordeev authored
Array pci_dev::resource[] is ambiguous wrt what is actually stored in its elements and how to interpret the index into the array. It is simple in case a device has only 32-bit BARs - an element pci_dev::resource[bar_num] contains the decoded address of BAR # bar_num. But what if a device has 64-bit BAR starting at bar_num? Curretnly pci_dev::resource[bar_num] contains the decoded address of the BAR, while pci_dev::resource[bar_num + 1] contains 0. That makes meaning of (bar_num + 1) index difficult to understand. On the one hand a testcase should not address a 64-bit BAR using high part BAR number. Particularly, when it tries to obtan BAR size or address. On the other hand a testcase should be able to access a low and high parts separately if it needs to for whatever reason. The rest of the API allows that as well. pci_dev::resource[] contains decoded 32/64-bit BAR addresses, not low/high parts of underlying 32-bit device BARs. Yet, indexes into this array correspond to raw 32-bit BARs in the PCI device configuration space. Thus, a question arises - what should be stored in array elements that correspond to high-parts of 64-bit BARs? Zero is particularly bad choice, because: - it is a valid address in PIO address space, so it can not stand for "no value" or NULL or whatever marker could be used to indicate a high part; - the high part of underlying 64-bit address is (could be) non-zero. So there is inconsistency also; By placing the same 64-bit address in both bar_num and (bar_num + 1) elements the ambiguity is less striking, since: - the meaning of bar_num kept consistent with the rest of the functions (where it refers 32-bit BAR in terms of the device configuration address space); - pci_dev::resource[bar_num + 1] contains a valid address rather than vague value of 0. - both bar_num and (bar_num + 1) indexes refer to the same 64-bit BAR and therefore return the same address; The notion of low and high parts of a 64-bit address is ignored, but that is fine, since pci_dev::resource[] contain only full addresses; 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> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Alexander Gordeev authored
This update is better be squashed into commit b8b9fcf5 ("pci: Make all ones invalid translate 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> Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 20 Jan, 2017 6 commits
-
-
Jim Mattson authored
Signed-off-by:
Jim Mattson <jmattson@google.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Remove -fpie from CFLAGS, which is unnecessary, and now, with the addition of -no-pie to the common Makefile, even confusing. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
We no longer need to add -fno-pic in the arm makefile. It's now added at the top-level. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Gavin Guo authored
Build fail can be observed while the kvm-unit-tests builds on Ubuntu Yakkety/Zesty release: /usr/bin/ld: x86/cstart64.o: relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC and can be fixed by adding "-fno-pic" and "-no-pie" option. There are other discussions: - gcc-6 6.2.0-7 breaks kernel build if stack protection is enabled https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841368 - [yakkety,RFC,v1] disable -pie when gcc has it enabled by default https://patchwork.ozlabs.org/patch/616621/ - https://wiki.ubuntu.com/YakketyYak/ReleaseNotes#GCC Signed-off-by:
Gavin Guo <gavin.guo@canonical.com> Signed-off-by:
Hsiangkai Wang <hsiangkai@gmail.com> Signed-off-by:
Cole Wang <cole945@gmail.com> Tested-by:
Po-Hsu Lin <po-hsu.lin@canonical.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 18 Jan, 2017 5 commits
-
-
Andrew Jones authored
Avoid printfs in library code unless in a printing function, e.g. pci_dev_print. Particularly we can avoid printing anything the caller can easily print themselves, if so desired. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Increase the utility of pci_cap_walk by allowing the caller to supply the table of cap handlers via a single handler, which implements all the cases of interest. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Writing zero to EDU_REG_INTR_RAISE doesn't clear the status, because the value is ORed in. The edu spec says that to clear the interrupt, regardless of using MSI or not, one should write the value of the interrupt status register to the interrupt acknowledge register from the interrupt handler. Cc: Peter Xu <peterx@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
We'll need to access the edu_dev struct from the ISR, so make it global. Cc: Peter Xu <peterx@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 17 Jan, 2017 1 commit
-
-
Andrew Jones authored
Commit 529046c3 "libcflat: add PRI(dux)32 format types" applies a detection trick that requires native compiling or cross-compiling with newlib, an embedded system C standard library. We can avoid the new dependency with a different trick. Cc: Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 12 Jan, 2017 10 commits
-
-
Peter Xu authored
run_task.sh is getting slow. This patch is trying to make it faster by running the tests concurrently. We provide a new parameter "-j" for the run_tests.sh, which can be used to specify how many run queues we want for the tests. Default queue length is 1, which is the old behavior. Quick test on my laptop (4 cores, 2 threads each) shows 3x speed boost: |-----------------+-----------| | command | time used | |-----------------+-----------| | run_test.sh | 75s | | run_test.sh -j8 | 27s | |-----------------+-----------| Signed-off-by:
Peter Xu <peterx@redhat.com> [Moved code to run_tests.bash, make "wait -n" support optional if -j1. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
We were using test.log before to keep all the test logs. This patch creates one log file per test case under logs/ directory with name "TESTNAME.log". Meanwhile, we will keep the last time log into logs.old/. Renaming scripts/functions.bash into scripts/common.bash to store some more global variables. 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> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Use the proper name, as the improper one isn't defined... Also cleanup some trailing spaces. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Reviewed-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
It's helpful to have a common order of file types in patches. Applying git-diff's orderFile feature allows us to do that. Just do 'git config diff.orderFile scripts/git.difforder' to enable it. Acked-by:
Radim Krčmář <rkrcmar@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
This allows a slightly nicer formatting of the text when displayed on some repository hosts. We keep a symlink from README for the old-school purists. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
Using %lx as a format string is not portable across 32/64 bit builds. Use explicit PRIx64 format strings. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
So we can have portable formatting of uint32_t types. However there is a catch. Different compilers can use legally subtly different types though so we need to probe the compiler defined intdef.h first. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
This patch reverts the stty parts of 8727c886 "runtime: better handling of QEMU aborts", as we can more robustly fix the same issue by simply redirecting /dev/null into qemu's stdin. The obvious side effect of this is that serial input will no longer be wired up to the tty (or any other input file descriptor), but unit tests do not, and should not, be reading from the serial port anyway. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-