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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 30, 2010 at 06:03:57PM +0100, Joerg Roedel wrote:
> This patch wraps changes to the CRx intercepts of SVM into
> seperate functions to abstract nested-svm better and prepare
> the implementation of the vmcb-clean-bits feature.
> 
> Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
> ---
>  arch/x86/include/asm/svm.h |   15 +++--
>  arch/x86/kvm/svm.c         |  119 +++++++++++++++++++++++---------------------
>  2 files changed, 72 insertions(+), 62 deletions(-)
> 

> -	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().

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux