lkml.org 
[lkml]   [2017]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Part1 PATCH v6 16/17] X86/KVM: Decrypt shared per-cpu variables when SEV is active
On Tue, Oct 17, 2017 at 06:54:52AM -0500, Brijesh Singh wrote:
> Will do. Do you want me to send v7 with that addressed. Because this
> require changes in 3 patches (PATCH 14, 16, 17)

Just send me those three first as a reply to the thread so that I can
test the whole queue everywhere. Or even better, point me to the v7 git
branch once you have it ready.

> The second call is for UP cases. The kvm_smp_prepapre_boot_cpu() is
> called only when CONFIG_SMP is enabled. Am I missing something ?

Yes, you are.

kvm_guest_init() gets called unconditionally from setup_arch(). But then
you said kvm_guest_init() is called before setup_per_cpu_areas() so why
do you need that call there at all? percpu areas are not ready yet, what
makes them ready in the UP case?

IOW, this sev_map_percpu_data() needs to happen only once, during boot.
So call it only once by finding the right spot and not by adding a
second call for the UP case.

AFAICT, it looks the easiest if you put it in kvm_guest_cpu_init() and
do something like:

if (smp_processor_id() == boot_cpu_data.cpu_index)
sev_map_percpu_data();

...

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2017-10-17 15:37    [W:0.103 / U:3.228 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site