aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6.10-xen-sparse
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2005-02-03 13:07:34 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2005-02-03 13:07:34 +0000
commitf32bc42de344e0c9e1949fb8cc5e3ce042dae16e (patch)
tree20f2e2e796a6bed8b1ce97e976c294219f078f21 /linux-2.6.10-xen-sparse
parentff7e4d5f080bef4156d5bf605746028e1e1d2690 (diff)
downloadxen-f32bc42de344e0c9e1949fb8cc5e3ce042dae16e.tar.gz
xen-f32bc42de344e0c9e1949fb8cc5e3ce042dae16e.tar.bz2
xen-f32bc42de344e0c9e1949fb8cc5e3ce042dae16e.zip
bitkeeper revision 1.1159.212.77 (4202221693AFbvFZWeMHHIjQfbzTIQ)
More x86_64 prgress. Many more gaps filled in. Next step is DOM0 construction. Signed-off-by: keir.fraser@cl.cam.ac.uk
Diffstat (limited to 'linux-2.6.10-xen-sparse')
-rw-r--r--linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c
index 98e7e92ff4..c97fe7cf21 100644
--- a/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c
+++ b/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c
@@ -174,13 +174,11 @@ static int privcmd_ioctl(struct inode *inode, struct file *file,
case IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN:
{
- unsigned long m2p_start_mfn =
- HYPERVISOR_shared_info->arch.mfn_to_pfn_start;
-
- if( put_user( m2p_start_mfn, (unsigned long *) data ) )
- ret = -EFAULT;
- else
- ret = 0;
+ unsigned long m2pv = (unsigned long)machine_to_phys_mapping;
+ pgd_t *pgd = pgd_offset_k(m2pv);
+ pmd_t *pmd = pmd_offset(pgd, m2pv);
+ unsigned long m2p_start_mfn = pmd_val(*pmd) >> PAGE_SHIFT;
+ ret = put_user(m2p_start_mfn, (unsigned long *)data) ? -EFAULT: 0;
}
break;