6c43eaffe4
At this time xentools413 will only build on a very recent -current (as of an hour ago or do - with /usr/include/xen/xenio.h 1.12 or newer) Xen is a hypervisor which supports running multiple guest operating systems on a single machine. Guest OSes (also called "domains") can be either paravirtualised (i.e. make hypercalls in order to access hardware), run in HVM (Hardware Virtualisation Mode) where they will be presented with virtual devices, or a combination where they use hypercalls to access hardware but manage memory themselves. At boot, the xen kernel is loaded along with the guest kernel for the first domain (called domain0). domain0 has privileges to access the physical hardware (PCI and ISA devices), administrate other domains and provide virtual devices (disks and network) to other domains.
46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
$NetBSD: patch-tools_qemu-xen-traditional_net.c,v 1.1 2020/05/26 11:12:11 bouyer Exp $
|
|
--- tools/qemu-xen-traditional/net.c.orig 2016-11-29 17:36:38.000000000 +0100
|
|
+++ tools/qemu-xen-traditional/net.c 2017-03-29 18:16:54.000000000 +0200
|
|
@@ -990,6 +990,7 @@
|
|
#define DEFAULT_NETWORK_DOWN_SCRIPT ""
|
|
#endif
|
|
|
|
+#if !defined(CONFIG_STUBDOM)
|
|
static int launch_script(const char *setup_script, const char *ifname,
|
|
const char *script_arg, int fd)
|
|
{
|
|
@@ -1028,6 +1029,7 @@
|
|
}
|
|
return 0;
|
|
}
|
|
+#endif
|
|
|
|
static int net_tap_init(VLANState *vlan, const char *model,
|
|
const char *name, const char *ifname1,
|
|
@@ -1048,12 +1050,14 @@
|
|
|
|
if (!setup_script || !strcmp(setup_script, "no"))
|
|
setup_script = "";
|
|
+#if !defined(CONFIG_STUBDOM)
|
|
if (setup_script[0] != '\0') {
|
|
if (launch_script(setup_script, ifname, script_arg, fd)) {
|
|
close(fd);
|
|
return -1;
|
|
}
|
|
}
|
|
+#endif
|
|
s = net_tap_fd_init(vlan, model, name, fd);
|
|
if (!s)
|
|
return -1;
|
|
@@ -1965,9 +1969,11 @@
|
|
if (vc->fd_read == tap_receive) {
|
|
TAPState *s = vc->opaque;
|
|
|
|
+#ifndef CONFIG_STUBDOM
|
|
if (s->down_script[0])
|
|
launch_script(s->down_script, s->down_script_arg,
|
|
s->script_arg, s->fd);
|
|
+#endif
|
|
}
|
|
#if defined(CONFIG_VDE)
|
|
if (vc->fd_read == vde_from_qemu) {
|