mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] KVM: SVM: Add manipulation functions for CRx intercepts
Date: Thu, 2 Dec 2010 14:43:50 -0200	[thread overview]
Message-ID: <20101202164350.GB23017@amt.cnet> (raw)
In-Reply-To: <1291136641-4874-3-git-send-email-joerg.roedel@amd.com>

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@amd.com>
> ---
>  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().


  reply	other threads:[~2010-12-02 16:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30 17:03 [PATCH 0/6] KVM: SVM: Wrap access to intercept masks into functions Joerg Roedel
2010-11-30 17:03 ` [PATCH 1/6] KVM: SVM: Add function to recalculate intercept masks Joerg Roedel
2010-11-30 17:03 ` [PATCH 2/6] KVM: SVM: Add manipulation functions for CRx intercepts Joerg Roedel
2010-12-02 16:43   ` Marcelo Tosatti [this message]
2010-12-03  9:50     ` Roedel, Joerg
2010-11-30 17:03 ` [PATCH 3/6] KVM: SVM: Add manipulation functions for DRx intercepts Joerg Roedel
2010-11-30 17:03 ` [PATCH 4/6] KVM: SVM: Add manipulation functions for exception intercepts Joerg Roedel
2010-11-30 17:04 ` [PATCH 5/6] KVM: SVM: Add manipulation functions for misc intercepts Joerg Roedel
2010-11-30 17:04 ` [PATCH 6/6] KVM: SVM: Use get_host_vmcb function in svm_get_msr for TSC Joerg Roedel
2010-11-30 17:42 ` [PATCH 0/6] KVM: SVM: Wrap access to intercept masks into functions Avi Kivity
2010-12-01 10:34   ` Roedel, Joerg
2010-12-03 20:23 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101202164350.GB23017@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®