On Fri, Dec 12, 2014 at 05:06:07PM +0100, Andrew Jones wrote:
This series applies report() to more x86 unit tests. It also
cleans up some uses of it in vmx_tests. Finally, it also
introduces report prefix support, and applies that a few places.
There should be no functional changes
to the minimal drop
10-12: Prep the arm framework for enabling the mmu on aarch64
13-14: Prep the aarch64 framework for enabling the mmu
15 : Enables the mmu on aarch64
These patches are also available here
https://github.com/rhdrjones/kvm-unit-tests/tree/arm64/initial-drop
Thanks,
drew
Andrew
Implement asm_mmu_enable and flush_tlb_all, and then make a final
change to mmu.c in order to link it into arm64. The final change
is to map the code read-only. This is necessary because armv8
forces all writable code shared between EL1 and EL0 to be PXN.
Signed-off-by: Andrew Jones drjo
When $ARCH != $TEST_DIR we should look there too. This patch cheats
though and makes cscope always look there, but then gets rid of the
duplicates generated when $ARCH == $TEST_DIR.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
Separate the concepts of an 'svc', the syscall instruction present
on both arm and arm64, and 'svc mode', which is arm's kernel mode,
and doesn't exist on arm64. kernel mode on arm64 is modeled with
exception level 1 (el1).
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/selftest.c
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/cstart64.S| 142 ++-
arm/selftest.c| 129 ---
arm/unittests.cfg | 2 -
config/config-arm64.mak | 1 +
lib/arm64/asm-offsets.c | 16
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm64/asm/page.h | 66 +++-
lib/arm64/asm/pgtable-hwdef.h | 136 ++
lib/arm64/asm/pgtable.h | 69 +
3 files changed, 270 insertions(+), 1 deletion
To use page level descriptors we need some pgd/pud/pmd/pte
methods, and a few more flags defined.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/mmu.h | 16 +---
lib/arm/asm/pgtable-hwdef.h | 38 ++-
lib/arm/asm/pgtable.h | 91
* don't assume 1G PGDIR_SIZE or L1_CACHE_BYTES pgd alignment
* use page level descriptors for non-I/O memory
* apply new pgd/pud/pmd/pte methods
* split mmu.h to share function declarations
* use more generic flag names in mmu.c
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/mmu
Using -kernel doesn't force qemu to exit immediately,
and thus we hang when trying to run arm/run. Using
-initrd works though.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/run | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arm/run b/arm/run
index a714350225597
Correct a type mismatch in the cpus initialization.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/arm/setup.c b/lib/arm/setup.c
index 5fa37ca35f383..50ca4cb9ff99e 100644
--- a/lib/arm/setup.c
+++ b/lib
more than one page,
even though the memory is there.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/flat.lds | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arm/flat.lds b/arm/flat.lds
index ee9fc0ab79abc..89a55720d728f 100644
--- a/arm/flat.lds
+++ b/arm
This allows it to be different for arm64, even with setup.h
shared.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/mmu.h | 2 +-
lib/arm/asm/page.h | 5 ++---
lib/arm/asm/pgtable-hwdef.h | 6 ++
lib/arm/asm/setup.h | 6 ++
lib/arm/mmu.c
-by: Andrew Jones drjo...@redhat.com
---
arm/cstart.S | 6 +++---
arm/selftest.c| 14 +++---
lib/arm/asm-offsets.c | 4 ++--
lib/arm/asm/asm-offsets.h | 2 +-
lib/arm/asm/io.h | 8
lib/arm/asm/mmu.h | 6 +++---
lib/arm/asm/page.h
Drop the unused arguments from setup(), passing only the fdt.
This allows setup() to be more easily shared with arm64.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/cstart.S| 12 ++--
lib/arm/setup.c | 3 +--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git
A size_t can have a different size when compiled as
64-bit vs. 32-bit. When unsigned int is what we want,
then make sure unsigned int is what we use.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/chr-testdev.c | 4 ++--
lib/virtio.c | 2 +-
lib/virtio.h | 3 ++-
3 files
make
QEMU=[qemu with aarch64, mach-virt, and chr-testdev] ./run_tests.sh
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/cstart64.S | 48 +
arm/run | 10 --
arm/selftest.c | 6
arm/unittests.cfg
On Wed, Dec 03, 2014 at 10:18:36PM +0100, Christoffer Dall wrote:
Several people have reported problems with rebooting ARM VMs, especially
on 32-bit ARM. This is mainly due to the same reason we were seeing
boot errors in the past, namely that the ram, dcache, and icache weren't
coherent on
), and then intermittently afterwards. I've just tested
this patch series, and it appears to resolve the issue. No stuck vcpu
after install, and a reboot loop has been running for a while now. I'm
testing on a mustang. If you like, feel free to add a
Tested-by: Andrew Jones drjo...@redhat.com
drew
On Tue, Nov 25, 2014 at 04:09:59PM +, Alex Bennée wrote:
Bring into line with the commentary for the other structures and their
KVM_EXIT_* cases.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 6076882..523f476
On Tue, Nov 25, 2014 at 04:10:00PM +, Alex Bennée wrote:
This commit defines the API headers for guest debugging. There are two
architecture specific debug structures:
- kvm_guest_debug_arch, allows us to pass in HW debug registers
- kvm_debug_exit_arch, signals the exact debug exit
On Tue, Nov 25, 2014 at 04:10:01PM +, Alex Bennée wrote:
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
ioctl. Currently any operation flag will return EINVAL. Actual
functionality will be added with further patches.
Technically the stub is already there, and you're
On Tue, Nov 25, 2014 at 04:10:02PM +, Alex Bennée wrote:
This adds support for SW breakpoints inserted by userspace.
First we need to trap all BKPT exceptions in the hypervisor (ELS). This
in controlled through the MDCR_EL2 register. I've added a new field to
the vcpu structure to hold
On Tue, Nov 25, 2014 at 04:10:03PM +, Alex Bennée wrote:
This adds support for single-stepping the guest. As userspace can and
will manipulate guest registers before restarting any tweaking of the
registers has to occur just before control is passed back to the guest.
Furthermore while
On Tue, Nov 25, 2014 at 04:10:04PM +, Alex Bennée wrote:
This is a pre-cursor to sharing the code with the guest debug support.
This replaces the big macro that fishes data out of a fixed location
with a more general helper macro to restore a set of debug registers. It
uses macro
On Tue, Nov 25, 2014 at 04:10:05PM +, Alex Bennée wrote:
This adds support for userspace to control the HW debug registers for
guest debug. We'll only copy the $ARCH defined number across as that's
all that hyp.S will use anyway. I've moved some helper functions into
the hw_breakpoint.h
On Wed, Nov 26, 2014 at 05:46:05PM +0100, Paolo Bonzini wrote:
On 26/11/2014 15:58, Alex Bennée wrote:
Andrew Jones drjo...@redhat.com writes:
On Tue, Nov 25, 2014 at 04:10:00PM +, Alex Bennée wrote:
This commit defines the API headers for guest debugging. There are two
On Thu, Nov 13, 2014 at 12:44:39AM -0200, Marcelo Tosatti wrote:
The periodic kvmclock sync can be an undesired source of latencies.
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0033df3..be56fd3 100644
---
On Thu, Nov 13, 2014 at 09:40:41AM +0100, Andrew Jones wrote:
On Thu, Nov 13, 2014 at 12:44:39AM -0200, Marcelo Tosatti wrote:
The periodic kvmclock sync can be an undesired source of latencies.
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/x86.c b
On Thu, Nov 13, 2014 at 11:44:02AM +0100, Andrew Jones wrote:
On Thu, Nov 13, 2014 at 09:40:41AM +0100, Andrew Jones wrote:
On Thu, Nov 13, 2014 at 12:44:39AM -0200, Marcelo Tosatti wrote:
The periodic kvmclock sync can be an undesired source of latencies.
Signed-off-by: Marcelo
On Thu, Nov 13, 2014 at 06:47:40PM +0100, Paolo Bonzini wrote:
On 13/11/2014 18:46, Radim Krčmář wrote:
Yes, or add callbacks to sysfs writes that would schedule/cancel this
work. (But having a for_every_vm loop is quite ugly.)
I'd be happy with a 'const kvmclock_periodic_sync'.
This first patch of this series fixes a bug caused by attempting
to use spinlocks without enabling the MMU. The next three do some
prep for the fifth, and also fix arm's PAGE_ALIGN. The fifth is
prep for the sixth, which finally turns the MMU on for arm unit
tests.
Andrew Jones (6):
arm: fix
/arm/asm/mmu.h
@@ -0,0 +1,11 @@
+#ifndef __ASMARM_MMU_H_
+#define __ASMARM_MMU_H_
+/*
+ * Copyright (C) 2014, Red Hat Inc, Andrew Jones drjo...@redhat.com
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.
+ */
+
+#define mmu_enabled() (0)
+
+#endif /* __ASMARM_MMU_H_ */
diff
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/page.h | 22 +++
lib/arm/asm/pgtable-hwdef.h | 65 +
2 files changed, 87 insertions(+)
create mode 100644 lib/arm/asm/pgtable-hwdef.h
diff --git a/lib/arm/asm/page.h b
Add a type-considerate ALIGN[_UP] macro to libcflat, and apply
it to /lib code that can make use of it. This will be used to
fix PAGE_ALIGN on arm, which can be used on phys_addr_t
addresses, which may exceed 32 bits.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/alloc.c| 4
This fixes PAGE_ALIGN for greater than 32-bit addresses.
Also fix up some whitespace in lib/arm/asm/page.h
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/page.h | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/lib/arm/asm/page.h b/lib
And apply it to /lib files. This prepares for the import of
kernel headers that make use of the const.h macros.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/asm-generic/page.h | 8 +++-
lib/const.h| 11 +++
2 files changed, 14 insertions(+), 5 deletions
We should probably always run with the mmu on, so let's
enable it from setup with an identity map.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arm/cstart.S | 33
config/config-arm.mak | 3 ++-
lib/arm/asm/mmu.h | 34
On Fri, Sep 26, 2014 at 09:51:15AM +0200, Christoffer Dall wrote:
On Tue, Sep 16, 2014 at 08:57:31AM -0400, Andrew Jones wrote:
- Original Message -
Il 16/09/2014 14:43, Andrew Jones ha scritto:
I don't think we need to worry about this case. AFAIU, enabling the
caches
- Original Message -
Il 16/09/2014 04:06, Andrew Jones ha scritto:
We shouldn't try Load-Exclusive instructions unless we've enabled memory
management, as these instructions depend on the data cache unit's
coherency monitor. This patch adds a new setup boolean, initialized
- Original Message -
Il 16/09/2014 14:12, Andrew Jones ha scritto:
Should it at least write 1 to the spinlock?
I thought about that. So on one hand we might get a somewhat functional
synchronization mechanism, which may be enough for some unit test that
doesn't enable caches
- Original Message -
- Original Message -
Il 16/09/2014 14:12, Andrew Jones ha scritto:
Should it at least write 1 to the spinlock?
I thought about that. So on one hand we might get a somewhat functional
synchronization mechanism, which may be enough for some
- Original Message -
Il 16/09/2014 14:43, Andrew Jones ha scritto:
I don't think we need to worry about this case. AFAIU, enabling the
caches for a particular cpu shouldn't require any synchronization.
So we should be able to do
enable caches
spin_lock
start
- Original Message -
Il 16/09/2014 14:43, Andrew Jones ha scritto:
I don't think we need to worry about this case. AFAIU, enabling the
caches for a particular cpu shouldn't require any synchronization.
So we should be able to do
enable caches
spin_lock
start
- Original Message -
- Original Message -
Il 16/09/2014 14:43, Andrew Jones ha scritto:
I don't think we need to worry about this case. AFAIU, enabling the
caches for a particular cpu shouldn't require any synchronization.
So we should be able to do
On Tue, Sep 16, 2014 at 10:38:11AM -0400, Andrew Jones wrote:
- Original Message -
- Original Message -
Il 16/09/2014 14:43, Andrew Jones ha scritto:
I don't think we need to worry about this case. AFAIU, enabling the
caches for a particular cpu shouldn't
from the spec if the
instructions will behave as expected while caches are off, so we no longer
allow Load-Exclusive instructions on those processors without caches enabled
either.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/setup.h | 2 ++
lib/arm/setup.c | 1 +
lib/arm
hypervisor guest types may find it useful as
well.
Signed-off-by: Ulrich Obergfell uober...@redhat.com
Signed-off-by: Andrew Jones drjo...@redhat.com
---
v2: don't override hardlockup detector setting when just changing
the threshold [Uli and Don]
---
include/linux/nmi.h | 9 +
kernel
On Fri, Jul 25, 2014 at 04:32:55AM -0400, Ulrich Obergfell wrote:
- Original Message -
From: Andrew Jones drjo...@redhat.com
To: linux-ker...@vger.kernel.org, kvm@vger.kernel.org
Cc: uober...@redhat.com, dzic...@redhat.com, pbonz...@redhat.com,
a...@linux-foundation.org, mi
hypervisor guest types may find it useful as
well.
Signed-off-by: Ulrich Obergfell uober...@redhat.com
Signed-off-by: Andrew Jones drjo...@redhat.com
---
include/linux/nmi.h | 9 +
kernel/watchdog.c | 45 +++--
2 files changed, 52 insertions(+), 2
It's not recommended for KVM guests to enable hard lockup detection, as
false positives may be easily triggered by, for example, vcpu overcommit.
However any kernel compiled with HARDLOCKUP_DETECTOR that detects a PMU
on boot will by default enable hard lockup detection. This series gives
a kernel
)
pr_info(enabled on all CPUs, ...)
The patch avoids this by clearing cpu0_err in watchdog_nmi_disable().
Signed-off-by: Ulrich Obergfell uober...@redhat.com
Signed-off-by: Andrew Jones drjo...@redhat.com
---
kernel/watchdog.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel
Obergfell uober...@redhat.com
Signed-off-by: Andrew Jones drjo...@redhat.com
---
arch/x86/kernel/kvm.c | 8
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 3dd8e2c4d74a9..95c3cb16af3e5 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
the already Reviewed-by
patches
05/14 add minimal virtio support for devtree virtio-mmio
09/14 arm: initial drop
should get a second look (or interdiffed).
Thanks in advance for reviews!
[1] http://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg01960.html
Andrew Jones (12):
libfdt: Import
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/asm-generic/io.h | 13 +
lib/asm-generic/page.h | 28
2 files changed, 41 insertions(+)
create mode 100644 lib/asm-generic/page.h
diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h
index
specific versions placed in
lib/$ARCH/asm/.
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
v5: added a trivial ioremap function [Christoffer Dall]
v4: introduce lib/asm symlink to get rid of #ifdef __arm__,
add spinlock.h too
v3: wrt
new file mode 100644
index 0..883cab89622f7
--- /dev/null
+++ b/lib/arm/asm/processor.h
@@ -0,0 +1,39 @@
+#ifndef _ASMARM_PROCESSOR_H_
+#define _ASMARM_PROCESSOR_H_
+/*
+ * Copyright (C) 2014, Red Hat Inc, Andrew Jones drjo...@redhat.com
+ *
+ * This work is licensed under the terms
Currently only supports sending (outbufs), doesn't have any
bells or whistles. Code adapted from the Linux Kernel.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
v7:
- {alloc,alloc_aligned} - {calloc,memalign}
- changes now split between virtio.* and virtio-mmio.* files
---
lib/virtio
From: Christoffer Dall christoffer.d...@linaro.org
Add IO accessor functions to the arm library functions to avoid
register-writeback IO accessors that are not yet supported by the
kernel.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Andrew Jones drjo...@redhat.com
-offsets.mak b/config/asm-offsets.mak
new file mode 100644
index 0..b2578a6692f33
--- /dev/null
+++ b/config/asm-offsets.mak
@@ -0,0 +1,41 @@
+#
+# asm-offsets adapted from the kernel, see
+# Kbuild
+# scripts/Kbuild.include
+# scripts/Makefile.build
+#
+# Authors: Andrew Jones
These are pretty much the same as the asm-generic version,
but use phys_addr_t.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/io.h | 13 +
lib/arm/asm/page.h | 34 +-
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/lib
Support the bare minimum of virtio to enable access to the virtio-mmio
config space of a device. Currently this implementation must use a
device tree to find the device.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v7:
- s/alloc
physical memory allocator, which the
early_* alloc functions build on.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
v7: expanded from only supplying the alloc function wrappers to
including early_* and phys_alloc [Paolo Bonzini]
---
lib/alloc.c | 176
-of.txt.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v7:
- squashed the add a make target bit of v6's libfdt: get libfdt to
build (now dropped) patch. The rest of that dropped patch has
already been merged under libcflat: add more
-by: Andrew Jones drjo...@redhat.com
---
lib/chr-testdev.c | 72 +++
lib/chr-testdev.h | 14 +++
lib/virtio.h | 2 ++
3 files changed, 88 insertions(+)
create mode 100644 lib/chr-testdev.c
create mode 100644 lib/chr-testdev.h
diff --git
From: Christoffer Dall christoffer.d...@linaro.org
Add simple busy-wait spinlock implementation for ARM.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Andrew Jones drjo...@redhat.com
---
config/config-arm.mak | 3 ++-
lib/arm/asm/spinlock.h | 9 ++---
lib/arm
--cross-prefix=arm-linux-gnu- --arch=arm
make
./run_tests.sh
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v7:
- remove memregions (reworked them as phys_alloc in lib/alloc)
- selftest: non-functional change: s/argv[i]/var
/setup.h b/lib/arm/asm/setup.h
new file mode 100644
index 0..21445ef2085fc
--- /dev/null
+++ b/lib/arm/asm/setup.h
@@ -0,0 +1,27 @@
+#ifndef _ASMARM_SETUP_H_
+#define _ASMARM_SETUP_H_
+/*
+ * Copyright (C) 2014, Red Hat Inc, Andrew Jones drjo...@redhat.com
+ *
+ * This work
On Fri, Jul 11, 2014 at 12:07:25PM +0200, Andrew Jones wrote:
On Fri, Jul 11, 2014 at 11:41:34AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:55, Andrew Jones ha scritto:
On Fri, Jul 11, 2014 at 10:40:42AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:19, Andrew Jones ha scritto:
alloc_ops
On Fri, Jul 11, 2014 at 10:47:00AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:19, Andrew Jones ha scritto:
This is a v6 of a series that introduces arm to kvm-unit-tests. As
the tidy-up patches from v5 have already been merged (thanks!), these
are just the remaining patches. Although
On Fri, Jul 11, 2014 at 11:08:28AM +0200, Andrew Jones wrote:
On Fri, Jul 11, 2014 at 10:32:51AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:19, Andrew Jones ha scritto:
+enum virtio_hwdesc_type {
+ VIRTIO_HWDESC_TYPE_DT = 0, /* device tree */
+ NR_VIRTIO_HWDESC_TYPES
).
Thanks in advance for reviews!
[1] http://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg01960.html
[2] http://fpaste.org/117172/
[3] http://fpaste.org/117173/
Andrew Jones (15):
libfdt: Import libfdt source
libfdt: get libfdt to build
add support for Linux device trees
libcflat: add
Add string functions needed for libfdt, and add a make target for
it. Also split string function declarations out to own string.h.
While at it, add strcpy.
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
v6: split out string.h [Paolo
Use libgcc's stddef.h and stdint.h, and then remove the redundant defines
from libcflat.h. These changes have no affect on code including libcflat.h,
but are needed in order to compile an unmodified libfdt for kvm-unit-tests
using an arm cross-compiler.
Signed-off-by: Andrew Jones drjo
.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v5:
- changed *get_baseaddr* helpers to *get_base* helpers
- a couple minor code changes [Christoffer Dall]
v4: reworked everything, added lots of comments to devicetree.h
---
lib/devicetree.c
Support the bare minimum of virtio to enable access to the virtio-mmio
config space of a device. Currently this implementation must use a
device tree to find the device.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v6:
- switch
\
lib/report.o
# libfdt paths
diff --git a/lib/abort.c b/lib/abort.c
new file mode 100644
index 0..61f7f924aba4b
--- /dev/null
+++ b/lib/abort.c
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2014, Red Hat Inc, Andrew Jones drjo...@redhat.com
+ *
+ * This work is licensed under the terms
These are pretty much the same as the asm-generic version,
but use phys_addr_t.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/arm/asm/io.h | 13 +
lib/arm/asm/page.h | 34 +-
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/lib
]
./configure --cross-prefix=arm-linux-gnu- --arch=arm
make
./run_tests.sh
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v6:
- fixed setup.c comment [Christoffer Dall]
- changed arm/run to use chr-testdev instead of virtio-testdev
- add
.
Signed-off-by: Andrew Jones drjo...@redhat.com
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v6: use alloc() for start_usr
v5: rebase change: replace __stringify with libcflat's new xstr
macro
v4: a couple tweaks to fit changes in the other patches,
vectors-usr test now has
From: Christoffer Dall christoffer.d...@linaro.org
Add simple busy-wait spinlock implementation for ARM.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Andrew Jones drjo...@redhat.com
---
config/config-arm.mak | 3 ++-
lib/arm/asm/spinlock.h | 9 ++---
lib/arm
-offsets.mak b/config/asm-offsets.mak
new file mode 100644
index 0..b2578a6692f33
--- /dev/null
+++ b/config/asm-offsets.mak
@@ -0,0 +1,41 @@
+#
+# asm-offsets adapted from the kernel, see
+# Kbuild
+# scripts/Kbuild.include
+# scripts/Makefile.build
+#
+# Authors: Andrew Jones
alloc_ops provide interfaces for alloc(), free() and friends, allowing
unit tests and common code to use dynamic memory allocation.
arch-specific code must provide the implementations.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/alloc.c | 2 ++
lib/alloc.h | 31
-by: Andrew Jones drjo...@redhat.com
---
lib/chr-testdev.c | 72 +++
lib/chr-testdev.h | 14 +++
lib/virtio.h | 2 ++
3 files changed, 88 insertions(+)
create mode 100644 lib/chr-testdev.c
create mode 100644 lib/chr-testdev.h
diff --git
From: Christoffer Dall christoffer.d...@linaro.org
Add IO accessor functions to the arm library functions to avoid
register-writeback IO accessors that are not yet supported by the
kernel.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Andrew Jones drjo...@redhat.com
specific versions placed in
lib/$ARCH/asm/.
Signed-off-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d...@linaro.org
---
v5: added a trivial ioremap function [Christoffer Dall]
v4: introduce lib/asm symlink to get rid of #ifdef __arm__,
add spinlock.h too
v3: wrt
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/asm-generic/io.h | 13 +
lib/asm-generic/page.h | 28
2 files changed, 41 insertions(+)
create mode 100644 lib/asm-generic/page.h
diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h
index
Currently only supports sending (outbufs), doesn't have any
bells or whistles.
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/virtio.c | 177 +++
lib/virtio.h | 107 +++-
2 files changed, 282
On Fri, Jul 11, 2014 at 10:40:42AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:19, Andrew Jones ha scritto:
alloc_ops provide interfaces for alloc(), free() and friends, allowing
unit tests and common code to use dynamic memory allocation.
arch-specific code must provide the implementations
On Fri, Jul 11, 2014 at 10:32:51AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:19, Andrew Jones ha scritto:
+enum virtio_hwdesc_type {
+VIRTIO_HWDESC_TYPE_DT = 0, /* device tree */
+NR_VIRTIO_HWDESC_TYPES,
+};
+
+enum virtio_bus_type {
+VIRTIO_BUS_TYPE_MMIO = 0
On Fri, Jul 11, 2014 at 11:27:58AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 11:08, Andrew Jones ha scritto:
lib/arm/virtio.c
where virtio_bind is in lib/arm/virtio.c.
Well, virtio_bind will still need to be in lib/virtio.c, but just as
a wrapper to arch_virtio_bind.
Ok, that's just
On Fri, Jul 11, 2014 at 11:32:20AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 11:23, Paolo Bonzini ha scritto:
+static struct virtqueue *vm_setup_vq(struct virtio_device *vdev,
+ unsigned index,
+ void (*callback)(struct virtqueue *vq),
+
On Fri, Jul 11, 2014 at 11:41:34AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:55, Andrew Jones ha scritto:
On Fri, Jul 11, 2014 at 10:40:42AM +0200, Paolo Bonzini wrote:
Il 11/07/2014 10:19, Andrew Jones ha scritto:
alloc_ops provide interfaces for alloc(), free() and friends, allowing
unit
On Thu, Apr 17, 2014 at 04:17:42PM +0200, Andrew Jones wrote:
Signed-off-by: Andrew Jones drjo...@redhat.com
---
x86/unittests.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 7930c026a38d6..d78fe0eafe2b6 100644
--- a/x86
report_skip(msg2, !cond1, cond1 cond2) - SKIP
report_skip(msg3, !cond1, cond1 cond3) - SKIP
Signed-off-by: Andrew Jones drjo...@redhat.com
---
lib/libcflat.h | 1 +
lib/report.c | 34 ++
2 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/lib
On Tue, Jun 17, 2014 at 02:46:30PM +0200, Paolo Bonzini wrote:
Il 17/06/2014 14:21, Andrew Jones ha scritto:
would look better as
report(msg1, cond1) - FAIL
report_skip(msg2, !cond1, cond1 cond2) - SKIP
report_skip(msg3, !cond1, cond1 cond3) - SKIP
I
Add report_xfail(), which is report(), but with another condition
allowing it to output PASS/FAIL/XPASS/XFAIL, rather than only
PASS/FAIL. This allows report output to stay more consistent
between systems/configurations that may or may not support all
tests.
Signed-off-by: Andrew Jones drjo
On Sat, Jun 14, 2014 at 04:16:53PM +0200, Christoffer Dall wrote:
On Wed, Jun 11, 2014 at 04:01:30PM +0200, Andrew Jones wrote:
This is the initial drop of the arm test framework and a first test
that just checks that setup completed (a selftest). kvm isn't needed
to run this test unless
On Sat, Jun 14, 2014 at 04:44:47PM +0200, Christoffer Dall wrote:
On Wed, Jun 11, 2014 at 04:01:15PM +0200, Andrew Jones wrote:
This is a v5 of a series that introduces arm to kvm-unit-tests. First,
it does some tidying up of the repo. Then, it adds support for device
trees (libfdt
On Thu, Jun 12, 2014 at 12:31:54PM +0200, Paolo Bonzini wrote:
Il 11/06/2014 16:01, Andrew Jones ha scritto:
diff --git a/configure b/configure
index d0c62e24dd1d2..6cfc64943f6e6 100755
--- a/configure
+++ b/configure
@@ -15,6 +15,7 @@ usage() {
Usage: $0 [options]
Options
301 - 400 of 595 matches
Mail list logo