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
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
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
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
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
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
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
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
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
&
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.
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
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
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
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
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
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
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
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
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
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
,
$ 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(+)
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
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
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
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
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
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
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
> &
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
2 +-
> riscv/Makefile | 2 +-
> s390x/Makefile | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: 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
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
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
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/
> 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
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
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 +--
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
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
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
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
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
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
> >
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
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
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
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
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
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
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
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
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
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
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
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 +++
>
, 54 deletions(-)
> create mode 100644 common/sieve.c
> mode change 100644 => 12 x86/sieve.c
>
Acked-by: 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
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
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
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
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]
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
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
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
}
> + 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
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
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
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
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
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
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
-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
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
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
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
; #define SBI_SPEC_VERSION_MAJOR_SHIFT 24
> #define SBI_SPEC_VERSION_MAJOR_MASK 0x7f
> --
> 2.34.1
>
Reviewed-by: Andrew Jones
| 2 +-
> x86/Makefile.common | 4 ++--
> 5 files changed, 6 insertions(+), 6 deletions(-)
>
> --
> 2.39.3
>
For the series
Reviewed-by: 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
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
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/
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
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
>
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
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
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
[*] 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/
[*] 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
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
) 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
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
90 matches
Mail list logo