bitkeeper revision 1.839 (406ee643kSLveMGyvVob0usRgg-CGg)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 3 Apr 2004 16:28:51 +0000 (16:28 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sat, 3 Apr 2004 16:28:51 +0000 (16:28 +0000)
vif.h, Makefile, domain.c, setup.c, entry.S, Rules.mk:
  Completely remove networking support from Xen when 'nodev=y' is specified.

xen/Makefile
xen/Rules.mk
xen/arch/i386/entry.S
xen/arch/i386/setup.c
xen/common/Makefile
xen/common/domain.c
xen/drivers/Makefile
xen/include/xen/vif.h

index cfe5e1242cb025aa29ce06309d4a1400a37a04ed..e75d29963688bb611f79ae434964cb3b39eea794 100644 (file)
@@ -36,7 +36,9 @@ clean: delete-links
 $(TARGET): delete-unfresh-files make-links $(GENERATED_FILES)
        $(MAKE) -C tools
        $(MAKE) -C common
-       $(MAKE) -C net
+       if [ "$(nodev)" != "y" ]; then \
+       $(MAKE) -C net ; \
+       fi
        $(MAKE) -C drivers
        $(MAKE) -C arch/$(TARGET_ARCH)
 
index 237bbbd6e198e75e53fae64dd8c4abe7aae9aef8..95bd10bab1a4da07c7d57a2587e40eb3e125bb07 100644 (file)
@@ -18,11 +18,11 @@ OBJS    += $(patsubst %.c,%.o,$(C_SRCS))
 
 # Note that link order matters!
 ALL_OBJS := $(BASEDIR)/common/common.o
-ALL_OBJS += $(BASEDIR)/net/network.o
 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
-ALL_OBJS += $(BASEDIR)/drivers/net/driver.o
 ifneq ($(nodev),y)
+ALL_OBJS += $(BASEDIR)/net/network.o
+ALL_OBJS += $(BASEDIR)/drivers/net/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/block/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/cdrom/driver.o
 ALL_OBJS += $(BASEDIR)/drivers/ide/driver.o
@@ -46,7 +46,6 @@ endif
 
 ifeq ($(nodev),y)
 CFLAGS += -DNO_DEVICES_IN_XEN
-CFLAGS := $(subst -Werror,,$(CFLAGS))
 endif
 
 %.o: %.c $(HDRS) Makefile
index 01419917049523230a997a473499b69f287a8f51..155ad23c4d96230a0605698a7d9b3539bf9dda49 100644 (file)
@@ -706,14 +706,19 @@ ENTRY(hypervisor_call_table)
         .long SYMBOL_NAME(do_set_gdt)
         .long SYMBOL_NAME(do_stack_switch)
         .long SYMBOL_NAME(do_set_callbacks)      /*  5 */
+#ifndef NO_DEVICES_IN_XEN
         .long SYMBOL_NAME(do_net_io_op)
+#else
+        .long SYMBOL_NAME(do_ni_syscall)
+#endif
         .long SYMBOL_NAME(do_fpu_taskswitch)
         .long SYMBOL_NAME(do_sched_op)
         .long SYMBOL_NAME(do_dom0_op)
-        .long SYMBOL_NAME(do_network_op)         /* 10 */
 #ifndef NO_DEVICES_IN_XEN
+        .long SYMBOL_NAME(do_network_op)         /* 10 */
         .long SYMBOL_NAME(do_block_io_op)
 #else
+        .long SYMBOL_NAME(do_ni_syscall)         /* 10 */
         .long SYMBOL_NAME(do_ni_syscall)
 #endif
         .long SYMBOL_NAME(do_set_debugreg)
index 862582e5d41a6ea64ff29f76b5f7301da9d724eb..f9107df29700b04b4ad06650e047cc2aa06974db 100644 (file)
@@ -317,9 +317,11 @@ void __init start_of_day(void)
     extern void timer_bh(void);
     extern void init_timervecs(void);
     extern void ac_timer_init(void);
+#ifndef NO_DEVICES_IN_XEN
     extern int  setup_network_devices(void);
     extern void net_init(void);
     extern void initialize_block_io(void);
+#endif
     extern void initialize_keytable(); 
     extern void initialize_keyboard(void);
     extern int opt_nosmp, opt_watchdog, opt_noacpi, opt_ignorebiostables;
@@ -415,10 +417,10 @@ void __init start_of_day(void)
     pci_init();
 #endif
     do_initcalls();
+#ifndef NO_DEVICES_IN_XEN
     if ( !setup_network_devices() )
         panic("Must have a network device!\n");
     net_init();            /* initializes virtual network system. */
-#ifndef NO_DEVICES_IN_XEN
     initialize_block_io(); /* setup block devices */
 #endif
 
index c660a8b24b4818a754012579f90f0da956aef62b..5edce924877f24b8f9176b53d54164dac4cd7791 100644 (file)
@@ -5,6 +5,10 @@ ifeq ($(nperfc),y)
 OBJS := $(subst perfc.o,,$(OBJS))
 endif
 
+ifeq ($(nodev),y)
+OBJS := $(subst network.o,,$(OBJS))
+endif
+
 default: $(OBJS)
        $(LD) $(LDARCHFLAGS) -r -o common.o $(OBJS)
 
index 7b55ee89d4cc6dfa814c5d9ef1446a9724a74953..7eaa5628ad5615e0b9b5a1feffc0c8decf972091 100644 (file)
@@ -695,7 +695,6 @@ int construct_dom0(struct task_struct *p,
 {
     char *dst;
     int i, rc;
-    domid_t dom = p->domain;
     unsigned long pfn, mfn;
     unsigned long nr_pages = (alloc_end - alloc_start) >> PAGE_SHIFT;
     unsigned long nr_pt_pages;
@@ -730,11 +729,14 @@ int construct_dom0(struct task_struct *p,
     unsigned long mpt_alloc;
 
     extern void physdev_init_dom0(struct task_struct *);
+
+#ifndef NO_DEVICES_IN_XEN
     extern void ide_probe_devices(xen_disk_info_t *);
     extern void scsi_probe_devices(xen_disk_info_t *);
     extern void cciss_probe_devices(xen_disk_info_t *);
     xen_disk_info_t xdi;
     xen_disk_t *xd;
+#endif
 
     /* Sanity! */
     if ( p->domain != 0 ) 
@@ -989,7 +991,7 @@ int construct_dom0(struct task_struct *p,
 
     /* Add virtual network interfaces. */
     while ( num_vifs-- > 0 )
-        (void)create_net_vif(dom);
+        (void)create_net_vif(0);
 
 #ifndef NO_DEVICES_IN_XEN
     /* DOM0 gets access to all real block devices. */
index 902add28e5f3175da61fd1683288175f38a43c65..5aa8a48247ada6ad5863e1012326f5c9f9c5a126 100644 (file)
@@ -2,8 +2,8 @@
 default:
        $(MAKE) -C char
        $(MAKE) -C pci
-       $(MAKE) -C net
        if [ "$(nodev)" != "y" ]; then \
+       $(MAKE) -C net ; \
        $(MAKE) -C block ; \
        $(MAKE) -C cdrom ; \
        $(MAKE) -C ide ; \
index 71e3a3d2ea7c01e719c884ef25ccd16910ff96e9..63469ece652d313b900c3363891d82dd58305c2a 100644 (file)
@@ -95,12 +95,19 @@ do {                                                               \
 } while (0)                                                        \
 
 /* vif prototypes */
+#ifndef NO_DEVICES_IN_XEN
 net_vif_t *create_net_vif(domid_t dom);
 void destroy_net_vif(net_vif_t *vif);
 void unlink_net_vif(net_vif_t *vif);
 net_vif_t *net_get_target_vif(u8 *data, unsigned int len, net_vif_t *src_vif);
 net_vif_t *find_net_vif(domid_t dom, unsigned int idx);
 void delete_all_domain_vfr_rules(struct task_struct *p);
+#else
+#define create_net_vif(_d) ((void)0)
+#define destroy_net_vif(_v) ((void)0)
+#define unlink_net_vif(_v) ((void)0)
+#define delete_all_domain_vfr_rules(_p) ((void)0)
+#endif
 
 /*
  * Return values from net_get_target_vif: