Skip to contentSkip to conversation

difference between PGT_gdt_page and PGT_ldt_page

DISCUSSION Jan Beulich 2 participants 4 messages Feb 15, 2006

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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'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

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

#2 lore raw
Quoted 2 lines

If default_ldt can be replaced by empty_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

#3 lore raw
In reply to Keir Fraser
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