[lkml]   [2020]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 8/8] KVM: nSVM: implement ondemand allocation of the nested state
On 27/08/20 19:11, Maxim Levitsky wrote:
> + hsave_page = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
> + if (!hsave_page)
> + goto error;
> +

I think an error here should be just an internal error userspace exit,
or a -ENOMEM from KVM_RUN; not a #GP in the guest[1]. However, that's
difficult to plug into KVM. Can you instead allocate nested state if
KVM_SET_CPUID2 sets the SVM bit? Returning -ENOMEM from KVM_SET_CPUID2
is more likely to be something that userspace copes with.

I queued patches 1-5, and 7 for 5.9-rc.


[1] Though in practice an order 0 allocation will never fail

 \ /
  Last update: 2020-09-12 18:33    [W:0.064 / U:1.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site