Displaying 2 results from an estimated 2 matches for "get_dev_entry".
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...nsigned int num)
+{
+ if (mmap((void *)addr, getpagesize() * num,
+ PROT_READ|PROT_WRITE|PROT_EXEC,
+ MAP_FIXED|MAP_PRIVATE, zero_fd, 0) != (void *)addr)
+ err(1, "Mmaping %u pages of /dev/zero @%p", num, (void *)addr);
+ return (void *)addr;
+}
+
+static struct lguest_device_desc *
+get_dev_entry(struct lguest_device_desc *descs, u16 type, u16 num_pages)
+{
+ static unsigned long top = RESERVE_TOP;
+ int i;
+ unsigned long pfn = 0;
+
+ if (num_pages) {
+ top -= num_pages*getpagesize();
+ map_pages(top, num_pages);
+ pfn = top / getpagesize();
+ }
+
+ for (i = 0; i < LGUEST_MAX_DEVICES...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...nsigned int num)
+{
+ if (mmap((void *)addr, getpagesize() * num,
+ PROT_READ|PROT_WRITE|PROT_EXEC,
+ MAP_FIXED|MAP_PRIVATE, zero_fd, 0) != (void *)addr)
+ err(1, "Mmaping %u pages of /dev/zero @%p", num, (void *)addr);
+ return (void *)addr;
+}
+
+static struct lguest_device_desc *
+get_dev_entry(struct lguest_device_desc *descs, u16 type, u16 num_pages)
+{
+ static unsigned long top = RESERVE_TOP;
+ int i;
+ unsigned long pfn = 0;
+
+ if (num_pages) {
+ top -= num_pages*getpagesize();
+ map_pages(top, num_pages);
+ pfn = top / getpagesize();
+ }
+
+ for (i = 0; i < LGUEST_MAX_DEVICES...