mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1159.217.17 (41e80727RATVR7CCn-A5xanZXzrSfg)
Merge
This commit is contained in:
commit
7d85a1cfdb
4 files changed
+13
-8
No files matched your search
@@ -236,8 +236,7 @@ void arch_do_createdomain(struct exec_domain *ed)
|
||||
d->shared_info = (void *)alloc_xenheap_page();
|
||||
memset(d->shared_info, 0, PAGE_SIZE);
|
||||
ed->vcpu_info = &d->shared_info->vcpu_data[ed->eid];
|
||||
d->shared_info->arch.mfn_to_pfn_start =
|
||||
virt_to_phys(&machine_to_phys_mapping[0])>>PAGE_SHIFT;
|
||||
d->shared_info->arch.mfn_to_pfn_start = m2p_start_mfn;
|
||||
SHARE_PFN_WITH_DOMAIN(virt_to_page(d->shared_info), d);
|
||||
machine_to_phys_mapping[virt_to_phys(d->shared_info) >>
|
||||
PAGE_SHIFT] = INVALID_P2M_ENTRY;
|
||||
|
||||
@@ -168,7 +168,7 @@ void __init init_frametable(void)
|
||||
|
||||
void arch_init_memory(void)
|
||||
{
|
||||
unsigned long mfn, i;
|
||||
unsigned long i;
|
||||
|
||||
/*
|
||||
* We are rather picky about the layout of 'struct pfn_info'. The
|
||||
@@ -211,13 +211,13 @@ void arch_init_memory(void)
|
||||
dom_io->id = DOMID_IO;
|
||||
|
||||
/* M2P table is mappable read-only by privileged domains. */
|
||||
mfn = l2_pgentry_to_pagenr(
|
||||
idle_pg_table[RDWR_MPT_VIRT_START >> L2_PAGETABLE_SHIFT]);
|
||||
for ( i = 0; i < 1024; i++ )
|
||||
{
|
||||
frame_table[mfn+i].count_info = PGC_allocated | 1;
|
||||
frame_table[mfn+i].u.inuse.type_info = PGT_gdt_page | 1; /* non-RW */
|
||||
frame_table[mfn+i].u.inuse.domain = dom_xen;
|
||||
frame_table[m2p_start_mfn+i].count_info = PGC_allocated | 1;
|
||||
/* gdt to make sure it's only mapped read-only by non-privileged
|
||||
domains. */
|
||||
frame_table[m2p_start_mfn+i].u.inuse.type_info = PGT_gdt_page | 1;
|
||||
frame_table[m2p_start_mfn+i].u.inuse.domain = dom_xen;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <asm/fixmap.h>
|
||||
#include <asm/domain_page.h>
|
||||
|
||||
unsigned long m2p_start_mfn;
|
||||
|
||||
static inline void set_pte_phys(unsigned long vaddr,
|
||||
l1_pgentry_t entry)
|
||||
{
|
||||
@@ -63,6 +65,7 @@ void __init paging_init(void)
|
||||
/* Allocate and map the machine-to-phys table. */
|
||||
if ( (pg = alloc_domheap_pages(NULL, 10)) == NULL )
|
||||
panic("Not enough memory to bootstrap Xen.\n");
|
||||
m2p_start_mfn = page_to_pfn(pg);
|
||||
idle_pg_table[RDWR_MPT_VIRT_START >> L2_PAGETABLE_SHIFT] =
|
||||
mk_l2_pgentry(page_to_phys(pg) | __PAGE_HYPERVISOR | _PAGE_PSE);
|
||||
|
||||
|
||||
@@ -226,7 +226,10 @@ void synchronise_pagetables(unsigned long cpu_mask);
|
||||
extern unsigned long *machine_to_phys_mapping;
|
||||
extern unsigned long *phys_to_machine_mapping;
|
||||
#else
|
||||
/* Don't call virt_to_phys on this: it isn't direct mapped. Using
|
||||
m2p_start_mfn instead. */
|
||||
#define machine_to_phys_mapping ((unsigned long *)RDWR_MPT_VIRT_START)
|
||||
extern unsigned long m2p_start_mfn;
|
||||
#define phys_to_machine_mapping ((unsigned long *)PERDOMAIN_VIRT_START)
|
||||
#endif
|
||||
|
||||
|
||||