lkml.org 
[lkml]   [2010]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/6] KVM: SVM: Wrap access to intercept masks into functions
On Tue, Nov 30, 2010 at 12:42:28PM -0500, Avi Kivity wrote:
> On 11/30/2010 07:03 PM, Joerg Roedel wrote:
> > Hi Avi, Hi Marcelo,
> >
> > this patchset wraps the access to the intercept vectors in the VMCB into
> > specific functions. There are two reasons for this:
> >
> > 1) In the nested-svm code the effective intercept masks are
> > calculated from the host and the guest intercept masks.
> > Whenever KVM changes the host intercept mask while the VCPU
> > is in guest-mode the effective intercept masks need to be
> > re-calculated. This is nicely wrapped into these functions
> > now and makes the code more robust.
> >
> > 2) These changes make the implementation of the upcoming
> > vmcb-clean-bits feature easier and also more robust (which
> > was the main reason for writing this patchset).
> >
> > These patches were developed on-top of the patch-set I sent yesterday. I
> > tested these patches with various guests (Windows-64, Linux 32,32e and
> > 64 as well as with nested-svm).
> >
>
> Looks good.
>
> One potential issue is that a series of set_intercept()s causes
> recalc_intercepts() to be called multiple times. If it turns out to be
> a problem, we can fix it by having an intercepts dirty bit and
> recalculating during guest entry if the bit is set.
>
> Since it's nested svm only, I doubt we'll see a problem in the short term.

Yes, we can optimize it if it turns out to be a problem. I thought that
these changes happen infrequently enough and that there should be no
more than 2-3 bits changed per exit-entry cycle at all.

Joerg

--
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632



\
 
 \ /
  Last update: 2010-12-01 11:37    [from the cache]
©2003-2011 Jasper Spaans