[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] MMAP failure after creating an HVM guest


  • To: "Xen devel list" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Dugger, Donald D" <donald.d.dugger@xxxxxxxxx>
  • Date: Wed, 17 May 2006 09:33:33 -0700
  • Delivery-date: Wed, 17 May 2006 09:34:13 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcZ5z6OG9CjS5RJCSzCVJYrOAA5b7Q==
  • Thread-topic: MMAP failure after creating an HVM guest

In tracking down an X windows problem I've discovered that an `mmap' on
Dom0 fails after an HVM guest is created.  The problem is with the 2
system calls:

        fd = open("/dev/mem", O_RDWR);
        p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);

These calls work fine until after the first HVM guest is created and
then the `mmap' fails with an EFAULT.  Interestingly enough, the `mmap'
works if `/dev/mem' is opened read only and the failure only happens
after the HVM guest goes into protected mode, if you destroy an HVM
Linux guest while it's still in Grub then this `mmap' will still work.

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
Donald.D.Dugger@xxxxxxxxx
Ph: (303)440-1368

Attachment: mmap.c
Description: mmap.c

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.