linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: kvm-ppc@vger.kernel.org, Bharata B Rao <bharata@linux.ibm.com>,
	linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V3 2/2] KVM: PPC: Implement H_SVM_INIT_ABORT hcall
Date: Thu, 2 Jan 2020 18:20:17 -0800	[thread overview]
Message-ID: <20200103022017.GF5556@oc0525413822.ibm.com> (raw)
In-Reply-To: <20200103003233.GA16216@us.ibm.com>

On Thu, Jan 02, 2020 at 04:32:33PM -0800, Sukadev Bhattiprolu wrote:
> Ram Pai [linuxram@us.ibm.com] wrote:
> > > +unsigned long kvmppc_h_svm_init_abort(struct kvm *kvm)
> > > +{
> > > +	int i;
> > > +
> > > +	if (!(kvm->arch.secure_guest & KVMPPC_SECURE_INIT_START))
> > > +		return H_UNSUPPORTED;
> > 
> > It should also return H_UNSUPPORTED when 
> > (kvm->arch.secure_guest & KVMPPC_SECURE_INIT_DONE) is true.
> 
> If KVMPPC_SECURE_INIT_DONE is set, KVMPPC_SECURE_INIT_START is also
> set - we never clear KVMPPC_SECURE_INIT_START right?

I am concerned about the case, where the VM has successfully
transitioned into a SVM, where both KVMPPC_SECURE_INIT_DONE and
KVMPPC_SECURE_INIT_START are set.

In this scenario, if the UV makes a H_SVM_INIT_ABORT hcall, the
Hypervisor will not return H_UNSUPPORTED, because
KVMPPC_SECURE_INIT_START is set.

That is the reason, I think, we need to add another check as below.

if (kvm->arch.secure_guest & KVMPPC_SECURE_INIT_DONE)
	return H_UNSUPPORTED;



> 
> Sukadev

-- 
Ram Pai


  reply	other threads:[~2020-01-03  2:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15  2:11 [PATCH V3 1/2] KVM: PPC: Add skip_page_out parameter Sukadev Bhattiprolu
2019-12-15  2:12 ` [PATCH V3 2/2] KVM: PPC: Implement H_SVM_INIT_ABORT hcall Sukadev Bhattiprolu
2019-12-16  3:29   ` Bharata B Rao
2019-12-19 21:50     ` Sukadev Bhattiprolu
2019-12-18  5:36   ` Paul Mackerras
2019-12-19 21:51     ` Sukadev Bhattiprolu
2020-01-03  0:18   ` Ram Pai
2020-01-03  0:32     ` Sukadev Bhattiprolu
2020-01-03  2:20       ` Ram Pai [this message]
2019-12-18  5:32 ` [PATCH V3 1/2] KVM: PPC: Add skip_page_out parameter Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200103022017.GF5556@oc0525413822.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=bharata@linux.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sukadev@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).