On Thu, 2005-06-16 at 14:55 +0100, Keir Fraser wrote:
> On 16 Jun 2005, at 09:11, Rusty Russell wrote:
>
> > So here's my patch against latest bk, including test program but we
> > have
> > an issue. On unmap, I hit the BUG_ON() on mm/rmap.c:482. Is this some
> > issue with using xc_map_foreign_range() on non-foreign pages?
>
> Ah, it's not working because xc_map_foreign_range does not raise
> refcnts on the page being mapped.
OK, fixed, please apply the below patch against current bk.
Mike, this means backing out your changes to use domain_info to
communicate this. I didn't try to extricate that...
Thanks,
Rusty.
diff -urpN --exclude dist --exclude html --exclude ps --exclude '*-xen0'
--exclude '*-xenU' --exclude 'pristine-*' --exclude TAGS --exclude '*.o'
--exclude asm-offsets.h --exclude asm-offsets.s --exclude .chkbuild --exclude
'*~' --exclude '.*.d' --exclude classlist.h --exclude devlist.h --exclude asm
--exclude banner.h --exclude 'ref-*' --exclude .makedep --exclude config-host.h
--exclude config-host.mak --exclude keysym_adapter_sdl.h --exclude config.h
--exclude config.mak --exclude pygrub --exclude bzimage_header.c --exclude
build --exclude compile.h --minimal
xen/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
xen-dom0-store/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
--- xen/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c 2005-06-16
18:03:10.000000000 +1000
+++ xen-dom0-store/linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c
2005-06-17 17:11:06.000000000 +1000
@@ -196,6 +196,36 @@ static int privcmd_ioctl(struct inode *i
}
break;
+ case IOCTL_PRIVCMD_INITDOMAIN_STORE:
+ {
+ extern int do_xenbus_probe(void*);
+
+ if (xen_start_info.store_evtchn != 0) {
+ ret = -EINVAL;
+ break;
+ }
+
+ /* Allocate page. */
+ xen_start_info.store_page = get_zeroed_page(GFP_KERNEL);
+ if (!xen_start_info.store_page) {
+ ret = -ENOMEM;
+ break;
+ }
+
+ /* We don't refcnt properly, so set reserved on page (this
+ * allocation is permanent). */
+ SetPageReserved(virt_to_page(xen_start_info.store_page));
+
+ /* Initial connect. Setup channel and page. */
+ xen_start_info.store_evtchn = data;
+ ret = pfn_to_mfn(virt_to_phys((void *)xen_start_info.store_page)
+ >> PAGE_SHIFT);
+
+ /* We'll return then this will wait for daemon to answer */
+ //kthread_run(do_xenbus_probe, NULL, "xenbus_probe");
+ }
+ break;
+
default:
ret = -EINVAL;
break;
diff -urpN --exclude dist --exclude html --exclude ps --exclude '*-xen0'
--exclude '*-xenU' --exclude 'pristine-*' --exclude TAGS --exclude '*.o'
--exclude asm-offsets.h --exclude asm-offsets.s --exclude .chkbuild --exclude
'*~' --exclude '.*.d' --exclude classlist.h --exclude devlist.h --exclude asm
--exclude banner.h --exclude 'ref-*' --exclude .makedep --exclude config-host.h
--exclude config-host.mak --exclude keysym_adapter_sdl.h --exclude config.h
--exclude config.mak --exclude pygrub --exclude bzimage_header.c --exclude
build --exclude compile.h --minimal
xen/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
xen-dom0-store/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
--- xen/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
2005-06-16 18:03:13.000000000 +1000
+++
xen-dom0-store/linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h
2005-06-16 13:47:48.000000000 +1000
@@ -84,5 +84,7 @@ typedef struct privcmd_blkmsg
_IOC(_IOC_NONE, 'P', 3, sizeof(privcmd_mmapbatch_t))
#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
_IOC(_IOC_READ, 'P', 4, sizeof(unsigned long))
+#define IOCTL_PRIVCMD_INITDOMAIN_STORE \
+ _IOC(_IOC_READ, 'P', 5, 0)
#endif /* __PRIVCMD_H__ */
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|