lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 08/12] KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest
On Mon, 9 Oct 2023, Raghavendra Rao Ananta wrote:
> +static int set_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r,
> + u64 val)
> +{
> + struct kvm *kvm = vcpu->kvm;
> + u64 new_n, mutable_mask;
> +
> + mutex_lock(&kvm->arch.config_lock);
> +
> + /*
> + * Make PMCR immutable once the VM has started running, but do
> + * not return an error (-EBUSY) to meet the existing expectations.
> + */

Why should we mention which error we're _not_ returning?


> + if (kvm_vm_has_ran_once(vcpu->kvm)) {
> + mutex_unlock(&kvm->arch.config_lock);
> + return 0;
> + }

\
 
 \ /
  Last update: 2023-10-17 17:53    [W:0.196 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site