From: Jing Zhang <jingzhangos@google.com> To: KVM <kvm@vger.kernel.org>, KVMARM <kvmarm@lists.linux.dev>, ARMLinux <linux-arm-kernel@lists.infradead.org>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@google.com> Cc: Will Deacon <will@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Fuad Tabba <tabba@google.com>, Reiji Watanabe <reijiw@google.com>, Ricardo Koller <ricarkol@google.com>, Raghavendra Rao Ananta <rananta@google.com>, Jing Zhang <jingzhangos@google.com> Subject: [PATCH v3 0/6] Support writable CPU ID registers from userspace Date: Tue, 28 Feb 2023 06:22:40 +0000 [thread overview] Message-ID: <20230228062246.1222387-1-jingzhangos@google.com> (raw) This patchset refactors/adds code to support writable per guest CPU ID feature registers. Part of the code/ideas are from https://lore.kernel.org/all/20220419065544.3616948-1-reijiw@google.com . No functional change is intended in this patchset. With the new CPU ID feature registers infrastructure, only writtings of ID_AA64PFR0_EL1.[CSV2|CSV3], ID_AA64DFR0_EL1.PMUVer and ID_DFR0_ELF.PerfMon are allowed as KVM does before. Writable (Configurable) per guest CPU ID feature registers are useful for creating/migrating guest on ARM CPUs with different kinds of features. --- * v2 -> v3 - Rebased to 96a4627dbbd4 (kvmarm/next) Merge tag ' https://github.com/oupton/linux tags/kvmarm-6.3' from into kvmarm-master/next - Add id registere emulation entry point function emulate_id_reg - Fix consistency for ID_AA64DFR0_EL1.PMUVer and ID_DFR0_EL1.PerfMon - Improve the checking for id register table by ensuring that every entry has the correct id register encoding. - Addressed other comments from Reiji and Marc. * v1 -> v2 - Rebase to 7121a2e1d107 (kvmarm/next) Merge branch kvm-arm64/nv-prefix into kvmarm/next - Address writing issue for PMUVer [1] https://lore.kernel.org/all/20230201025048.205820-1-jingzhangos@google.com [2] https://lore.kernel.org/all/20230212215830.2975485-1-jingzhangos@google.com --- Jing Zhang (5): KVM: arm64: Move CPU ID feature registers emulation into a separate file KVM: arm64: Use per guest ID register for ID_AA64PFR0_EL1.[CSV2|CSV3] KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer KVM: arm64: Introduce ID register specific descriptor KVM: arm64: Refactor writings for PMUVer/CSV2/CSV3 Reiji Watanabe (1): KVM: arm64: Save ID registers' sanitized value per guest arch/arm64/include/asm/cpufeature.h | 25 + arch/arm64/include/asm/kvm_host.h | 26 +- arch/arm64/kernel/cpufeature.c | 26 +- arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/arm.c | 24 +- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 7 +- arch/arm64/kvm/id_regs.c | 801 ++++++++++++++++++++++++++++ arch/arm64/kvm/sys_regs.c | 469 +--------------- arch/arm64/kvm/sys_regs.h | 43 ++ include/kvm/arm_pmu.h | 6 +- 10 files changed, 927 insertions(+), 502 deletions(-) create mode 100644 arch/arm64/kvm/id_regs.c base-commit: 96a4627dbbd48144a65af936b321701c70876026 -- 2.39.2.722.g9855ee24e9-goog
WARNING: multiple messages have this Message-ID (diff)
From: Jing Zhang <jingzhangos@google.com> To: KVM <kvm@vger.kernel.org>, KVMARM <kvmarm@lists.linux.dev>, ARMLinux <linux-arm-kernel@lists.infradead.org>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@google.com> Cc: Will Deacon <will@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Fuad Tabba <tabba@google.com>, Reiji Watanabe <reijiw@google.com>, Ricardo Koller <ricarkol@google.com>, Raghavendra Rao Ananta <rananta@google.com>, Jing Zhang <jingzhangos@google.com> Subject: [PATCH v3 0/6] Support writable CPU ID registers from userspace Date: Tue, 28 Feb 2023 06:22:40 +0000 [thread overview] Message-ID: <20230228062246.1222387-1-jingzhangos@google.com> (raw) This patchset refactors/adds code to support writable per guest CPU ID feature registers. Part of the code/ideas are from https://lore.kernel.org/all/20220419065544.3616948-1-reijiw@google.com . No functional change is intended in this patchset. With the new CPU ID feature registers infrastructure, only writtings of ID_AA64PFR0_EL1.[CSV2|CSV3], ID_AA64DFR0_EL1.PMUVer and ID_DFR0_ELF.PerfMon are allowed as KVM does before. Writable (Configurable) per guest CPU ID feature registers are useful for creating/migrating guest on ARM CPUs with different kinds of features. --- * v2 -> v3 - Rebased to 96a4627dbbd4 (kvmarm/next) Merge tag ' https://github.com/oupton/linux tags/kvmarm-6.3' from into kvmarm-master/next - Add id registere emulation entry point function emulate_id_reg - Fix consistency for ID_AA64DFR0_EL1.PMUVer and ID_DFR0_EL1.PerfMon - Improve the checking for id register table by ensuring that every entry has the correct id register encoding. - Addressed other comments from Reiji and Marc. * v1 -> v2 - Rebase to 7121a2e1d107 (kvmarm/next) Merge branch kvm-arm64/nv-prefix into kvmarm/next - Address writing issue for PMUVer [1] https://lore.kernel.org/all/20230201025048.205820-1-jingzhangos@google.com [2] https://lore.kernel.org/all/20230212215830.2975485-1-jingzhangos@google.com --- Jing Zhang (5): KVM: arm64: Move CPU ID feature registers emulation into a separate file KVM: arm64: Use per guest ID register for ID_AA64PFR0_EL1.[CSV2|CSV3] KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer KVM: arm64: Introduce ID register specific descriptor KVM: arm64: Refactor writings for PMUVer/CSV2/CSV3 Reiji Watanabe (1): KVM: arm64: Save ID registers' sanitized value per guest arch/arm64/include/asm/cpufeature.h | 25 + arch/arm64/include/asm/kvm_host.h | 26 +- arch/arm64/kernel/cpufeature.c | 26 +- arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/arm.c | 24 +- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 7 +- arch/arm64/kvm/id_regs.c | 801 ++++++++++++++++++++++++++++ arch/arm64/kvm/sys_regs.c | 469 +--------------- arch/arm64/kvm/sys_regs.h | 43 ++ include/kvm/arm_pmu.h | 6 +- 10 files changed, 927 insertions(+), 502 deletions(-) create mode 100644 arch/arm64/kvm/id_regs.c base-commit: 96a4627dbbd48144a65af936b321701c70876026 -- 2.39.2.722.g9855ee24e9-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-02-28 6:23 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-28 6:22 Jing Zhang [this message] 2023-02-28 6:22 ` [PATCH v3 0/6] Support writable CPU ID registers from userspace Jing Zhang 2023-02-28 6:22 ` [PATCH v3 1/6] KVM: arm64: Move CPU ID feature registers emulation into a separate file Jing Zhang 2023-02-28 6:22 ` Jing Zhang 2023-02-28 6:22 ` [PATCH v3 2/6] KVM: arm64: Save ID registers' sanitized value per guest Jing Zhang 2023-02-28 6:22 ` Jing Zhang 2023-03-07 22:44 ` Oliver Upton 2023-03-07 22:44 ` Oliver Upton 2023-03-10 2:14 ` Jing Zhang 2023-03-10 2:14 ` Jing Zhang 2023-02-28 6:22 ` [PATCH v3 3/6] KVM: arm64: Use per guest ID register for ID_AA64PFR0_EL1.[CSV2|CSV3] Jing Zhang 2023-02-28 6:22 ` Jing Zhang 2023-02-28 6:22 ` [PATCH v3 4/6] KVM: arm64: Use per guest ID register for ID_AA64DFR0_EL1.PMUVer Jing Zhang 2023-02-28 6:22 ` Jing Zhang 2023-03-08 16:42 ` Reiji Watanabe 2023-03-08 16:42 ` Reiji Watanabe 2023-03-10 2:38 ` Jing Zhang 2023-03-10 2:38 ` Jing Zhang 2023-03-13 4:13 ` Reiji Watanabe 2023-03-13 4:13 ` Reiji Watanabe 2023-03-14 4:36 ` Jing Zhang 2023-03-14 4:36 ` Jing Zhang 2023-03-14 5:14 ` Reiji Watanabe 2023-03-14 5:14 ` Reiji Watanabe 2023-03-14 5:35 ` Reiji Watanabe 2023-03-14 5:35 ` Reiji Watanabe 2023-03-14 17:25 ` Jing Zhang 2023-03-14 17:25 ` Jing Zhang 2023-03-14 6:09 ` Jing Zhang 2023-03-14 6:09 ` Jing Zhang 2023-02-28 6:22 ` [PATCH v3 5/6] KVM: arm64: Introduce ID register specific descriptor Jing Zhang 2023-02-28 6:22 ` Jing Zhang 2023-03-13 4:15 ` Reiji Watanabe 2023-03-13 4:15 ` Reiji Watanabe 2023-03-14 4:26 ` Jing Zhang 2023-03-14 4:26 ` Jing Zhang 2023-02-28 6:22 ` [PATCH v3 6/6] KVM: arm64: Refactor writings for PMUVer/CSV2/CSV3 Jing Zhang 2023-02-28 6:22 ` Jing Zhang
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=20230228062246.1222387-1-jingzhangos@google.com \ --to=jingzhangos@google.com \ --cc=alexandru.elisei@arm.com \ --cc=james.morse@arm.com \ --cc=kvm@vger.kernel.org \ --cc=kvmarm@lists.linux.dev \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=maz@kernel.org \ --cc=oupton@google.com \ --cc=pbonzini@redhat.com \ --cc=rananta@google.com \ --cc=reijiw@google.com \ --cc=ricarkol@google.com \ --cc=suzuki.poulose@arm.com \ --cc=tabba@google.com \ --cc=will@kernel.org \ /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.