difference between PGT_gdt_page and PGT_ldt_page
Is there any particular reason why there cannot just be a PGT_descr_page, combining the two currently existing types? Even if it's only a page, I'd want to avoid wasting memory for nothing, and i386's default_ldt could easily move into the same page cpu_gdt_table lives in. Alternatively one could also use empty_zero_page here. Or do it like on x86-64, where the symbol doesn't exist at all, and knowledge about it being all zeroes is used where needed. Jan
Quoted 4 lines · Jan Beulich
Is there any particular reason why there cannot just be a
PGT_descr_page, combining the two currently existing types? Even if it's only a page, I'd want to avoid wasting memory for nothing, and i386'sdefault_ldtcould easily move into the same pagecpu_gdt_tablelives in. Alternatively one could also useempty_zero_pagehere. Or do it like on x86-64, where the symbol doesn't exist at all, and knowledge about it being all zeroes is used where needed. Jan
If default_ldt can be replaced by empty_zero_page, why do we need a default LDT at all?
The page types could quite easily be merged. The main problem is that all descriptor tables need to be page aligned. We could get rid of that restriction for LDTs I think.
-- Keir
Quoted 2 lines
If
default_ldtcan be replaced byempty_zero_page, why do we need a default LDT at all?
That would be one of the implied questions. I assume this is done to minimize the delta to native code, which needlessly has this, too.
Jan
Quoted 3 lines
The page types could quite easily be merged. The main problem is that all descriptor tables need to be page aligned. We could get rid of that restriction for LDTs I think.
Wouldn't that imply that you don't need a special PGT_ldt_page type then anymore?
Jan