* [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
@ 2009-11-27 8:46 Sheng Yang
2009-11-30 22:02 ` Marcelo Tosatti
0 siblings, 1 reply; 8+ messages in thread
From: Sheng Yang @ 2009-11-27 8:46 UTC (permalink / raw)
To: Marcelo Tosatti, Avi Kivity; +Cc: kvm, Sheng Yang
Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
supported processors.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
arch/x86/kvm/vmx.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 80367c5..1092e8a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2308,8 +2308,10 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES;
if (vmx->vpid == 0)
exec_control &= ~SECONDARY_EXEC_ENABLE_VPID;
- if (!enable_ept)
+ if (!enable_ept) {
exec_control &= ~SECONDARY_EXEC_ENABLE_EPT;
+ enable_unrestricted_guest = 0;
+ }
if (!enable_unrestricted_guest)
exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST;
if (!ple_gap)
--
1.5.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
2009-11-27 8:46 [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled Sheng Yang
@ 2009-11-30 22:02 ` Marcelo Tosatti
2010-03-17 18:37 ` Alexander Graf
0 siblings, 1 reply; 8+ messages in thread
From: Marcelo Tosatti @ 2009-11-30 22:02 UTC (permalink / raw)
To: Sheng Yang; +Cc: Avi Kivity, kvm
On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote:
> Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
> supported processors.
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
2009-11-30 22:02 ` Marcelo Tosatti
@ 2010-03-17 18:37 ` Alexander Graf
2010-03-18 1:50 ` Sheng Yang
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Graf @ 2010-03-17 18:37 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Sheng Yang, Avi Kivity, kvm
Marcelo Tosatti wrote:
> On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote:
>
>> Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
>> supported processors.
>>
>> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
>>
>
> Applied, thanks.
>
So without this patch kvm breaks with ept=0? Sounds like a stable
candidate to me.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
2010-03-17 18:37 ` Alexander Graf
@ 2010-03-18 1:50 ` Sheng Yang
2010-03-18 5:51 ` Alexander Graf
0 siblings, 1 reply; 8+ messages in thread
From: Sheng Yang @ 2010-03-18 1:50 UTC (permalink / raw)
To: Alexander Graf; +Cc: Marcelo Tosatti, Avi Kivity, kvm
On Thursday 18 March 2010 02:37:10 Alexander Graf wrote:
> Marcelo Tosatti wrote:
> > On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote:
> >> Otherwise would cause VMEntry failure when using ept=0 on unrestricted
> >> guest supported processors.
> >>
> >> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> >
> > Applied, thanks.
>
> So without this patch kvm breaks with ept=0? Sounds like a stable
> candidate to me.
Seems unrestricted guest code isn't in v2.6.31-stable, and v2.6.32 had already
fixed this issue. So it should be fine.
--
regards
Yang, Sheng
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
2010-03-18 1:50 ` Sheng Yang
@ 2010-03-18 5:51 ` Alexander Graf
2010-03-18 5:57 ` Sheng Yang
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Graf @ 2010-03-18 5:51 UTC (permalink / raw)
To: Sheng Yang; +Cc: Marcelo Tosatti, Avi Kivity, kvm
On 18.03.2010, at 02:50, Sheng Yang wrote:
> On Thursday 18 March 2010 02:37:10 Alexander Graf wrote:
>> Marcelo Tosatti wrote:
>>> On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote:
>>>> Otherwise would cause VMEntry failure when using ept=0 on unrestricted
>>>> guest supported processors.
>>>>
>>>> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
>>>
>>> Applied, thanks.
>>
>> So without this patch kvm breaks with ept=0? Sounds like a stable
>> candidate to me.
>
> Seems unrestricted guest code isn't in v2.6.31-stable, and v2.6.32 had already
> fixed this issue. So it should be fine.
Are you sure? I don't see the patch in 2.6.32-stable git.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
2010-03-18 5:51 ` Alexander Graf
@ 2010-03-18 5:57 ` Sheng Yang
0 siblings, 0 replies; 8+ messages in thread
From: Sheng Yang @ 2010-03-18 5:57 UTC (permalink / raw)
To: Alexander Graf; +Cc: Marcelo Tosatti, Avi Kivity, kvm
On Thursday 18 March 2010 13:51:41 Alexander Graf wrote:
> On 18.03.2010, at 02:50, Sheng Yang wrote:
> > On Thursday 18 March 2010 02:37:10 Alexander Graf wrote:
> >> Marcelo Tosatti wrote:
> >>> On Fri, Nov 27, 2009 at 04:46:26PM +0800, Sheng Yang wrote:
> >>>> Otherwise would cause VMEntry failure when using ept=0 on unrestricted
> >>>> guest supported processors.
> >>>>
> >>>> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> >>>
> >>> Applied, thanks.
> >>
> >> So without this patch kvm breaks with ept=0? Sounds like a stable
> >> candidate to me.
> >
> > Seems unrestricted guest code isn't in v2.6.31-stable, and v2.6.32 had
> > already fixed this issue. So it should be fine.
>
> Are you sure? I don't see the patch in 2.6.32-stable git.
Yes, you are right. Found it not in 2.6.32-stable...
Would post a patch for stable.
Thanks
--
regards
Yang, Sheng
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
2010-03-18 6:11 Sheng Yang
@ 2010-04-07 21:49 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2010-04-07 21:49 UTC (permalink / raw)
To: Sheng Yang; +Cc: stable, kvm, Avi Kivity, Marcelo Tosatti, Alexander Graf
On Thu, Mar 18, 2010 at 02:11:19PM +0800, Sheng Yang wrote:
> Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
> supported processors.
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Now included through a different submission.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
@ 2010-03-18 6:11 Sheng Yang
2010-04-07 21:49 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Sheng Yang @ 2010-03-18 6:11 UTC (permalink / raw)
To: Greg KH
Cc: stable, kvm, Avi Kivity, Marcelo Tosatti, Alexander Graf, Sheng Yang
Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
supported processors.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
Please apply this to 2.6.32 stable. Thanks!
Patch already in the upstream, commit:
046d87103addc117f0d397196e85189722d4d7de
arch/x86/kvm/vmx.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 80367c5..1092e8a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2316,8 +2316,10 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES;
if (vmx->vpid == 0)
exec_control &= ~SECONDARY_EXEC_ENABLE_VPID;
- if (!enable_ept)
+ if (!enable_ept) {
exec_control &= ~SECONDARY_EXEC_ENABLE_EPT;
+ enable_unrestricted_guest = 0;
+ }
if (!enable_unrestricted_guest)
exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST;
vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_control);
--
1.5.4.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-07 22:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27 8:46 [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled Sheng Yang
2009-11-30 22:02 ` Marcelo Tosatti
2010-03-17 18:37 ` Alexander Graf
2010-03-18 1:50 ` Sheng Yang
2010-03-18 5:51 ` Alexander Graf
2010-03-18 5:57 ` Sheng Yang
2010-03-18 6:11 Sheng Yang
2010-04-07 21:49 ` Greg KH
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.