From owner-freebsd-virtualization@FreeBSD.ORG Mon Mar 18 13:08:53 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 22EA558D; Mon, 18 Mar 2013 13:08:53 +0000 (UTC) (envelope-from gibbs@freebsd.org) Received: from aslan.scsiguy.com (www.scsiguy.com [70.89.174.89]) by mx1.freebsd.org (Postfix) with ESMTP id B69AD9A9; Mon, 18 Mar 2013 13:08:52 +0000 (UTC) Received: from [192.168.0.99] (macbook.scsiguy.com [192.168.0.99]) (authenticated bits=0) by aslan.scsiguy.com (8.14.5/8.14.5) with ESMTP id r2ID8lVa076504 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 18 Mar 2013 07:08:48 -0600 (MDT) (envelope-from gibbs@freebsd.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Difference in event channel implementation for Xen PV vs HVM guests From: "Justin T. Gibbs" In-Reply-To: <51470A2B.5040609@citrix.com> Date: Mon, 18 Mar 2013 07:08:49 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <9AE68E59-739C-499C-9991-0C84D4584981@freebsd.org> References: <51470A2B.5040609@citrix.com> To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= X-Mailer: Apple Mail (2.1503) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (aslan.scsiguy.com [192.168.0.4]); Mon, 18 Mar 2013 07:08:49 -0600 (MDT) Cc: "freebsd-xen@freebsd.org" , dfr@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 13:08:53 -0000 On Mar 18, 2013, at 6:35 AM, Roger Pau Monn=E9 = wrote: > Hello, >=20 > 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). >=20 > 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? >=20 > 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? >=20 > (Sorry if I've Cc'ed someone not related) >=20 > Thanks, Roger. > _______________________________________________ > 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" Hi Roger, I know of no reasons why XENHVM cannot use the full event channel interface. In fact, Spectra Logic implemented PV timers and a general cleanup of the HVM event channel interface. I haven't merged it back yet because I know the changes break PV and I haven't found time to clean up the PV code, merge the HVM and PV event channel systems, and move IPI/MSI delivery to event channels. I've uploaded Spectra's changes here: http://people.freebsd.org/~gibbs/xen_ev/ The diffs file provides the history of the original checkins to our Perforce repository. The tar file includes all the files that have been modified and reflects our efforts to keep our code base in sync with stable/9. Apart from the PV issues outlined above, I would expect the code provided to just drop right in to stable/9. Unfortunately, Xen support is not a current priority for Spectra so I don't have a lot of day job time to focus on getting this code back into FreeBSD. However, if this code looks like it would suite your needs, and you have resources for testing i386/PV, I'd be happy to collaborate with you and will make the time to help get this committed. -- Justin