<div dir="ltr">Hi Cole,<div>     Long time no see~</div><div>     Thanks for giving help me about AArch64 of virtio-pci. You have rich experience about this,</div><div>I am green hand and seeking for your help again :-)<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 13 June 2016 at 06:21, Cole Robinson <span dir="ltr"><<a href="mailto:crobinso@redhat.com" target="_blank">crobinso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On 06/12/2016 10:29 AM, Kevin Zhao wrote:<br>
> Hi Cole && All,<br>
>      Nice meeting you in the libvirt mail-list. Greetings from Linaro !!!<br>
>      I am Kevin Zhao from Linaro and working for OpenStack on Aarch64.<br>
> Nowadays I find that the default "virtio" bus is "virtio-mmio" , not<br>
> "virtio-pci". Since virtio-mmio do not has the host plugged function ,<br>
> something is wrong with the function in OpenStack Nova.<br>
><br>
>       Then I search and find some mail information as belows by Cole :-)<br>
>       1) <a href="https://www.redhat.com/archives/libvir-list/2015-December/msg00217.html" rel="noreferrer" target="_blank">https://www.redhat.com/archive<wbr>s/libvir-list/2015-December/<wbr>msg00217.html</a><br>
>       2) <a href="https://www.redhat.com/archives/libvir-list/2016-March/msg00167.html" rel="noreferrer" target="_blank">https://www.redhat.com/archive<wbr>s/libvir-list/2016-March/<wbr>msg00167.html</a><br>
><br>
>        I see some efforts have been doing by you. Really thanks for your<br>
> efforts for Aarch64. And I have some small questions.<br>
>       1. Is Libvirt planning to replace the default virtio-mmio to virtio-pci<br>
> for Aarch64?<br>
<br>
</span>We have vague plans to maybe change the virtio-mmio default to virtio-pci at<br>
some future point, based on some new enough qemu machine type. But the main<br>
blocker is that most linux distributions currently don't work out of the box<br>
with virtio-pci, at least Fedora doesn't as far as I know. So changing the<br>
default now is pre-mature</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
>       2. If not , how can I change the xml file(generated by Virsh) for<br>
> virtio-pci  so that Qemu can recognize it ?<br>
><br>
<br>
</span>The latest libvirt-1.3.5 release accepts device XML containing <address<br>
type='pci'/> . The address block is an explicit request to libvirt to<br>
'allocate a PCI address' rather than the default virtio-mmio. So for example<br>
if you want to specify a virtio nic, but have it use virtio-pci rather than<br>
virtio-mmio, you can do something like:<br>
<br>
    <interface type='network'><br>
      <source network='default'/><br>
      <model type='virtio'/><br>
      <address type='pci'/><br>
    </interface><br></blockquote><div><br></div><div>I have changed the libvirt to 1.3.5 now, also add the pci to net-device xml like: </div><div> <address type='pci'/>,then use the virsh to boot the VM,the total xml file is:</div><div><div> <a href="https://paste.fedoraproject.org/409534/71434141/">https://paste.fedoraproject.org/409534/71434141/</a></div></div><div><br></div><div>After booting, the eth0 device disappear(eth0 occur when the address is virtio-mmio),</div><div>but I can find another net-device, also it can't work for dhcp: </div><div><div>2: enp2s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000</div><div>    link/ether 52:54:00:0d:25:26 brd ff:ff:ff:ff:ff:ff</div><div>    inet6 fe80::5054:ff:fe0d:2526/64 scope link </div><div>       valid_lft forever preferred_lft forever</div></div><div>Running lspci:</div><div><div>02:01.0 Ethernet controller: Red Hat, Inc Virtio network device</div></div><div><br></div><div>My question is: </div><div>1. I use Debian 8 AArch64 as the Guest OS, do you think the virtio-pci for net-device works is OK ?</div><div><br></div><div>2. If I change the disk address-type to pci(Libvirt pass the virtio pci parameters to Qemu for disk device), but I can't boot </div><div>the VM. Does Qemu not support virtio pci for  disk device in AArch64?</div><div><br></div><div>Big Big Thanks~</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
But there isn't currently any switch to say 'always give me virtio-pci instead<br>
of virtio-mmio'<br>
<span><font color="#888888"><br>
- Cole<br>
</font></span></blockquote></div><br></div></div></div></div>