From owner-freebsd-virtualization@FreeBSD.ORG Sun Jul 6 08:10:01 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88AF41065679 for ; Sun, 6 Jul 2008 08:10:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outg.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 67FD18FC12 for ; Sun, 6 Jul 2008 08:10:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 4A95D2426; Sun, 6 Jul 2008 01:10:01 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 6621D2D6013; Sun, 6 Jul 2008 01:10:00 -0700 (PDT) Message-ID: <48707DD7.9080905@elischer.org> Date: Sun, 06 Jul 2008 01:09:59 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ermal_Lu=E7i?= , freebsd-virtualization@freebsd.org, Marko Zec References: <4863F1B0.9060603@elischer.org> <4863F509.2010408@elischer.org> <4863F5A3.9060703@elischer.org> <9a542da30806261543x667875eej8a5b6fa9da773b12@mail.gmail.com> <486443D1.40302@elischer.org> <9a542da30807050419q5b2fd68fj3229b199f0032def@mail.gmail.com> In-Reply-To: <9a542da30807050419q5b2fd68fj3229b199f0032def@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: porting to vimage document X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2008 08:10:01 -0000 I've started on a document about porting to vimage. http://perforce.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/vimage/porting%5fto%5fvimage.txt It's not finished by a long way but I'm off to bed now.. Marko, feel free to add to this.. I'll take up work on thi sagain tomorrow if I can.. Julian From owner-freebsd-virtualization@FreeBSD.ORG Sun Jul 6 16:54:13 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF77E1065684 for ; Sun, 6 Jul 2008 16:54:13 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outO.internet-mail-service.net (outo.internet-mail-service.net [216.240.47.238]) by mx1.freebsd.org (Postfix) with ESMTP id A1D438FC1E for ; Sun, 6 Jul 2008 16:54:13 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 8EE5D2370; Sun, 6 Jul 2008 09:54:13 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id BDF7C2D600E; Sun, 6 Jul 2008 09:54:12 -0700 (PDT) Message-ID: <4870F8B4.2060203@elischer.org> Date: Sun, 06 Jul 2008 09:54:12 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ermal_Lu=E7i?= , freebsd-virtualization@freebsd.org, Marko Zec References: <4863F1B0.9060603@elischer.org> <4863F509.2010408@elischer.org> <4863F5A3.9060703@elischer.org> <9a542da30806261543x667875eej8a5b6fa9da773b12@mail.gmail.com> <486443D1.40302@elischer.org> <9a542da30807050419q5b2fd68fj3229b199f0032def@mail.gmail.com> <48707DD7.9080905@elischer.org> In-Reply-To: <48707DD7.9080905@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: porting to vimage document X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2008 16:54:13 -0000 Julian Elischer wrote: > > I've started on a document about porting to vimage. > > http://perforce.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/vimage/porting%5fto%5fvimage.txt > > > It's not finished by a long way but I'm off to bed now.. > > Marko, feel free to add to this.. I'll take up work on this again > tomorrow if I can.. (some more added) > > Julian > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to > "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Wed Jul 9 21:02:39 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19D561065672 for ; Wed, 9 Jul 2008 21:02:39 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id D2F568FC1B for ; Wed, 9 Jul 2008 21:02:38 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id m69L2bpP083738 for ; Wed, 9 Jul 2008 15:02:38 -0600 (MDT) Message-ID: <48752768.9080106@gritton.org> Date: Wed, 09 Jul 2008 15:02:32 -0600 From: James Gritton User-Agent: Thunderbird 2.0.0.9 (X11/20080228) MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on gritton.org X-Virus-Status: Clean Subject: jail_set (pretty much) done X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2008 21:02:39 -0000 The name-based FreeBSD Jail extensions are now ready for use. I've added support to the user-space programs (jail, jls, jexec), and added some fluff to the relevant man pages. This still stands alone - I haven't yet integrated it with Vimage, which is the next step. But it's there for anyone who wants to take a look at it on its own. I've put diffs against Current in http://gritton.org/jail_set.diff, and I have a perforce branch in //depot/user/jamie/jail_set/. In a nutshell, this adds three system calls: jail_get, jail_set, and jail_remove. Jail_remove is a no-brainer. The other two allow jails to be created and existing jails to be modified in a manner similar to the nmount system call. The user-level jail and jls programs work with these system calls to set/get an arbitrary set of name-based jail parameters. The system has a certain set of parameters, key among them the members of original jail structure, and modules are free to add their own parameters. The linux OS info has been changed to use this setup as a demonstration (and because it's just better that way). Hierarchical jails are supported (though turned off by default). It's all in the updated jail(2) and jail(8) man pages. - Jamie From owner-freebsd-virtualization@FreeBSD.ORG Fri Jul 11 16:18:27 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91266106567A for ; Fri, 11 Jul 2008 16:18:27 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id 4D12C8FC14 for ; Fri, 11 Jul 2008 16:18:27 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id m6BGIPUA082423 for ; Fri, 11 Jul 2008 10:18:26 -0600 (MDT) Message-ID: <487787CC.6020302@gritton.org> Date: Fri, 11 Jul 2008 10:18:20 -0600 From: James Gritton User-Agent: Thunderbird 2.0.0.9 (X11/20080228) MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Content-Type: multipart/mixed; boundary="------------020300050904010705090201" X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on gritton.org X-Virus-Status: Clean Subject: Simpler Vimage sysctls X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2008 16:18:27 -0000 This is a multi-part message in MIME format. --------------020300050904010705090201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit While working on combining jail_set and Vimage, I found that the sysctl virtualization hacks were more complicated than they needed to be. The extra "subs" and "mod" arguments in SYSCTL_HANDLER_V_ARGS don't need to be explicitly passed because they're members of the sysctl_v_oid structure passed in the oidp argument. By using oidp->oid_v_subs instead of subs (and same for mod), SYSCTL_HANDLER_V_ARGS becomes the same as SYSCTL_HANDLER_ARGS, and no longer need to be defined. With the handlers now taking the same arguments, the sysctl_oid and sysctl_v_oid structures become identical and sysctl_v_oid can go away. Unrelated to this is the various SYSCTL_V_XXX macros that refer to either SYSCTL_V_OID or SYSCTL_OID depending on the VIMAGE define. Since SYSCTL_V_OID already reduces to SYSCTL_OID if VIMAGE is undefined, those further switches are unnecessary. I'm including a diff that trims all this away, while keeping the same functionality. - Jamie --------------020300050904010705090201 Content-Type: text/plain; name="vs.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vs.diff" diff -r -u ov/src/sys/kern/kern_sysctl.c src/sys/kern/kern_sysctl.c --- ov/src/sys/kern/kern_sysctl.c Wed Jul 9 14:14:02 2008 +++ src/sys/kern/kern_sysctl.c Fri Jul 11 00:53:50 2008 @@ -849,7 +849,7 @@ #ifdef VIMAGE int -sysctl_handle_v_int(SYSCTL_HANDLER_V_ARGS) +sysctl_handle_v_int(SYSCTL_HANDLER_ARGS) { int tmpout, error = 0; @@ -1009,7 +1009,7 @@ #ifdef VIMAGE int -sysctl_handle_v_string(SYSCTL_HANDLER_V_ARGS) +sysctl_handle_v_string(SYSCTL_HANDLER_ARGS) { int error=0; char *tmparg; @@ -1088,7 +1088,7 @@ #ifdef VIMAGE int -sysctl_handle_v_opaque(SYSCTL_HANDLER_V_ARGS) +sysctl_handle_v_opaque(SYSCTL_HANDLER_ARGS) { int error, tries; u_int generation; @@ -1421,17 +1421,7 @@ if (error != 0) return (error); #endif -#ifndef VIMAGE error = oid->oid_handler(oid, arg1, arg2, req); -#else - if (oid->oid_v_subs) { - struct sysctl_v_oid *v_oid = (struct sysctl_v_oid *) oid; - error = v_oid->oid_handler(oid, arg1, arg2, - req, oid->oid_v_subs, - oid->oid_v_mod); - } else - error = oid->oid_handler(oid, arg1, arg2, req); -#endif return (error); } diff -r -u ov/src/sys/netinet/in_pcb.c src/sys/netinet/in_pcb.c --- ov/src/sys/netinet/in_pcb.c Wed Jul 9 14:14:48 2008 +++ src/sys/netinet/in_pcb.c Fri Jul 11 00:27:08 2008 @@ -121,11 +121,7 @@ else if ((var) > (max)) { (var) = (max); } static int -#ifndef VIMAGE sysctl_net_ipport_check(SYSCTL_HANDLER_ARGS) -#else -sysctl_net_ipport_check(SYSCTL_HANDLER_V_ARGS) -#endif { #ifdef VIMAGE INIT_VNET_INET(curvnet); diff -r -u ov/src/sys/netinet/ip_fw2.c src/sys/netinet/ip_fw2.c --- ov/src/sys/netinet/ip_fw2.c Wed Jul 9 14:14:49 2008 +++ src/sys/netinet/ip_fw2.c Fri Jul 11 00:27:29 2008 @@ -157,11 +157,7 @@ static int autoinc_step; #endif -#ifdef VIMAGE -extern int ipfw_chg_hook(SYSCTL_HANDLER_V_ARGS); -#else extern int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); -#endif #ifdef SYSCTL_NODE SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW, 0, "Firewall"); diff -r -u ov/src/sys/netinet/ip_fw_pfil.c src/sys/netinet/ip_fw_pfil.c --- ov/src/sys/netinet/ip_fw_pfil.c Wed Jul 9 14:14:49 2008 +++ src/sys/netinet/ip_fw_pfil.c Fri Jul 11 00:27:54 2008 @@ -75,11 +75,7 @@ # endif #endif -#ifdef VIMAGE -int ipfw_chg_hook(SYSCTL_HANDLER_V_ARGS); -#else int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); -#endif /* Dummynet hooks. */ ip_dn_ruledel_t *ip_dn_ruledel_ptr = NULL; @@ -493,11 +489,7 @@ #endif /* INET6 */ int -#ifdef VIMAGE -ipfw_chg_hook(SYSCTL_HANDLER_V_ARGS) -#else ipfw_chg_hook(SYSCTL_HANDLER_ARGS) -#endif { #ifdef VIMAGE INIT_VNET_IPFW(curvnet); diff -r -u ov/src/sys/netinet6/in6_proto.c src/sys/netinet6/in6_proto.c --- ov/src/sys/netinet6/in6_proto.c Wed Jul 9 14:14:55 2008 +++ src/sys/netinet6/in6_proto.c Fri Jul 11 00:28:18 2008 @@ -450,11 +450,7 @@ /* net.inet6.ip6 */ static int -#ifdef VIMAGE -sysctl_ip6_temppltime(SYSCTL_HANDLER_V_ARGS) -#else sysctl_ip6_temppltime(SYSCTL_HANDLER_ARGS) -#endif { INIT_VNET_INET6(curvnet); #ifdef VIMAGE @@ -477,11 +473,7 @@ } static int -#ifdef VIMAGE -sysctl_ip6_tempvltime(SYSCTL_HANDLER_V_ARGS) -#else sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS) -#endif { INIT_VNET_INET6(curvnet); #ifdef VIMAGE diff -r -u ov/src/sys/sys/sysctl.h src/sys/sys/sysctl.h --- ov/src/sys/sys/sysctl.h Wed Jul 9 14:15:24 2008 +++ src/sys/sys/sysctl.h Fri Jul 11 00:53:23 2008 @@ -115,9 +115,6 @@ #define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, int arg2, \ struct sysctl_req *req -#define SYSCTL_HANDLER_V_ARGS struct sysctl_oid *oidp, void *arg1, int arg2, \ - struct sysctl_req *req, int subs, int mod - /* definitions for sysctl_req 'lock' member */ #define REQ_UNLOCKED 0 /* not locked and not wired */ #define REQ_LOCKED 1 /* locked and not wired */ @@ -169,22 +166,6 @@ short oid_v_mod; }; -struct sysctl_v_oid { - struct sysctl_oid_list *oid_parent; - SLIST_ENTRY(sysctl_oid) oid_link; - int oid_number; - u_int oid_kind; - void *oid_arg1; - int oid_arg2; - const char *oid_name; - int (*oid_handler)(SYSCTL_HANDLER_V_ARGS); - const char *oid_fmt; - int oid_refcnt; - const char *oid_descr; - short oid_v_subs; - short oid_v_mod; -}; - #define SYSCTL_IN(r, p, l) (r->newfunc)(r, p, l) #define SYSCTL_OUT(r, p, l) (r->oldfunc)(r, p, l) @@ -196,9 +177,9 @@ int sysctl_handle_string(SYSCTL_HANDLER_ARGS); int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); -int sysctl_handle_v_int(SYSCTL_HANDLER_V_ARGS); -int sysctl_handle_v_string(SYSCTL_HANDLER_V_ARGS); -int sysctl_handle_v_opaque(SYSCTL_HANDLER_V_ARGS); +int sysctl_handle_v_int(SYSCTL_HANDLER_ARGS); +int sysctl_handle_v_string(SYSCTL_HANDLER_ARGS); +int sysctl_handle_v_opaque(SYSCTL_HANDLER_ARGS); /* * These functions are used to add/remove an oid from the mib. @@ -247,7 +228,7 @@ #ifdef VIMAGE #define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \ handler, fmt, descr) \ - static struct sysctl_v_oid sysctl__##parent##_##name = { \ + static struct sysctl_oid sysctl__##parent##_##name = { \ &sysctl_##parent##_children, { 0 }, nbr, kind, \ (void *) offsetof(struct mod, _##a1), a2, #name, \ handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \ @@ -277,15 +258,9 @@ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \ arg, len, sysctl_handle_string, "A", descr) -#ifdef VIMAGE #define SYSCTL_V_STRING(subs, mod, parent, nbr, name, access, sym, len, descr) \ SYSCTL_V_OID(subs, mod, parent, nbr, name, CTLTYPE_STRING|(access), \ sym, len, sysctl_handle_v_string, "A", descr) -#else -#define SYSCTL_V_STRING(subs, mod, parent, nbr, name, access, sym, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \ - &sym, len, sysctl_handle_string, "A", descr) -#endif #define SYSCTL_ADD_STRING(ctx, parent, nbr, name, access, arg, len, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING|(access), \ @@ -296,15 +271,9 @@ SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|(access), \ ptr, val, sysctl_handle_int, "I", descr) -#ifdef VIMAGE #define SYSCTL_V_INT(subs, mod, parent, nbr, name, access, sym, val, descr) \ SYSCTL_V_OID(subs, mod, parent, nbr, name, CTLTYPE_INT|(access), \ sym, val, sysctl_handle_v_int, "I", descr) -#else -#define SYSCTL_V_INT(subs, mod, parent, nbr, name, access, sym, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|(access), \ - &sym, val, sysctl_handle_int, "I", descr) -#endif #define SYSCTL_ADD_INT(ctx, parent, nbr, name, access, ptr, val, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_INT|(access), \ @@ -368,19 +337,11 @@ ptr, sizeof(struct type), sysctl_handle_opaque, \ "S," #type, descr) -#ifdef VIMAGE #define SYSCTL_V_STRUCT(subs, mod, parent, nbr, name, access, sym, \ type, descr) \ SYSCTL_V_OID(subs, mod, parent, nbr, name, CTLTYPE_OPAQUE|(access), \ sym, sizeof(struct type), sysctl_handle_v_opaque, \ "S," #type, descr) -#else -#define SYSCTL_V_STRUCT(subs, mod, parent, nbr, name, access, sym, \ - type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ - &sym, sizeof(struct type), sysctl_handle_opaque, \ - "S," #type, descr) -#endif #define SYSCTL_ADD_STRUCT(ctx, parent, nbr, name, access, ptr, type, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_OPAQUE|(access), \ @@ -391,17 +352,10 @@ SYSCTL_OID(parent, nbr, name, (access), \ ptr, arg, handler, fmt, descr) -#ifdef VIMAGE #define SYSCTL_V_PROC(subs, mod, parent, nbr, name, access, sym, arg, \ handler, fmt, descr) \ SYSCTL_V_OID(subs, mod, parent, nbr, name, (access), \ sym, arg, handler, fmt, descr) -#else -#define SYSCTL_V_PROC(subs, mod, parent, nbr, name, access, sym, arg, \ - handler, fmt, descr) \ - SYSCTL_OID(parent, nbr, name, (access), \ - &sym, arg, handler, fmt, descr) -#endif #define SYSCTL_ADD_PROC(ctx, parent, nbr, name, access, ptr, arg, handler, fmt, descr) \ sysctl_add_oid(ctx, parent, nbr, name, (access), \ @@ -420,9 +374,10 @@ #ifdef VIMAGE #define SYSCTL_RESOLVE_V_ARG1() do { \ char *cp; \ - switch (subs) { \ + switch (oidp->oid_v_subs) { \ case V_NET: \ - cp = (char *) TD_TO_VNET(curthread)->mod_data[mod]; \ + cp = (char *) \ + TD_TO_VNET(curthread)->mod_data[oidp->oid_v_mod]; \ break; \ case V_PROCG: \ cp = (char *) TD_TO_VPROCG(curthread); \ @@ -431,7 +386,7 @@ cp = (char *) TD_TO_VCPU(curthread); \ break; \ default: \ - panic("unsupported module id %d", subs); \ + panic("unsupported module id %d", oidp->oid_v_subs); \ } \ arg1 = cp + (size_t) arg1; \ } while (0) --------------020300050904010705090201-- From owner-freebsd-virtualization@FreeBSD.ORG Fri Jul 11 20:24:09 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C51221065674 for ; Fri, 11 Jul 2008 20:24:09 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id 9FEB48FC22 for ; Fri, 11 Jul 2008 20:24:09 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id m6BKO8AM011713 for ; Fri, 11 Jul 2008 14:24:08 -0600 (MDT) Message-ID: <4877C161.3080400@gritton.org> Date: Fri, 11 Jul 2008 14:24:01 -0600 From: James Gritton User-Agent: Thunderbird 2.0.0.9 (X11/20080228) MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org References: <487787CC.6020302@gritton.org> In-Reply-To: <487787CC.6020302@gritton.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on gritton.org X-Virus-Status: Clean Subject: Re: Simpler Vimage sysctls X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2008 20:24:09 -0000 OK, forget that last part about the SYSCTL_V_XXX macros not needing to be redefined for VIMAGE - I didn't notice that they link to the sysctl_handle_v_xxx functions. - Jamie James Gritton wrote: > While working on combining jail_set and Vimage, I found that the > sysctl virtualization hacks were more complicated than they needed to be. > > The extra "subs" and "mod" arguments in SYSCTL_HANDLER_V_ARGS don't > need to be explicitly passed because they're members of the > sysctl_v_oid structure passed in the oidp argument. By using > oidp->oid_v_subs instead of subs (and same for mod), > SYSCTL_HANDLER_V_ARGS becomes the same as SYSCTL_HANDLER_ARGS, and no > longer need to be defined. > > With the handlers now taking the same arguments, the sysctl_oid and > sysctl_v_oid structures become identical and sysctl_v_oid can go away. > > Unrelated to this is the various SYSCTL_V_XXX macros that refer to > either SYSCTL_V_OID or SYSCTL_OID depending on the VIMAGE define. > Since SYSCTL_V_OID already reduces to SYSCTL_OID if VIMAGE is > undefined, those further switches are unnecessary. > > I'm including a diff that trims all this away, while keeping the same > functionality. From owner-freebsd-virtualization@FreeBSD.ORG Sat Jul 12 01:55:26 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52FCA106564A for ; Sat, 12 Jul 2008 01:55:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outS.internet-mail-service.net (outs.internet-mail-service.net [216.240.47.242]) by mx1.freebsd.org (Postfix) with ESMTP id 327298FC17 for ; Sat, 12 Jul 2008 01:55:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 1505223EE; Fri, 11 Jul 2008 18:55:26 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id B66B62D6019; Fri, 11 Jul 2008 18:55:25 -0700 (PDT) Message-ID: <48780EF3.6030802@elischer.org> Date: Fri, 11 Jul 2008 18:54:59 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: James Gritton References: <487787CC.6020302@gritton.org> In-Reply-To: <487787CC.6020302@gritton.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org Subject: Re: Simpler Vimage sysctls X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 01:55:26 -0000 James Gritton wrote: > While working on combining jail_set and Vimage, I found that the sysctl > virtualization hacks were more complicated than they needed to be. > > The extra "subs" and "mod" arguments in SYSCTL_HANDLER_V_ARGS don't need > to be explicitly passed because they're members of the sysctl_v_oid > structure passed in the oidp argument. By using oidp->oid_v_subs > instead of subs (and same for mod), SYSCTL_HANDLER_V_ARGS becomes the > same as SYSCTL_HANDLER_ARGS, and no longer need to be defined. I've only looked at the sysctl macros supreficially but assumed that the redundant information was forward looking, and that there was support for future changes there. > > With the handlers now taking the same arguments, the sysctl_oid and > sysctl_v_oid structures become identical and sysctl_v_oid can go away. > > Unrelated to this is the various SYSCTL_V_XXX macros that refer to > either SYSCTL_V_OID or SYSCTL_OID depending on the VIMAGE define. Since > SYSCTL_V_OID already reduces to SYSCTL_OID if VIMAGE is undefined, those > further switches are unnecessary. umm but they call different code.. > > I'm including a diff that trims all this away, while keeping the same > functionality. > > - Jamie > > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Sat Jul 12 07:53:33 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE87D1065673 for ; Sat, 12 Jul 2008 07:53:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outK.internet-mail-service.net (outk.internet-mail-service.net [216.240.47.234]) by mx1.freebsd.org (Postfix) with ESMTP id B51448FC15 for ; Sat, 12 Jul 2008 07:53:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 776F32352; Sat, 12 Jul 2008 00:53:33 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id F23172D6319; Sat, 12 Jul 2008 00:53:32 -0700 (PDT) Message-ID: <487862DB.1040904@elischer.org> Date: Sat, 12 Jul 2008 00:52:59 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: James Gritton References: <487787CC.6020302@gritton.org> In-Reply-To: <487787CC.6020302@gritton.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org Subject: Re: Simpler Vimage sysctls X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 07:53:33 -0000 James Gritton wrote: > While working on combining jail_set and Vimage, I found that the sysctl > virtualization hacks were more complicated than they needed to be. > > The extra "subs" and "mod" arguments in SYSCTL_HANDLER_V_ARGS don't need > to be explicitly passed because they're members of the sysctl_v_oid > structure passed in the oidp argument. By using oidp->oid_v_subs > instead of subs (and same for mod), SYSCTL_HANDLER_V_ARGS becomes the > same as SYSCTL_HANDLER_ARGS, and no longer need to be defined. > > With the handlers now taking the same arguments, the sysctl_oid and > sysctl_v_oid structures become identical and sysctl_v_oid can go away. looking at this I see what you are saying, and it looks odd that there is a short oid_v_subs; short oid_v_mod; even in the non VIMAGE case.. and in the non vimage struct. I do wonder if Marko started moving towards this already and got stopped for some reason. Marko? From owner-freebsd-virtualization@FreeBSD.ORG Sat Jul 12 16:55:06 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BAEB1065681 for ; Sat, 12 Jul 2008 16:55:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2880E8FC12 for ; Sat, 12 Jul 2008 16:55:06 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 5652E41C648 for ; Sat, 12 Jul 2008 18:55:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id frbFnmxCfAzu for ; Sat, 12 Jul 2008 18:55:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 04DE041C64C; Sat, 12 Jul 2008 18:55:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 3EC1F44487F for ; Sat, 12 Jul 2008 16:55:00 +0000 (UTC) Date: Sat, 12 Jul 2008 16:54:59 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: freebsd-virtualization@freebsd.org Message-ID: <20080712165025.N57089@maildrop.int.zabbadoz.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: vimage(8) cleanup, what about submitting and to where? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 16:55:06 -0000 Hi, I am not sure about the plans for vimage(8) but it lives in usr.sbin and installs itself into /sbin. the .include is not last in the Makefile, etc. In case this will go in with any of the steps could you please fix it in at least //depot/projects/vimage/... I got a kernel compiled and booted today from that branch. Last I heard was that I should wait with any cleanup/corrections/style patches. Has that changed? What is the current state and what can I do if I'd like to have changes? I am asking because someone has to keep the 4(or more?) branches in synch that you have already created. /bz -- Bjoern A. Zeeb Stop bit received. Insert coin for new game. From owner-freebsd-virtualization@FreeBSD.ORG Sat Jul 12 20:27:50 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F79D1065671 for ; Sat, 12 Jul 2008 20:27:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outl.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id F02728FC0C for ; Sat, 12 Jul 2008 20:27:49 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id BCE5224A4; Sat, 12 Jul 2008 13:27:49 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 92E832D6018; Sat, 12 Jul 2008 13:27:49 -0700 (PDT) Message-ID: <48791396.2010404@elischer.org> Date: Sat, 12 Jul 2008 13:27:02 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <20080712165025.N57089@maildrop.int.zabbadoz.net> In-Reply-To: <20080712165025.N57089@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-virtualization@freebsd.org Subject: Re: vimage(8) cleanup, what about submitting and to where? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 20:27:50 -0000 Bjoern A. Zeeb wrote: > Hi, > > I am not sure about the plans for vimage(8) but it lives in usr.sbin > and installs itself into /sbin. the .include is not last in the > Makefile, etc. > > In case this will go in with any of the steps could you please fix it > in at least //depot/projects/vimage/... > > I got a kernel compiled and booted today from that branch. > > Last I heard was that I should wait with any cleanup/corrections/style > patches. Has that changed? What is the current state and what can I > do if I'd like to have changes? I am asking because someone has to > keep the 4(or more?) branches in synch that you have already created. > > /bz > Sorry, I have been busy with the birth of my son as you may have guessed, and Marko has been inundated by $WORK for a while. Marko has been committing a lot of style fixes to the p4 branch "vimage" and I have been integrating those changes across to the 'vimage-devel" branch. if you have p4 acccess you should feel free to commit any "obvious" fixes yourself and just post a summary to this mailing list. bigger changes we can discuss here. For example the changes suggested by James Gritton..