/* So, when pin_stack_pages() asks us to pin a page, we check if it's already in the page tables, and if not, we call demand_page() with error code 2 (meaning "write").  */
void pin_page(struct lg_cpu *cpu, unsigned long vaddr)
/* So, when pin_stack_pages() asks us to pin a page, we check if it's already in the page tables, and if not, we call demand_page() with error code 2 (meaning "write").  */
void pin_page(struct lg_cpu *cpu, unsigned long vaddr)
{
	if (!page_writable(cpu, vaddr) && !demand_page(cpu, vaddr, 2))
		kill_guest(cpu, "bad stack page %#lx", vaddr);
}