All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
To: Jan Kiszka <jan.kiszka@siemens.com>, kvm@vger.kernel.org
Subject: Re: Nested paging in nested SVM setup
Date: Wed, 18 Jun 2014 22:59:25 +0600	[thread overview]
Message-ID: <53A1C56D.4060703@gmail.com> (raw)
In-Reply-To: <53A18A6D.2050407@siemens.com>

Hi Jan,

> If we want to provide useful nested SVM support, this must be feasible.
> If there is a bug, it has to be fixed.
I was more concerned about if it is supported (and it means I do 
something wrong), or if it is not supported (at least, now).

> Maybe you can describe how you configured the involved units (NPT
> structures, guest / host PAR, MTRR etc.).
I've tried different combinations, but to be specific:
- NPT: four-level long-mode page tables; all PTEs except terminal have 
U,R,P bits set (0x07), as per APMv2 15.25.5
- APIC page pte; physical address 0xfee00000, flags: PAT, PWT, PCD, U, P 
(0x9D)
- guest PAT and host PAT are the same, 0x7010600070106 (as set by the 
Linux kernel). Guest PAT is stored in VMCB; host PAT is restored at each 
#VMEXIT.
- MTRRs. No changes to what Linux use prior to VM entry here; #0 (base 
0x80000000, mask 0xFF80000000) uncacheable, others are disabled.

I also noticed that setting PAT MSR from the nested hypervisor leaves 
high word unassigned, i.e. the code like this:

   mov $0x70106, %rax
   mov %rax, %rdx
   mov $0x0277, %rcx
   wrmsr
   rdmsr

yields %rax = 0, %rdx = 0x70106.

> Even better would be a test case based on kvm-unit-tests (see [1],
Will have a look at it, thanks.

--
Best regards,
Valentine Sinitsyn

  reply	other threads:[~2014-06-18 16:59 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 11:36 Nested paging in nested SVM setup Valentine Sinitsyn
2014-06-18 12:47 ` Jan Kiszka
2014-06-18 16:59   ` Valentine Sinitsyn [this message]
2014-06-19  9:32     ` Paolo Bonzini
2014-06-19  5:03   ` Valentine Sinitsyn
2014-08-20  6:46   ` Valentine Sinitsyn
2014-08-20  6:55     ` Paolo Bonzini
2014-08-20  7:37       ` Valentine Sinitsyn
2014-08-20  8:11         ` Paolo Bonzini
2014-08-20  9:49           ` Valentine Sinitsyn
2014-08-21  6:28           ` Valentine Sinitsyn
2014-08-21  8:48             ` Valentine Sinitsyn
2014-08-21 11:04               ` Paolo Bonzini
2014-08-21 11:06                 ` Jan Kiszka
2014-08-21 11:12                   ` Valentine Sinitsyn
2014-08-21 11:16                 ` Valentine Sinitsyn
2014-08-21 11:24               ` Paolo Bonzini
2014-08-21 12:28                 ` Valentine Sinitsyn
2014-08-21 12:38                   ` Valentine Sinitsyn
2014-08-21 13:40                   ` Valentine Sinitsyn
2014-09-01 17:41                   ` Paolo Bonzini
2014-09-01 19:21                     ` Valentine Sinitsyn
2014-09-02  8:25                       ` Paolo Bonzini
2014-09-02  9:16                         ` Valentine Sinitsyn
2014-09-02 11:21                           ` Paolo Bonzini
2014-09-02 11:26                             ` Valentine Sinitsyn
2014-08-21 17:35                 ` Valentine Sinitsyn
2014-08-21 20:31                   ` Paolo Bonzini
2014-08-22  4:33                     ` Valentine Sinitsyn
2014-08-22  8:53                       ` Paolo Bonzini
2014-09-01 16:11                       ` Paolo Bonzini
2014-09-01 17:04     ` Paolo Bonzini
2014-09-02  6:09       ` Valentine Sinitsyn
2014-09-02  6:21         ` Valentine Sinitsyn
2014-09-02  9:45         ` Paolo Bonzini
2014-09-02  9:53           ` Valentine Sinitsyn
2014-09-02 11:48             ` Paolo Bonzini
2014-09-02 10:31           ` Valentine Sinitsyn

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=53A1C56D.4060703@gmail.com \
    --to=valentine.sinitsyn@gmail.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    /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.