Re: Mentor of the Project "PCI frontend XEN PV driver"?

Bei Guan gbtju85 at gmail.com
Fri Apr 19 17:47:26 UTC 2013


2013/4/19 Justin T. Gibbs <gibbs at freebsd.org>

> On Apr 18, 2013, at 7:14 AM, Bei Guan <gbtju85 at gmail.com> wrote:
>
> 2013/4/16 Justin T. Gibbs <gibbs at freebsd.org>
>
>> On Apr 12, 2013, at 3:02 AM, Bei Guan <gbtju85 at gmail.com> wrote:
>>
>> > Thank you for your reply.
>> >
>> > I think it's also a good project for me to write a SCSI or USB PV
>> frontend for FreeBSD. I'm interest in Xen and have done some development
>> about Xen PV and HVM, but I didn't do any development on FreeBSD. As to
>> this project, where should I start? Is there any other similar FreeBSD
>> project I can refer to?
>>
>> Front-end drivers for network, block, and control already exist and
>> should serve as a good starting point for the creation of another PV driver.
>>
>> I've also updated the ideas page to include more information about our
>> existing XEN implementation and what will be required for these projects.
>>
>> > In order to write a SCSI or USB PV driver, do we need the Xen PV
>> drivers in FreeBSD, such as event channel, hypercalls, xenbus, and so on?
>>
>> Yes, FreeBSD already has support for all XenBus APIs needed to write
>> these drivers.  See "sys/xen" and "sys/dev/xen" in the FreeBSD kernel
>> source tree.
>>
>> > You said the "drivers can be developed using an HVM guest", can you
>> give me more information about it?
>>
>> Typically, you install FreeBSD using standard install media as a full HVM
>> guest on a system running Xen.  Then compile a custom kernel using the
>> XENHVM config file in order to activate the existing PV drivers.
>>
> Hi Justin,
>
> Does this project need to provide USB/SCSI PV drivers to both 32-bit and
> 64-bit FreeBSD?
>
>
> Idealy, yes.
>
> I've compiled the FreeBSD 8.3 (i386) as Xen DomU with the XENHVM config.
> But, It cannot boot successfully. The screenshot is attached.
> According to the page https://wiki.freebsd.org/FreeBSD/Xen , 32-bit
> FreeBSD should work when compiled with XENHVM config.
>
>
> I have never tried a 32bit XENHVM configuration, but I know of no reasons
> why it should not work.  The issue shown by your screen shot (in your other
> email) is probably due to a PV driver failing to fully attach, or a mistake
> in the merge of SVN changeset 211236 to releng-8.  I would suggest
> instrumenting sys/xen/xenbus/xenbusb.c to determine the driver that is
> still holding up the root mount process and then go from there.  See
> xenbusb_attach() and xenbusb_nop_confighook_cb() for details.
>
> You may also want to invest in changing your Xen configuration to use a
> serial console.  This will allow you to properly log and examine all kernel
> messages emitted during your test runs.
>
Hi Justin,

The 64bit FreeBSD 8.3 with the XENHVM configure also cannot boot. I have
got the boot log using a serial console. All the two logs are attached.
My environment is Xen-4.2 + ubuntu10.04 (Dom0 installed with the package :
linux-image-2.6.32-5-xen-amd64_2.6.32-35_amd64.deb).
I will inspect it more tomorrow.

Thanks for your information.



> I will try the 64-bit FreeBSD. However, if the FreeBSD boot successfully
> (compiled with XENHVM config), how can we know it really uses the PV
> drivers instead of the native drivers?
>
>
> Your configuration is definitely using PV drivers.  xenbusb_front, xn, and
> xbd, are all PV drivers.
>
> --
> Justin
>



-- 
Best Regards,
Bei Guan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freebsd64_xenhvm_bootError.log
Type: application/octet-stream
Size: 5514 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/soc-status/attachments/20130420/94aa9c1d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freebsd32_xenhvm_bootError.log
Type: application/octet-stream
Size: 5411 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/soc-status/attachments/20130420/94aa9c1d/attachment-0001.obj>


More information about the soc-status mailing list