From owner-freebsd-virtualization@FreeBSD.ORG Mon Mar 18 12:36:04 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7F9D1C2E; Mon, 18 Mar 2013 12:36:04 +0000 (UTC) (envelope-from roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [46.33.159.39]) by mx1.freebsd.org (Postfix) with ESMTP id ADCAF82E; Mon, 18 Mar 2013 12:36:03 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.84,865,1355097600"; d="scan'208";a="2605163" Received: from lonpmailmx01.citrite.net ([10.30.203.162]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 18 Mar 2013 12:35:57 +0000 Received: from [192.168.1.30] (10.30.249.242) by LONPMAILMX01.citrite.net (10.30.203.162) with Microsoft SMTP Server id 8.3.298.1; Mon, 18 Mar 2013 12:35:56 +0000 Message-ID: <51470A2B.5040609@citrix.com> Date: Mon, 18 Mar 2013 13:35:55 +0100 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: "freebsd-xen@freebsd.org" Subject: Difference in event channel implementation for Xen PV vs HVM guests Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: dfr@FreeBSD.org, gibbs@FreeBSD.org, freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 18 Mar 2013 12:36:04 -0000 Hello, While working on improving XENHVM (I've been looking at adding PV timers), I've realized that the event channel implementation in PV vs HVM mode differs greatly. Xen PV port uses sys/xen/evtchn/evtchn.c while Xen HVM uses sys/dev/xenpci/evtchn.c, and the Xen HVM implementation is greatly reduced (only contains the necessary functions to operate backends/frontends). To implement PV timers I need to expand the event channel interface for XENHVM, and I was wondering why FreeBSD choose to have two different implementations, the main difference between PV and HVM is the event callback, but I guess this can be abstracted between the two different implementations, and then everything else could be reused. Am I missing something obvious? Is there any known technical problem in modifying XENHVM to use the full event channel implementation present in sys/xen/evtchn/evtchn.c that prevented XENHVM from using it in the first place? (Sorry if I've Cc'ed someone not related) Thanks, Roger.