This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: "Xen devel list" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] MMAP failure after creating an HVM guest
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
Ph: (303)440-1368

Attachment: mmap.c
Description: mmap.c

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] MMAP failure after creating an HVM guest, Dugger, Donald D <=