All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm-unit-tests: VMX: Fix two minor bugs
@ 2013-09-11  3:11 Arthur Chunqi Li
  2013-09-11  3:15 ` Arthur Chunqi Li
  0 siblings, 1 reply; 3+ messages in thread
From: Arthur Chunqi Li @ 2013-09-11  3:11 UTC (permalink / raw)
  To: kvm; +Cc: jan.kiszka, gleb, pbonzini, Arthur Chunqi Li

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm-unit-tests: VMX: Fix two minor bugs
  2013-09-11  3:11 [PATCH] kvm-unit-tests: VMX: Fix two minor bugs Arthur Chunqi Li
@ 2013-09-11  3:15 ` Arthur Chunqi Li
  2013-09-11  7:45   ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Arthur Chunqi Li @ 2013-09-11  3:15 UTC (permalink / raw)
  To: kvm; +Cc: Jan Kiszka, Gleb Natapov, Paolo Bonzini, Arthur Chunqi Li

Hi Paolo,

Sorry but I should trouble you merging these two minor changes to vmx branch.

Until now, all the commits in vmx branch seems fine (if others have no
comments). Because I have some patches to commit based on vmx branch,
should we merge this branch to master or I just commit patches based
on vmx?

Thanks,
Arthur

On Wed, Sep 11, 2013 at 11:11 AM, Arthur Chunqi Li <yzt356@gmail.com> wrote:
> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm-unit-tests: VMX: Fix two minor bugs
  2013-09-11  3:15 ` Arthur Chunqi Li
@ 2013-09-11  7:45   ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2013-09-11  7:45 UTC (permalink / raw)
  To: Arthur Chunqi Li; +Cc: kvm, Jan Kiszka, Gleb Natapov

Il 11/09/2013 05:15, Arthur Chunqi Li ha scritto:
> Hi Paolo,
> 
> Sorry but I should trouble you merging these two minor changes to vmx branch.
> 
> Until now, all the commits in vmx branch seems fine (if others have no
> comments). Because I have some patches to commit based on vmx branch,
> should we merge this branch to master or I just commit patches based
> on vmx?

Please send patches based on vmx, otherwise review becomes very very
hard.  When everything is ready, we'll squash the fixes and merge to
master.  Until then, vmx will _not_ be rebased so you can use it for
development.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-11  7:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11  3:11 [PATCH] kvm-unit-tests: VMX: Fix two minor bugs Arthur Chunqi Li
2013-09-11  3:15 ` Arthur Chunqi Li
2013-09-11  7:45   ` Paolo Bonzini

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.