[kvm-unit-tests PATCH v3 4/5] riscv: gitlab-ci: Add clang build tests

2024-09-11 Thread Andrew Jones
Test building 32 and 64-bit with clang. Throw a test of in- and out- of-tree building in too by swapping which is done to which (32-bit vs. 64-bit) with respect to the gcc build tests. Acked-by: Thomas Huth Acked-by: Nicholas Piggin Signed-off-by: Andrew Jones --- .gitlab-ci.yml | 43

[kvm-unit-tests PATCH v3 5/5] README: Add cross and clang recipes

2024-09-11 Thread Andrew Jones
Add configure command line examples for cross-compiling, for compiling with clang, and for cross-compiling with clang. Signed-off-by: Andrew Jones --- README.md | 22 ++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 2d6f7db5605c..be07dc28a094

[kvm-unit-tests PATCH v3 3/5] configure: Support cross compiling with clang

2024-09-11 Thread Andrew Jones
ble to cross compile for riscv with clang after configuring with ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \ --cross-prefix=riscv64-linux-gnu- Reviewed-by: Thomas Huth Reviewed-by: Nicholas Piggin Signed-off-by: Andrew Jones --- configure | 11

[kvm-unit-tests PATCH v3 2/5] Makefile: Prepare for clang EFI builds

2024-09-11 Thread Andrew Jones
r the initrd_dev_path struct. (Eliminating the warning is preferred to reworking the struct, because the implementation is imported verbatim from Linux.) Reviewed-by: Nicholas Piggin Signed-off-by: Andrew Jones --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile

[kvm-unit-tests PATCH v3 0/5] Support cross compiling with clang

2024-09-11 Thread Andrew Jones
gnore warnings vs. fix code to commit message of patch2 - Picked up Nick's tags v2: - fix building with clang and --config-efi by suppressing a warning - added riscv clang efi build to CI - picked up Thomas's tags Andrew Jones (5): riscv: Drop mstrict-align Makefile: Prepare for c

[kvm-unit-tests PATCH v3 1/5] riscv: Drop mstrict-align

2024-09-11 Thread Andrew Jones
The spec says unaligned accesses are supported, so this isn't required and clang doesn't support it. A platform might have slow unaligned accesses, but kvm-unit-tests isn't about speed anyway. Reviewed-by: Thomas Huth Signed-off-by: Andrew Jones --- riscv/Makefile | 4 +++- 1

Re: [kvm-unit-tests PATCH v2 3/4] configure: Support cross compiling with clang

2024-09-11 Thread Andrew Jones
On Wed, Sep 11, 2024 at 10:24:34AM GMT, Nicholas Piggin wrote: > On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote: > > When a user specifies the compiler with --cc assume it's already > > fully named, even if the user also specifies a cross-prefix. This > > allow

Re: [kvm-unit-tests PATCH v2 2/4] Makefile: Prepare for clang EFI builds

2024-09-11 Thread Andrew Jones
On Wed, Sep 11, 2024 at 10:21:39AM GMT, Nicholas Piggin wrote: > On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote: > > clang complains about GNU extensions such as variable sized types not > > being at the end of structs unless -Wno-gnu is used. We may > > eventually w

Re: [kvm-unit-tests PATCH v2 1/4] riscv: Drop mstrict-align

2024-09-11 Thread Andrew Jones
On Wed, Sep 11, 2024 at 10:08:23AM GMT, Nicholas Piggin wrote: > On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote: > > The spec says unaligned accesses are supported, so this isn't required > > and clang doesn't support it. A platform might have slow unaligned &

Re: [kvm-unit-tests PATCH 1/2] configure: Introduce add-config

2024-09-11 Thread Andrew Jones
On Wed, Sep 11, 2024 at 10:39:03AM GMT, Nicholas Piggin wrote: > On Wed Sep 4, 2024 at 12:39 AM AEST, Andrew Jones wrote: > > Allow users to add additional CONFIG_* and override defaults > > by concatenating a given file with #define's and #undef's to > > lib/config.

[kvm-unit-tests PATCH v2 4/4] riscv: gitlab-ci: Add clang build tests

2024-09-04 Thread Andrew Jones
Test building 32 and 64-bit with clang. Throw a test of in- and out- of-tree building in too by swapping which is done to which (32-bit vs. 64-bit) with respect to the gcc build tests. Acked-by: Thomas Huth Signed-off-by: Andrew Jones --- .gitlab-ci.yml | 43

[kvm-unit-tests PATCH v2 3/4] configure: Support cross compiling with clang

2024-09-04 Thread Andrew Jones
ble to cross compile for riscv with clang after configuring with ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \ --cross-prefix=riscv64-linux-gnu- Reviewed-by: Thomas Huth Signed-off-by: Andrew Jones --- configure | 11 --- 1 file changed

[kvm-unit-tests PATCH v2 2/4] Makefile: Prepare for clang EFI builds

2024-09-04 Thread Andrew Jones
r the initrd_dev_path struct. Signed-off-by: Andrew Jones --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 3d51cb726120..7471f7285b78 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,8 @@ EFI_CFLAGS += -fshort-wchar # EFI applications use PIC as they are l

[kvm-unit-tests PATCH v2 1/4] riscv: Drop mstrict-align

2024-09-04 Thread Andrew Jones
The spec says unaligned accesses are supported, so this isn't required and clang doesn't support it. A platform might have slow unaligned accesses, but kvm-unit-tests isn't about speed anyway. Reviewed-by: Thomas Huth Signed-off-by: Andrew Jones --- riscv/Makefile | 2 +- 1

[kvm-unit-tests PATCH v2 0/4] Support cross compiling with clang

2024-09-04 Thread Andrew Jones
compile - which is why there's no gitlab-ci patch for aarch64 in this series). I suspect it should work for other architectures too. v2: - fix building with clang and --config-efi by suppressing a warning - added riscv clang efi build to CI - picked up Thomas's tags Andrew Jones (4

Re: [kvm-unit-tests PATCH 0/3] Support cross compiling with clang

2024-09-04 Thread Andrew Jones
On Tue, Sep 03, 2024 at 06:30:47PM GMT, Andrew Jones wrote: > Modify configure to allow --cc=clang and a cross-prefix to be specified > together (as well as --cflags). This allows compiling with clang, but > using cross binutils for everything else, including the linker. So far > tes

[kvm-unit-tests PATCH 2/3] configure: Support cross compiling with clang

2024-09-03 Thread Andrew Jones
ble to cross compile for riscv with clang after configuring with ./configure --arch=riscv64 --cc=clang --cflags='--target=riscv64' \ --cross-prefix=riscv64-linux-gnu- Signed-off-by: Andrew Jones --- configure | 11 --- 1 file changed, 8 insertions(+), 3 deletion

[kvm-unit-tests PATCH 3/3] riscv: gitlab-ci: Add clang build tests

2024-09-03 Thread Andrew Jones
Test building 32 and 64-bit with clang. Throw a test of in- and out- of-tree building in too by swapping which is done to which (32-bit vs. 64-bit) with respect to the gcc build tests. Signed-off-by: Andrew Jones --- .gitlab-ci.yml | 28 1 file changed, 28

[kvm-unit-tests PATCH 1/3] riscv: Drop mstrict-align

2024-09-03 Thread Andrew Jones
The spec says unaligned accesses are supported, so this isn't required and clang doesn't support it. A platform might have slow unaligned accesses, but kvm-unit-tests isn't about speed anyway. Signed-off-by: Andrew Jones --- riscv/Makefile | 2 +- 1 file changed, 1 insertion

[kvm-unit-tests PATCH 0/3] Support cross compiling with clang

2024-09-03 Thread Andrew Jones
compile - which is why there's no gitlab-ci patch for aarch64 in this series). I suspect it should work for other architectures too. Andrew Jones (3): riscv: Drop mstrict-align configure: Support cross compiling with clang riscv: gitlab-ci: Add clang build tests .gitlab-ci.yml

[kvm-unit-tests PATCH 2/2] riscv: Make NR_CPUS configurable

2024-09-03 Thread Andrew Jones
, $ cat < 256.config #undef CONFIG_NR_CPUS #define CONFIG_NR_CPUS 256 EOF $ ./configure --arch=riscv64 --cross-prefix=riscv64-linux-gnu- --add-config=256.config Signed-off-by: Andrew Jones --- configure | 3 ++- lib/riscv/asm/setup.h | 3 ++- 2 files changed, 4 insertions(+)

[kvm-unit-tests PATCH 1/2] configure: Introduce add-config

2024-09-03 Thread Andrew Jones
Allow users to add additional CONFIG_* and override defaults by concatenating a given file with #define's and #undef's to lib/config.h Signed-off-by: Andrew Jones --- configure | 14 ++ 1 file changed, 14 insertions(+) diff --git a/configure b/configure index 27

[kvm-unit-tests PATCH 0/2] configure: Support CONFIG_* extension

2024-09-03 Thread Andrew Jones
branch). Add support for extending config.h with a manually provided config.h-type file and also add support for using it for CONFIG_NR_CPUS for riscv. Andrew Jones (2): configure: Introduce add-config riscv: Make NR_CPUS configurable configure | 17 - lib/riscv/asm

Re: [PATCH v12 57/84] KVM: RISC-V: Mark "struct page" pfns accessed before dropping mmu_lock

2024-07-31 Thread Andrew Jones
ST) && writable) > kvm_set_pfn_dirty(hfn); > + else > + kvm_release_pfn_clean(hfn); > > spin_unlock(&kvm->mmu_lock); > - kvm_set_pfn_accessed(hfn); > - kvm_release_pfn_clean(hfn); > return ret; > } > > -- > 2.46.0.rc1.232.g9752f9e123-goog > Reviewed-by: Andrew Jones

Re: [PATCH v12 56/84] KVM: RISC-V: Mark "struct page" pfns dirty iff a stage-2 PTE is installed

2024-07-31 Thread Andrew Jones
err("Failed to map in G-stage\n"); > > out_unlock: > + if ((!ret || ret == -EEXIST) && writable) > + kvm_set_pfn_dirty(hfn); > + > spin_unlock(&kvm->mmu_lock); > kvm_set_pfn_accessed(hfn); > kvm_release_pfn_clean(hfn); > -- > 2.46.0.rc1.232.g9752f9e123-goog > Reviewed-by: Andrew Jones

Re: [PATCH v12 58/84] KVM: RISC-V: Use kvm_faultin_pfn() when mapping pfns into the guest

2024-07-31 Thread Andrew Jones
m_release_pfn_clean(hfn); > - > + kvm_release_faultin_page(kvm, page, ret && ret != -EEXIST, writable); > spin_unlock(&kvm->mmu_lock); > return ret; > } > -- > 2.46.0.rc1.232.g9752f9e123-goog > > Reviewed-by: Andrew Jones

Re: [kvm-unit-tests PATCH v10 12/15] scripts/arch-run.bash: Fix run_panic() success exit status

2024-06-17 Thread Andrew Jones
gt; else > # some QEMU versions report multiple panic events > echo "PASS: guest panicked" > + echo "EXIT: STATUS=1" > ret=1 > fi > > -- > 2.45.1 > Acked-by: Andrew Jones

Re: [kvm-unit-tests PATCH v10 12/15] scripts/arch-run.bash: Fix run_panic() success exit status

2024-06-17 Thread Andrew Jones
On Fri, Jun 14, 2024 at 10:56:02AM GMT, Nicholas Piggin wrote: > On Wed Jun 12, 2024 at 5:26 PM AEST, Andrew Jones wrote: > > On Wed, Jun 12, 2024 at 03:23:17PM GMT, Nicholas Piggin wrote: > > > run_qemu_status() looks for "EXIT: STATUS=%d" if the harness command > &

Re: [kvm-unit-tests PATCH v10 12/15] scripts/arch-run.bash: Fix run_panic() success exit status

2024-06-12 Thread Andrew Jones
On Wed, Jun 12, 2024 at 03:23:17PM GMT, Nicholas Piggin wrote: > run_qemu_status() looks for "EXIT: STATUS=%d" if the harness command > returned 1, to determine the final status of the test. In the case of > panic tests, QEMU should terminate before successful exit status is > known, so the run_pan

Re: [kvm-unit-tests PATCH] build: retain intermediate .aux.o targets

2024-06-12 Thread Andrew Jones
2 +- > riscv/Makefile | 2 +- > s390x/Makefile | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > Acked-by: Andrew Jones

Re: [kvm-unit-tests PATCH v9 29/31] powerpc: Remove remnants of ppc64 directory and build structure

2024-06-04 Thread Andrew Jones
+1,111 @@ > > -include $(SRCDIR)/$(TEST_DIR)/Makefile.$(ARCH) > > +# > > +# powerpc makefile > > +# > > +# Authors: Andrew Jones > > I'd maybe drop that e-mail address now since it it not valid anymore. > Andrew, do want to see your new mail address here? No n

Re: [kvm-unit-tests PATCH v9 01/31] doc: update unittests doc

2024-05-06 Thread Andrew Jones
check > - > -check = =< > +check = = > > Check a file for a particular value before running a test. The check line > can contain multiple files to check separated by a space, but each check > parameter needs to be of the form = > + > +The path and value can not contain space, =, or shell wildcard characters. > -- > 2.43.0 > Reviewed-by: Andrew Jones

Re: [kvm-unit-tests PATCH v9 02/31] report: Add known failure reporting option

2024-05-06 Thread Andrew Jones
On Mon, May 06, 2024 at 09:25:37AM GMT, Thomas Huth wrote: > On 04/05/2024 14.28, Nicholas Piggin wrote: > > There are times we would like to test a function that is known to fail > > in some conditions due to a bug in implementation (QEMU, KVM, or even > > hardware). It would be nice to count thes

Re: [kvm-unit-tests PATCH v8 13/35] doc: start documentation directory with unittests.cfg doc

2024-04-05 Thread Andrew Jones
On Fri, Apr 05, 2024 at 06:35:14PM +1000, Nicholas Piggin wrote: > Consolidate unittests.cfg documentation in one place. > > Suggested-by: Andrew Jones > Signed-off-by: Nicholas Piggin > --- > arm/unittests.cfg | 26 ++--- > docs/

Re: [kvm-unit-tests PATCH v8 04/35] (arm|s390): Use migrate_skip in test cases

2024-04-05 Thread Andrew Jones
> previously. > > Reviewed-by: Thomas Huth > Signed-off-by: Nicholas Piggin > --- > arm/gic.c | 21 - > s390x/migration-cmm.c | 8 > s390x/migration-skey.c | 4 +++- > s390x/migration.c | 1 + > 4 files changed, 20 insertio

[kvm-unit-tests PATCH v2 04/13] treewide: lib/stack: Make base_address arch specific

2024-03-05 Thread Andrew Jones
weak, such that an architecture may override it when necessary, to accommodate the image layout. Then, immediately supply the riscv override. Signed-off-by: Andrew Jones --- lib/riscv/stack.c | 18 ++ lib/stack.c | 8 lib/stack.h | 2 ++ 3 files changed, 24

[kvm-unit-tests PATCH v2 03/13] treewide: lib/stack: Fix backtrace

2024-03-05 Thread Andrew Jones
trace printing") Acked-by: Claudio Imbrenda Reviewed-by: Nicholas Piggin Signed-off-by: Andrew Jones --- lib/arm/stack.c | 13 + lib/arm64/stack.c | 12 +--- lib/riscv/stack.c | 12 +--- lib/s390x/stack.c | 12 +--- lib/stack.h | 24 +--

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-05 Thread Andrew Jones
On Tue, Mar 05, 2024 at 07:26:18AM +0100, Thomas Huth wrote: > On 05/03/2024 03.19, Nicholas Piggin wrote: > > On Fri Mar 1, 2024 at 10:41 PM AEST, Thomas Huth wrote: > > > On 26/02/2024 11.12, Nicholas Piggin wrote: > > > > Add basic testing of various kinds of interrupts, machine check, > > > > p

Re: [kvm-unit-tests PATCH 5/7] arch-run: Add a "continuous" migration option for tests

2024-03-04 Thread Andrew Jones
On Mon, Mar 04, 2024 at 07:17:35AM +0100, Thomas Huth wrote: > On 26/02/2024 10.38, Nicholas Piggin wrote: > > The cooperative migration protocol is very good to control precise > > pre and post conditions for a migration event. However in some cases > > its intrusiveness to the test program, can m

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-01 Thread Andrew Jones
On Fri, Mar 01, 2024 at 02:57:04PM +0100, Thomas Huth wrote: > On 01/03/2024 14.45, Andrew Jones wrote: > > On Fri, Mar 01, 2024 at 01:41:22PM +0100, Thomas Huth wrote: > > > On 26/02/2024 11.12, Nicholas Piggin wrote: > > > > Add basic testing of various kind

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-01 Thread Andrew Jones
On Fri, Mar 01, 2024 at 01:41:22PM +0100, Thomas Huth wrote: > On 26/02/2024 11.12, Nicholas Piggin wrote: > > Add basic testing of various kinds of interrupts, machine check, > > page fault, illegal, decrementer, trace, syscall, etc. > > > > This has a known failure on QEMU TCG pseries machines w

Re: [kvm-unit-tests PATCH 04/13] treewide: lib/stack: Make base_address arch specific

2024-02-29 Thread Andrew Jones
On Thu, Feb 29, 2024 at 01:49:58PM +1000, Nicholas Piggin wrote: > On Thu Feb 29, 2024 at 1:04 AM AEST, Andrew Jones wrote: > > Calculating the offset of an address is image specific, which is > > architecture specific. Until now, all architectures and architecture > > config

Re: [kvm-unit-tests PATCH 03/13] treewide: lib/stack: Fix backtrace

2024-02-29 Thread Andrew Jones
On Thu, Feb 29, 2024 at 01:31:52PM +1000, Nicholas Piggin wrote: > On Thu Feb 29, 2024 at 1:04 AM AEST, Andrew Jones wrote: ... > > diff --git a/lib/stack.h b/lib/stack.h > > index 10fc2f793354..6edc84344b51 100644 > > --- a/lib/stack.h > > +++ b/lib/stack.h > >

[kvm-unit-tests PATCH 04/13] treewide: lib/stack: Make base_address arch specific

2024-02-28 Thread Andrew Jones
architecture specific, since the architecture's image layout already is. Signed-off-by: Andrew Jones --- lib/arm64/stack.c | 17 + lib/riscv/stack.c | 18 ++ lib/stack.c | 19 ++- lib/stack.h | 2 ++ lib/x86/stack.c

[kvm-unit-tests PATCH 03/13] treewide: lib/stack: Fix backtrace

2024-02-28 Thread Andrew Jones
trace printing") Signed-off-by: Andrew Jones --- lib/arm/stack.c | 13 + lib/arm64/stack.c | 12 +--- lib/riscv/stack.c | 12 +--- lib/s390x/stack.c | 12 +--- lib/stack.h | 24 +--- lib/x86/stack.c | 12 +--- 6 files c

Re: [kvm-unit-tests PATCH 32/32] powerpc: gitlab CI update

2024-02-28 Thread Andrew Jones
On Mon, Feb 26, 2024 at 08:12:18PM +1000, Nicholas Piggin wrote: > This adds testing for the powernv machine, and adds a gitlab-ci test > group instead of specifying all tests in .gitlab-ci.yml. > > Signed-off-by: Nicholas Piggin > --- > .gitlab-ci.yml| 16 ++-- > powerpc/uni

Re: [kvm-unit-tests PATCH 30/32] configure: Make arch_libdir a first-class entity

2024-02-28 Thread Andrew Jones
ir heuristic and just require > everybody sets arch_libdir correctly. Fail if the lib/arch or > lib/arch/asm directories can not be found. > > Cc: Alexandru Elisei > Cc: Andrew Jones > Cc: Claudio Imbrenda > Cc: David Hildenbrand > Cc: Eric Auger > Cc: Janosch Fr

Re: [kvm-unit-tests PATCH 29/32] configure: Fail on unknown arch

2024-02-28 Thread Andrew Jones
a missing test directory to disambiguate > the error in out of tree builds. > > Cc: Alexandru Elisei > Cc: Andrew Jones > Cc: Claudio Imbrenda > Cc: David Hildenbrand > Cc: Eric Auger > Cc: Janosch Frank > Cc: Laurent Vivier > Cc: Nico Böhr > Cc: Paolo Bonzini &g

Re: [kvm-unit-tests PATCH 25/32] common/sieve: Support machines without MMU

2024-02-28 Thread Andrew Jones
On Mon, Feb 26, 2024 at 08:12:11PM +1000, Nicholas Piggin wrote: > Not all powerpc CPUs provide MMU support. Define vm_available() that is > true by default but archs can override it. Use this to run VM tests. > > Cc: Paolo Bonzini > Cc: Thomas Huth > Cc: And

Re: [kvm-unit-tests PATCH 24/32] common/sieve: Use vmalloc.h for setup_mmu definition

2024-02-28 Thread Andrew Jones
On Mon, Feb 26, 2024 at 08:12:10PM +1000, Nicholas Piggin wrote: > There is no good reason to put setup_vm in libcflat.h when it's > defined in vmalloc.h. > > Cc: Paolo Bonzini > Cc: Thomas Huth > Cc: Andrew Jones > Cc: Janosch Frank > Cc: Claudio Imbrenda

Re: [kvm-unit-tests PATCH 23/32] powerpc: Add MMU support

2024-02-28 Thread Andrew Jones
On Mon, Feb 26, 2024 at 08:12:09PM +1000, Nicholas Piggin wrote: > Add support for radix MMU, 4kB and 64kB pages. > > This also adds MMU interrupt test cases, and runs the interrupts > test entirely with MMU enabled if it is available (aside from > machine check tests). > > Signed-off-by: Nichola

Re: [kvm-unit-tests PATCH 10/32] scripts: Accommodate powerpc powernv machine differences

2024-02-28 Thread Andrew Jones
going to work if it tried to load the kernel > @@ -18,7 +18,7 @@ premature_failure() > local log="$(eval "$(get_cmdline _NO_FILE_4Uhere_)" 2>&1)" > > echo "$log" | grep "_NO_FILE_4Uhere_" | > - grep -q -e "could not \(load\|open\) kernel" -e "error loading" && > +grep -q -e "[Cc]ould not \(load\|open\) kernel" -e "error loading" && > return 1 > > RUNTIME_log_stderr <<< "$log" > -- > 2.42.0 > Acked-by: Andrew Jones

Re: [kvm-unit-tests PATCH 17/32] arch-run: Fix handling multiple exit status messages

2024-02-28 Thread Andrew Jones
85: [: too many arguments > scripts/arch-run.bash: line 93: return: too many arguments > > lib/arch code should probably serialise this to prevent it, but > at the moment not all do. So make the parser handle this by > just looking at the first EXIT. > > Cc: Paolo Bonzini

Re: [kvm-unit-tests PATCH 09/32] scripts: allow machine option to be specified in unittests.cfg

2024-02-28 Thread Andrew Jones
On Mon, Feb 26, 2024 at 08:11:55PM +1000, Nicholas Piggin wrote: > This allows different machines with different requirements to be > supported by run_tests.sh, similarly to how different accelerators > are handled. > > Acked-by: Thomas Huth > Signed-off-by: Nicholas Piggin > --- > scripts/comm

Re: [kvm-unit-tests PATCH 04/32] powerpc: interrupt stack backtracing

2024-02-28 Thread Andrew Jones
On Mon, Feb 26, 2024 at 08:11:50PM +1000, Nicholas Piggin wrote: > Add support for backtracing across interrupt stacks, and > add interrupt frame backtrace for unhandled interrupts. > > Signed-off-by: Nicholas Piggin > --- > lib/powerpc/processor.c | 4 ++- > lib/ppc64/asm/stack.h | 3 +++ >

Re: [kvm-unit-tests PATCH v5 7/8] Add common/ directory for architecture-independent tests

2024-02-20 Thread Andrew Jones
, 54 deletions(-) > create mode 100644 common/sieve.c > mode change 100644 => 12 x86/sieve.c > Acked-by: Andrew Jones

Re: [kvm-unit-tests PATCH v1 01/18] Makefile: Define __ASSEMBLY__ for assembly files

2024-02-15 Thread Andrew Jones
On Thu, Feb 15, 2024 at 05:16:01PM +, Alexandru Elisei wrote: > Hi Drew, > > On Thu, Feb 15, 2024 at 05:32:22PM +0100, Andrew Jones wrote: > > On Thu, Feb 15, 2024 at 04:05:56PM +, Alexandru Elisei wrote: > > > Hi Drew, > > > > > > On Mon, Jan

Re: [kvm-unit-tests PATCH v1 01/18] Makefile: Define __ASSEMBLY__ for assembly files

2024-02-15 Thread Andrew Jones
On Thu, Feb 15, 2024 at 04:05:56PM +, Alexandru Elisei wrote: > Hi Drew, > > On Mon, Jan 15, 2024 at 01:44:17PM +0100, Andrew Jones wrote: > > On Thu, Nov 30, 2023 at 04:07:03AM -0500, Shaoqin Huang wrote: > > > From: Alexandru Elisei > > > > > > T

Re: [kvm-unit-tests PATCH v2 1/9] (arm|powerpc|s390x): Makefile: Fix .aux.o generation

2024-02-02 Thread Andrew Jones
On Fri, Feb 02, 2024 at 04:57:32PM +1000, Nicholas Piggin wrote: > Using all prerequisites for the source file results in the build > dying on the second time around with: > > gcc: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple > files > > This is due to auxinfo.h becomin

Re: [kvm-unit-tests PATCH v1 01/18] Makefile: Define __ASSEMBLY__ for assembly files

2024-01-15 Thread Andrew Jones
w defined for all > .S files, even those that didn't set it explicitely before. > > Reviewed-by: Nikos Nikoleris > Reviewed-by: Andrew Jones > Signed-off-by: Alexandru Elisei > Signed-off-by: Shaoqin Huang > --- > Makefile | 5 - > arm/cstart.S

[PATCH -fixes v2] RISC-V: KVM: Require HAVE_KVM

2024-01-04 Thread Andrew Jones
randconfig test. Fixes: 99cdc6c18c2d ("RISC-V: Add initial skeletal KVM support") Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/44907c6b-c5bd-4e4a-a921-e4d382553...@infradead.org/ Signed-off-by: Andrew Jones --- v2: - Added Fixes tag and -fixes prefix [Alexandre/Anup]

Re: Re: [PATCH] RISC-V: KVM: Require HAVE_KVM

2024-01-04 Thread Andrew Jones
On Thu, Jan 04, 2024 at 12:07:51PM +0100, Alexandre Ghiti wrote: > On 04/01/2024 11:52, Andrew Jones wrote: > > This applies to linux-next, but I forgot to append -next to the PATCH > > prefix. > > > Shoudn't this go to -fixes instead? With a Fixes tag? I'm no

Re: [PATCH] RISC-V: KVM: Require HAVE_KVM

2024-01-04 Thread Andrew Jones
This applies to linux-next, but I forgot to append -next to the PATCH prefix. On Thu, Jan 04, 2024 at 11:43:08AM +0100, Andrew Jones wrote: > KVM requires EVENTFD, which is selected by HAVE_KVM. Other KVM > supporting architectures select HAVE_KVM and then their KVM > Kconfigs ensure

Re: [PATCH v5 4/5] tty: Add SBI debug console support to HVC SBI driver

2023-11-24 Thread Andrew Jones
ABLED(CONFIG_RISCV_SBI_V01)) { > + err = PTR_ERR_OR_ZERO(hvc_alloc(0, 0, &hvc_sbi_v01_ops, 256)); > + if (err) > + return err; > + hvc_instantiate(0, 0, &hvc_sbi_v01_ops); > + } else { > + return -ENODEV; > + } > > return 0; > } > -console_initcall(hvc_sbi_console_init); > +device_initcall(hvc_sbi_init); > -- > 2.34.1 > Reviewed-by: Andrew Jones

Re: [PATCH v4 2/5] RISC-V: Add SBI debug console helper routines

2023-11-20 Thread Andrew Jones
} > + if ((sbi_spec_version >= sbi_mk_version(2, 0)) && > + (sbi_probe_extension(SBI_EXT_DBCN) > 0)) { > + pr_info("SBI DBCN extension detected\n"); > + sbi_debug_console_available = true; > + } > } else { > __sbi_set_timer = __sbi_set_timer_v01; > __sbi_send_ipi = __sbi_send_ipi_v01; > -- > 2.34.1 > Otherwise, Reviewed-by: Andrew Jones Thanks, drew

Re: [PATCH v3 8/9] tty: Add SBI debug console support to HVC SBI driver

2023-10-20 Thread Andrew Jones
On Fri, Oct 20, 2023 at 12:51:39PM +0530, Anup Patel wrote: > From: Atish Patra > > RISC-V SBI specification supports advanced debug console > support via SBI DBCN extension. > > Extend the HVC SBI driver to support it. > > Signed-off-by: Atish Patra > Signed-off-by: Anup Patel > --- > drive

Re: [PATCH v3 5/9] KVM: riscv: selftests: Add SBI DBCN extension to get-reg-list test

2023-10-20 Thread Andrew Jones
ISCV_SBI_EXT_VENDOR, > + KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_SBI_EXT | > KVM_REG_RISCV_SBI_SINGLE | KVM_RISCV_SBI_EXT_DBCN, > KVM_REG_RISCV | KVM_REG_SIZE_ULONG | KVM_REG_RISCV_SBI_EXT | > KVM_REG_RISCV_SBI_MULTI_EN | 0, > KVM_REG_RISCV | KVM_REG_SIZE_ULONG | K

Re: [PATCH v3 3/9] RISC-V: KVM: Allow some SBI extensions to be disabled by default

2023-10-20 Thread Andrew Jones
o receive forwarded calls from Guest VCPU. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/asm/kvm_vcpu_sbi.h | 4 ++ > arch/riscv/kvm/vcpu.c | 6 +++ > arch/riscv/kvm/vcpu_sbi.c | 57 +-- > 3 files changed, 38 in

Re: [PATCH v2 4/8] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:05AM +0530, Anup Patel wrote: > The frozen SBI v2.0 specification defines the SBI debug console > (DBCN) extension which replaces the legacy SBI v0.1 console > functions namely sbi_console_getchar() and sbi_console_putchar(). > > The SBI DBCN extension needs to be emu

Re: [PATCH v2 8/8] RISC-V: Enable SBI based earlycon support

2023-10-19 Thread Andrew Jones
y > CONFIG_SERIAL_OF_PLATFORM=y > +CONFIG_SERIAL_EARLYCON_RISCV_SBI=y > CONFIG_VIRTIO_CONSOLE=y > CONFIG_HW_RANDOM=y > CONFIG_HW_RANDOM_VIRTIO=y > -- > 2.34.1 > Reviewed-by: Andrew Jones

Re: [PATCH v2 6/8] tty/serial: Add RISC-V SBI debug console based earlycon

2023-10-19 Thread Andrew Jones
write; > + } else { > + if (IS_ENABLED(CONFIG_RISCV_SBI_V01)) > + device->con->write = sbi_0_1_console_write; > + else > + ret = -ENODEV; > + } > + > + return ret; > } > EARLYCON_DECLARE(sbi, early_sbi_setup); > -- > 2.34.1 > Reviewed-by: Andrew Jones

Re: [PATCH v2 5/8] RISC-V: Add inline version of sbi_console_putchar/getchar() functions

2023-10-19 Thread Andrew Jones
-1; } > +#endif > long sbi_get_mvendorid(void); > long sbi_get_marchid(void); > long sbi_get_mimpid(void); > -- > 2.34.1 > Otherwise, Reviewed-by: Andrew Jones

Re: [PATCH v2 4/8] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-19 Thread Andrew Jones
break; > + default: > + retdata->err_val = SBI_ERR_NOT_SUPPORTED; > + } > + > + return 0; > +} > + > +const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_dbcn = { > + .extid_start = SBI_EXT_DBCN, > + .extid_end = SBI_EXT_DBCN, > + .default_unavail = true, > + .handler = kvm_sbi_ext_dbcn_handler, > +}; > -- > 2.34.1 > Reviewed-by: Andrew Jones

Re: [PATCH v2 3/8] RISC-V: KVM: Allow some SBI extensions to be disabled by default

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:04AM +0530, Anup Patel wrote: > Currently, all SBI extensions are enabled by default which is > problematic for SBI extensions (such as DBCN) which are forwarded > to the KVM user-space because we might have an older KVM user-space > which is not aware/ready to handle

Re: [PATCH v2 2/8] RISC-V: KVM: Change the SBI specification version to v2.0

2023-10-19 Thread Andrew Jones
bi.h > @@ -11,7 +11,7 @@ > > #define KVM_SBI_IMPID 3 > > -#define KVM_SBI_VERSION_MAJOR 1 > +#define KVM_SBI_VERSION_MAJOR 2 > #define KVM_SBI_VERSION_MINOR 0 > > enum kvm_riscv_sbi_ext_status { > -- > 2.34.1 > Reviewed-by: Andrew Jones

Re: [PATCH v2 1/8] RISC-V: Add defines for SBI debug console extension

2023-10-19 Thread Andrew Jones
; #define SBI_SPEC_VERSION_MAJOR_SHIFT 24 > #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f > -- > 2.34.1 > Reviewed-by: Andrew Jones

Re: [kvm-unit-tests PATCH 0/2] Rework LDFLAGS and link with noexecstack

2023-06-23 Thread Andrew Jones
| 2 +- > x86/Makefile.common | 4 ++-- > 5 files changed, 6 insertions(+), 6 deletions(-) > > -- > 2.39.3 > For the series Reviewed-by: Andrew Jones

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Andrew Jones
On Thu, Nov 03, 2022 at 04:02:12PM +0100, Borislav Petkov wrote: > On Thu, Nov 03, 2022 at 01:59:45PM +0100, Andrew Jones wrote: > > The patch I'm proposing ensures cpumask_next()'s range, which is actually > > [-1, nr_cpus_ids - 1), > > Lemme make sure I unders

[PATCH v4 0/1] Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Andrew Jones
a warning for > as that's unexpected. [Yury] - Picked up tags on the riscv patch v2: - Added all the information I should have in the first place to the commit message [Boris] - Changed style of fix [Boris] Andrew Jones (1): x86: cpuinfo: Ensure inputs to cpumask_next

[PATCH v4 1/1] x86: cpuinfo: Ensure inputs to cpumask_next are valid

2022-11-03 Thread Andrew Jones
o cpumask_next() is valid. Signed-off-by: Andrew Jones Cc: Yury Norov --- arch/x86/kernel/cpu/proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 099b6f0d96bd..de3f93ac6e49 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-11-03 Thread Andrew Jones
On Wed, Nov 02, 2022 at 07:44:02PM +0100, Borislav Petkov wrote: > On Mon, Oct 31, 2022 at 11:03:27AM +0100, Andrew Jones wrote: > > Currently (after the revert of 78e5a3399421) > > After the revert? > > That commit is still in the latest Linus tree. The revert commit is

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-31 Thread Andrew Jones
On Mon, Oct 31, 2022 at 09:58:57AM +0100, Borislav Petkov wrote: > On Mon, Oct 31, 2022 at 09:06:04AM +0100, Andrew Jones wrote: > > The valid cpumask range is [0, nr_cpu_ids) and cpumask_next() always > > returns a CPU ID greater than its input, which results in its input >

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-31 Thread Andrew Jones
On Fri, Oct 28, 2022 at 06:06:41PM +0200, Borislav Petkov wrote: > On Fri, Oct 28, 2022 at 10:13:28AM -0500, Yury Norov wrote: > > Because it's related to bitmap API usage and has been revealed after > > some work in bitmaps. > > So first of all, that "fix" needs to explain what exactly it is fixi

Re: [PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-28 Thread Andrew Jones
On Fri, Oct 14, 2022 at 05:58:45PM +0200, Andrew Jones wrote: > Commit 78e5a3399421 ("cpumask: fix checking valid cpu range") has > started issuing warnings[*] when cpu indices equal to nr_cpu_ids - 1 > are passed to cpumask_next* functions. seq_read_iter() and cpuinfo

Re: [PATCH v3 0/2] Fix /proc/cpuinfo cpumask warning

2022-10-28 Thread Andrew Jones
two different architectures they don't necessarily need to go > > through the same tree. > > > > v3: > > - Change condition from >= to == in order to still get a warning > > for > as that's unexpected. [Yury] > > - Picked up tags on the

[PATCH v3 1/2] RISC-V: Fix /proc/cpuinfo cpumask warning

2022-10-14 Thread Andrew Jones
[*] Warnings will only appear with DEBUG_PER_CPU_MAPS enabled. Signed-off-by: Andrew Jones Cc: Yury Norov Reviewed-by: Anup Patel Reviewed-by: Conor Dooley Tested-by: Conor Dooley --- arch/riscv/kernel/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/kernel/cpu.c b/arch/

[PATCH v3 2/2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-14 Thread Andrew Jones
[*] Warnings will only appear with DEBUG_PER_CPU_MAPS enabled. Signed-off-by: Andrew Jones Cc: Yury Norov --- arch/x86/kernel/cpu/proc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 099b6f0d96bd..de3f93ac6e49 100644 --- a/a

[PATCH v3 0/2] Fix /proc/cpuinfo cpumask warning

2022-10-14 Thread Andrew Jones
to == in order to still get a warning for > as that's unexpected. [Yury] - Picked up tags on the riscv patch v2: - Added all the information I should have in the first place to the commit message [Boris] - Changed style of fix [Boris] Andrew Jones (2): RISC-V: Fix /proc/cp

Re: [PATCH v2] x86: Fix /proc/cpuinfo cpumask warning

2022-10-13 Thread Andrew Jones
) I'm not equipped to test on each architecture. To test, just build a kernel with DEBUG_PER_CPU_MAPS enabled, boot to a shell, do 'cat /proc/cpuinfo', and look for a kernel warning. Thanks, drew On Wed, Oct 12, 2022 at 10:24:22AM +0200, Andrew Jones wrote: > On Wed, Oct 12, 2

Re: [PATCH v2 02/10] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-04-13 Thread Andrew Jones
On Mon, Apr 13, 2015 at 03:51:33PM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Tue, Mar 31, 2015 at 04:08:00PM +0100, Alex Bennée wrote: > >> Currently x86, powerpc and soon arm64 use the same two architecture > >> specific bits for guest debug support for software and hardwa