Skip to content

Commit

Permalink
x86/pv: don't populate the GDT/LDT L3 slot at domain creation
Browse files Browse the repository at this point in the history
The current code in pv_domain_initialise() populates the L3 slot used for the
GDT/LDT, however that's not needed, since the create_perdomain_mapping() in
pv_create_gdt_ldt_l1tab() will already take care of allocating an L2 and
populating the L3 entry if not present.

No functional change intended.

Signed-off-by: Roger Pau Monné <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
  • Loading branch information
royger authored and jbeulich committed Nov 26, 2024
1 parent 8fe330a commit fcf91ce
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions xen/arch/x86/pv/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,6 @@ int pv_domain_initialise(struct domain *d)
(d->arch.pv.cpuidmasks = xmemdup(&cpuidmask_defaults)) == NULL )
goto fail;

rc = create_perdomain_mapping(d, GDT_LDT_VIRT_START,
GDT_LDT_MBYTES << (20 - PAGE_SHIFT),
NULL, NULL);
if ( rc )
goto fail;

d->arch.ctxt_switch = &pv_csw;

if ( !is_pv_32bit_domain(d) && use_invpcid && cpu_has_pcid )
Expand Down

0 comments on commit fcf91ce

Please sign in to comment.