[RFC PATCH v3 01/29] KVM: arm64: Add has_reset_once flag for vcpu

Marc Zyngier maz at kernel.org
Sun Nov 21 04:36:38 PST 2021


On Wed, 17 Nov 2021 06:43:31 +0000,
Reiji Watanabe <reijiw at google.com> wrote:
> 
> Introduce 'has_reset_once' flag in kvm_vcpu_arch, which indicates
> if the vCPU reset has been done once, for later use.

It would be nice if you could at least hint at what this flag is going
to be used for, as being able to reset a vcpu as often as userspace
wants it is part of the KVM ABI.

> 
> Signed-off-by: Reiji Watanabe <reijiw at google.com>
> Reviewed-by: Oliver Upton <oupton at google.com>
> ---
>  arch/arm64/include/asm/kvm_host.h | 2 ++
>  arch/arm64/kvm/reset.c            | 4 ++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 2a5f7f38006f..edbe2cb21947 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -385,6 +385,7 @@ struct kvm_vcpu_arch {
>  		u64 last_steal;
>  		gpa_t base;
>  	} steal;
> +	bool has_reset_once;

Why can't this be a new flag (part of the vcpu->arch.flags set) rather
than a discrete bool?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list