[PATCH v7 07/27] arm64/sve: Check SVE virtualisability

2019-03-29 Thread Dave Martin
analyses the extent to which SVE can be virtualised safely without interfering with migration of vcpus between physical CPUs, and rejects late secondary CPUs that would erode the situation further. It is left up to KVM to decide what to do with this information. Signed-off-by: Dave Martin Reviewed

[PATCH v7 16/27] KVM: arm64: Factor out core register ID enumeration

2019-03-29 Thread Dave Martin
the compiler does of specialising the code), but KVM_GET_REG_LIST is not a hot path. This will make it easier to consolidate ID filtering code in one place. No functional change. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested-by: zhang.lei --- Changes since v5: * New patch

[PATCH v7 10/27] KVM: arm64: Propagate vcpu into read_id_reg()

2019-03-29 Thread Dave Martin
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 Reviewed-by: Alex Bennée Tested-by: zhang.lei --- arch/arm64/kvm/sys_regs.c | 23

[PATCH v7 24/27] KVM: arm64/sve: Allow userspace to enable SVE for vcpus

2019-03-29 Thread Dave Martin
ing the vector lengths supported by the vcpu is considered configuration of the emulated hardware rather than runtime configuration, so no support is offered for changing the vector lengths available to an existing vcpu across reset. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested-by: zhang.

[PATCH v7 21/27] KVM: arm/arm64: Add hook for arch-specific KVM initialisation

2019-03-29 Thread Dave Martin
This patch adds a kvm_arm_init_arch_resources() hook to perform subarch-specific initialisation when starting up KVM. This will be used in a subsequent patch for global SVE-related setup on arm64. No functional change. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested

[PATCH v7 22/27] KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl

2019-03-29 Thread Dave Martin
ioctl is not required and will always yield EINVAL. Subsequent patches will add the finalization logic to make use of this ioctl for SVE. No functional change for existing userspace. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested-by: zhang.lei --- Changes since v5: * Commit

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

2019-03-29 Thread Dave Martin
Since the the sizes of individual members of the core arm64 registers vary, the list of register encodings that make sense is not a simple linear sequence. To clarify which encodings to use, this patch adds a brief list to the documentation. Signed-off-by: Dave Martin Reviewed-by: Julien Grall

[PATCH v7 06/27] arm64/sve: Clarify role of the VQ map maintenance functions

2019-03-29 Thread Dave Martin
adds comments to make the functions' roles clearer. No functional change. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Reviewed-by: Julien Grall Tested-by: zhang.lei --- Changes since v5: * [Julien Thierry] This patch is useful for explaining the previous patch (as per the v5

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

2019-03-29 Thread Dave Martin
-in feature for userspace, this will not affect existing users. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested-by: zhang.lei --- Changes since v5: * Refactored to cope with the removal of core_reg_size_from_offset() (which was added by another series which will now be handled

[PATCH v7 26/27] KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG

2019-03-29 Thread Dave Martin
KVM_GET_ONE_REG and KVM_SET_ONE_REG return some error codes that are not documented (but hopefully not surprising either). To give an indication of what these may mean, this patch adds brief documentation. Signed-off-by: Dave Martin --- Documentation/virtual/kvm/api.txt | 6 ++ 1 file

[PATCH v7 19/27] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2019-03-29 Thread Dave Martin
adds no explicit support for enumerating multiple slices. The code can be extended straightforwardly to support this in the future, if needed. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested-by: zhang.lei --- Changes since v6: * [Julien Thierry] Add a #define to replace

[PATCH v7 14/27] KVM: Allow 2048-bit register access via ioctl interface

2019-03-29 Thread Dave Martin
not enumerate any 2048-bit register unless userspace explicitly opts in to the relevant architecture-specific features. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Tested-by: zhang.lei --- include/uapi/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/kvm.h b

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

2019-03-29 Thread Dave Martin
at all for KVM_GET_REG_LIST in this case. For consistency we also reject ioctl access to the register. This ensures that a non-SVE-enabled guest looks the same to userspace, irrespective of whether the kernel KVM implementation supports SVE. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry

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

2019-03-29 Thread Dave Martin
of non-SVE-capable hardware (as was done unconditionally prior to this patch). No SVE handling is added on non-VHE-only paths, since VHE is an architectural and Kconfig prerequisite of SVE. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Tested-by: zhang.lei --- Changes since v5

[PATCH v7 09/27] KVM: arm64: Add a vcpu flag to control SVE visibility for the guest

2019-03-29 Thread Dave Martin
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 Tested-by: zhang.lei --- arch/arm64/include/asm

[PATCH v7 03/27] KVM: arm64: Delete orphaned declaration for __fpsimd_enabled()

2019-03-29 Thread Dave Martin
__fpsimd_enabled() no longer exists, but a dangling declaration has survived in kvm_hyp.h. This patch gets rid of it. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Tested-by: zhang.lei --- arch/arm64/include/asm/kvm_hyp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64

[PATCH v7 08/27] arm64/sve: Enable SVE state tracking for non-task contexts

2019-03-29 Thread Dave Martin
at vcpu context bind time, the specified vector length will not be used for anything yet. In later patches TIF_SVE will be set here as appropriate, and the appropriate maximum vector length for the vcpu will be passed when binding. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed

[PATCH v7 04/27] KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance

2019-03-29 Thread Dave Martin
the term one per line, for maximum readability. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Tested-by: zhang.lei --- arch/arm64/kvm/guest.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index dd436a5..62514cb

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

2019-03-29 Thread Dave Martin
-linuxv6/v2/head http://linux-arm.org/git?p=kvmtool-dm.git;a=shortlog;h=refs/heads/sve-linuxv6/v2/head [5] Mark Rutland Re: [PATCH v5 12/26] KVM: arm64: Support runtime sysreg visibility filtering https://lists.cs.columbia.edu/pipermail/kvmarm/2019-February/034718.html Dave Martin (27): KVM

Re: [PATCH v6 19/27] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2019-03-28 Thread Dave Martin
On Thu, Mar 28, 2019 at 02:29:23PM +, Julien Thierry wrote: > > > On 28/03/2019 12:27, Dave Martin wrote: > > On Wed, Mar 27, 2019 at 03:21:02PM +, Julien Thierry wrote: > >> > >> > >> On 27/03/2019 10:33, Dave Martin wrote: [...] > >

Re: [PATCH v6 19/27] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2019-03-28 Thread Dave Martin
On Wed, Mar 27, 2019 at 03:21:02PM +, Julien Thierry wrote: > > > On 27/03/2019 10:33, Dave Martin wrote: > > On Wed, Mar 27, 2019 at 09:47:42AM +, Julien Thierry wrote: > >> Hi Dave, > >> > >> On 19/03/2019 17:52, Dave Martin wrote: [...] >

Re: [PATCH v6 22/27] KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl

2019-03-27 Thread Dave Martin
On Wed, Mar 27, 2019 at 02:07:56PM +, Julien Thierry wrote: > Hi Dave, > > On 19/03/2019 17:52, Dave Martin wrote: > > Some aspects of vcpu configuration may be too complex to be > > completed inside KVM_ARM_VCPU_INIT. Thus, there may be a > > requirement for user

Re: [PATCH v7 9/10] KVM: arm64: docs: document KVM support of pointer authentication

2019-03-27 Thread Dave Martin
On Wed, Mar 27, 2019 at 05:19:28PM +0530, Amit Daniel Kachhap wrote: > Hi, > > On 3/27/19 4:14 PM, Dave Martin wrote: > >On Mon, Mar 25, 2019 at 08:05:49PM +, Kristina Martsenko wrote: > >>On 19/03/2019 08:30, Amit Daniel Kachhap wrote: > >>>This

Re: [PATCH v7 9/10] KVM: arm64: docs: document KVM support of pointer authentication

2019-03-27 Thread Dave Martin
On Mon, Mar 25, 2019 at 08:05:49PM +, Kristina Martsenko wrote: > On 19/03/2019 08:30, Amit Daniel Kachhap wrote: > > This adds sections for KVM API extension for pointer authentication. > > A brief description about usage of pointer authentication for KVM guests > > is added in the arm64

Re: [PATCH v6 21/27] KVM: arm/arm64: Add hook for arch-specific KVM initialisation

2019-03-27 Thread Dave Martin
On Wed, Mar 27, 2019 at 10:07:17AM +, Julien Thierry wrote: > Hi Dave, > > On 19/03/2019 17:52, Dave Martin wrote: > > This patch adds a kvm_arm_init_arch_resources() hook to perform > > subarch-specific initialisation when starting up KVM. > > > > This w

Re: [PATCH v6 19/27] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2019-03-27 Thread Dave Martin
On Wed, Mar 27, 2019 at 09:47:42AM +, Julien Thierry wrote: > Hi Dave, > > On 19/03/2019 17:52, Dave Martin wrote: > > This patch includes the SVE register IDs in the list returned by > > KVM_GET_REG_LIST, as appropriate. > > > > On a non-SVE-e

Re: [PATCH v5 00/26] KVM: arm64: SVE guest support

2019-03-26 Thread Dave Martin
On Mon, Mar 25, 2019 at 05:49:56PM +0100, Andrew Jones wrote: > On Mon, Mar 25, 2019 at 04:38:03PM +, Peter Maydell wrote: > > On Mon, 25 Mar 2019 at 16:33, Andrew Jones wrote: > > > > > > On Tue, Mar 19, 2019 at 05:51:51PM +, Dave Martin wrote: > > &

Re: [PATCH v5 00/26] KVM: arm64: SVE guest support

2019-03-20 Thread Dave Martin
On Tue, Mar 19, 2019 at 05:51:51PM +, Dave Martin wrote: [...] > Known issues: > > * This update requires modifications to kvmtool that are not published >yet. I will reply to this cover letter with a link when those are >available (hopefully within 24 hours

[PATCH kvmtool v2 3/3] arm64: Add command-line option to set the guest's SVE vector lengths

2019-03-20 Thread Dave Martin
for such configurations, this patch adds a command-line option to allow setting of the set of vector lengths to be made available to the guest. For now, the setting is global: no means is offered to configure individual guest vcpus independently of each other. Signed-off-by: Dave Martin --- It wasn't clear

[PATCH kvmtool v2 2/3] arm64: Add basic SVE support

2019-03-20 Thread Dave Martin
this work. The kernel does not enable SVE by default, and for now kvmtool adopts the same policy: without --sve, SVE is not enabled for the guest even if the host supports it. Signed-off-by: Dave Martin --- arm/aarch32/include/kvm/kvm-cpu-arch.h| 5 + arm/aarch64/include/kvm/kvm-config

[PATCH kvmtool v2 1/3] arm/arm64: [HACK] Sync kernel headers from sve-guest v6

2019-03-20 Thread Dave Martin
This patch imports the necessary UAPI header definitions for building the SVE extensions for kvmtool. This commit should be replaced by a header import from upstream Linux once the SVE kvm patches have been merged. Signed-off-by: Dave Martin --- arm/aarch64/include/asm/kvm.h | 22

[PATCH kvmtool v2 0/3] arm64: Basic SVE guest support

2019-03-20 Thread Dave Martin
hread.html (Note, the subject line for this posting was incorrect. It should have read: [PATCH v6 00/27] KVM: arm64: SVE guest support) git://linux-arm.org/linux-dm.git sve-kvm/v6/head http://linux-arm.org/git?p=linux-dm.git;a=shortlog;h=refs/heads/sve-kvm/v6/head Dave Martin (3): arm/arm64: [

Re: [PATCH v5 00/26] KVM: arm64: SVE guest support

2019-03-19 Thread Dave Martin
On Tue, Mar 19, 2019 at 05:51:51PM +, Dave Martin wrote: [...] Yes, I messed up the subject line in the cover letter :P The prefix should read "[PATCH v6 00/27]" Cheers ---Dave ___ kvmarm mailing list kvmarm@lists.cs.columbia

[PATCH v6 27/27] KVM: arm64/sve: Document KVM API extensions for SVE

2019-03-19 Thread Dave Martin
This patch adds sections to the KVM API documentation describing the extensions for supporting the Scalable Vector Extension (SVE) in guests. Signed-off-by: Dave Martin --- Changes since v5: * Document KVM_ARM_VCPU_FINALIZE and its interactions with SVE. --- Documentation/virtual/kvm

[PATCH v6 23/27] KVM: arm64/sve: Add pseudo-register for the guest's vector lengths

2019-03-19 Thread Dave Martin
nit to work this out, in the kvm_arm_init_arch_resources() hook. The KVM_REG_ARM64_SVE_VLS pseudo-register is not exposed yet. Subsequent patches will allow SVE to be turned on for guest vcpus, making it visible. Signed-off-by: Dave Martin --- Changes since v5: * [Julien Thierry] Del

[PATCH v6 24/27] KVM: arm64/sve: Allow userspace to enable SVE for vcpus

2019-03-19 Thread Dave Martin
ing the vector lengths supported by the vcpu is considered configuration of the emulated hardware rather than runtime configuration, so no support is offered for changing the vector lengths available to an existing vcpu across reset. Signed-off-by: Dave Martin --- Changes since v5: * Refactored to m

[PATCH v6 22/27] KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl

2019-03-19 Thread Dave Martin
ioctl is not required and will always yield EINVAL. Subsequent patches will add the finalization logic to make use of this ioctl for SVE. No functional change for existing userspace. Signed-off-by: Dave Martin --- Changes since v5: * Commit message, including subject line, rewritten

[PATCH v6 25/27] KVM: arm64: Add a capability to advertise SVE support

2019-03-19 Thread Dave Martin
To provide a uniform way to check for KVM SVE support amongst other features, this patch adds a suitable capability KVM_CAP_ARM_SVE, and reports it as present when SVE is available. Signed-off-by: Dave Martin --- Changes since v5: * [Julien Thierry] Strip out has_vhe() sanity-check, which

[PATCH v6 21/27] KVM: arm/arm64: Add hook for arch-specific KVM initialisation

2019-03-19 Thread Dave Martin
This patch adds a kvm_arm_init_arch_resources() hook to perform subarch-specific initialisation when starting up KVM. This will be used in a subsequent patch for global SVE-related setup on arm64. No functional change. Signed-off-by: Dave Martin --- arch/arm/include/asm/kvm_host.h | 2

[PATCH v6 26/27] KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG

2019-03-19 Thread Dave Martin
KVM_GET_ONE_REG and KVM_SET_ONE_REG return some error codes that are not documented (but hopefully not surprising either). To give an indication of what these may mean, this patch adds brief documentation. Signed-off-by: Dave Martin --- Documentation/virtual/kvm/api.txt | 6 ++ 1 file

[PATCH v6 20/27] arm64/sve: In-kernel vector length availability query interface

2019-03-19 Thread Dave Martin
outside these functions: now that these are exposed outside fpsimd.c, they are prefixed with __ in order to provide an extra hint that they are not intended for general-purpose use. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée --- arch/arm64/include/asm/fpsimd.h | 29

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

2019-03-19 Thread Dave Martin
-in feature for userspace, this will not affect existing users. Signed-off-by: Dave Martin --- (Julien Thierry's Reviewed-by dropped due to non-trivial refactoring) Changes since v5: * Refactored to cope with the removal of core_reg_size_from_offset() (which was added by another series which

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

2019-03-19 Thread Dave Martin
of non-SVE-capable hardware (as was done unconditionally prior to this patch). No SVE handling is added on non-VHE-only paths, since VHE is an architectural and Kconfig prerequisite of SVE. Signed-off-by: Dave Martin --- Changes since v5: * [Julien Thierry, Julien Grall] Commit message typo fixes

[PATCH v6 18/27] KVM: arm64/sve: Add SVE support to register access ioctl interface

2019-03-19 Thread Dave Martin
state. This avoids some complex and pointless emulation in the kernel to convert between the two views of these aliased registers. Signed-off-by: Dave Martin --- Changes since v5: * [Julien Thierry] rename sve_reg_region() to sve_reg_to_region() to make its purpose a bit clearer. * [Julien

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

2019-03-19 Thread Dave Martin
at all for KVM_GET_REG_LIST in this case. For consistency we also reject ioctl access to the register. This ensures that a non-SVE-enabled guest looks the same to userspace, irrespective of whether the kernel KVM implementation supports SVE. Signed-off-by: Dave Martin --- Changes since v5: * Port

[PATCH v6 16/27] KVM: arm64: Factor out core register ID enumeration

2019-03-19 Thread Dave Martin
the compiler does of specialising the code), but KVM_GET_REG_LIST is not a hot path. This will make it easier to consolidate ID filtering code in one place. No functional change. Signed-off-by: Dave Martin --- Changes since v5: * New patch. This reimplements part of the separately

[PATCH v6 19/27] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST

2019-03-19 Thread Dave Martin
adds no explicit support for enumerating multiple slices. The code can be extended straightforwardly to support this in the future, if needed. Signed-off-by: Dave Martin --- Changes since v5: (Dropped Julien Thierry's Reviewed-by due to non-trivial rebasing) * Move mis-split reword to prevent

[PATCH v6 09/27] KVM: arm64: Add a vcpu flag to control SVE visibility for the guest

2019-03-19 Thread Dave Martin
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 --- arch/arm64/include/asm/kvm_host.h | 4 1 file

[PATCH v6 08/27] arm64/sve: Enable SVE state tracking for non-task contexts

2019-03-19 Thread Dave Martin
at vcpu context bind time, the specified vector length will not be used for anything yet. In later patches TIF_SVE will be set here as appropriate, and the appropriate maximum vector length for the vcpu will be passed when binding. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed

[PATCH v6 14/27] KVM: Allow 2048-bit register access via ioctl interface

2019-03-19 Thread Dave Martin
not enumerate any 2048-bit register unless userspace explicitly opts in to the relevant architecture-specific features. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée --- include/uapi/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux

[PATCH v6 15/27] KVM: arm64: Add missing #include of in guest.c

2019-03-19 Thread Dave Martin
arch/arm64/kvm/guest.c uses the string functions, but the corresponding header is not included. We seem to get away with this for now, but for completeness this patch adds the #include, in preparation for adding yet more memset() calls. Signed-off-by: Dave Martin --- arch/arm64/kvm/guest.c | 1

[PATCH v6 04/27] KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance

2019-03-19 Thread Dave Martin
the term one per line, for maximum readability. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée --- arch/arm64/kvm/guest.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index dd436a5..62514cb 100644 --- a/arch/arm64

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

2019-03-19 Thread Dave Martin
hiding register where appropriate. Signed-off-by: Dave Martin --- Changes since v5: * Rename the visibility override flags, add some comments, and rename/ introduce helpers to make the purpose of this code clearer. --- arch/arm64/kvm/sys_regs.c | 24 +--- arch/arm64/kvm

[PATCH v6 10/27] KVM: arm64: Propagate vcpu into read_id_reg()

2019-03-19 Thread Dave Martin
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 Reviewed-by: Alex Bennée --- arch/arm64/kvm/sys_regs.c | 23 +-- 1

[PATCH v6 07/27] arm64/sve: Check SVE virtualisability

2019-03-19 Thread Dave Martin
analyses the extent to which SVE can be virtualised safely without interfering with migration of vcpus between physical CPUs, and rejects late secondary CPUs that would erode the situation further. It is left up to KVM to decide what to do with this information. Signed-off-by: Dave Martin Reviewed

[PATCH v6 06/27] arm64/sve: Clarify role of the VQ map maintenance functions

2019-03-19 Thread Dave Martin
adds comments to make the functions' roles clearer. No functional change. Signed-off-by: Dave Martin Reviewed-by: Julien Thierry Reviewed-by: Julien Grall --- Changes since v5: * [Julien Thierry] This patch is useful for explaining the previous patch (as per the v5 ordering

[PATCH v6 05/27] KVM: arm64: Add missing #includes to kvm_host.h

2019-03-19 Thread Dave Martin
kvm_host.h uses some declarations from other headers that are currently included by accident, without an explicit #include. This patch adds a few #includes that are clearly missing. Although the header builds without them today, this should help to avoid future surprises. Signed-off-by: Dave

[PATCH v6 02/27] arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush

2019-03-19 Thread Dave Martin
e() anyway. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Julien Grall --- arch/arm64/kernel/fpsimd.c | 25 +++-- arch/arm64/kernel/signal.c | 5 - 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kerne

[PATCH v6 03/27] KVM: arm64: Delete orphaned declaration for __fpsimd_enabled()

2019-03-19 Thread Dave Martin
__fpsimd_enabled() no longer exists, but a dangling declaration has survived in kvm_hyp.h. This patch gets rid of it. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée --- arch/arm64/include/asm/kvm_hyp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/include/asm/kvm_hyp.h b

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

2019-03-19 Thread Dave Martin
Since the the sizes of individual members of the core arm64 registers vary, the list of register encodings that make sense is not a simple linear sequence. To clarify which encodings to use, this patch adds a brief list to the documentation. Signed-off-by: Dave Martin Reviewed-by: Julien Grall

[PATCH v5 00/26] KVM: arm64: SVE guest support

2019-03-19 Thread Dave Martin
-arm.org/git?p=linux-dm.git;a=shortlog;h=refs/heads/sve-kvm/v6/head git://linux-arm.org/linux-dm.git sve-kvm/v6/head [3] [PATCH v2 0/2] Fix KVM_GET_REG_LIST invalid register ID regression https://lists.cs.columbia.edu/pipermail/kvmarm/2018-December/033810.html Dave Martin (27): KVM: Documenta

Re: [PATCH v5 22/26] KVM: arm64/sve: Add pseudo-register for the guest's vector lengths

2019-03-07 Thread Dave Martin
On Thu, Mar 07, 2019 at 01:47:09PM +, Marc Zyngier wrote: > Hi Dave, > > On 01/03/2019 14:55, Dave Martin wrote: > > [FYI Peter, your views on the proposal outlined torward the end of the > > mail would be appreciated.] > > > > On Fri, Mar 01, 2019 at 01:28

Re: [kvmtool PATCH v6 6/6] arm/kvm: arm64: Add a vcpu feature for pointer authentication

2019-03-05 Thread Dave Martin
On Mon, Mar 04, 2019 at 04:38:18PM +0530, Amit Daniel Kachhap wrote: > > Hi Dave, > > On 3/1/19 4:54 PM, Dave P Martin wrote: > >On Fri, Mar 01, 2019 at 10:37:54AM +, Amit Daniel Kachhap wrote: > >>Hi, > >> > >>On 2/21/19 9:24 PM, Dave Martin w

Re: [PATCH v5 00/26] KVM: arm64: SVE guest support

2019-03-05 Thread Dave Martin
On Sun, Mar 03, 2019 at 02:40:57AM +, Zhang, Lei wrote: > Hi Dave, > > > -Original Message- > > From: linux-arm-kernel On > > Behalf Of Dave Martin > > Sent: Tuesday, February 19, 2019 4:52 AM > > To: kvmarm@lists.cs.columbia.edu > > C

Re: [PATCH v5 22/26] KVM: arm64/sve: Add pseudo-register for the guest's vector lengths

2019-03-01 Thread Dave Martin
[FYI Peter, your views on the proposal outlined torward the end of the mail would be appreciated.] On Fri, Mar 01, 2019 at 01:28:19PM +, Julien Thierry wrote: > > > On 26/02/2019 12:13, Dave Martin wrote: > > On Thu, Feb 21, 2019 at 05:48:59PM +, Julien Thierry wrot

Re: [PATCH v5 18/26] KVM: arm64/sve: Add SVE support to register access ioctl interface

2019-03-01 Thread Dave Martin
On Fri, Mar 01, 2019 at 01:03:36PM +, Julien Thierry wrote: > > > On 26/02/2019 12:13, Dave Martin wrote: > > On Thu, Feb 21, 2019 at 03:23:37PM +, Julien Thierry wrote: > >> Hi Dave, > >> > >> On 18/02/2019 19:52, Dave Martin wrote: >

Re: [PATCH v5 06/26] arm64/sve: Check SVE virtualisability

2019-03-01 Thread Dave Martin
On Fri, Mar 01, 2019 at 12:39:52PM +, Julien Thierry wrote: > > > On 26/02/2019 12:06, Dave Martin wrote: > > On Wed, Feb 20, 2019 at 11:12:49AM +, Julien Thierry wrote: > >> Hi Dave, > >> > >> On 18/02/2019 19:52, Dave Martin wrote: [..

Re: [PATCH v5 13/26] KVM: arm64/sve: System register context switch and access support

2019-02-27 Thread Dave Martin
On Wed, Feb 27, 2019 at 02:17:06PM +, Julien Grall wrote: > Hi Dave, > > On 2/27/19 1:50 PM, Dave Martin wrote: > >On Wed, Feb 27, 2019 at 12:02:46PM +, Julien Grall wrote: > >>Hi Dave, > >> > >>On 2/26/19 5:01 PM, Dave Martin wrote: [...] >

Re: [PATCH v5 13/26] KVM: arm64/sve: System register context switch and access support

2019-02-27 Thread Dave Martin
On Wed, Feb 27, 2019 at 12:02:46PM +, Julien Grall wrote: > Hi Dave, > > On 2/26/19 5:01 PM, Dave Martin wrote: > >On Tue, Feb 26, 2019 at 04:32:30PM +, Julien Grall wrote: > >>On 18/02/2019 19:52, Dave Martin wrote: > >>We seem to already have code

Re: [PATCH v5 14/26] KVM: arm64/sve: Context switch the SVE registers

2019-02-27 Thread Dave Martin
On Tue, Feb 26, 2019 at 04:56:36PM +, Julien Grall wrote: > Hi Dave, > > On 26/02/2019 12:13, Dave Martin wrote: > >On Wed, Feb 20, 2019 at 04:46:57PM +, Julien Thierry wrote: > >> > >> > >>On 18/02/2019 19:52, Dave Martin wrote: > >>

Re: [PATCH 1/5] KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loaded

2019-02-27 Thread Dave Martin
On Tue, Feb 26, 2019 at 01:53:52PM +, Dave Martin wrote: > On Wed, Feb 20, 2019 at 07:41:43PM +, Marc Zyngier wrote: > > On Wed, 20 Feb 2019 19:14:53 + > > Dave Martin wrote: [...] > > > Perhaps an alternative approach would be to nobble the preempt

Re: [PATCH v5 13/26] KVM: arm64/sve: System register context switch and access support

2019-02-26 Thread Dave Martin
On Tue, Feb 26, 2019 at 04:32:30PM +, Julien Grall wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > >@@ -1091,6 +1088,95 @@ static int reg_from_user(u64 *val, const void __user > >*uaddr, u64 id); > > static int reg_to_user(void __user *ua

Re: [PATCH v5 08/26] arm64/sve: Enable SVE state tracking for non-task contexts

2019-02-26 Thread Dave Martin
On Tue, Feb 26, 2019 at 03:59:40PM +, Julien Grall wrote: > Hi Dave, > > On 26/02/2019 15:58, Dave Martin wrote: > >On Tue, Feb 26, 2019 at 03:49:00PM +, Julien Grall wrote: > >>Hi Dave, > >> > >>On 26/02/2019 12:07, Dave Martin wrote: [...]

Re: [PATCH v5 08/26] arm64/sve: Enable SVE state tracking for non-task contexts

2019-02-26 Thread Dave Martin
On Tue, Feb 26, 2019 at 03:49:00PM +, Julien Grall wrote: > Hi Dave, > > On 26/02/2019 12:07, Dave Martin wrote: > >On Fri, Feb 22, 2019 at 03:26:51PM +, Julien Grall wrote: > >>Hi Dave, > >> > >>On 18/02/2019 19:52, Dave Martin wrote: > >&

Re: [PATCH 1/5] KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loaded

2019-02-26 Thread Dave Martin
On Tue, Feb 26, 2019 at 01:34:49PM +0100, Christoffer Dall wrote: > On Wed, Feb 20, 2019 at 07:14:53PM +0000, Dave Martin wrote: > > On Fri, Jan 25, 2019 at 10:46:52AM +0100, Christoffer Dall wrote: > > > Resetting the VCPU state modifies the system register state in memory,

Re: [PATCH 1/5] KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loaded

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 07:41:43PM +, Marc Zyngier wrote: > On Wed, 20 Feb 2019 19:14:53 + > Dave Martin wrote: > > > On Fri, Jan 25, 2019 at 10:46:52AM +0100, Christoffer Dall wrote: > > > Resetting the VCPU state modifies the system register state in memory, >

Re: [PATCH v5 05/26] KVM: arm64: Add missing #include of to kvm_host.h

2019-02-26 Thread Dave Martin
On Tue, Feb 26, 2019 at 12:31:45PM +, Mark Rutland wrote: > On Tue, Feb 26, 2019 at 12:06:16PM +0000, Dave Martin wrote: > > On Wed, Feb 20, 2019 at 03:23:50PM +, Mark Rutland wrote: [...] > > > #include > > > > [...] > > > > > #include

Re: [PATCH v5 24/26] KVM: arm64: Add a capabillity to advertise SVE support

2019-02-26 Thread Dave Martin
On Fri, Feb 22, 2019 at 09:10:46AM +, Julien Thierry wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > > To provide a uniform way to check for KVM SVE support amongst other > > features, this patch adds a suitable capability KVM_CAP_ARM_SVE, > > and

Re: [PATCH v5 23/26] KVM: arm64/sve: Allow userspace to enable SVE for vcpus

2019-02-26 Thread Dave Martin
On Fri, Feb 22, 2019 at 09:05:16AM +, Julien Thierry wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > > Now that all the pieces are in place, this patch offers a new flag > > KVM_ARM_VCPU_SVE that userspace can pass to KVM_ARM_VCPU_INIT to > >

Re: [PATCH v5 22/26] KVM: arm64/sve: Add pseudo-register for the guest's vector lengths

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 05:48:59PM +, Julien Thierry wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > > This patch adds a new pseudo-register KVM_REG_ARM64_SVE_VLS to > > allow userspace to set and query the set of vector lengths visible &g

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

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 12:06:23PM +, Julien Thierry wrote: > > > On 18/02/2019 19:52, Dave Martin wrote: > > In order to avoid the pointless complexity of maintaining two ioctl > > register access views of the same data, this patch blocks ioctl > > access to the

Re: [PATCH v5 18/26] KVM: arm64/sve: Add SVE support to register access ioctl interface

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 03:23:37PM +, Julien Thierry wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > > This patch adds the following registers for access via the > > KVM_{GET,SET}_ONE_REG interface: > > > > * KVM_REG_ARM64_SVE_ZREG(n, i

Re: [PATCH v5 14/26] KVM: arm64/sve: Context switch the SVE registers

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 04:46:57PM +, Julien Thierry wrote: > > > On 18/02/2019 19:52, Dave Martin wrote: > > 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 struct > > vcpu_

Re: [PATCH v5 12/26] KVM: arm64: Support runtime sysreg visibility filtering

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 03:37:26PM +, Mark Rutland wrote: > On Mon, Feb 18, 2019 at 07:52:25PM +0000, Dave Martin wrote: > > Some optional features of the Arm architecture add new system > > registers that are not present in the base architecture. > > > > Where

Re: [PATCH v5 14/26] KVM: arm64/sve: Context switch the SVE registers

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 04:19:18PM +, Mark Rutland wrote: > On Mon, Feb 18, 2019 at 07:52:27PM +0000, Dave Martin wrote: > > -static bool __hyp_text __hyp_switch_fpsimd(struct kvm_vcpu *vcpu) > > +/* Check for an FPSIMD/SVE trap and handle as appropriate */ > > +s

Re: [PATCH v5 12/26] KVM: arm64: Support runtime sysreg visibility filtering

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 02:33:44PM +, Julien Thierry wrote: > > > On 18/02/2019 19:52, Dave Martin wrote: > > Some optional features of the Arm architecture add new system > > registers that are not present in the base architecture. > > > > Where these fe

Re: [PATCH v5 11/26] KVM: arm64: Extend reset_unknown() to handle mixed RES0/UNKNOWN registers

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 01:33:28PM +, Julien Thierry wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > > The reset_unknown() system register helper initialises a guest > > register to a distinctive junk value on vcpu reset, to help expose > > a

Re: [PATCH v5 06/26] arm64/sve: Check SVE virtualisability

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 01:36:26PM +, Julien Grall wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > >+/* > >+ * Mismatches above sve_max_virtualisable_vl are fine, since > >+ * no guest is allowed to conf

Re: [PATCH v5 07/26] arm64/sve: Clarify role of the VQ map maintenance functions

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 11:43:24AM +, Julien Thierry wrote: > > > On 18/02/2019 19:52, Dave Martin wrote: > > The roles of sve_init_vq_map(), sve_update_vq_map() and > > sve_verify_vq_map() are highly non-obvious to anyone who has not dug > > through cpufeatures.

Re: [PATCH v5 08/26] arm64/sve: Enable SVE state tracking for non-task contexts

2019-02-26 Thread Dave Martin
On Fri, Feb 22, 2019 at 03:26:51PM +, Julien Grall wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > >The current FPSIMD/SVE context handling support for non-task (i.e., > >KVM vcpu) contexts does not take SVE into account. This means that > &g

Re: [PATCH v5 07/26] arm64/sve: Clarify role of the VQ map maintenance functions

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 01:46:46PM +, Julien Grall wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > >The roles of sve_init_vq_map(), sve_update_vq_map() and > >sve_verify_vq_map() are highly non-obvious to anyone who has not dug > >through cpufeature

Re: [PATCH v5 06/26] arm64/sve: Check SVE virtualisability

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 11:12:49AM +, Julien Thierry wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > > Due to the way the effective SVE vector length is controlled and > > trapped at different exception levels, certain mismatches in the > > sets

Re: [PATCH v5 05/26] KVM: arm64: Add missing #include of to kvm_host.h

2019-02-26 Thread Dave Martin
On Wed, Feb 20, 2019 at 03:23:50PM +, Mark Rutland wrote: > On Mon, Feb 18, 2019 at 07:52:18PM +0000, Dave Martin wrote: > > kvm_host.h uses DECLARE_BITMAP() to declare the features member of > > struct vcpu_arch, but the corresponding #include for this is > > missing. >

Re: [PATCH v5 02/26] arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 12:39:39PM +, Julien Grall wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > >This patch updates fpsimd_flush_task_state() to mirror the new > >semantics of fpsimd_flush_cpu_state() introduced by commit > >d8ad71

Re: [PATCH v5 01/26] KVM: Documentation: Document arm64 core registers in detail

2019-02-26 Thread Dave Martin
On Thu, Feb 21, 2019 at 11:48:30AM +, Julien Grall wrote: > Hi Dave, > > On 18/02/2019 19:52, Dave Martin wrote: > >Since the the sizes of individual members of the core arm64 > >registers vary, the list of register encodings that make sense is > >n

Re: [PATCH v3 2/2] KVM: doc: add API documentation on the KVM_REG_ARM_WORKAROUNDS register

2019-02-22 Thread Dave Martin
On Fri, Feb 22, 2019 at 12:18:18PM +, Andre Przywara wrote: > Add documentation for the newly defined firmware registers to save and > restore any vulnerability migitation status. > > Signed-off-by: Andre Przywara > --- > Documentation/virtual/kvm/arm/psci.txt | 24

Re: [PATCH v3 1/2] KVM: arm/arm64: Add save/restore support for firmware workaround state

2019-02-22 Thread Dave Martin
On Fri, Feb 22, 2019 at 12:18:17PM +, Andre Przywara wrote: > KVM implements the firmware interface for mitigating cache speculation > vulnerabilities. Guests may use this interface to ensure mitigation is > active. > If we want to migrate such a guest to a host with a different support >

Re: [PATCH] KVM: arm64: Fix architecturally invalid reset value for FPEXC32_EL2

2019-02-22 Thread Dave Martin
On Fri, Feb 22, 2019 at 10:01:03AM +, Marc Zyngier wrote: > On Thu, 21 Feb 2019 11:42:32 + > Dave Martin wrote: > > > Due to what looks like a typo dating back to the original addition > > of FPEXC32_EL2 handling, KVM currently initialises this register to > >

Re: [PATCH v6 5/6] arm64/kvm: control accessibility of ptrauth key registers

2019-02-21 Thread Dave Martin
ters to default values but they are > left like that as they are conditionally accessible (set/get). > > Signed-off-by: Amit Daniel Kachhap > Cc: Mark Rutland > Cc: Marc Zyngier > Cc: Christoffer Dall > Cc: kvmarm@lists.cs.columbia.edu > --- > This patch needs patch [1]

Re: [PATCH v6 3/6] arm64/kvm: context-switch ptrauth registers

2019-02-21 Thread Dave Martin
On Tue, Feb 19, 2019 at 02:54:28PM +0530, Amit Daniel Kachhap wrote: > From: Mark Rutland > > When pointer authentication is supported, a guest may wish to use it. > This patch adds the necessary KVM infrastructure for this to work, with > a semi-lazy context switch of the pointer auth state. >

<    1   2   3   4   5   6   7   8   9   10   >