From: Bagas Sanjaya <bagasdotme@gmail.com>
To: linux-doc@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Isaku Yamahata <isaku.yamahata@intel.com>,
Kai Huang <kai.huang@intel.com>,
x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/12] Documentation: kvm: tdx-tdp-mmu: Properly format nested list for EPT state machine
Date: Sat, 9 Jul 2022 11:26:26 +0700 [thread overview]
Message-ID: <YskDcli+Lg6uKzYX@debian.me> (raw)
In-Reply-To: <20220709042037.21903-9-bagasdotme@gmail.com>
On Sat, Jul 09, 2022 at 11:20:34AM +0700, Bagas Sanjaya wrote:
> The state machine of EPT entry
> ------------------------------
> -(private EPT entry, shared EPT entry) =
> - (non-present, non-present): private mapping is allowed
> - (present, non-present): private mapping is mapped
> - (non-present | SPTE_SHARED_MASK, non-present | SPTE_SHARED_MASK):
> - shared mapping is allowed
> - (non-present | SPTE_SHARED_MASK, present | SPTE_SHARED_MASK):
> - shared mapping is mapped
> - (present | SPTE_SHARED_MASK, any) invalid combination
> +* (private EPT entry, shared EPT entry)
>
> -* map_gpa(private GPA): Mark the region that private GPA is allowed(NEW)
> - private EPT entry: clear SPTE_SHARED_MASK
> - present: nop
> - non-present: nop
> - non-present | SPTE_SHARED_MASK -> non-present (clear SPTE_SHARED_MASK)
> + * (non-present, non-present):
> + private mapping is allowed
> + * (present, non-present):
> + private mapping is mapped
> + * (non-present | SPTE_SHARED_MASK, non-present | SPTE_SHARED_MASK):
> + shared mapping is allowed
> + * (non-present | SPTE_SHARED_MASK, present | SPTE_SHARED_MASK):
> + shared mapping is mapped
> + * (present | SPTE_SHARED_MASK, any):
> + invalid combination
>
> - shared EPT entry: zap the entry, clear SPTE_SHARED_MASK
> - present: invalid
> - non-present -> non-present: nop
> - present | SPTE_SHARED_MASK -> non-present
> - non-present | SPTE_SHARED_MASK -> non-present
> +* map_gpa (private GPA): Mark the region that private GPA is allowed(NEW)
>
> -* map_gpa(shared GPA): Mark the region that shared GPA is allowed(NEW)
> - private EPT entry: zap and set SPTE_SHARED_MASK
> - present -> non-present | SPTE_SHARED_MASK
> - non-present -> non-present | SPTE_SHARED_MASK
> - non-present | SPTE_SHARED_MASK: nop
> + * private EPT entry: clear SPTE_SHARED_MASK
>
> - shared EPT entry: set SPTE_SHARED_MASK
> - present: invalid
> - non-present -> non-present | SPTE_SHARED_MASK
> - present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK: nop
> - non-present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK: nop
> + * present: nop
> + * non-present: nop
> + * non-present | SPTE_SHARED_MASK -> non-present (clear SPTE_SHARED_MASK)
>
> -* map(private GPA)
> - private EPT entry
> - present: nop
> - non-present -> present
> - non-present | SPTE_SHARED_MASK: nop. looping on EPT violation(NEW)
> + * shared EPT entry: zap the entry, clear SPTE_SHARED_MASK
>
> - shared EPT entry: nop
> + * present: invalid
> + * non-present -> non-present: nop
> + * present | SPTE_SHARED_MASK -> non-present
> + * non-present | SPTE_SHARED_MASK -> non-present
>
> -* map(shared GPA)
> - private EPT entry: nop
> +* map_gpa (shared GPA): Mark the region that shared GPA is allowed(NEW)
>
> - shared EPT entry
> - present: invalid
> - present | SPTE_SHARED_MASK: nop
> - non-present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK
> - non-present: nop. looping on EPT violation(NEW)
> + * private EPT entry: zap and set SPTE_SHARED_MASK
>
> -* zap(private GPA)
> - private EPT entry: zap the entry with keeping SPTE_SHARED_MASK
> - present -> non-present
> - present | SPTE_SHARED_MASK: invalid
> - non-present: nop as is_shadow_present_pte() is checked
> - non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is
> - checked
> + * present -> non-present | SPTE_SHARED_MASK
> + * non-present -> non-present | SPTE_SHARED_MASK
> + * non-present | SPTE_SHARED_MASK: nop
>
> - shared EPT entry: nop
> + * shared EPT entry: set SPTE_SHARED_MASK
>
> -* zap(shared GPA)
> - private EPT entry: nop
> + * present: invalid
> + * non-present -> non-present | SPTE_SHARED_MASK
> + * present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK: nop
> + * non-present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK: nop
>
> - shared EPT entry: zap
> - any -> non-present
> - present: invalid
> - present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK
> - non-present: nop as is_shadow_present_pte() is checked
> - non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is
> - checked
> +* map (private GPA)
> +
> + * private EPT entry
> +
> + * present: nop
> + * non-present -> present
> + * non-present | SPTE_SHARED_MASK: nop. looping on EPT violation(NEW)
> +
> + * shared EPT entry: nop
> +
> +* map (shared GPA)
> +
> + * private EPT entry: nop
> +
> + * shared EPT entry:
> +
> + * present: invalid
> + * present | SPTE_SHARED_MASK: nop
> + * non-present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK
> + * non-present: nop. looping on EPT violation(NEW)
> +
> +* zap (private GPA)
> +
> + * private EPT entry: zap the entry with keeping SPTE_SHARED_MASK
> +
> + * present -> non-present
> + * present | SPTE_SHARED_MASK: invalid
> + * non-present: nop as is_shadow_present_pte() is checked
> + * non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is
> + checked
> +
> + * shared EPT entry: nop
> +
> +* zap (shared GPA)
> +
> + * private EPT entry: nop
> +
> + * shared EPT entry: zap
> +
> + * any -> non-present
> + * present: invalid
> + * present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK
> + * non-present: nop as is_shadow_present_pte() is checked
> + * non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is
> + checked
IMO, the state machine lists above should have used tables instead.
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2022-07-09 4:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 4:20 [PATCH 00/12] Documentation: tdx: documentation fixes Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 01/12] Documentation: kvm: Pad bullet lists with blank line Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 02/12] Documentation: kvm: tdx: Use appropriate subbullet marker Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 03/12] Documentation: kvm: tdx: Add footnote markers Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 04/12] Documentation: kvm: tdx: Use bullet list for public kvm trees Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 05/12] Documentation: kvm: tdx: title typofix Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 06/12] Documentation: kvm: tdx-tdp-mmu: Add blank line padding for lists Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 07/12] Documentation: kvm: tdx-tdp-mmu: Use literal code block for EPT violation diagrams Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 08/12] Documentation: kvm: tdx-tdp-mmu: Properly format nested list for EPT state machine Bagas Sanjaya
2022-07-09 4:26 ` Bagas Sanjaya [this message]
2022-07-12 19:34 ` Isaku Yamahata
2022-07-09 4:20 ` [PATCH 09/12] Documentation: kvm: tdx-tdp-mmu: Add blank line padding to lists in concurrent sections Bagas Sanjaya
2022-07-09 4:20 ` [PATCH 10/12] Documentation: x86: Enclose TDX initialization code inside code block Bagas Sanjaya
2022-07-12 4:12 ` Kai Huang
2022-07-09 4:20 ` [PATCH 11/12] Documentation: x86: Use literal code block for TDX dmesg output Bagas Sanjaya
2022-07-12 4:11 ` Kai Huang
2022-07-09 4:20 ` [PATCH 12/12] Documentation: kvm: Add TDX documentation to KVM table of contents Bagas Sanjaya
2022-07-12 19:35 ` [PATCH 00/12] Documentation: tdx: documentation fixes Isaku Yamahata
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=YskDcli+Lg6uKzYX@debian.me \
--to=bagasdotme@gmail.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=isaku.yamahata@intel.com \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).