[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHVum0cnj+bWwAwDeEj+MrqNNbWEYAW5k=-GWVJpm4g8sQ9-Xw@mail.gmail.com>
Date: Mon, 24 Oct 2022 13:24:01 -0700
From: Vipin Sharma <vipinsh@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>, pbonzini@...hat.com,
dmatlack@...gle.com, kvm@...r.kernel.org, shujunxue@...gle.com,
terrytaehyun@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] Add Hyperv extended hypercall support in KVM
On Mon, Oct 24, 2022 at 12:36 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Mon, Oct 24, 2022, Vipin Sharma wrote:
> > On Mon, Oct 24, 2022 at 8:22 AM Sean Christopherson <seanjc@...gle.com> wrote:
> > >
> > > On Mon, Oct 24, 2022, Vitaly Kuznetsov wrote:
> > > enable():
> > >
> > > case KVM_CAP_HYPERV_EXT_CALL:
> > > r = -EINVAL;
> > > if (mask & ~KVM_SUPPORTED_HYPERV_EXT_CALL)
> > > break;
> > >
> > > mutex_lock(&kvm->lock);
> > > if (!kvm->created_vcpus) {
> >
> > Any reason for setting capability only after vcpus are created?
>
> This only allows setting the capability _before_ vCPUs are created. Attempting
> to set the cap after vCPUs are created gets rejected with -EINVAL. This
> requirement means vCPUs don't need to take a lock to consume per-VM state, as KVM
> prevents the state from changing once vCPUs are created.
I totally misread the condition and didn't notice the '!' in the if()
statement.
Thanks for the feedback.
Powered by blists - more mailing lists