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

Re: [Xen-users] Xen as Guest L1 - VirtIO front-end



On Thu, May 28, 2015 at 12:56 PM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
On Thu, 2015-05-28 at 11:45 +0100, George Dunlap wrote:
> On Wed, May 27, 2015 at 9:47 PM, Alex Palesandro <palexster@xxxxxxxxx> wrote:
> > Hi,
> >
> > I'm trying to virtualize Xen as L1 nested hypervisor. However, when I try to
> > boot Dom0 linux kernel, the boot process hangs (relevant output should be
> > attached).
> >
> > I'm using KVM on ArchLinux with Linux 4.0.3 with qemu 2.3.0. The guest
> > hypervisor is Xen 4.5 with Ubuntu 14.10 (Linux 3.16) as Dom0.
> > Looking at the log, I'm guessing that the problem concerns VirtIO. Any Idea
> > for a possible workaround? Is it possible to use the VirtIO front-end in
> > Dom0?
>
> Have you tried disabling virtio (i.e., using only emulated devices)
> and seeing if that works? That would give you a pretty clear "smoking
> gun" as it were.
>
> I don't know much about virtio. But I wouldn't be surprised if the
> virtio code assumes that it knows how to make hypercalls and talk to
> the hypervisor. But in this case, dom0 is technically an L2 guest (a
> VM running on L1 Xen running on L0 KVM); in which case some
> "hypervisor interactions" will end up in Xen (e.g., pvcpuid, int 0x81
> hypercalls), and other "hypervisor interactions" will end up in
> KVM/qemu (at very least, MMIO accesses from the virtio PCI bus
> devices).
>
> Not that it might not be able to be made to work, but I'm not at all
> surprised to found out that it doesn't. :-)

IIRC virtio does not use the kernel's DMA API, since in general it
doesn't need to. But under Xen the DMA API is the thing which arranges
inside a PV domain (which includes dom0) to translate guest physical
addresses to machine physical ones.

So virtio in L1 dom0 ends up using guest physical addresses, whereas the
backend (in L0 KVM) is seeing what would be machine addresses to the L1
Xen.

Thanks a lot for your answers.Â
With those new details, I found this set of patches that seems to address the DMA API issue: Âhttp://lists.celinuxforum.org/pipermail/virtualization/2014-September/027378.html
However, IIUC those patches were not accepted into the mainline tree:Âhttp://www.spinics.net/lists/linux-s390/msg08436.html

The reason I wanted to adopt virtio was twofold. It is the standard set up for VM OpenStack + KVM based clouds and it normally performs better than emulated devices AFAIK.
Initially, I was using an OpenStack cloud as normal user, so AFAIK I could not modify completely the VM template. Than, testing on my notebook with the same configuration, Linux Dom0 boots correctly removing every VirtIO device.Â

I'll try to apply them and see if they fix the issue.

Alex


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.