return 0;
}
+static void xen_alloc_ldt(struct desc_struct *ldt, unsigned entries)
+{
+ unsigned pages = roundup(entries * LDT_ENTRY_SIZE, PAGE_SIZE);
+ void *v = ldt;
+ int i;
+
+ for(i = 0; i < pages; i += PAGE_SIZE)
+ make_lowmem_page_readonly(v + i);
+}
+
+static void xen_free_ldt(struct desc_struct *ldt, unsigned entries)
+{
+ unsigned pages = roundup(entries * LDT_ENTRY_SIZE, PAGE_SIZE);
+ void *v = ldt;
+ int i;
+
+ for(i = 0; i < pages; i += PAGE_SIZE)
+ make_lowmem_page_readwrite(v + i);
+}
+
static void xen_set_ldt(const void *addr, unsigned entries)
{
struct mmuext_op *op;
.load_gs_index = xen_load_gs_index,
#endif
+ .alloc_ldt = xen_alloc_ldt,
+ .free_ldt = xen_free_ldt,
+
.store_gdt = native_store_gdt,
.store_idt = native_store_idt,
.store_tr = xen_store_tr,
{
phys_addr_t paddr;
- maddr &= PTE_MASK;
+ maddr &= PTE_PFN_MASK;
paddr = mfn_to_pfn(maddr >> PAGE_SHIFT) << PAGE_SHIFT;
return paddr;