[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZTG7g7__AgUBbWIk@google.com>
Date: Thu, 19 Oct 2023 16:28:03 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Jinrong Liang <ljr.kernel@...il.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Like Xu <likexu@...cent.com>,
David Matlack <dmatlack@...gle.com>,
Aaron Lewis <aaronlewis@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jinrong Liang <cloudliang@...cent.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/9] KVM: selftests: Add vcpu_set_cpuid_property() to
set properties
On Mon, Sep 11, 2023, Jinrong Liang wrote:
> From: Jinrong Liang <cloudliang@...cent.com>
>
> Add vcpu_set_cpuid_property() helper function for setting properties,
> which simplifies the process of setting CPUID properties for vCPUs.
>
> Suggested-by: Sean Christopherson <seanjc@...gle.com>
> Signed-off-by: Jinrong Liang <cloudliang@...cent.com>
> ---
> .../selftests/kvm/include/x86_64/processor.h | 4 ++++
> tools/testing/selftests/kvm/lib/x86_64/processor.c | 14 ++++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
> index 4fd042112526..6b146e1c6736 100644
> --- a/tools/testing/selftests/kvm/include/x86_64/processor.h
> +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
> @@ -973,6 +973,10 @@ static inline void vcpu_set_cpuid(struct kvm_vcpu *vcpu)
>
> void vcpu_set_cpuid_maxphyaddr(struct kvm_vcpu *vcpu, uint8_t maxphyaddr);
>
> +void vcpu_set_cpuid_property(struct kvm_vcpu *vcpu,
> + struct kvm_x86_cpu_property property,
> + uint32_t value);
The vcpu_set_cpuid_maxphyaddr() helper right above this can and should be converted
as part of this patch. X86_PROPERTY_MAX_PHY_ADDR is already defined, i.e. it's a
trivial conversion, and that way there's an immediate user of the the new helper.
Powered by blists - more mailing lists