Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2014 03:24:48 +0000
From:      Wei Hu <weh@microsoft.com>
To:        =?iso-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>, John Baldwin <jhb@freebsd.org>, "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>
Cc:        "freebsd-xen@freebsd.org" <freebsd-xen@freebsd.org>, "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   RE: Directly reserve an interrupt IDT entry for Hyper-V
Message-ID:  <07ddd62e6cc84509aa76aa299c8dbd3c@BY1PR0301MB0902.namprd03.prod.outlook.com>
In-Reply-To: <53F4CDBA.8040500@citrix.com>
References:  <3defccd56bc0407c88bdda139b2462ac@BY1PR0301MB0902.namprd03.prod.outlook.com> <53F4A34A.4010807@citrix.com> <201408201131.29399.jhb@freebsd.org> <53F4CDBA.8040500@citrix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Roger and John,

I will request a free IDT slot instead of sharing the same vector with Xen. It would be great to have an API to do this. Before the API is available, I will probably use the same way as in vmm_ipi.c  to find a free slot.

Thanks so much for your help,
Wei
 

-----Original Message-----
From: Roger Pau Monné [mailto:roger.pau@citrix.com] 
Sent: Thursday, August 21, 2014 12:33 AM
To: John Baldwin; freebsd-drivers@freebsd.org
Cc: Wei Hu; freebsd-xen@freebsd.org; freebsd-virtualization@freebsd.org
Subject: Re: Directly reserve an interrupt IDT entry for Hyper-V

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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?07ddd62e6cc84509aa76aa299c8dbd3c>