DragonFly BSD
DragonFly kernel List (threaded) for 2013-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [GSOC] Implement hardware nested page table support for vkernels


From: Mihai Carabas <mihai.carabas@xxxxxxxxx>
Date: Sun, 23 Jun 2013 22:16:33 +0300

--20cf30334e0354a78804dfd72209
Content-Type: text/plain; charset=ISO-8859-1

Hello,

I will make a brief description of what I've done this week. First I will
make a short paragraph with my joy while getting up a new development
environment.

At the begining of the week I received at my school some HP blades [1],
with Xeon processors that supports EPT. I decided to move from the Corei3
desktop and create a new developing environment. After struggling with the
HP iLO virtual console, I installed the DFly on it (at first I tried with
the virtual CD-ROM and it didn't work because dragonfly wasn't recognizing
the devices, than moved to the virtual USB drive and it worked). After a
lost day, I managed to install it and have this ACPI warnings[2]. Booting
without ACPI, failed with a panic [3] (the console has no buffer, so I
can't give you more output). There wouldn't be any problem (only annoying
prints to the console), but at a reboot the machine freezes in this state
[4]. Yesterday swildner came with the notice to put in boot/loader.conf the
"debug.acpi.disabled="thermal"" and the warning messages dissapeared, but
the reboot still blocks. Further more, I investigate with swildner and
found out that there is no driver for my 10gbit ethernet card[5] (Emulex).
swildner tried to make a port from the OCE Freebsd driver [6], but I didn't
get to test it yet. I will come the next days with a feedback.

Meanwhile, to not loose time, I moved my development process to a HP
desktop with a Corei5 (second generation) that came at the package with the
blades. The installation worked smoothly.

I created a new branch "virt_ept" and my code will be available on
Github[7] and on the Leaf[8], both remotes will be updated at the same time.

Until now I created some stub interfaces for the micro-hypervisor and
separate implementation in two files (vmx.c for Intel and svm.c for AMD).
The AMD implementation will remain as a stub for the moment. In the Intel
one, I started adding MSR registers and some bit values needed for
extension availability checks before executing the vmxon operation (there
are some default settings that need to be on 1 all the time). All of the
features probably will be on their default values. The EPT, VPID and some
VMENTER/VMEXIT features will be activated (I'm still studying the manual).
Also I created some wrappers on top of the asm instruction (vmxon, vmxoff,
vmwrite, vmread). I created a macro for the error code that will be
interpreted as is stated in the  "Section 30.2 CONVENTIONS" of the Intel
system programming guide - Vol3 [9]. The next step is to implement the
third algorithm from the "31.5.1 Algorithms for Determining VMX
Capabilities" in order to determine the default values of all the VMX
extensions. This algorithm will be also used when activating an extension,
in order to be sure it is supported (here we are particular interested in
EPT and VPID). After that I will execute the vmxon instruction to see if
the system works with the extensions activated. I will come with a reply
the next days with my results.


[1]
http://h10010.www1.hp.com/wwpc/ro/ro/sm/WF06b/3709945-3709945-3328410-3328419-3328419-5177949-5195853.html?dnr=1
[2] http://mihai.micosconstruct.ro/err2.png
[3] http://mihai.micosconstruct.ro/err.png
[4] http://mihai.micosconstruct.ro/err3.png
[5] http://mihai.micosconstruct.ro/ethernet.png
[6]
http://leaf.dragonflybsd.org/~swildner/0001-WIP-First-stab-at-porting-FreeBSD-s-oce-4-driver.patch
[7] https://github.com/mihaicarabas/dragonfly/commits/virt_ept
[8]
http://gitweb.dragonflybsd.org/~mihaic/dragonfly.git/shortlog/refs/heads/virt_ept
[9] http://mihai.micosconstruct.ro/intel-3c-part3.pdf

Thanks,
Mihai

--20cf30334e0354a78804dfd72209
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div style>I will make a brief descri=
ption of what I&#39;ve done this week. First I will make a short paragraph =
with my joy while getting up a new development environment.</div><div style=
>
<br></div><div style>At the begining of the week I received at my school so=
me HP blades [1], with Xeon processors that supports EPT. I decided to move=
 from the Corei3 desktop and create a new developing environment. After=A0s=
truggling with the HP iLO virtual console, I installed the DFly on it (at f=
irst I tried with the virtual CD-ROM and it didn&#39;t work because dragonf=
ly wasn&#39;t recognizing the devices, than moved to the virtual USB drive =
and it worked). After a lost day, I managed to install it and have this ACP=
I warnings[2]. Booting without ACPI, failed with a panic [3] (the console h=
as no buffer, so I can&#39;t give you more output). There wouldn&#39;t be a=
ny problem (only annoying prints to the console), but at a reboot the machi=
ne freezes in this state [4]. Yesterday swildner came with the notice to pu=
t in boot/loader.conf the &quot;debug.acpi.disabled=3D&quot;thermal&quot;&q=
uot; and the warning messages dissapeared, but the reboot still blocks. Fur=
ther more, I investigate with swildner and found out that there is no drive=
r for my 10gbit ethernet card[5] (Emulex). swildner tried to make a port fr=
om the OCE Freebsd driver [6], but I didn&#39;t get to test it yet. I will =
come the next days with a feedback.</div>
<div style><br></div><div style>Meanwhile, to not loose time, I moved my de=
velopment process to a HP desktop with a Corei5 (second generation) that ca=
me at the package with the blades. The installation worked smoothly.</div>
<div style><br></div><div style>I created a new branch &quot;virt_ept&quot;=
 and my code will be available on Github[7] and on the Leaf[8], both remote=
s will be updated at the same time.</div><div style><br></div><div style>
Until now I created some stub interfaces for the micro-hypervisor and separ=
ate implementation in two files (vmx.c for Intel and svm.c for AMD). The AM=
D implementation will remain as a stub for the moment. In the Intel one, I =
started adding MSR registers and some bit values needed for extension avail=
ability checks before executing the vmxon operation (there are some default=
 settings that need to be on 1 all the time). All of the features probably =
will be on their default values. The EPT, VPID and some VMENTER/VMEXIT feat=
ures will be activated (I&#39;m still studying the manual). Also I created =
some wrappers on top of the asm instruction (vmxon, vmxoff, vmwrite, vmread=
). I created a macro for the error code that will be interpreted as is stat=
ed in the =A0&quot;Section 30.2 CONVENTIONS&quot; of the Intel system progr=
amming guide - Vol3 [9]. The next step is to implement the third algorithm =
from the &quot;31.5.1 Algorithms for Determining VMX Capabilities&quot; in =
order to determine the default values of all the VMX extensions. This algor=
ithm will be also used when activating an extension, in order to be sure it=
 is supported (here we are particular interested in EPT and VPID). After th=
at I will execute the vmxon instruction to see if the system works with the=
 extensions activated. I will come with a reply the next days with my resul=
ts.</div>
<div style><br></div><div style><br></div><div style>[1]=A0<a href=3D"http:=
//h10010.www1.hp.com/wwpc/ro/ro/sm/WF06b/3709945-3709945-3328410-3328419-33=
28419-5177949-5195853.html?dnr=3D1">http://h10010.www1.hp.com/wwpc/ro/ro/sm=
/WF06b/3709945-3709945-3328410-3328419-3328419-5177949-5195853.html?dnr=3D1=
</a></div>
<div style>[2]=A0<a href=3D"http://mihai.micosconstruct.ro/err2.png";>http:/=
/mihai.micosconstruct.ro/err2.png</a></div><div style>[3]=A0<a href=3D"http=
://mihai.micosconstruct.ro/err.png">http://mihai.micosconstruct.ro/err.png<=
/a></div>
<div style>[4]=A0<a href=3D"http://mihai.micosconstruct.ro/err3.png";>http:/=
/mihai.micosconstruct.ro/err3.png</a></div><div style>[5]=A0<a href=3D"http=
://mihai.micosconstruct.ro/ethernet.png">http://mihai.micosconstruct.ro/eth=
ernet.png</a></div>
<div style>[6] <a href=3D"http://leaf.dragonflybsd.org/~swildner/0001-WIP-F=
irst-stab-at-porting-FreeBSD-s-oce-4-driver.patch">http://leaf.dragonflybsd=
.org/~swildner/0001-WIP-First-stab-at-porting-FreeBSD-s-oce-4-driver.patch<=
/a></div>
<div style>[7]=A0<a href=3D"https://github.com/mihaicarabas/dragonfly/commi=
ts/virt_ept">https://github.com/mihaicarabas/dragonfly/commits/virt_ept</a>=
</div><div style>[8]=A0<a href=3D"http://gitweb.dragonflybsd.org/~mihaic/dr=
agonfly.git/shortlog/refs/heads/virt_ept">http://gitweb.dragonflybsd.org/~m=
ihaic/dragonfly.git/shortlog/refs/heads/virt_ept</a></div>
<div style>[9] <a href=3D"http://mihai.micosconstruct.ro/intel-3c-part3.pdf=
">http://mihai.micosconstruct.ro/intel-3c-part3.pdf</a></div><br><div style=
>Thanks,</div><div style>Mihai</div></div>

--20cf30334e0354a78804dfd72209--



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]