[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8735au3ap2.fsf@stealth>
Date: Mon, 07 Nov 2022 18:02:01 +0000
From: Punit Agrawal <punit.agrawal@...edance.com>
To: Usama Arif <usama.arif@...edance.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.cs.columbia.edu, kvm@...r.kernel.org,
linux-doc@...r.kernel.org,
virtualization@...ts.linux-foundation.org, linux@...linux.org.uk,
yezengruan@...wei.com, catalin.marinas@....com, will@...nel.org,
maz@...nel.org, steven.price@....com, mark.rutland@....com,
bagasdotme@...il.com, fam.zheng@...edance.com,
liangma@...ngbit.com, punit.agrawal@...edance.com
Subject: Re: [v2 3/6] KVM: arm64: Support pvlock preempted via shared structure
Usama Arif <usama.arif@...edance.com> writes:
> Implement the service call for configuring a shared structure between a
> VCPU and the hypervisor in which the hypervisor can tell whether the
> VCPU is running or not.
>
> The preempted field is zero if the VCPU is not preempted.
> Any other value means the VCPU has been preempted.
>
> Signed-off-by: Zengruan Ye <yezengruan@...wei.com>
> Signed-off-by: Usama Arif <usama.arif@...edance.com>
> ---
> Documentation/virt/kvm/arm/hypercalls.rst | 3 ++
> arch/arm64/include/asm/kvm_host.h | 18 ++++++++++
> arch/arm64/include/uapi/asm/kvm.h | 1 +
> arch/arm64/kvm/Makefile | 2 +-
> arch/arm64/kvm/arm.c | 8 +++++
> arch/arm64/kvm/hypercalls.c | 8 +++++
> arch/arm64/kvm/pvlock.c | 43 +++++++++++++++++++++++
> tools/arch/arm64/include/uapi/asm/kvm.h | 1 +
> 8 files changed, 83 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm64/kvm/pvlock.c
>
> diff --git a/Documentation/virt/kvm/arm/hypercalls.rst b/Documentation/virt/kvm/arm/hypercalls.rst
> index 3e23084644ba..872a16226ace 100644
> --- a/Documentation/virt/kvm/arm/hypercalls.rst
> +++ b/Documentation/virt/kvm/arm/hypercalls.rst
> @@ -127,6 +127,9 @@ The pseudo-firmware bitmap register are as follows:
> Bit-1: KVM_REG_ARM_VENDOR_HYP_BIT_PTP:
> The bit represents the Precision Time Protocol KVM service.
>
> + Bit-2: KVM_REG_ARM_VENDOR_HYP_BIT_PV_LOCK:
> + The bit represents the Paravirtualized lock service.
> +
> Errors:
>
> ======= =============================================================
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 45e2136322ba..18303b30b7e9 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -417,6 +417,11 @@ struct kvm_vcpu_arch {
> u64 last_steal;
> gpa_t base;
> } steal;
> +
> + /* Guest PV lock state */
> + struct {
> + gpa_t base;
> + } pv;
Using "pv" for the structure isn't quite describing the usage well. It'd
be better to call it "pv_lock" or "pvlock" at the least.
[...]
Powered by blists - more mailing lists