Re: [PATCH 2/6] KVM: SVM: Add manipulation functions for CRxintercepts

From: Roedel, Joerg
Date: Fri Dec 03 2010 - 04:51:09 EST


On Thu, Dec 02, 2010 at 11:43:50AM -0500, Marcelo Tosatti wrote:
> On Tue, Nov 30, 2010 at 06:03:57PM +0100, Joerg Roedel wrote:
> > - control->intercept_cr_read = INTERCEPT_CR0_MASK |
> > - INTERCEPT_CR3_MASK |
> > - INTERCEPT_CR4_MASK;
> > -
> > - control->intercept_cr_write = INTERCEPT_CR0_MASK |
> > - INTERCEPT_CR3_MASK |
> > - INTERCEPT_CR4_MASK |
> > - INTERCEPT_CR8_MASK;
> > + set_cr_intercept(svm, INTERCEPT_CR0_READ);
> > + set_cr_intercept(svm, INTERCEPT_CR3_READ);
> > + set_cr_intercept(svm, INTERCEPT_CR4_READ);
> > + set_cr_intercept(svm, INTERCEPT_CR0_WRITE);
> > + set_cr_intercept(svm, INTERCEPT_CR3_WRITE);
> > + set_cr_intercept(svm, INTERCEPT_CR4_WRITE);
> > + set_cr_intercept(svm, INTERCEPT_CR8_WRITE);
>
> Should clear hflags before using is_guest_mode().

Right, thanks. Here is the updated patch.