public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
@ 2013-08-05  9:10 Arthur Chunqi Li
  2013-08-05  9:33 ` Gleb Natapov
  0 siblings, 1 reply; 8+ messages in thread
From: Arthur Chunqi Li @ 2013-08-05  9:10 UTC (permalink / raw)
  To: kvm; +Cc: jan.kiszka, gleb, pbonzini, Arthur Chunqi Li

Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
---
 arch/x86/kvm/vmx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 45fd70c..240f0db 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
 #else
 	nested_vmx_exit_ctls_high = 0;
 #endif
-	nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
+	nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
+		VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
 
 	/* entry controls */
 	rdmsr(MSR_IA32_VMX_ENTRY_CTLS,
-- 
1.7.9.5


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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05  9:10 [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control Arthur Chunqi Li
@ 2013-08-05  9:33 ` Gleb Natapov
  2013-08-05  9:36   ` Gmail
  0 siblings, 1 reply; 8+ messages in thread
From: Gleb Natapov @ 2013-08-05  9:33 UTC (permalink / raw)
  To: Arthur Chunqi Li; +Cc: kvm, jan.kiszka, pbonzini

On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
> 
> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
> ---
>  arch/x86/kvm/vmx.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 45fd70c..240f0db 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>  #else
>  	nested_vmx_exit_ctls_high = 0;
>  #endif
> -	nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
> +	nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
> +		VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
>  
You should not set those if host does not support them, otherwise
GUEST_IA32_PAT may not be available.

--
			Gleb.

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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05  9:33 ` Gleb Natapov
@ 2013-08-05  9:36   ` Gmail
  2013-08-05 10:38     ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Gmail @ 2013-08-05  9:36 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm@vger.kernel.org, jan.kiszka@web.de, pbonzini@redhat.com



> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
>> 
>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
>> ---
>> arch/x86/kvm/vmx.c |    3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>> index 45fd70c..240f0db 100644
>> --- a/arch/x86/kvm/vmx.c
>> +++ b/arch/x86/kvm/vmx.c
>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>> #else
>>    nested_vmx_exit_ctls_high = 0;
>> #endif
>> -    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
>> +    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
>> +        VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
>> 
> You should not set those if host does not support them, otherwise
> GUEST_IA32_PAT may not be available
To Jan,
Is this different from IA32_EFER?

Arthur
> 
> --
>            Gleb.

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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05  9:36   ` Gmail
@ 2013-08-05 10:38     ` Jan Kiszka
  2013-08-05 10:55       ` Gleb Natapov
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2013-08-05 10:38 UTC (permalink / raw)
  To: Gmail; +Cc: Gleb Natapov, kvm@vger.kernel.org, pbonzini@redhat.com

[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]

On 2013-08-05 11:36, Gmail wrote:
> 
> 
>> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
>>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
>>>
>>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
>>> ---
>>> arch/x86/kvm/vmx.c |    3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>>> index 45fd70c..240f0db 100644
>>> --- a/arch/x86/kvm/vmx.c
>>> +++ b/arch/x86/kvm/vmx.c
>>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>>> #else
>>>    nested_vmx_exit_ctls_high = 0;
>>> #endif
>>> -    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
>>> +    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
>>> +        VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
>>>
>> You should not set those if host does not support them, otherwise
>> GUEST_IA32_PAT may not be available
> To Jan,
> Is this different from IA32_EFER?

As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do
depend on the existence of the host feature. So my patch requires an
update as you noted.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05 10:38     ` Jan Kiszka
@ 2013-08-05 10:55       ` Gleb Natapov
  2013-08-05 11:00         ` Arthur Chunqi Li
  0 siblings, 1 reply; 8+ messages in thread
From: Gleb Natapov @ 2013-08-05 10:55 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Gmail, kvm@vger.kernel.org, pbonzini@redhat.com

On Mon, Aug 05, 2013 at 12:38:32PM +0200, Jan Kiszka wrote:
> On 2013-08-05 11:36, Gmail wrote:
> > 
> > 
> >> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
> >>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
> >>>
> >>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
> >>> ---
> >>> arch/x86/kvm/vmx.c |    3 ++-
> >>> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> >>> index 45fd70c..240f0db 100644
> >>> --- a/arch/x86/kvm/vmx.c
> >>> +++ b/arch/x86/kvm/vmx.c
> >>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
> >>> #else
> >>>    nested_vmx_exit_ctls_high = 0;
> >>> #endif
> >>> -    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
> >>> +    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
> >>> +        VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
> >>>
> >> You should not set those if host does not support them, otherwise
> >> GUEST_IA32_PAT may not be available
> > To Jan,
> > Is this different from IA32_EFER?
> 
> As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do
> depend on the existence of the host feature. So my patch requires an
> update as you noted.
> 
Your patch didn't add new users of GUEST_IA32_PAT and
VM_ENTRY_LOAD_IA32_PAT is enabled by nested only if host has it, so I am
not sure why you are saying that patch should be updated.


--
			Gleb.

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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05 10:55       ` Gleb Natapov
@ 2013-08-05 11:00         ` Arthur Chunqi Li
  2013-08-05 11:04           ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Arthur Chunqi Li @ 2013-08-05 11:00 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: Jan Kiszka, kvm@vger.kernel.org, pbonzini@redhat.com

On Mon, Aug 5, 2013 at 6:55 PM, Gleb Natapov <gleb@redhat.com> wrote:
> On Mon, Aug 05, 2013 at 12:38:32PM +0200, Jan Kiszka wrote:
>> On 2013-08-05 11:36, Gmail wrote:
>> >
>> >
>> >> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
>> >>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
>> >>>
>> >>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
>> >>> ---
>> >>> arch/x86/kvm/vmx.c |    3 ++-
>> >>> 1 file changed, 2 insertions(+), 1 deletion(-)
>> >>>
>> >>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>> >>> index 45fd70c..240f0db 100644
>> >>> --- a/arch/x86/kvm/vmx.c
>> >>> +++ b/arch/x86/kvm/vmx.c
>> >>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>> >>> #else
>> >>>    nested_vmx_exit_ctls_high = 0;
>> >>> #endif
>> >>> -    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
>> >>> +    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
>> >>> +        VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
>> >>>
>> >> You should not set those if host does not support them, otherwise
>> >> GUEST_IA32_PAT may not be available
>> > To Jan,
>> > Is this different from IA32_EFER?
>>
>> As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do
>> depend on the existence of the host feature. So my patch requires an
>> update as you noted.
>>
> Your patch didn't add new users of GUEST_IA32_PAT and
> VM_ENTRY_LOAD_IA32_PAT is enabled by nested only if host has it, so I am
> not sure why you are saying that patch should be updated.
I think Jan points [1] and you refer to another.

[1] http://www.mail-archive.com/kvm@vger.kernel.org/msg94188.html

Arthur
>
>
> --
>                         Gleb.

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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05 11:00         ` Arthur Chunqi Li
@ 2013-08-05 11:04           ` Jan Kiszka
  2013-08-05 11:05             ` Gleb Natapov
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2013-08-05 11:04 UTC (permalink / raw)
  To: Arthur Chunqi Li; +Cc: Gleb Natapov, kvm@vger.kernel.org, pbonzini@redhat.com

[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]

On 2013-08-05 13:00, Arthur Chunqi Li wrote:
> On Mon, Aug 5, 2013 at 6:55 PM, Gleb Natapov <gleb@redhat.com> wrote:
>> On Mon, Aug 05, 2013 at 12:38:32PM +0200, Jan Kiszka wrote:
>>> On 2013-08-05 11:36, Gmail wrote:
>>>>
>>>>
>>>>> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
>>>>>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
>>>>>>
>>>>>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
>>>>>> ---
>>>>>> arch/x86/kvm/vmx.c |    3 ++-
>>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>>>>>> index 45fd70c..240f0db 100644
>>>>>> --- a/arch/x86/kvm/vmx.c
>>>>>> +++ b/arch/x86/kvm/vmx.c
>>>>>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>>>>>> #else
>>>>>>    nested_vmx_exit_ctls_high = 0;
>>>>>> #endif
>>>>>> -    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
>>>>>> +    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
>>>>>> +        VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
>>>>>>
>>>>> You should not set those if host does not support them, otherwise
>>>>> GUEST_IA32_PAT may not be available
>>>> To Jan,
>>>> Is this different from IA32_EFER?
>>>
>>> As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do
>>> depend on the existence of the host feature. So my patch requires an
>>> update as you noted.
>>>
>> Your patch didn't add new users of GUEST_IA32_PAT and
>> VM_ENTRY_LOAD_IA32_PAT is enabled by nested only if host has it, so I am
>> not sure why you are saying that patch should be updated.
> I think Jan points [1] and you refer to another.
> 
> [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg94188.html

Yep, that's what I was referring to.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

* Re: [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control
  2013-08-05 11:04           ` Jan Kiszka
@ 2013-08-05 11:05             ` Gleb Natapov
  0 siblings, 0 replies; 8+ messages in thread
From: Gleb Natapov @ 2013-08-05 11:05 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Arthur Chunqi Li, kvm@vger.kernel.org, pbonzini@redhat.com

On Mon, Aug 05, 2013 at 01:04:25PM +0200, Jan Kiszka wrote:
> On 2013-08-05 13:00, Arthur Chunqi Li wrote:
> > On Mon, Aug 5, 2013 at 6:55 PM, Gleb Natapov <gleb@redhat.com> wrote:
> >> On Mon, Aug 05, 2013 at 12:38:32PM +0200, Jan Kiszka wrote:
> >>> On 2013-08-05 11:36, Gmail wrote:
> >>>>
> >>>>
> >>>>> On Mon, Aug 05, 2013 at 05:10:35PM +0800, Arthur Chunqi Li wrote:
> >>>>>> Advertise VM_EXIT_SAVE_IA32_PAT and VM_EXIT_LOAD_IA32_PAT.
> >>>>>>
> >>>>>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
> >>>>>> ---
> >>>>>> arch/x86/kvm/vmx.c |    3 ++-
> >>>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>>>>>
> >>>>>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> >>>>>> index 45fd70c..240f0db 100644
> >>>>>> --- a/arch/x86/kvm/vmx.c
> >>>>>> +++ b/arch/x86/kvm/vmx.c
> >>>>>> @@ -2198,7 +2198,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
> >>>>>> #else
> >>>>>>    nested_vmx_exit_ctls_high = 0;
> >>>>>> #endif
> >>>>>> -    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR;
> >>>>>> +    nested_vmx_exit_ctls_high |= VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
> >>>>>> +        VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
> >>>>>>
> >>>>> You should not set those if host does not support them, otherwise
> >>>>> GUEST_IA32_PAT may not be available
> >>>> To Jan,
> >>>> Is this different from IA32_EFER?
> >>>
> >>> As we use a real VMCS to keep GUEST/HOST_IA32_EFER, we actually do
> >>> depend on the existence of the host feature. So my patch requires an
> >>> update as you noted.
> >>>
> >> Your patch didn't add new users of GUEST_IA32_PAT and
> >> VM_ENTRY_LOAD_IA32_PAT is enabled by nested only if host has it, so I am
> >> not sure why you are saying that patch should be updated.
> > I think Jan points [1] and you refer to another.
> > 
> > [1] http://www.mail-archive.com/kvm@vger.kernel.org/msg94188.html
> 
> Yep, that's what I was referring to.
> 
Ah, too many patches :)

--
			Gleb.

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

end of thread, other threads:[~2013-08-05 11:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05  9:10 [PATCH] KVM: nVMX: Advertise IA32_PAT in VM exit control Arthur Chunqi Li
2013-08-05  9:33 ` Gleb Natapov
2013-08-05  9:36   ` Gmail
2013-08-05 10:38     ` Jan Kiszka
2013-08-05 10:55       ` Gleb Natapov
2013-08-05 11:00         ` Arthur Chunqi Li
2013-08-05 11:04           ` Jan Kiszka
2013-08-05 11:05             ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox