[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YwvAVtfrF9xLvpM8@google.com>
Date: Sun, 28 Aug 2022 19:21:58 +0000
From: Mingwei Zhang <mizhang@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Oliver Upton <oupton@...gle.com>
Subject: Re: [PATCH 3/5] selftests: KVM: Introduce vcpu_run_interruptable()
On Thu, Aug 25, 2022, Sean Christopherson wrote:
> On Tue, Aug 02, 2022, Mingwei Zhang wrote:
> > Introduce vcpu_run_interruptable() to allow selftests execute their own
> > code when a vcpu is kicked out of KVM_RUN on receiving a POSIX signal.
>
> But that's what __vcpu_run() is for. Clearing "immediate_exit" after KVM_RUN does
> not scream "interruptible" to me.
>
> There's only one user after this series, just clear vcpu->run->immediate_exit
> manually in that test (a comment on _why_ it's cleared would be helpful).
>
hmm. good point. __vcpu_run() I thought it was internal function private
to kvm_util.c, but now after your selftest refactoring, this is useable.
Will use __vcpu_run() instead.
> > +int vcpu_run_interruptable(struct kvm_vcpu *vcpu)
> > +{
> > + int rc;
> > +
> > + rc = __vcpu_run(vcpu);
> > +
> > + vcpu->run->immediate_exit = 0;
> > +
> > + return rc;
> > +}
> > +
> > int _vcpu_run(struct kvm_vcpu *vcpu)
> > {
> > int rc;
> > --
> > 2.37.1.455.g008518b4e5-goog
> >
Powered by blists - more mailing lists