lkml.org 
[lkml]   [2020]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 62/70] x86/kvm: Add KVM specific VMMCALL handling under SEV-ES
On Fri, Mar 20, 2020 at 02:23:58PM -0700, David Rientjes wrote:
> On Thu, 19 Mar 2020, Joerg Roedel wrote:
> > +#if defined(CONFIG_AMD_MEM_ENCRYPT)
> > +static void kvm_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs)
> > +{
> > + /* RAX and CPL are already in the GHCB */
> > + ghcb_set_rbx(ghcb, regs->bx);
> > + ghcb_set_rcx(ghcb, regs->cx);
> > + ghcb_set_rdx(ghcb, regs->dx);
> > + ghcb_set_rsi(ghcb, regs->si);
>
> Is it possible to check the hypercall from RAX and only copy the needed
> regs or is there a requirement that they must all be copied
> unconditionally?

No, there is no such requirement. This could be optimized with hypercall
specific knowledge as it is in the KVM code anyway.

Regards,

Joerg

\
 
 \ /
  Last update: 2020-03-20 23:23    [W:0.092 / U:9.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site