Re: [PATCH kvm-unit-tests] MAINTAINERS: Change drew's email address

2022-06-23 Thread Alex Bennée
Andrew Jones writes: > As a side effect of leaving Red Hat I won't be able to use my Red Hat > email address anymore. I'm also changing the name of my gitlab group. > > Signed-off-by: Andrew Jones > Signed-off-by: Andrew Jones Reviewed-by: Alex Bennée

Re: [kvm-unit-tests PATCH v3 0/3] GIC ITS tests

2022-02-01 Thread Alex Bennée
Andrew Jones writes: > On Tue, Nov 30, 2021 at 02:11:34PM +0000, Alex Bennée wrote: >> >> Andrew Jones writes: >> >> > On Fri, Nov 19, 2021 at 04:30:47PM +, Alex Bennée wrote: >> >> >> >> Andrew Jones writes: >> >> &

Configuring the host GIC for guest to guest IPI

2021-12-13 Thread Alex Bennée
would it take to enable such a feature? -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [kvm-unit-tests PATCH v9 0/9] MTTCG sanity tests for ARM

2021-12-10 Thread Alex Bennée
Alex Bennée writes: > Hi, > > Not a great deal has changed from the last posting although I have > dropped the additional unittests.cfg in favour of setting "nodefault" > for the tests. Otherwise the clean-ups are mainly textual (removing > printfs, random newli

[kvm-unit-tests PATCH v9 9/9] arm/tcg-test: some basic TCG exercising tests

2021-12-02 Thread Alex Bennée
-size 1 in QEMU to limit the code generation buffer size. Signed-off-by: Alex Bennée Message-Id: <2028184650.661575-11-alex.ben...@linaro.org> --- v9 - moved back to unittests.cfg - fixed some missing accel tags - s/printf/report_info/ --- arm/Makefile.arm | 2 + arm/Makefile

[kvm-unit-tests PATCH v9 6/9] arm/locking-tests: add comprehensive locking test

2021-12-02 Thread Alex Bennée
k" use WaitForEvent sleep - "excl" use load/store exclusive semantics Also two more options allow the test to be tweaked - "noshuffle" disables the memory shuffling - "count=%ld" set your own per-CPU increment count Signed-off-by: Alex Bennée Message-Id: <2

[kvm-unit-tests PATCH v9 7/9] arm/barrier-litmus-tests: add simple mp and sal litmus tests

2021-12-02 Thread Alex Bennée
res. I've imported a few more of the barrier primatives from the Linux source tree so we consistently use macros. The arm64 barrier primitives trip up on -Wstrict-aliasing so this is disabled in the Makefile. Signed-off-by: Alex Bennée CC: Will Deacon Message-Id: <2028184650.661575-9-alex.ben.

[kvm-unit-tests PATCH v9 5/9] arm/tlbflush-code: TLB flush during code execution

2021-12-02 Thread Alex Bennée
: - "page" flush each page in turn (one per function) - "self" do the flush after each computation cycle - "verbose" report progress on each computation cycle Signed-off-by: Alex Bennée CC: Mark Rutland Message-Id: <2028184650.661575-7-alex.ben...@linaro

[kvm-unit-tests PATCH v9 8/9] arm/run: use separate --accel form

2021-12-02 Thread Alex Bennée
This will allow TCG tests to alter things such as tb-size. Signed-off-by: Alex Bennée Message-Id: <2028184650.661575-10-alex.ben...@linaro.org> --- arm/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arm/run b/arm/run index a390ca5a..73c6c83a 100755 --- a/a

[kvm-unit-tests PATCH v9 4/9] lib: add isaac prng library from CCAN

2021-12-02 Thread Alex Bennée
of kvm-unit-tests. Signed-off-by: Alex Bennée CC: Timothy B. Terriberry Acked-by: Andrew Jones Message-Id: <2028184650.661575-6-alex.ben...@linaro.org> --- arm/Makefile.common | 1 + lib/prng.h | 82 ++ lib/prng.c

[kvm-unit-tests PATCH v9 0/9] MTTCG sanity tests for ARM

2021-12-02 Thread Alex Bennée
he details are in the commits bellow the ---. I've also tweaked .git/config so get_maintainer.pl should ensure direct delivery of the patches ;-) Alex Bennée (9): docs: mention checkpatch in the README arm/flat.lds: don't drop debug during link Makefile: add GNU global tags support lib: add isaac prng li

[kvm-unit-tests PATCH v9 3/9] Makefile: add GNU global tags support

2021-12-02 Thread Alex Bennée
If you have ctags you might as well offer gtags as a target. Signed-off-by: Alex Bennée Message-Id: <2028184650.661575-4-alex.ben...@linaro.org> --- Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b80c31f8..0b7c03ac

[kvm-unit-tests PATCH v9 2/9] arm/flat.lds: don't drop debug during link

2021-12-02 Thread Alex Bennée
-data.elf -o 0x4008 Signed-off-by: Alex Bennée Message-Id: <2028184650.661575-3-alex.ben...@linaro.org> --- arm/flat.lds | 1 - 1 file changed, 1 deletion(-) diff --git a/arm/flat.lds b/arm/flat.lds index 6fb459ef..47fcb649 100644 --- a/arm/flat.lds +++ b/arm/flat.lds @@ -62,7

[kvm-unit-tests PATCH v9 1/9] docs: mention checkpatch in the README

2021-12-02 Thread Alex Bennée
Signed-off-by: Alex Bennée Acked-by: Andrew Jones Message-Id: <2028184650.661575-2-alex.ben...@linaro.org> Acked-by: Thomas Huth --- v9 - slightly more weaselly statement about checkpatch --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md

Re: [kvm-unit-tests PATCH v8 04/10] run_tests.sh: add --config option for alt test set

2021-12-01 Thread Alex Bennée
Andrew Jones writes: > On Wed, Dec 01, 2021 at 04:20:02PM +0000, Alex Bennée wrote: >> >> Andrew Jones writes: >> >> > On Thu, Nov 18, 2021 at 06:46:44PM +, Alex Bennée wrote: >> >> The upcoming MTTCG tests don't need to be run for normal KVM

Re: [kvm-unit-tests PATCH v8 04/10] run_tests.sh: add --config option for alt test set

2021-12-01 Thread Alex Bennée
Andrew Jones writes: > On Thu, Nov 18, 2021 at 06:46:44PM +0000, Alex Bennée wrote: >> The upcoming MTTCG tests don't need to be run for normal KVM unit >> tests so lets add the facility to have a custom set of tests. > > I think an environment variable override

Re: [kvm-unit-tests PATCH v3 0/3] GIC ITS tests

2021-11-30 Thread Alex Bennée
Andrew Jones writes: > On Fri, Nov 19, 2021 at 04:30:47PM +0000, Alex Bennée wrote: >> >> Andrew Jones writes: >> >> > On Fri, Nov 12, 2021 at 02:08:01PM +, Alex Bennée wrote: >> >> >> >> Andrew Jones writes: >> >> &

Re: [kvm-unit-tests PATCH v8 01/10] docs: mention checkpatch in the README

2021-11-24 Thread Alex Bennée
Andrew Jones writes: > On Thu, Nov 18, 2021 at 06:46:41PM +0000, Alex Bennée wrote: >> Signed-off-by: Alex Bennée >> --- >> README.md | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/README.md b/README.md >> index b498aaf..5db48e5

[kvm-unit-tests PATCH v4 0/3] GIC ITS tests

2021-11-19 Thread Alex Bennée
Hi, changes since v3: - dropped the pending LPI test altogether Alex Bennée (3): arm64: remove invalid check from its-trigger test arm64: enable its-migration tests for TCG arch-run: do not process ERRATA when running under TCG scripts/arch-run.bash | 4 +++- arm/gic.c

[kvm-unit-tests PATCH v4 3/3] arch-run: do not process ERRATA when running under TCG

2021-11-19 Thread Alex Bennée
. Signed-off-by: Alex Bennée --- scripts/arch-run.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 43da998..f1f4456 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -267,7 +267,9 @@ env_file

[kvm-unit-tests PATCH v4 2/3] arm64: enable its-migration tests for TCG

2021-11-19 Thread Alex Bennée
With the support for TCG emulated GIC we can also test these now. Signed-off-by: Alex Bennée Reviewed-by: Eric Auger Reviewed-by: Andrew Jones Cc: Shashi Mallela Message-Id: <20210525172628.2088-4-alex.ben...@linaro.org> --- v3 - add its-migrate-unmapped-collection --- arm/unittes

[kvm-unit-tests PATCH v4 1/3] arm64: remove invalid check from its-trigger test

2021-11-19 Thread Alex Bennée
While an IRQ is not "guaranteed to be visible until an appropriate invalidation" it doesn't stop the actual implementation delivering it earlier if it wants to. This is the case for QEMU's TCG and as tests should only be checking architectural compliance this check is invalid. Signed-of

Re: [kvm-unit-tests PATCH v3 0/3] GIC ITS tests

2021-11-19 Thread Alex Bennée
Andrew Jones writes: > On Fri, Nov 12, 2021 at 02:08:01PM +0000, Alex Bennée wrote: >> >> Andrew Jones writes: >> >> > On Fri, Nov 12, 2021 at 11:47:31AM +, Alex Bennée wrote: >> >> Hi, >> >> >> >> Sorry this has been s

[kvm-unit-tests PATCH v8 10/10] arm/tcg-test: some basic TCG exercising tests

2021-11-18 Thread Alex Bennée
-size 1 in QEMU to limit the code generation buffer size. Signed-off-by: Alex Bennée --- v5 - added armv8 version of the tcg tests - max out at -smp 4 in unittests.cfg - add up IRQs sent and delivered for PASS/FAIL - take into account error count - add "rounds=" parameter -

[kvm-unit-tests PATCH v8 05/10] lib: add isaac prng library from CCAN

2021-11-18 Thread Alex Bennée
of kvm-unit-tests. Signed-off-by: Alex Bennée CC: Timothy B. Terriberry Acked-by: Andrew Jones --- arm/Makefile.common | 1 + lib/prng.h | 82 ++ lib/prng.c | 162 3 files changed, 245 insertions(+) create

[kvm-unit-tests PATCH v8 09/10] arm/run: use separate --accel form

2021-11-18 Thread Alex Bennée
This will allow TCG tests to alter things such as tb-size. Signed-off-by: Alex Bennée --- arm/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arm/run b/arm/run index a390ca5..73c6c83 100755 --- a/arm/run +++ b/arm/run @@ -58,8 +58,8 @@ if $qemu $M -device '?' 2>

[kvm-unit-tests PATCH v8 08/10] arm/barrier-litmus-tests: add simple mp and sal litmus tests

2021-11-18 Thread Alex Bennée
res. I've imported a few more of the barrier primatives from the Linux source tree so we consistently use macros. The arm64 barrier primitives trip up on -Wstrict-aliasing so this is disabled in the Makefile. Signed-off-by: Alex Bennée CC: Will Deacon --- v8 - move to mttcgtests.cfg - fix checkpa

[kvm-unit-tests PATCH v8 07/10] arm/locking-tests: add comprehensive locking test

2021-11-18 Thread Alex Bennée
k" use WaitForEvent sleep - "excl" use load/store exclusive semantics Also two more options allow the test to be tweaked - "noshuffle" disables the memory shuffling - "count=%ld" set your own per-CPU increment count Signed-off-by: Alex Bennée --- v2 - Do

[kvm-unit-tests PATCH v8 06/10] arm/tlbflush-code: TLB flush during code execution

2021-11-18 Thread Alex Bennée
: - "page" flush each page in turn (one per function) - "self" do the flush after each computation cycle - "verbose" report progress on each computation cycle Signed-off-by: Alex Bennée CC: Mark Rutland --- v2 - rename to tlbflush-test - made makefile change

[kvm-unit-tests PATCH v8 04/10] run_tests.sh: add --config option for alt test set

2021-11-18 Thread Alex Bennée
The upcoming MTTCG tests don't need to be run for normal KVM unit tests so lets add the facility to have a custom set of tests. Signed-off-by: Alex Bennée --- run_tests.sh | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 9f233c5

[kvm-unit-tests PATCH v8 01/10] docs: mention checkpatch in the README

2021-11-18 Thread Alex Bennée
Signed-off-by: Alex Bennée --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b498aaf..5db48e5 100644 --- a/README.md +++ b/README.md @@ -182,3 +182,5 @@ the code files. We also start with common code and finish with unit test code. git-diff's

[kvm-unit-tests PATCH v8 02/10] arm/flat.lds: don't drop debug during link

2021-11-18 Thread Alex Bennée
-data.elf -o 0x4008 Signed-off-by: Alex Bennée --- arm/flat.lds | 1 - 1 file changed, 1 deletion(-) diff --git a/arm/flat.lds b/arm/flat.lds index 6fb459e..47fcb64 100644 --- a/arm/flat.lds +++ b/arm/flat.lds @@ -62,7 +62,6 @@ SECTIONS /DISCARD/ : { *(.note*) *(.interp

[kvm-unit-tests PATCH v8 03/10] Makefile: add GNU global tags support

2021-11-18 Thread Alex Bennée
If you have ctags you might as well offer gtags as a target. Signed-off-by: Alex Bennée --- Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b80c31f..0b7c03a 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,9 @@ cscope

[kvm-unit-tests PATCH v8 00/10] MTTCG sanity tests for ARM

2021-11-18 Thread Alex Bennée
warnings make no sense for kvm-unit-tests). I dropped an additional test which attempts to test for data flush behaviour but it still needs some work: https://github.com/stsquad/kvm-unit-tests/commit/712eb3a287df24cdeff00ef966d68aef6ff2b8eb Alex Bennée (10): docs: mention checkpatch in the README

Re: [kvm-unit-tests PATCH v3 0/3] GIC ITS tests

2021-11-12 Thread Alex Bennée
Andrew Jones writes: > On Fri, Nov 12, 2021 at 11:47:31AM +0000, Alex Bennée wrote: >> Hi, >> >> Sorry this has been sitting in my tree so long. The changes are fairly >> minor from v2. I no longer split the tests up into TCG and KVM >> versions and inst

Re: [kvm-unit-tests PATCH v3 0/3] GIC ITS tests

2021-11-12 Thread Alex Bennée
Andrew Jones writes: > On Fri, Nov 12, 2021 at 11:47:31AM +0000, Alex Bennée wrote: >> Hi, >> >> Sorry this has been sitting in my tree so long. The changes are fairly >> minor from v2. I no longer split the tests up into TCG and KVM >> versions and inst

[kvm-unit-tests PATCH v3 2/3] arm64: enable its-migration tests for TCG

2021-11-12 Thread Alex Bennée
With the support for TCG emulated GIC we can also test these now. Signed-off-by: Alex Bennée Reviewed-by: Eric Auger Reviewed-by: Andrew Jones Cc: Shashi Mallela Message-Id: <20210525172628.2088-4-alex.ben...@linaro.org> --- v3 - add its-migrate-unmapped-collection --- arm/unittes

[kvm-unit-tests PATCH v3 3/3] arch-run: do not process ERRATA when running under TCG

2021-11-12 Thread Alex Bennée
. Signed-off-by: Alex Bennée --- scripts/arch-run.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 43da998..f1f4456 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -267,7 +267,9 @@ env_file

[kvm-unit-tests PATCH v3 1/3] arm64: remove invalid check from its-trigger test

2021-11-12 Thread Alex Bennée
While an IRQ is not "guaranteed to be visible until an appropriate invalidation" it doesn't stop the actual implementation delivering it earlier if it wants to. This is the case for QEMU's TCG and as tests should only be checking architectural compliance this check is invalid. Signed-of

[kvm-unit-tests PATCH v3 0/3] GIC ITS tests

2021-11-12 Thread Alex Bennée
Hi, Sorry this has been sitting in my tree so long. The changes are fairly minor from v2. I no longer split the tests up into TCG and KVM versions and instead just ensure that ERRATA_FORCE is always set when run under TCG. Alex Bennée (3): arm64: remove invalid check from its-trigger test

Re: [kvm-unit-tests PATCH v2 4/4] arm64: split its-migrate-unmapped-collection into KVM and TCG variants

2021-06-01 Thread Alex Bennée
Andrew Jones writes: > On Tue, Jun 01, 2021 at 05:49:01PM +0100, Alex Bennée wrote: >> >> Auger Eric writes: >> >> > Hi Alex, >> > >> > On 5/25/21 7:26 PM, Alex Bennée wrote: >> >> When running the test in TCG we are basically runn

Re: [kvm-unit-tests PATCH v2 4/4] arm64: split its-migrate-unmapped-collection into KVM and TCG variants

2021-06-01 Thread Alex Bennée
Auger Eric writes: > Hi Alex, > > On 5/25/21 7:26 PM, Alex Bennée wrote: >> When running the test in TCG we are basically running on bare metal so >> don't rely on having a particular kernel errata applied. >> >> You might wonder why we handle this with a

[kvm-unit-tests RFC PATCH] arm64: split pmu tests into tcg/kvm variants

2021-05-25 Thread Alex Bennée
QEMU is able to give a counter for instructions retired under TCG but you need to enable -icount for it to work. Split the tests into kvm/tcg variants to support this. [AJB: I wonder if the solution is to have a totally separate unittests.cfg for TCG mode here?] Signed-off-by: Alex Bennée

[kvm-unit-tests PATCH v2 1/4] arm64: remove invalid check from its-trigger test

2021-05-25 Thread Alex Bennée
While an IRQ is not "guaranteed to be visible until an appropriate invalidation" it doesn't stop the actual implementation delivering it earlier if it wants to. This is the case for QEMU's TCG and as tests should only be checking architectural compliance this check is invalid. Signed-of

[kvm-unit-tests PATCH v2 0/4] enable LPI and ITS for TCG

2021-05-25 Thread Alex Bennée
feature implementation Date: Thu, 29 Apr 2021 19:41:53 -0400 Message-Id: <20210429234201.125565-1-shashi.mall...@linaro.org> The only real change from the last version was to drop the IMPDEF behaviour check instead of trying to work around it for the TCG case. Please review. Alex Ben

[kvm-unit-tests PATCH v2 2/4] scripts/arch-run: don't use deprecated server/nowait options

2021-05-25 Thread Alex Bennée
The very fact that QEMU drops the deprecation warning while running is enough to confuse the its-migration test into failing. The boolean options server and wait have accepted the long form options for a long time. Signed-off-by: Alex Bennée Cc: Shashi Mallela --- scripts/arch-run.bash | 4

[kvm-unit-tests PATCH v2 4/4] arm64: split its-migrate-unmapped-collection into KVM and TCG variants

2021-05-25 Thread Alex Bennée
eval "$@" which unwraps the -append leading to any second parameter being split and leaving QEMU very confused and the test hanging. This seemed simpler than re-writing all the test running logic in something sane ;-) Signed-off-by: Alex Bennée Cc: Shashi Mallela --- arm/gic.c

[kvm-unit-tests PATCH v2 3/4] arm64: enable its-migration tests for TCG

2021-05-25 Thread Alex Bennée
With the support for TCG emulated GIC we can also test these now. Signed-off-by: Alex Bennée Cc: Shashi Mallela --- arm/unittests.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/arm/unittests.cfg b/arm/unittests.cfg index f776b66..1a39428 100644 --- a/arm/unittests.cfg +++ b/arm

Re: [kvm-unit-tests PATCH v1 1/4] arm64: split its-trigger test into KVM and TCG variants

2021-04-28 Thread Alex Bennée
Alex Bennée writes: > Marc Zyngier writes: > >> On Wed, 28 Apr 2021 15:00:15 +0100, >> Alexandru Elisei wrote: >>> >>> I interpret that as that an INVALL guarantees that a change is >>> visible, but it the change can become visible even without

Re: [kvm-unit-tests PATCH v1 1/4] arm64: split its-trigger test into KVM and TCG variants

2021-04-28 Thread Alex Bennée
t; should be dropped completely, rather than trying to sidestep it for > TCG. All three parts of that section? report(check_acked(, -1, -1), "dev2/eventid=20 still does not trigger any LPI"); report(check_acked(, 0, 8195), &quo

Re: [kvm-unit-tests PATCH v1 1/4] arm64: split its-trigger test into KVM and TCG variants

2021-04-28 Thread Alex Bennée
Marc Zyngier writes: > On 2021-04-28 11:18, Alex Bennée wrote: >> A few of the its-trigger tests rely on IMPDEF behaviour where caches >> aren't flushed before invall events. However TCG emulation doesn't >> model any invall behaviour and as we can't probe for it we need

[kvm-unit-tests PATCH v1 0/4] enable LPI and ITS for TCG

2021-04-28 Thread Alex Bennée
o some limitations in the run_migration() script in the last patch. Alex Bennée (4): arm64: split its-trigger test into KVM and TCG variants scripts/arch-run: don't use deprecated server/nowait options arm64: enable its-migration tests for TCG arm64: split its-migrate-unmapped-collection in

[kvm-unit-tests PATCH v1 3/4] arm64: enable its-migration tests for TCG

2021-04-28 Thread Alex Bennée
With the support for TCG emulated GIC we can also test these now. You need to call run_tests.sh with -a to trigger the its-migrate-unmapped-collection test which obviously doesn't need the KVM errata to run in TCG system emulation mode. Signed-off-by: Alex Bennée --- arm/unittests.cfg | 3

[kvm-unit-tests PATCH v1 4/4] arm64: split its-migrate-unmapped-collection into KVM and TCG variants

2021-04-28 Thread Alex Bennée
"$@" which unwraps the -append leading to any second parameter being split and leaving QEMU very confused and the test hanging. This seemed simpler than re-writing all the test running logic in something sane ;-) Signed-off-by: Alex Bennée Cc: Shashi Mallela --- arm/gic.c | 7 ++

[kvm-unit-tests PATCH v1 1/4] arm64: split its-trigger test into KVM and TCG variants

2021-04-28 Thread Alex Bennée
. Signed-off-by: Alex Bennée Cc: Shashi Mallela --- arm/gic.c | 60 +++ arm/unittests.cfg | 11 - 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/arm/gic.c b/arm/gic.c index 98135ef..96a329d 100644 --- a/arm/gic.c +++ b/arm

[kvm-unit-tests PATCH v1 2/4] scripts/arch-run: don't use deprecated server/nowait options

2021-04-28 Thread Alex Bennée
The very fact that QEMU drops the deprecation warning while running is enough to confuse the its-migration test into failing. The boolean options server and wait have accepted the long form options for a long time. Signed-off-by: Alex Bennée --- scripts/arch-run.bash | 4 ++-- 1 file changed, 2

Re: [PATCH v1 3/3] kernel/configs: don't include PCI_QUIRKS in KVM guest configs

2020-08-04 Thread Alex Bennée
Marc Zyngier writes: > On 2020-08-04 15:44, Alex Bennée wrote: >> Marc Zyngier writes: >> >>> On 2020-08-04 13:44, Alex Bennée wrote: >>>> The VIRTIO_PCI support is an idealised PCI bus, we don't need a bunch >>>> of bloat for real worl

Re: [RFC PATCH v1 0/3] put arm64 kvm_config on a diet

2020-08-04 Thread Alex Bennée
Ard Biesheuvel writes: > On Tue, 4 Aug 2020 at 14:45, Alex Bennée wrote: >> >> Hi, >> >> When building guest kernels for virtualisation we were bringing in a >> bunch of stuff from physical hardware which we don't need for our >> idealised fixable virt

Re: [PATCH v1 3/3] kernel/configs: don't include PCI_QUIRKS in KVM guest configs

2020-08-04 Thread Alex Bennée
Marc Zyngier writes: > On 2020-08-04 13:44, Alex Bennée wrote: >> The VIRTIO_PCI support is an idealised PCI bus, we don't need a bunch >> of bloat for real world hardware for a VirtIO guest. > > Who says this guest will only have virtio devices? This is true - altho

[PATCH v1 2/3] arm64: gate the whole of pci-xgene on CONFIG_PCI_XGENE

2020-08-04 Thread Alex Bennée
-thunder* -rwxr-xr-x 1 alex alex 85639808 Aug 3 17:12 vmlinux* Signed-off-by: Alex Bennée --- drivers/pci/controller/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makefile index 8fad4781a5d3..3b9b72f5773a

[PATCH v1 3/3] kernel/configs: don't include PCI_QUIRKS in KVM guest configs

2020-08-04 Thread Alex Bennée
The VIRTIO_PCI support is an idealised PCI bus, we don't need a bunch of bloat for real world hardware for a VirtIO guest. Signed-off-by: Alex Bennée --- kernel/configs/kvm_guest.config | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/configs/kvm_guest.config b/kernel/configs

[PATCH v1 1/3] arm64: allow de-selection of ThunderX PCI controllers

2020-08-04 Thread Alex Bennée
85652472 Aug 3 16:48 vmlinux* -rwxr-xr-x 1 alex alex 86033880 Aug 3 16:39 vmlinux.orig* Signed-off-by: Alex Bennée Cc: Robert Richter Cc: linux-...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org --- arch/arm64/Kconfig.platforms| 2 ++ arch/arm64/configs/defconfig| 1

[RFC PATCH v1 0/3] put arm64 kvm_config on a diet

2020-08-04 Thread Alex Bennée
PCI_QUIRKS from the KVM guest build as a virtual PCI device should be quirk free. This is my first time hacking around Kconfig so I hope I've got the balance between depends and selects right but please let be know if it could be specified in a cleaner way. Alex Bennée (3): arm64: allow de

Re: [kvm-unit-tests PATCH] arm: expand the timer tests

2020-01-13 Thread Alex Bennée
Alexandru Elisei writes: > Hi, > > On 1/10/20 4:05 PM, Alex Bennée wrote: >> This was an attempt to replicate a QEMU bug. However to trigger the >> bug you need to have an offset set in EL2 which kvm-unit-tests is >> unable to do. However it does exercise some m

[kvm-unit-tests PATCH] arm: expand the timer tests

2020-01-10 Thread Alex Bennée
This was an attempt to replicate a QEMU bug. However to trigger the bug you need to have an offset set in EL2 which kvm-unit-tests is unable to do. However it does exercise some more corner cases. Bug: https://bugs.launchpad.net/bugs/1859021 Signed-off-by: Alex Bennée --- arm/timer.c | 27

Re: [PATCH v2 07/14] KVM: arm64/sve: Make register ioctl access errors more consistent

2019-04-25 Thread Alex Bennée
Dave Martin writes: > On Thu, Apr 25, 2019 at 01:30:29PM +0100, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > Currently, the way error codes are generated when processing the >> > SVE register access ioctls in a bit haphazard. >

Re: [PATCH v2 00/14] KVM: arm64: SVE cleanups

2019-04-25 Thread Alex Bennée
x-arm.org/git?p=linux-dm.git;a=shortlog;h=refs/heads/sve-kvm-fixes/v2/head > > Tested with qemu and kvmtool on ThunderX2, and with kvmtool on the Arm > Fast model (to exercise SVE support). These all look good to me: Reviewed-by: Alex Bennée -- Alex Bennée _

Re: [PATCH v2 07/14] KVM: arm64/sve: Make register ioctl access errors more consistent

2019-04-25 Thread Alex Bennée
; /* Handle the KVM_REG_ARM64_SVE_VLS pseudo-reg as a special case: */ > if (reg->id == KVM_REG_ARM64_SVE_VLS) > return set_sve_vls(vcpu, reg); > > - /* Otherwise, reg is an architectural SVE register... */ > + /* Try to interpret reg ID as an architectural SVE register... */ > + ret = sve_reg_to_region(, vcpu, reg); > + if (ret) > + return ret; > > if (!kvm_arm_vcpu_sve_finalized(vcpu)) > return -EPERM; > > - if (sve_reg_to_region(, vcpu, reg)) > - return -ENOENT; > - > if (copy_from_user(vcpu->arch.sve_state + region.koffset, uptr, > region.klen)) > return -EFAULT; -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v7 00/27] KVM: arm64: SVE guest support

2019-04-25 Thread Alex Bennée
(Documentation only.) > > * Patch 27: KVM: arm64/sve: Document KVM API extensions for SVE > >(Documentation only.) I've finished going through the series. Aside from a few minor nits and the discussion you've already had with drew happy with it. Have a general: Reviewed-by: A

Re: [PATCH v7 12/27] KVM: arm64/sve: System register context switch and access support

2019-04-24 Thread Alex Bennée
> * > @@ -1346,7 +1418,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { > ID_SANITISED(ID_AA64PFR1_EL1), > ID_UNALLOCATED(4,2), > ID_UNALLOCATED(4,3), > - ID_UNALLOCATED(4,4), > + { SYS_DESC(SYS_ID_AA64ZFR0_EL1), access_id_aa64zfr0_el1, .get_user = >

Re: [PATCH v7 13/27] KVM: arm64/sve: Context switch the SVE registers

2019-04-24 Thread Alex Bennée
t;> > > > >> > > > +/* Pointer to the vcpu's SVE FFR for sve_{save,load}_state() */ >> > > > +#define vcpu_sve_pffr(vcpu) ((void *)((char >> > > > *)((vcpu)->arch.sve_state) + \ >> > > > + >

Re: [PATCH v7 17/27] KVM: arm64: Reject ioctl access to FPSIMD V-regs on SVE vcpus

2019-04-24 Thread Alex Bennée
register access > support. > > Since SVE is an opt-in feature for userspace, this will not affect > existing users. > > Signed-off-by: Dave Martin > Reviewed-by: Julien Thierry > Tested-by: zhang.lei Reviewed-by: Alex Bennée > > --- > > Changes s

Re: [PATCH v7 11/27] KVM: arm64: Support runtime sysreg visibility filtering

2019-04-24 Thread Alex Bennée
const struct sys_reg_desc *rd); > }; this makes me wonder what sort of machines will see different register visibility depending on which vcpu you are running on? Otherwise is looks good to me: Reviewed-by: Alex Bennée -- Alex Bennée _

Re: [PATCH v7 01/27] KVM: Documentation: Document arm64 core registers in detail

2019-04-24 Thread Alex Bennée
on. > > Signed-off-by: Dave Martin > Reviewed-by: Julien Grall > Reviewed-by: Peter Maydell Reviewed-by: Alex Bennée > --- > Documentation/virtual/kvm/api.txt | 24 > 1 file changed, 24 insertions(+) > > diff --git a/Documentation/virtual/kvm/a

Re: [PATCH v2 00/14] KVM: arm64: SVE cleanups

2019-04-24 Thread Alex Bennée
Dave Martin writes: > This series contains some cleanups applicable to the SVE KVM support > patches merged into kvmarm/next. These arose from Andrew Jones' > review. Does this mean these won't get merged into the original series before the final merging upstream? -- Al

Kernel boot regression with PAuth and aarch64-softmmu -cpu max and el2 enabled

2019-01-29 Thread Alex Bennée
bled Pauth but no firmware underneath it? Either we've got something wrong or we'll need to rethink what features the user can have enabled by -cpu max on a direct kernel boot. -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.co

Re: [RFC PATCH v2 00/23] KVM: arm64: Initial support for SVE guests

2018-11-22 Thread Alex Bennée
are > of course welcome!) I've finished my pass for this revision. Sorry it took so long to get to it. -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [RFC PATCH v2 23/23] KVM: arm64/sve: Document KVM API extensions for SVE

2018-11-22 Thread Alex Bennée
are not recommended except for testing and > +experimentation purposes. Architecturally compliant guest OSes will > +work, but may or may not make effective use of the resulting > +configuration. > + > +After a successful KVM_ARM_SVE_CONFIG_SET, KVM_ARM_SVE_CONFIG_GET

Re: [RFC PATCH v2 21/23] KVM: arm64/sve: allow KVM_ARM_SVE_CONFIG_QUERY on vm fd

2018-11-22 Thread Alex Bennée
; unsigned int ioctl, unsigned long arg) > { > - return -EINVAL; > + void __user *userp = (void __user *)arg; > + > + switch (ioctl) { > + case KVM_ARM_SVE_CONFIG: > + return kvm_vcpu_s

Re: [RFC PATCH v2 19/23] KVM: arm64/sve: Report and enable SVE API extensions for userspace

2018-11-22 Thread Alex Bennée
.sve_max_vl))); > + > + return 0; > +} > + > /** > * kvm_reset_vcpu - sets core registers and sys_regs to reset value > * @vcpu: The VCPU pointer > @@ -103,6 +148,7 @@ int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, > long ext) > int kvm_reset_vcpu(str

Re: [RFC PATCH v2 11/23] KVM: arm64: Support runtime sysreg filtering for KVM_GET_REG_LIST

2018-11-22 Thread Alex Bennée
t;> >> I could add a special meaning for an empty kvm_sve_vls, such that >> it doesn't enable SVE on the affected vcpu. That retains the ability >> to create heterogeneous guests while still following the above flow. >> > I think making sure that userspace

Re: [RFC PATCH v2 16/23] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2018-11-21 Thread Alex Bennée
Dave Martin writes: > On Wed, Nov 21, 2018 at 04:09:03PM +0000, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > This patch includes the SVE register IDs in the list returned by >> > KVM_GET_REG_LIST, as appropriate. >> > >&g

Re: [RFC PATCH v2 17/23] arm64/sve: In-kernel vector length availability query interface

2018-11-21 Thread Alex Bennée
Dave Martin writes: > On Wed, Nov 21, 2018 at 04:16:42PM +0000, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > KVM will need to interrogate the set of SVE vector lengths >> > available on the system. >> > >> >

Re: [RFC PATCH v2 17/23] arm64/sve: In-kernel vector length availability query interface

2018-11-21 Thread Alex Bennée
q_to_bit() and bit_to_vq() are not intended for use outside these > functions, so they are given a __ prefix to warn people not to use > them unless they really know what they are doing. Personally I wouldn't have bothered with the __ but whatever: Reviewed-by: Alex Bennée > > Signe

Re: [RFC PATCH v2 16/23] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2018-11-21 Thread Alex Bennée
_arm_get_fw_num_regs(vcpu); > res += NUM_TIMER_REGS; > @@ -357,6 +398,10 @@ int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 > __user *uindices) > uindices++; > } > > + ret = copy_sve_reg_indices(vcpu, ); > + if (ret) > +

Re: [RFC PATCH v2 15/23] KVM: arm64/sve: Add SVE support to register access ioctl interface

2018-11-21 Thread Alex Bennée
> + case KVM_REG_ARM_CORE: return set_core_reg(vcpu, reg); > + case KVM_REG_ARM_FW:return kvm_arm_set_fw_reg(vcpu, reg); > + case KVM_REG_ARM64_SVE: return set_sve_reg(vcpu, reg); > + } > > if (is_timer_reg(reg->id)) > return set_timer_reg(vcpu, reg); The kernel coding-style.rst seems mute on the subject of default handling in switch but it's probably worth having a: default: break; /* falls through */ to be explicit. It's out of scope for this review but I did get a bit confused as the KVM_REG_ARM_COPROC_SHIFT registers seems to be fairly spread out across the files. We have demux_c15_get/set in sys_regs but doesn't look as though it touches the rest of the emulation logic and we have kvm_arm_get/set_fw_reg which are "special" PCSI registers. I guess this is because COPROC_SHIFT has been used for a bunch of disparate core and non-core and special registers. -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [RFC PATCH v2 13/23] KVM: arm64/sve: Context switch the SVE registers

2018-11-20 Thread Alex Bennée
away and just moves things around a little bit. So I >> guess it could makes sense for the fast(ish) path although I'd be >> interested in knowing if it made any real difference to the numbers. >> After all the first read should be well cached and moving it through the >> st

Re: [RFC PATCH v2 13/23] KVM: arm64/sve: Context switch the SVE registers

2018-11-20 Thread Alex Bennée
Dave Martin writes: > On Mon, Nov 19, 2018 at 04:36:01PM +0000, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > In order to give each vcpu its own view of the SVE registers, this >> > patch adds context storage via a new sve_state pointer in struc

Re: [RFC PATCH v2 14/23] KVM: Allow 2048-bit register access via ioctl interface

2018-11-20 Thread Alex Bennée
Dave Martin writes: > On Mon, Nov 19, 2018 at 04:48:36PM +0000, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > The Arm SVE architecture defines registers that are up to 2048 bits >> > in size (with some possibility of further future expansion

Re: [RFC PATCH v2 14/23] KVM: Allow 2048-bit register access via ioctl interface

2018-11-19 Thread Alex Bennée
ve space for another few bits that is the last one without changing the mask. Reviewed-by: Alex Bennée > > struct kvm_reg_list { > __u64 n; /* number of regs */ -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [RFC PATCH v2 13/23] KVM: arm64/sve: Context switch the SVE registers

2018-11-19 Thread Alex Bennée
ixup_guest_exit(struct kvm_vcpu > *vcpu, u64 *exit_code) >* and restore the guest context lazily. >* If FP/SIMD is not implemented, handle the trap and inject an >* undefined instruction exception to the guest. > + * Similarly for trapped SVE accesses. >*/ > - if (system_supports_fpsimd() && > - kvm_vcpu_trap_get_class(vcpu) == ESR_ELx_EC_FP_ASIMD) > - return __hyp_switch_fpsimd(vcpu); > + guest_has_sve = vcpu_has_sve(vcpu); I'm not sure if it's worth fishing this out here given you are already passing vcpu down the chain. > + if (__hyp_trap_is_fpsimd(vcpu, guest_has_sve)) > + return __hyp_switch_fpsimd(vcpu, guest_has_sve); > > if (!__populate_fault_info(vcpu)) > return true; Otherwise: Reviewed-by: Alex Bennée -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [RFC PATCH v2 06/23] arm64/sve: Check SVE virtualisability

2018-11-16 Thread Alex Bennée
Dave Martin writes: > On Thu, Nov 15, 2018 at 03:39:01PM +0000, Alex Bennée wrote: >> >> Dave Martin writes: >> >> > Due to the way the effective SVE vector length is controlled and >> > trapped at different exception levels, certain mismatches in th

Re: [RFC PATCH v2 12/23] KVM: arm64/sve: System register context switch and access support

2018-11-15 Thread Alex Bennée
cess_id_aa64zfr0_el1, .get_user = > get_id_aa64zfr0_el1, .set_user = set_id_aa64zfr0_el1, .check_present = > sve_check_present }, > +#else > ID_UNALLOCATED(4,4), > +#endif > ID_UNALLOCATED(4,5), > ID_UNALLOCATED(4,6), > ID_UNALLOCATED(4,7), > @@ -1307,6 +1407,9 @@ static const struct sys_reg_desc sys_reg_descs[] = { > > { SYS_DESC(SYS_SCTLR_EL1), access_vm_reg, reset_val, SCTLR_EL1, > 0x00C50078 }, > { SYS_DESC(SYS_CPACR_EL1), NULL, reset_val, CPACR_EL1, 0 }, > +#ifdef CONFIG_ARM64_SVE > + { SYS_DESC(SYS_ZCR_EL1), access_zcr_el1, reset_unknown, ZCR_EL1, > ~0xfUL, .get_user = get_zcr_el1, .set_user = set_zcr_el1, .check_present = > sve_check_present }, > +#endif > { SYS_DESC(SYS_TTBR0_EL1), access_vm_reg, reset_unknown, TTBR0_EL1 }, > { SYS_DESC(SYS_TTBR1_EL1), access_vm_reg, reset_unknown, TTBR1_EL1 }, > { SYS_DESC(SYS_TCR_EL1), access_vm_reg, reset_val, TCR_EL1, 0 }, Overlong lines. -- Alex Bennée ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [RFC PATCH v2 09/23] KVM: arm64: Propagate vcpu into read_id_reg()

2018-11-15 Thread Alex Bennée
ID register > fields such as ID_AA64PFR0_EL1.SVE for example. > > This patch propagates vcpu into read_id_reg() so that future > patches can add run-time checks on the guest configuration here. > > For now, there is no functional change. > > Signed-off-by: Dave Martin Revi

Re: [RFC PATCH v2 08/23] KVM: arm64: Add a vcpu flag to control SVE visibility for the guest

2018-11-15 Thread Alex Bennée
Dave Martin writes: > Since SVE will be enabled or disabled on a per-vcpu basis, a flag > is needed in order to track which vcpus have it enabled. > > This patch adds a suitable flag and a helper for checking it. > > Signed-off-by: Dave Martin Reviewed-by: Alex Bennée

Re: [RFC PATCH v2 06/23] arm64/sve: Check SVE virtualisability

2018-11-15 Thread Alex Bennée
found */ > + sve_max_virtualisable_vl = SVE_VQ_MAX; > + else if (WARN_ON(b == SVE_VQ_MAX - 1)) > + /* No virtualisable VLs? This is architecturally forbidden. */ > + sve_max_virtualisable_vl = SVE_VQ_MIN; >

Re: [PATCH 2/2] kvm/arm: consistently advance singlestep when emulating instructions

2018-11-09 Thread Alex Bennée
p, nor do we need to > fake a debug exception from the guest. > > Signed-off-by: Mark Rutland > Cc: Alex Bennée > Cc: Christoffer Dall > Cc: Marc Zyngier > Cc: Peter Maydell Reviewed-by: Alex Bennée Tested-by: Alex Bennée For reference I'm leaving this kernel boot soaking o

Re: [PATCH 1/2] kvm/arm: skip MMIO insn after emulation

2018-11-09 Thread Alex Bennée
way of applying > consistent single-step logic, and it prevents us from being able to fail > an MMIO instruction with a synchronous exception. > > Clean this up by only advancing the CPU state *after* the effects of the > instruction are emulated. > > Signed-off-by: Mark Rutland >

Re: [RFC PATCH] KVM: arm64: don't single-step for non-emulated faults

2018-11-09 Thread Alex Bennée
Mark Rutland writes: > On Thu, Nov 08, 2018 at 02:38:43PM +, Peter Maydell wrote: >> On 8 November 2018 at 14:28, Alex Bennée wrote: >> > >> > Mark Rutland writes: >> >> One problem is that I couldn't spot when we advance the PC for an MMIO >>

Re: [RFC PATCH] KVM: arm64: don't single-step for non-emulated faults

2018-11-08 Thread Alex Bennée
Mark Rutland writes: > On Thu, Nov 08, 2018 at 12:40:11PM +0000, Alex Bennée wrote: >> Mark Rutland writes: >> > On Wed, Nov 07, 2018 at 06:01:20PM +, Mark Rutland wrote: >> >> On Wed, Nov 07, 2018 at 05:10:31PM +, Alex Bennée wrote: >> >&g

  1   2   3   4   5   >