From: Alexandru Elisei <alexandru.elisei@arm.com> To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com Subject: [PATCH 0/5] KVM: arm64: Miscellaneous improvements Date: Tue, 1 Dec 2020 15:01:52 +0000 [thread overview] Message-ID: <20201201150157.223625-1-alexandru.elisei@arm.com> (raw) The documentation update in the first patch was suggested by Marc [1]. When I was going through the code to track down all the places error codes were coming from I noticed a few things that in my opinion could be improved. The following patches aim to do just that. I'm fine dropping them if the churn looks unjustified. Tested the Documentation changes by building pdfdocs, didn't notice any warnings regarding api.rst. Tested the other patches on a rockpro64 on the little cores. I ran kvm-unit-tests with qemu and kvmtool. I also ran a Linux guest with qemu and ran perf: $ perf record -a -- iperf3 -c 127.0.0.1 -t 60 I checked that interrupts were firing and nothing looked out of the ordinary. I used qemu because qemu VCPUs do initialization concurrently from their own thread, not from the main thread like kvmtool. To check that kvm_timer_enable() is never reached if the VGIC is not initialized, I hacked kvmtool to remove the ioctl KVM_DEV_ARM_VGIC_GRP_CTRL(KVM_DEV_ARM_VGIC_CTRL_INIT) from gic__init_gic(). When trying to run a guest, I got the following error message: KVM_RUN failed: Device or resource busy which is consistent with the EBUSY return code from vgic_v3_map_resources(). Double checked that that's where the code is coming from by adding a pr_info statement to kvm_arch_vcpu_first_run_init(). [1] https://www.spinics.net/lists/arm-kernel/msg858024.html Alexandru Elisei (5): KVM: Documentation: Add arm64 KVM_RUN error codes KVM: arm64: arch_timer: Remove VGIC initialization check KVM: arm64: Move double-checked lock to kvm_vgic_map_resources() KVM: arm64: Update comment in kvm_vgic_map_resources() KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset() Documentation/virt/kvm/api.rst | 9 +++++++-- arch/arm64/kvm/arch_timer.c | 3 --- arch/arm64/kvm/arm.c | 8 +++----- arch/arm64/kvm/pmu-emul.c | 2 -- arch/arm64/kvm/vgic/vgic-init.c | 9 ++++++++- arch/arm64/kvm/vgic/vgic-v2.c | 3 --- arch/arm64/kvm/vgic/vgic-v3.c | 3 --- 7 files changed, 18 insertions(+), 19 deletions(-) -- 2.29.2 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Alexandru Elisei <alexandru.elisei@arm.com> To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com Subject: [PATCH 0/5] KVM: arm64: Miscellaneous improvements Date: Tue, 1 Dec 2020 15:01:52 +0000 [thread overview] Message-ID: <20201201150157.223625-1-alexandru.elisei@arm.com> (raw) The documentation update in the first patch was suggested by Marc [1]. When I was going through the code to track down all the places error codes were coming from I noticed a few things that in my opinion could be improved. The following patches aim to do just that. I'm fine dropping them if the churn looks unjustified. Tested the Documentation changes by building pdfdocs, didn't notice any warnings regarding api.rst. Tested the other patches on a rockpro64 on the little cores. I ran kvm-unit-tests with qemu and kvmtool. I also ran a Linux guest with qemu and ran perf: $ perf record -a -- iperf3 -c 127.0.0.1 -t 60 I checked that interrupts were firing and nothing looked out of the ordinary. I used qemu because qemu VCPUs do initialization concurrently from their own thread, not from the main thread like kvmtool. To check that kvm_timer_enable() is never reached if the VGIC is not initialized, I hacked kvmtool to remove the ioctl KVM_DEV_ARM_VGIC_GRP_CTRL(KVM_DEV_ARM_VGIC_CTRL_INIT) from gic__init_gic(). When trying to run a guest, I got the following error message: KVM_RUN failed: Device or resource busy which is consistent with the EBUSY return code from vgic_v3_map_resources(). Double checked that that's where the code is coming from by adding a pr_info statement to kvm_arch_vcpu_first_run_init(). [1] https://www.spinics.net/lists/arm-kernel/msg858024.html Alexandru Elisei (5): KVM: Documentation: Add arm64 KVM_RUN error codes KVM: arm64: arch_timer: Remove VGIC initialization check KVM: arm64: Move double-checked lock to kvm_vgic_map_resources() KVM: arm64: Update comment in kvm_vgic_map_resources() KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset() Documentation/virt/kvm/api.rst | 9 +++++++-- arch/arm64/kvm/arch_timer.c | 3 --- arch/arm64/kvm/arm.c | 8 +++----- arch/arm64/kvm/pmu-emul.c | 2 -- arch/arm64/kvm/vgic/vgic-init.c | 9 ++++++++- arch/arm64/kvm/vgic/vgic-v2.c | 3 --- arch/arm64/kvm/vgic/vgic-v3.c | 3 --- 7 files changed, 18 insertions(+), 19 deletions(-) -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-12-01 15:00 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-01 15:01 Alexandru Elisei [this message] 2020-12-01 15:01 ` [PATCH 0/5] KVM: arm64: Miscellaneous improvements Alexandru Elisei 2020-12-01 15:01 ` [PATCH 1/5] KVM: Documentation: Add arm64 KVM_RUN error codes Alexandru Elisei 2020-12-01 15:01 ` Alexandru Elisei 2020-12-01 15:01 ` [PATCH 2/5] KVM: arm64: arch_timer: Remove VGIC initialization check Alexandru Elisei 2020-12-01 15:01 ` Alexandru Elisei 2020-12-14 12:45 ` Auger Eric 2020-12-14 12:45 ` Auger Eric 2020-12-01 15:01 ` [PATCH 3/5] KVM: arm64: Move double-checked lock to kvm_vgic_map_resources() Alexandru Elisei 2020-12-01 15:01 ` Alexandru Elisei 2020-12-14 12:55 ` Auger Eric 2020-12-14 12:55 ` Auger Eric 2020-12-27 14:36 ` Marc Zyngier 2020-12-27 14:36 ` Marc Zyngier 2020-12-01 15:01 ` [PATCH 4/5] KVM: arm64: Update comment in kvm_vgic_map_resources() Alexandru Elisei 2020-12-01 15:01 ` Alexandru Elisei 2020-12-14 12:59 ` Auger Eric 2020-12-14 12:59 ` Auger Eric 2020-12-01 15:01 ` [PATCH 5/5] KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset() Alexandru Elisei 2020-12-01 15:01 ` Alexandru Elisei 2020-12-14 13:48 ` Auger Eric 2020-12-14 13:48 ` Auger Eric 2020-12-14 14:02 ` Alexandru Elisei 2020-12-14 14:02 ` Alexandru Elisei 2020-12-15 9:15 ` Auger Eric 2020-12-15 9:15 ` Auger Eric 2020-12-27 14:41 ` [PATCH 0/5] KVM: arm64: Miscellaneous improvements Marc Zyngier 2020-12-27 14:41 ` Marc Zyngier
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=20201201150157.223625-1-alexandru.elisei@arm.com \ --to=alexandru.elisei@arm.com \ --cc=james.morse@arm.com \ --cc=julien.thierry.kdev@gmail.com \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=maz@kernel.org \ --cc=suzuki.poulose@arm.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.