From: Dave Martin <Dave.Martin@arm.com> To: kvmarm@lists.cs.columbia.edu Cc: "Peter Maydell" <peter.maydell@linaro.org>, "Okamoto Takayuki" <tokamoto@jp.fujitsu.com>, "Christoffer Dall" <cdall@kernel.org>, "Ard Biesheuvel" <ard.biesheuvel@linaro.org>, "Marc Zyngier" <marc.zyngier@arm.com>, "Catalin Marinas" <catalin.marinas@arm.com>, "Will Deacon" <will.deacon@arm.com>, "Zhang Lei" <zhang.lei@jp.fujitsu.com>, "Julien Grall" <julien.grall@arm.com>, "Alex Bennée" <alex.bennee@linaro.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 00/26] KVM: arm64: SVE guest support Date: Tue, 19 Mar 2019 17:51:51 +0000 [thread overview] Message-ID: <1553017938-710-1-git-send-email-Dave.Martin@arm.com> (raw) This series implements support for allowing KVM guests to use the Arm Scalable Vector Extension (SVE), superseding the previous v5 series [1]. The patches are also available on a branch for reviewer convenience. [2] The patches are based on v5.1-rc1. The series has been reworked to remove the dependency on [3], eliminating the ABI "fixes" but keeping the relevant cleanup/ refactoring. (See patch 16.) This series addresses review comments received on v5, and contains one significant change: * A new ioctl KVM_ARM_VCPU_FINALIZE is added to replace the implicit finalization behaviour in v5. If userspace enables SVE, it must now use this ioctl to finalize the vcpu configuration before KVM_RUN etc. or SVE register access are permitted. For a description of minor updates, see the individual patches. 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 of this posting). The kvmtool branch referenced by the v5 cover letter **will not work** with v6... Please be patient :) Testing status: * Lightweight testing on the Arm Fast Model, primarily to exercise the new vcpu finalization API. I plan to re-run stress testing once v6 is posted. The low-level context switch internals in the series remain unchanged since v5, so it is "relatively unlikely" that new problems will crop up since the v5 testing. * ThunderX2: basic testing of arm64 defconfig, including booting guests (no SVE support on this hardware). (This was done on an interim release candidate of v6: I will redo it after this posting.) * aarch32 host testing has only been done in v5 so far. arch/arm changes between v5 and v6 are minimal. I plan to redo sanity-check testing after this posting. I will reply to this cover letter when I have v6 test outcomes to report. Resolved issues: * The register zeroing bug observed when testing v5 has been tracked down to architecture noncompliance in the Arm Fast Model, which led to lanes of SVE registers being zeroed in some inappropriate situations. [1] Previous series: [PATCH v5 00/26] KVM: arm64: SVE guest support https://lists.cs.columbia.edu/pipermail/kvmarm/2019-February/034695.html [2] This series in git: http://linux-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: Documentation: Document arm64 core registers in detail arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush KVM: arm64: Delete orphaned declaration for __fpsimd_enabled() KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance KVM: arm64: Add missing #includes to kvm_host.h arm64/sve: Clarify role of the VQ map maintenance functions arm64/sve: Check SVE virtualisability arm64/sve: Enable SVE state tracking for non-task contexts KVM: arm64: Add a vcpu flag to control SVE visibility for the guest KVM: arm64: Propagate vcpu into read_id_reg() KVM: arm64: Support runtime sysreg visibility filtering KVM: arm64/sve: System register context switch and access support KVM: arm64/sve: Context switch the SVE registers KVM: Allow 2048-bit register access via ioctl interface KVM: arm64: Add missing #include of <linux/string.h> in guest.c KVM: arm64: Factor out core register ID enumeration KVM: arm64: Reject ioctl access to FPSIMD V-regs on SVE vcpus KVM: arm64/sve: Add SVE support to register access ioctl interface KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST arm64/sve: In-kernel vector length availability query interface KVM: arm/arm64: Add hook for arch-specific KVM initialisation KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl KVM: arm64/sve: Add pseudo-register for the guest's vector lengths KVM: arm64/sve: Allow userspace to enable SVE for vcpus KVM: arm64: Add a capability to advertise SVE support KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG KVM: arm64/sve: Document KVM API extensions for SVE Documentation/virtual/kvm/api.txt | 156 +++++++++++++++ arch/arm/include/asm/kvm_host.h | 6 + arch/arm64/include/asm/fpsimd.h | 33 +++- arch/arm64/include/asm/kvm_host.h | 43 ++++- arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/include/asm/sysreg.h | 3 + arch/arm64/include/uapi/asm/kvm.h | 22 +++ arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/fpsimd.c | 172 ++++++++++++----- arch/arm64/kernel/signal.c | 5 - arch/arm64/kvm/fpsimd.c | 17 +- arch/arm64/kvm/guest.c | 387 +++++++++++++++++++++++++++++++++++--- arch/arm64/kvm/hyp/switch.c | 74 ++++++-- arch/arm64/kvm/reset.c | 137 +++++++++++++- arch/arm64/kvm/sys_regs.c | 130 +++++++++++-- arch/arm64/kvm/sys_regs.h | 25 +++ include/uapi/linux/kvm.h | 5 + virt/kvm/arm/arm.c | 22 +++ 18 files changed, 1110 insertions(+), 130 deletions(-) -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Dave Martin <Dave.Martin@arm.com> To: kvmarm@lists.cs.columbia.edu Cc: "Peter Maydell" <peter.maydell@linaro.org>, "Okamoto Takayuki" <tokamoto@jp.fujitsu.com>, "Christoffer Dall" <cdall@kernel.org>, "Ard Biesheuvel" <ard.biesheuvel@linaro.org>, "Marc Zyngier" <marc.zyngier@arm.com>, "Catalin Marinas" <catalin.marinas@arm.com>, "Will Deacon" <will.deacon@arm.com>, "Zhang Lei" <zhang.lei@jp.fujitsu.com>, "Julien Grall" <julien.grall@arm.com>, "Alex Bennée" <alex.bennee@linaro.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 00/26] KVM: arm64: SVE guest support Date: Tue, 19 Mar 2019 17:51:51 +0000 [thread overview] Message-ID: <1553017938-710-1-git-send-email-Dave.Martin@arm.com> (raw) This series implements support for allowing KVM guests to use the Arm Scalable Vector Extension (SVE), superseding the previous v5 series [1]. The patches are also available on a branch for reviewer convenience. [2] The patches are based on v5.1-rc1. The series has been reworked to remove the dependency on [3], eliminating the ABI "fixes" but keeping the relevant cleanup/ refactoring. (See patch 16.) This series addresses review comments received on v5, and contains one significant change: * A new ioctl KVM_ARM_VCPU_FINALIZE is added to replace the implicit finalization behaviour in v5. If userspace enables SVE, it must now use this ioctl to finalize the vcpu configuration before KVM_RUN etc. or SVE register access are permitted. For a description of minor updates, see the individual patches. 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 of this posting). The kvmtool branch referenced by the v5 cover letter **will not work** with v6... Please be patient :) Testing status: * Lightweight testing on the Arm Fast Model, primarily to exercise the new vcpu finalization API. I plan to re-run stress testing once v6 is posted. The low-level context switch internals in the series remain unchanged since v5, so it is "relatively unlikely" that new problems will crop up since the v5 testing. * ThunderX2: basic testing of arm64 defconfig, including booting guests (no SVE support on this hardware). (This was done on an interim release candidate of v6: I will redo it after this posting.) * aarch32 host testing has only been done in v5 so far. arch/arm changes between v5 and v6 are minimal. I plan to redo sanity-check testing after this posting. I will reply to this cover letter when I have v6 test outcomes to report. Resolved issues: * The register zeroing bug observed when testing v5 has been tracked down to architecture noncompliance in the Arm Fast Model, which led to lanes of SVE registers being zeroed in some inappropriate situations. [1] Previous series: [PATCH v5 00/26] KVM: arm64: SVE guest support https://lists.cs.columbia.edu/pipermail/kvmarm/2019-February/034695.html [2] This series in git: http://linux-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: Documentation: Document arm64 core registers in detail arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush KVM: arm64: Delete orphaned declaration for __fpsimd_enabled() KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance KVM: arm64: Add missing #includes to kvm_host.h arm64/sve: Clarify role of the VQ map maintenance functions arm64/sve: Check SVE virtualisability arm64/sve: Enable SVE state tracking for non-task contexts KVM: arm64: Add a vcpu flag to control SVE visibility for the guest KVM: arm64: Propagate vcpu into read_id_reg() KVM: arm64: Support runtime sysreg visibility filtering KVM: arm64/sve: System register context switch and access support KVM: arm64/sve: Context switch the SVE registers KVM: Allow 2048-bit register access via ioctl interface KVM: arm64: Add missing #include of <linux/string.h> in guest.c KVM: arm64: Factor out core register ID enumeration KVM: arm64: Reject ioctl access to FPSIMD V-regs on SVE vcpus KVM: arm64/sve: Add SVE support to register access ioctl interface KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST arm64/sve: In-kernel vector length availability query interface KVM: arm/arm64: Add hook for arch-specific KVM initialisation KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl KVM: arm64/sve: Add pseudo-register for the guest's vector lengths KVM: arm64/sve: Allow userspace to enable SVE for vcpus KVM: arm64: Add a capability to advertise SVE support KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG KVM: arm64/sve: Document KVM API extensions for SVE Documentation/virtual/kvm/api.txt | 156 +++++++++++++++ arch/arm/include/asm/kvm_host.h | 6 + arch/arm64/include/asm/fpsimd.h | 33 +++- arch/arm64/include/asm/kvm_host.h | 43 ++++- arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/include/asm/sysreg.h | 3 + arch/arm64/include/uapi/asm/kvm.h | 22 +++ arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/fpsimd.c | 172 ++++++++++++----- arch/arm64/kernel/signal.c | 5 - arch/arm64/kvm/fpsimd.c | 17 +- arch/arm64/kvm/guest.c | 387 +++++++++++++++++++++++++++++++++++--- arch/arm64/kvm/hyp/switch.c | 74 ++++++-- arch/arm64/kvm/reset.c | 137 +++++++++++++- arch/arm64/kvm/sys_regs.c | 130 +++++++++++-- arch/arm64/kvm/sys_regs.h | 25 +++ include/uapi/linux/kvm.h | 5 + virt/kvm/arm/arm.c | 22 +++ 18 files changed, 1110 insertions(+), 130 deletions(-) -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-03-19 17:51 UTC|newest] Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-19 17:51 Dave Martin [this message] 2019-03-19 17:51 ` [PATCH v5 00/26] KVM: arm64: SVE guest support Dave Martin 2019-03-19 17:51 ` [PATCH v6 01/27] KVM: Documentation: Document arm64 core registers in detail Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 02/27] arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 03/27] KVM: arm64: Delete orphaned declaration for __fpsimd_enabled() Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 04/27] KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 05/27] KVM: arm64: Add missing #includes to kvm_host.h Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 06/27] arm64/sve: Clarify role of the VQ map maintenance functions Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 07/27] arm64/sve: Check SVE virtualisability Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:51 ` [PATCH v6 08/27] arm64/sve: Enable SVE state tracking for non-task contexts Dave Martin 2019-03-19 17:51 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 09/27] KVM: arm64: Add a vcpu flag to control SVE visibility for the guest Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 10/27] KVM: arm64: Propagate vcpu into read_id_reg() Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 11/27] KVM: arm64: Support runtime sysreg visibility filtering Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-04-02 2:49 ` Amit Daniel Kachhap 2019-04-02 2:49 ` Amit Daniel Kachhap 2019-03-19 17:52 ` [PATCH v6 12/27] KVM: arm64/sve: System register context switch and access support Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-26 13:58 ` Julien Thierry 2019-03-26 13:58 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 13/27] KVM: arm64/sve: Context switch the SVE registers Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 8:15 ` Julien Thierry 2019-03-27 8:15 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 14/27] KVM: Allow 2048-bit register access via ioctl interface Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 15/27] KVM: arm64: Add missing #include of <linux/string.h> in guest.c Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 16/27] KVM: arm64: Factor out core register ID enumeration Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 8:46 ` Julien Thierry 2019-03-27 8:46 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 17/27] KVM: arm64: Reject ioctl access to FPSIMD V-regs on SVE vcpus Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 8:46 ` Julien Thierry 2019-03-27 8:46 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 18/27] KVM: arm64/sve: Add SVE support to register access ioctl interface Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 9:23 ` Julien Thierry 2019-03-27 9:23 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 19/27] KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 9:47 ` Julien Thierry 2019-03-27 9:47 ` Julien Thierry 2019-03-27 10:33 ` Dave Martin 2019-03-27 10:33 ` Dave Martin 2019-03-27 15:21 ` Julien Thierry 2019-03-27 15:21 ` Julien Thierry 2019-03-28 12:27 ` Dave Martin 2019-03-28 12:27 ` Dave Martin 2019-03-28 14:29 ` Julien Thierry 2019-03-28 14:29 ` Julien Thierry 2019-03-28 16:48 ` Dave Martin 2019-03-28 16:48 ` Dave Martin 2019-03-28 16:59 ` Julien Thierry 2019-03-28 16:59 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 20/27] arm64/sve: In-kernel vector length availability query interface Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 21/27] KVM: arm/arm64: Add hook for arch-specific KVM initialisation Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 10:07 ` Julien Thierry 2019-03-27 10:07 ` Julien Thierry 2019-03-27 10:41 ` Dave Martin 2019-03-27 10:41 ` Dave Martin 2019-03-27 15:23 ` Julien Thierry 2019-03-27 15:23 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 22/27] KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 14:07 ` Julien Thierry 2019-03-27 14:07 ` Julien Thierry 2019-03-27 17:42 ` Dave Martin 2019-03-27 17:42 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 23/27] KVM: arm64/sve: Add pseudo-register for the guest's vector lengths Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 14:57 ` Julien Thierry 2019-03-27 14:57 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 24/27] KVM: arm64/sve: Allow userspace to enable SVE for vcpus Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 15:15 ` Julien Thierry 2019-03-27 15:15 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 25/27] KVM: arm64: Add a capability to advertise SVE support Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-27 15:16 ` Julien Thierry 2019-03-27 15:16 ` Julien Thierry 2019-03-19 17:52 ` [PATCH v6 26/27] KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:52 ` [PATCH v6 27/27] KVM: arm64/sve: Document KVM API extensions for SVE Dave Martin 2019-03-19 17:52 ` Dave Martin 2019-03-19 17:58 ` [PATCH v5 00/26] KVM: arm64: SVE guest support Dave Martin 2019-03-19 17:58 ` Dave Martin 2019-03-27 5:51 ` Zhang, Lei 2019-03-27 5:51 ` Zhang, Lei 2019-03-20 12:30 ` Dave Martin 2019-03-20 12:30 ` Dave Martin 2019-03-25 16:32 ` Andrew Jones 2019-03-25 16:32 ` Andrew Jones 2019-03-25 16:38 ` Peter Maydell 2019-03-25 16:38 ` Peter Maydell 2019-03-25 16:49 ` Andrew Jones 2019-03-25 16:49 ` Andrew Jones 2019-03-26 11:28 ` Dave Martin 2019-03-26 11:28 ` Dave Martin -- strict thread matches above, loose matches on Subject: below -- 2019-02-18 19:52 Dave Martin 2019-02-18 19:52 ` Dave Martin 2019-02-20 15:47 ` Dave Martin 2019-02-20 15:47 ` Dave Martin 2019-03-03 2:40 ` Zhang, Lei 2019-03-05 9:47 ` Dave Martin 2019-03-05 9:47 ` Dave Martin 2019-03-08 7:06 ` Zhang, Lei 2019-03-08 7:06 ` Zhang, Lei
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1553017938-710-1-git-send-email-Dave.Martin@arm.com \ --to=dave.martin@arm.com \ --cc=alex.bennee@linaro.org \ --cc=ard.biesheuvel@linaro.org \ --cc=catalin.marinas@arm.com \ --cc=cdall@kernel.org \ --cc=julien.grall@arm.com \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=marc.zyngier@arm.com \ --cc=peter.maydell@linaro.org \ --cc=tokamoto@jp.fujitsu.com \ --cc=will.deacon@arm.com \ --cc=zhang.lei@jp.fujitsu.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.