Skip to contentSkip to conversation

add CONFIG_XC to mini-os

PATCH In review Matthew Fioravante 2 participants 2 messages Sep 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 5/8 add CONFIG_XC to mini-os

This patch adds a CONFIG_XC option to mini-os, to allow conditional support for libxc for mini-os domains.

Signed off by: Matthew Fioravante [email protected]

extras/mini-os/Makefile +1 -0
@@ -27,6 +27,7 @@ CONFIG_FBFRONT ?= y
 CONFIG_KBDFRONT ?= y
 CONFIG_CONSFRONT ?= y
 CONFIG_XENBUS ?= y
+CONFIG_XC ?=y
 CONFIG_LWIP ?= $(lwip)
 
 # Export config items as compiler directives
extras/mini-os/lib/sys.c +2 -0
@@ -397,6 +397,7 @@ int close(int fd)
         return res;
     }
 #endif
+#ifdef CONFIG_XC
     case FTYPE_XC:
         minios_interface_close_fd(fd);
         return 0;
@@ -406,6 +407,7 @@ int close(int fd)
     case FTYPE_GNTMAP:
         minios_gnttab_close_fd(fd);
         return 0;
+#endif
 #ifdef CONFIG_NETFRONT
     case FTYPE_TAP:
         shutdown_netfront(files[fd].tap.dev);
@@ -1195,10 +1197,13 @@ void *mmap(void *start, size_t length, int prot,

int flags, int fd, off_t offset

     if (fd == -1)
         return map_zero(n, 1);
+#ifdef CONFIG_XC
     else if (files[fd].type == FTYPE_XC) {
         unsigned long zero = 0;
         return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, NULL, 0);
-    } else if (files[fd].type == FTYPE_MEM) {
+    }
+#endif
+    else if (files[fd].type == FTYPE_MEM) {
         unsigned long first_mfn = offset >> PAGE_SHIFT;
         return map_frames_ex(&first_mfn, n, 0, 1, 1, DOMID_IO, NULL,
_PAGE_PRESENT|_PAGE_RW);
     } else ASSERT(0);
Signature · 1 line
1.7.4.4

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 5/8
#1 lore raw

extras/mini-os/Makefile CONFIG_FBFRONT ?= y · line 33

Quoted 11 lines · Matthew Fioravante, le Mon 17 Sep 2012 18:00:31 -0400, a écrit :
extras/mini-os/Makefile +1 -0
@@ -27,6 +27,7 @@ CONFIG_FBFRONT ?= y
 CONFIG_KBDFRONT ?= y
 CONFIG_CONSFRONT ?= y
 CONFIG_XENBUS ?= y
+CONFIG_XC ?=y
 CONFIG_LWIP ?= $(lwip)
 
 # Export config items as compiler directives

Maybe it'd be safer to also disable

APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc-$(XEN_TARGET_ARCH) -whole-archive -lxenguest -lxenctrl -no-whole-archive

in that case?

Apart from that,

Samuel