head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.26 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.24 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.22 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.20 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.18 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.16 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.14 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.12 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.10 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.8 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.6 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.4 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.2 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.2.0.4 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.2 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.1.1.1.0.2 pkgsrc-2006Q3-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2007.06.14.19.44.55; author bouyer; state dead; branches; next 1.3; 1.3 date 2007.04.28.17.14.52; author bouyer; state Exp; branches; next 1.2; 1.2 date 2006.10.19.22.57.13; author bouyer; state Exp; branches; next 1.1; 1.1 date 2006.07.02.16.49.31; author bouyer; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2006.07.02.16.49.31; author bouyer; state Exp; branches; next ; desc @@ 1.4 log @Renamed xen*30 to xen*3 @ text @$NetBSD: patch-bt,v 1.3 2007/04/28 17:14:52 bouyer Exp $ --- /dev/null 2007-04-25 19:26:24.000000000 +0200 +++ xenstore/xenstored_netbsd.c 2007-04-25 19:28:19.000000000 +0200 @@@@ -0,0 +1,73 @@@@ +/****************************************************************************** + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * Copyright (C) 2005 Rusty Russell IBM Corporation + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, version 2 of the + * License. + */ + +#include +#include +#include +#include + +#include "xenstored_core.h" + +#define XENSTORED_PROC_KVA "/dev/xsd_kva" +#define XENSTORED_PROC_PORT "/kern/xen/xsd_port" + +evtchn_port_t xenbus_evtchn(void) +{ + int fd; + int rc; + evtchn_port_t port; + char str[20]; + + fd = open(XENSTORED_PROC_PORT, O_RDONLY); + if (fd == -1) + return -1; + + rc = read(fd, str, sizeof(str)); + if (rc == -1) + { + int err = errno; + close(fd); + errno = err; + return -1; + } + + str[rc] = '\0'; + port = strtoul(str, NULL, 0); + + close(fd); + return port; +} + +void *xenbus_map(void) +{ + int fd; + void *addr; + + fd = open(XENSTORED_PROC_KVA, O_RDWR); + if (fd == -1) + return NULL; + + addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE, + MAP_SHARED, fd, 0); + + if (addr == MAP_FAILED) + addr = NULL; + + close(fd); + + return addr; +} + +void xenbus_notify_running(void) +{ +} @ 1.3 log @Update xen 3.0 packages to 3.0.4. pksgrc changes: install man pages for xm, xend-config.sxp and xmdomain.cfg. Should fix pkg/36190. Main changes: This is largely an opportunistic stabilising release for HVM guests, due to the large amount of work in that area of the code since 3.0.3. These enhancements have in particular improved support for SMP and ACPI Linux and Windows operating systems. @ text @d1 1 a1 1 $NetBSD: patch-bt,v 1.2 2006/10/19 22:57:13 bouyer Exp $ @ 1.2 log @Update to 3.0.3. I don't have a comprehensive list of changes, only "many new features". One looks promising: - a new easy-to-use CPU scheduler which includes weights, caps, and automatic SMP load-balancing; pkgsrc changes: - remove patches against unused files - add a netbsd-specific example with verbose comments - add a vif script for ip-routing based setups @ text @d1 1 a1 1 $NetBSD: patch-bt,v 1.1.1.1 2006/07/02 16:49:31 bouyer Exp $ d3 3 a5 3 --- /dev/null 2006-10-17 00:06:16.000000000 +0200 +++ xenstore/xenstored_netbsd.c 2006-10-17 00:07:33.000000000 +0200 @@@@ -0,0 +1,69 @@@@ d75 4 @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d3 72 a74 89 --- xenstore/xenstored_domain.c.orig 2006-01-31 17:09:22.000000000 +0100 +++ xenstore/xenstored_domain.c @@@@ -18,7 +18,9 @@@@ */ #include +#ifndef __NetBSD__ #include +#endif #include #include #include @@@@ -38,7 +40,11 @@@@ #include "xenstored_test.h" #include +#ifdef __NetBSD__ +#include +#else #include +#endif static int *xc_handle; static evtchn_port_t virq_port; @@@@ -283,7 +289,11 @@@@ static struct domain *new_domain(void *c rc = ioctl(eventchn_fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind); if (rc == -1) return NULL; +#ifdef __NetBSD__ + domain->port = bind.port; +#else domain->port = rc; +#endif domain->conn = new_connection(writechn, readchn); domain->conn->domain = domain; @@@@ -503,8 +513,11 @@@@ outfd: } - +#ifdef __NetBSD__ +#define EVTCHN_DEV_NAME "/dev/xenevt" +#else #define EVTCHN_DEV_NAME "/dev/xen/evtchn" +#endif #define EVTCHN_DEV_MAJOR 10 #define EVTCHN_DEV_MINOR 201 @@@@ -512,7 +525,9 @@@@ outfd: /* Returns the event channel handle. */ int domain_init(void) { +#ifndef __NetBSD__ struct stat st; +#endif struct ioctl_evtchn_bind_virq bind; int rc; @@@@ -530,6 +545,9 @@@@ int domain_init(void) eventchn_fd = fake_open_eventchn(); (void)&st; #else +#ifdef __NetBSD__ + eventchn_fd = open(EVTCHN_DEV_NAME, O_NONBLOCK|O_RDWR); +#else /* Make sure any existing device file links to correct device. */ if ((lstat(EVTCHN_DEV_NAME, &st) != 0) || !S_ISCHR(st.st_mode) || (st.st_rdev != makedev(EVTCHN_DEV_MAJOR, EVTCHN_DEV_MINOR))) @@@@ -545,6 +563,7 @@@@ int domain_init(void) goto reopen; return -errno; } +#endif /* !__NetBSD__ */ #endif if (eventchn_fd < 0) barf_perror("Failed to open evtchn device"); @@@@ -556,7 +575,11 @@@@ int domain_init(void) rc = ioctl(eventchn_fd, IOCTL_EVTCHN_BIND_VIRQ, &bind); if (rc == -1) barf_perror("Failed to bind to domain exception virq port"); +#ifdef __NetBSD__ + virq_port = bind.port; +#else virq_port = rc; +#endif return eventchn_fd; } @ 1.1.1.1 log @Initial import of a packages for Xen 3.0 domain0 tools. @ text @@