Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: kvm <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer
Date: Sun, 25 Aug 2013 09:44:43 +0200	[thread overview]
Message-ID: <5219B5EB.9050900@web.de> (raw)
In-Reply-To: <CABpY8MJox6Vepmrpqb-j+72L3bY0Ss44sbzCUK1uB1H6BaARLg@mail.gmail.com>

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

On 2013-08-25 09:37, Arthur Chunqi Li wrote:
> On Sun, Aug 25, 2013 at 3:28 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2013-08-25 09:24, Arthur Chunqi Li wrote:
>>> On Sun, Aug 25, 2013 at 2:44 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>>>> On 2013-08-24 20:44, root wrote:
>>>>> This patch contains the following two changes:
>>>>> 1. Fix the bug in nested preemption timer support. If vmexit L2->L0
>>>>> with some reasons not emulated by L1, preemption timer value should
>>>>> be save in such exits.
>>>>> 2. Add support of "Save VMX-preemption timer value" VM-Exit controls
>>>>> to nVMX.
>>>>>
>>>>> With this patch, nested VMX preemption timer features are fully
>>>>> supported.
>>>>>
>>>>> Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
>>>>> ---
>>>>>  arch/x86/kvm/vmx.c |   30 +++++++++++++++++++++++++-----
>>>>>  1 file changed, 25 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
>>>>> index 57b4e12..9579409 100644
>>>>> --- a/arch/x86/kvm/vmx.c
>>>>> +++ b/arch/x86/kvm/vmx.c
>>>>> @@ -2204,7 +2204,8 @@ static __init void nested_vmx_setup_ctls_msrs(void)
>>>>>  #ifdef CONFIG_X86_64
>>>>>               VM_EXIT_HOST_ADDR_SPACE_SIZE |
>>>>>  #endif
>>>>> -             VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT;
>>>>> +             VM_EXIT_LOAD_IA32_PAT | VM_EXIT_SAVE_IA32_PAT |
>>>>> +             VM_EXIT_SAVE_VMX_PREEMPTION_TIMER;
>>>>>       nested_vmx_exit_ctls_high |= (VM_EXIT_ALWAYSON_WITHOUT_TRUE_MSR |
>>>>>                                     VM_EXIT_LOAD_IA32_EFER);
>>>>
>>>> In the absence of VM_EXIT_SAVE_VMX_PREEMPTION_TIMER, you need to hide
>>>> PIN_BASED_VMX_PREEMPTION_TIMER from the guest as we cannot emulate its
>>>> behavior properly in that case.
> Besides, we need to test that in the absence of
> PIN_BASED_VMX_PREEMPTION_TIMER, we need to hide
> VM_EXIT_SAVE_VMX_PREEMPTION_TIMER, though this should not happen
> according to Intel SDM.

If the SDM guarantees this for us, we don't need such a safety measure.
Otherwise, it should be added, yes.

Jan



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

  reply	other threads:[~2013-08-25  7:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-24 18:44 [PATCH] KVM: nVMX: Fully support of nested VMX preemption timer root
2013-08-25  6:44 ` Jan Kiszka
2013-08-25  7:24   ` Arthur Chunqi Li
2013-08-25  7:28     ` Jan Kiszka
2013-08-25  7:37       ` Arthur Chunqi Li
2013-08-25  7:44         ` Jan Kiszka [this message]
2013-08-25  7:49           ` Arthur Chunqi Li
2013-08-25  7:37   ` Abel Gordon
2013-08-25  7:42     ` Arthur Chunqi Li
2013-08-25  7:43     ` Jan Kiszka
2013-08-25  7:50       ` Abel Gordon
2013-08-25  7:54         ` Jan Kiszka
2013-08-25  8:18           ` Abel Gordon
2013-08-25  8:25             ` Jan Kiszka
2013-08-25  8:27               ` Jan Kiszka
2013-08-25  8:39                 ` Abel Gordon
2013-08-25  8:41             ` Arthur Chunqi Li
2013-08-25  8:53               ` Jan Kiszka
2013-08-25  9:07                 ` Arthur Chunqi Li
2013-08-25  9:08                   ` Jan Kiszka
2013-08-25  7:55         ` Arthur Chunqi Li
2013-08-25  8:04           ` Abel Gordon
2013-08-25  8:13             ` Jan Kiszka

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=5219B5EB.9050900@web.de \
    --to=jan.kiszka@web.de \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yzt356@gmail.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