From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 16:33:11 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 818D6896; Wed, 20 Aug 2014 16:33:11 +0000 (UTC) Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Cybertrust Public SureServer SV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2881C355F; Wed, 20 Aug 2014 16:33:09 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.01,903,1400025600"; d="scan'208";a="164166878" Received: from [IPv6:::1] (10.80.16.47) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Wed, 20 Aug 2014 12:33:00 -0400 Message-ID: <53F4CDBA.8040500@citrix.com> Date: Wed, 20 Aug 2014 18:32:58 +0200 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: John Baldwin , Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V References: <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> <53F4A34A.4010807@citrix.com> <201408201131.29399.jhb@freebsd.org> In-Reply-To: <201408201131.29399.jhb@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-DLP: MIA1 Cc: "freebsd-xen@freebsd.org" , "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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, 20 Aug 2014 16:33:11 -0000 On 20/08/14 17:31, John Baldwin wrote: > On Wednesday, August 20, 2014 9:31:54 am Roger Pau Monné wrote: >> Hello, >> >> I don't think using the same IDT vector is the right approach, I would >> just pick a different IDT vector and use that for Hyper-V. Using the >> same IDT vector (like your suggestion above) would prevent shipping a >> kernel with with both Hyper-V and Xen support (like it's done now in >> GENERIC). >> >> Roger. > > Hmm, can't you make this a runtime check to only call setidt() if you detect > you are under the appropriate hypervisor? > > Also, bhyve currently has a hackish way of requesting a free IDT slot. > Perhaps it would be best if I added little API to reserve an IDT slot assuming > that callers could accept a dynamic IDT vector rather than a static one. That would work for Xen. The IDT vector doesn't need to be fixed since it's registered with Xen when the system boots. Roger.