All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arthur Chunqi Li <yzt356@gmail.com>
To: kvm@vger.kernel.org
Cc: jan.kiszka@siemens.com, gleb@redhat.com, pbonzini@redhat.com,
	Arthur Chunqi Li <yzt356@gmail.com>
Subject: [PATCH] kvm-unit-tests: VMX: Fix two minor bugs
Date: Wed, 11 Sep 2013 11:11:49 +0800	[thread overview]
Message-ID: <1378869109-14128-1-git-send-email-yzt356@gmail.com> (raw)

This patch just contains two minor changes to EPT framwork.
1. Reorder macro definition
2. Fix bug of setting CPU_EPT without check.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
---
 x86/vmx.h       |    2 +-
 x86/vmx_tests.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/x86/vmx.h b/x86/vmx.h
index e02183f..dc1ebdf 100644
--- a/x86/vmx.h
+++ b/x86/vmx.h
@@ -366,9 +366,9 @@ enum Ctrl0 {
 	CPU_NMI_WINDOW		= 1ul << 22,
 	CPU_IO			= 1ul << 24,
 	CPU_IO_BITMAP		= 1ul << 25,
+	CPU_MSR_BITMAP		= 1ul << 28,
 	CPU_MONITOR		= 1ul << 29,
 	CPU_PAUSE		= 1ul << 30,
-	CPU_MSR_BITMAP		= 1ul << 28,
 	CPU_SECONDARY		= 1ul << 31,
 };
 
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index e891a9f..0759e10 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -925,7 +925,7 @@ static void ept_init()
 	ctrl_cpu[1] = (ctrl_cpu[1] | CPU_EPT)
 		& ctrl_cpu_rev[1].clr;
 	vmcs_write(CPU_EXEC_CTRL0, ctrl_cpu[0]);
-	vmcs_write(CPU_EXEC_CTRL1, ctrl_cpu[1] | CPU_EPT);
+	vmcs_write(CPU_EXEC_CTRL1, ctrl_cpu[1]);
 	if (setup_ept())
 		init_fail = true;
 	data_page1 = alloc_page();
-- 
1.7.9.5


             reply	other threads:[~2013-09-11  3:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11  3:11 Arthur Chunqi Li [this message]
2013-09-11  3:15 ` [PATCH] kvm-unit-tests: VMX: Fix two minor bugs Arthur Chunqi Li
2013-09-11  7:45   ` Paolo Bonzini

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=1378869109-14128-1-git-send-email-yzt356@gmail.com \
    --to=yzt356@gmail.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.