x86/XPTI: Fix up stale comments concerning mappings
PATCH 1/1 x86/XPTI: Fix up stale comments concerning mappings
The comments became stale when c/s d1d6fc97d66 "x86/xpti: really hide almost all of Xen image" altered how the stubs were mapped.
---
CC: Jan Beulich <[email protected]>
CC: Juergen Gross <[email protected]>
--- xen/arch/x86/smpboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/smpboot.c +2 -2
@@ -794,7 +794,7 @@ static int setup_cpu_root_pgt(unsigned int cpu)/* SH_LINEAR_PT inserted together with guest mappings. */ /* PERDOMAIN inserted during context switch. */ -/* One-time setup of common_pgt, which maps .text.entry and the stubs. */ +/* One-time setup of common_pgt, which maps .text.entry. */ if (unlikely (!root_get_intpte (common_pgt)) ) {const char *ptr;
@@ -811,7 +811,7 @@ static int setup_cpu_root_pgt(unsigned int cpu) rpt[root_table_offset (XEN_VIRT_START )] = common_pgt; -/* Install direct map page table entries for stack, IDT, and TSS. */ +/* Install per-pcpu mappings for the stack, IDT, TSS and stubs. */ for ( off = rc =0 ; !rc && off <STACK_SIZE ; off +=PAGE_SIZE )if ( !memguard_is_stack_guard_page (off) ) rc =clone_mapping (__va (__pa (stack_base[cpu])) + off, rpt);
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 800
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 25.05.18 at 12:52, <[email protected]> wrote:
xen/arch/x86/smpboot.c +1
-1@@ -794,7 +794,7 @@ static int setup_cpu_root_pgt(unsigned int cpu)/* SH_LINEAR_PT inserted together with guest mappings. */ /* PERDOMAIN inserted during context switch. */ -/* One-time setup of common_pgt, which maps .text.entry and the stubs. */ +/* One-time setup of common_pgt, which maps .text.entry. */ if (unlikely (!root_get_intpte (common_pgt)) ) {const char *ptr;
I don't understand this removal - common_pgt still is used to map the stubs. It is just that the addition of the leaf entry for the stub space now happens later. If you really want to change it, how about "One-time setup of common_pgt and its .text.entry mappings"?
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 814
Quoted 6 lines
xen/arch/x86/smpboot.c +1
-1@@ -811,7 +811,7 @@ static int setup_cpu_root_pgt(unsigned int cpu) rpt[root_table_offset (XEN_VIRT_START )] = common_pgt; -/* Install direct map page table entries for stack, IDT, and TSS. */ +/* Install per-pcpu mappings for the stack, IDT, TSS and stubs. */
Just for my own education: Back in school (i.e. quite long ago) I had been told that in such enumerations - specifically other than in German - a comma also belongs right ahead of the "and". Is that not the case anymore nowadays?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 25.05.18 at 12:52, <[email protected]> wrote:
xen/arch/x86/smpboot.c +0
-0@@ -794,7 +794,7 @@ static int setup_cpu_root_pgt(unsigned int cpu)/* SH_LINEAR_PT inserted together with guest mappings. */ /* PERDOMAIN inserted during context switch. */
Quoted 6 lines
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 800
Quoted 5 lines
xen/arch/x86/smpboot.c +1
-1-/* One-time setup of common_pgt, which maps .text.entry and the stubs. */ +/* One-time setup of common_pgt, which maps .text.entry. */ if (unlikely (!root_get_intpte (common_pgt)) ) {const char *ptr;I don't understand this removal -
common_pgtstill is used to map the stubs.
Hang on. If this is the case, then surely you SP3 fix need to retain its "no other CPUs using this mapping" check when destroying the mapping.
Quoted 6 lines
It is just that the addition of the leaf entry for the stub space now happens later. If you really want to change it, how about "One-time setup of
common_pgtand its .text.entry mappings"?Quoted 2 lines
xen/arch/x86/smpboot.c +0
-0@@ -811,7 +811,7 @@ static int setup_cpu_root_pgt(unsigned int cpu)
Quoted 8 lines
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 814
Quoted 4 lines
xen/arch/x86/smpboot.c +1
-1rpt[root_table_offset (XEN_VIRT_START )] = common_pgt; -/* Install direct map page table entries for stack, IDT, and TSS. */ +/* Install per-pcpu mappings for the stack, IDT, TSS and stubs. */ Just for my own education: Back in school (i.e. quite long ago) I had been told that in such enumerations - specifically other than in German - a comma also belongs right ahead of the "and". Is that not the case anymore nowadays?
This known as "The Oxford Comma". It is one of the more argued-over areas of English grammar, but is optional (insofar that, some places demand its presence, some places refuse to allow it, and most don't care either way).
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 25.05.18 at 13:31, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 797
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 25.05.18 at 12:52, <[email protected]> wrote:
xen/arch/x86/smpboot.c +0
-1@@ -794,7 +794,7 @@ static int setup_cpu_root_pgt(unsigned int cpu)/* SH_LINEAR_PT inserted together with guest mappings. */ /* PERDOMAIN inserted during context switch. */ -/* One-time setup of common_pgt, which maps .text.entry and the stubs. */
Quoted 8 lines
Quoted 5 lines
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 800
Quoted 4 lines
xen/arch/x86/smpboot.c +1
-0+/* One-time setup of common_pgt, which maps .text.entry. */ if (unlikely (!root_get_intpte (common_pgt)) ) {const char *ptr;I don't understand this removal -
common_pgtstill is used to map the stubs.Hang on. If this is the case, then surely you SP3 fix need to retain its "no other CPUs using this mapping" check when destroying the mapping.
No. All the CPUs share the L4 and L3 entries, but L2 entries may differ (when there are more than 512 CPUs), and L1 entries will be distinct for all CPUs. (I take it you mean "S3 fix" rather than "SP3 fix".)
Quoted 8 lines
Quoted 8 lines
It is just that the addition of the leaf entry for the stub space now happens later. If you really want to change it, how about "One-time setup of
common_pgtand its .text.entry mappings"?Quoted 4 lines
xen/arch/x86/smpboot.c +0
-0@@ -811,7 +811,7 @@ static int setup_cpu_root_pgt(unsigned int cpu) rpt[root_table_offset (XEN_VIRT_START )] = common_pgt;
Quoted 8 lines
Quoted 6 lines
xen/arch/x86/smpboot.c static int setup_cpu_root_pgt(unsigned int cpu) · line 814
Quoted 2 lines
xen/arch/x86/smpboot.c +1
-1-/* Install direct map page table entries for stack, IDT, and TSS. */ +/* Install per-pcpu mappings for the stack, IDT, TSS and stubs. */ Just for my own education: Back in school (i.e. quite long ago) I had been told that in such enumerations - specifically other than in German - a comma also belongs right ahead of the "and". Is that not the case anymore nowadays?
This known as "The Oxford Comma".
Ouch - and I've asked someone sitting in Cambridge. ;-)
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel