From: Joerg Roedel <joerg.roedel@amd.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 06/12] KVM: SVM: Add clean-bit for NPT state
Date: Fri, 3 Dec 2010 11:45:53 +0100 [thread overview]
Message-ID: <1291373159-4822-7-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1291373159-4822-1-git-send-email-joerg.roedel@amd.com>
This patch implements the clean-bit for all nested paging
related state in the vmcb.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kvm/svm.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index b81d31a..3b5d894 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -191,6 +191,7 @@ enum {
VMCB_PERM_MAP, /* IOPM Base and MSRPM Base */
VMCB_ASID, /* ASID */
VMCB_INTR, /* int_ctl, int_vector */
+ VMCB_NPT, /* npt_en, nCR3, gPAT */
VMCB_DIRTY_MAX,
};
@@ -1749,6 +1750,7 @@ static void nested_svm_set_tdp_cr3(struct kvm_vcpu *vcpu,
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->control.nested_cr3 = root;
+ mark_dirty(svm->vmcb, VMCB_NPT);
force_new_asid(vcpu);
}
@@ -3552,6 +3554,7 @@ static void set_tdp_cr3(struct kvm_vcpu *vcpu, unsigned long root)
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->control.nested_cr3 = root;
+ mark_dirty(svm->vmcb, VMCB_NPT);
/* Also sync guest cr3 here in case we live migrate */
svm->vmcb->save.cr3 = vcpu->arch.cr3;
--
1.7.1
next prev parent reply other threads:[~2010-12-03 10:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 10:45 [PATCH 0/12] KVM: SVM: Add support for VMCB state caching Joerg Roedel
2010-12-03 10:45 ` [PATCH 01/12] KVM: SVM: Add clean-bits infrastructure code Joerg Roedel
2010-12-03 12:15 ` Roedel, Joerg
2010-12-03 10:45 ` [PATCH 02/12] KVM: SVM: Add clean-bit for intercetps, tsc-offset and pause filter count Joerg Roedel
2010-12-03 10:45 ` [PATCH 03/12] KVM: SVM: Add clean-bit for IOPM_BASE and MSRPM_BASE Joerg Roedel
2010-12-03 10:45 ` [PATCH 04/12] KVM: SVM: Add clean-bit for the ASID Joerg Roedel
2010-12-03 10:45 ` [PATCH 05/12] KVM: SVM: Add clean-bit for interrupt state Joerg Roedel
2010-12-06 19:29 ` Marcelo Tosatti
2010-12-07 8:23 ` Joerg Roedel
2010-12-03 10:45 ` Joerg Roedel [this message]
2010-12-03 10:45 ` [PATCH 07/12] KVM: SVM: Add clean-bit for control registers Joerg Roedel
2010-12-03 10:45 ` [PATCH 08/12] KVM: SVM: Add clean-bit for DR6 and DR7 Joerg Roedel
2010-12-03 10:45 ` [PATCH 09/12] KVM: SVM: Add clean-bit for GDT and IDT Joerg Roedel
2010-12-03 10:45 ` [PATCH 10/12] KVM: SVM: Add clean-bit for Segements and CPL Joerg Roedel
2010-12-03 10:45 ` [PATCH 11/12] KVM: SVM: Add clean-bit for CR2 register Joerg Roedel
2010-12-03 10:45 ` [PATCH 12/12] KVM: SVM: Add clean-bit for LBR state Joerg Roedel
2010-12-06 19:49 ` [PATCH 0/12] KVM: SVM: Add support for VMCB state caching Marcelo Tosatti
2010-12-07 8:26 ` Joerg Roedel
2010-12-07 9:50 ` Avi Kivity
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=1291373159-4822-7-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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