Thread (18 messages) flat view 18 messages, 4 authors, 2020-06-15

Re: [PATCH v1 3/4] KVM: PPC: Book3S HV: migrate remaining normal-GFNs to secure-GFNs in H_SVM_INIT_DONE

From: Bharata B Rao <hidden>
Date: 2020-06-04 02:33:49

On Wed, Jun 03, 2020 at 04:10:25PM -0700, Ram Pai wrote:
On Tue, Jun 02, 2020 at 03:36:39PM +0530, Bharata B Rao wrote:
quoted
On Mon, Jun 01, 2020 at 12:05:35PM -0700, Ram Pai wrote:
quoted
On Mon, Jun 01, 2020 at 05:25:18PM +0530, Bharata B Rao wrote:
quoted
On Sat, May 30, 2020 at 07:27:50PM -0700, Ram Pai wrote:
quoted
H_SVM_INIT_DONE incorrectly assumes that the Ultravisor has explicitly
called H_SVM_PAGE_IN for all secure pages.
I don't think that is quite true. HV doesn't assume anything about
secure pages by itself.
Yes. Currently, it does not assume anything about secure pages.  But I am
proposing that it should consider all pages (except the shared pages) as
secure pages, when H_SVM_INIT_DONE is called.
Ok, then may be also add the proposed changes to H_SVM_INIT_DONE
documentation.
ok.
quoted
quoted
In other words, HV should treat all pages; except shared pages, as
secure pages once H_SVM_INIT_DONE is called. And this includes pages
added subsequently through memory hotplug.
So after H_SVM_INIT_DONE, if HV touches a secure page for any
reason and gets encrypted contents via page-out, HV drops the
device pfn at that time. So what state we would be in that case? We
have completed H_SVM_INIT_DONE, but still have a normal (but encrypted)
page in HV?
Good point.

The corresponding GFN will continue to be a secure GFN. Just that its
backing PFN is not a device-PFN, but a memory-PFN. Also that backing
memory-PFN contains encrypted content.

I will clarify this in the patch; about secure-GFN state.
I feel all this is complicating the states in HV and is avoidable
if UV just issued page-in calls during memslot registration uvcall.

Regards,
Bharata.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help