Skip to content

Commit c09f527

Browse files
committed
We don't have to zero the IST page
1 parent b74dd0b commit c09f527

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/tinykvm/vcpu.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,7 @@ void Machine::setup_cow_mode(const Machine* other)
423423
page tables that allow the master VM to execute code
424424
separately from its forks, while sharing a master page table. */
425425
auto pml4 = memory.new_page();
426-
tinykvm::page_duplicate(pml4.pmem,
427-
other->memory.page_at(other->memory.physbase + PT_ADDR)); // Intentional!
426+
tinykvm::page_duplicate(pml4.pmem, other->memory.page_at(other->memory.physbase + PT_ADDR));
428427
memory.page_tables = pml4.addr;
429428

430429
/* Zero a new page for IST stack */
@@ -435,7 +434,7 @@ void Machine::setup_cow_mode(const Machine* other)
435434
// stackless interrupts, to be honest. Something to think about?
436435
// XXX: In theory we can avoid initializing one of these pages
437436
// until the guest asks for a certain level of concurrency.
438-
memory.get_writable_page(memory.physbase + IST_ADDR, PDE64_RW | PDE64_NX, true);
437+
memory.get_writable_page(memory.physbase + IST_ADDR, PDE64_RW | PDE64_NX, false);
439438
//memory.get_writable_page(memory.physbase + IST2_ADDR, PDE64_RW | PDE64_NX, true);
440439

441440
struct kvm_sregs sregs = other->get_special_registers();

0 commit comments

Comments
 (0)