[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLtK09pY1EjOtllS@google.com>
Date: Sat, 5 Jun 2021 18:58:43 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Marc Zyngier <maz@...nel.org>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Suleiman Souhlal <suleiman@...gle.com>, x86@...nel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 2/2] kvm: x86: implement KVM PM-notifier
On (21/06/05 10:00), Marc Zyngier wrote:
[..]
> > + select HAVE_KVM_PM_NOTIFIER
>
> if you write this as:
>
> select HAVE_KVM_PM_NOTIFIER if PM
[..]
> > +#if defined(CONFIG_PM) && defined(CONFIG_HAVE_KVM_PM_NOTIFIER)
>
> ... you can simplify this expression to be a simple
>
> #ifdef CONFIG_HAVE_KVM_PM_NOTIFIER
>
> in both patches.
Thanks.
> > +static int kvm_arch_suspend_notifier(struct kvm *kvm)
> > +{
> > + struct kvm_vcpu *vcpu;
> > + int i, ret;
> > +
> > + mutex_lock(&kvm->lock);
> > + kvm_for_each_vcpu(i, vcpu, kvm) {
> > + ret = kvm_set_guest_paused(vcpu);
> > + if (ret) {
> > + pr_err("Failed to pause guest VCPU%d: %d\n",
> > + vcpu->vcpu_id, ret);
>
> Is it really a good idea to fail suspend when a guest doesn't have PV
> time enabled? I also wonder how useful the pr_err() is, given that it
> contains no information that would help identifying which guest failed
> to pause.
No opinion. What shall we do when we fail to suspend the VM?
VM's watchdogs will trigger and maybe panic the system after
resume.
Powered by blists - more mailing lists