summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/book-enea-nfv-access-guide/doc/hypervisor_virtualization.xml229
1 files changed, 124 insertions, 105 deletions
diff --git a/doc/book-enea-nfv-access-guide/doc/hypervisor_virtualization.xml b/doc/book-enea-nfv-access-guide/doc/hypervisor_virtualization.xml
index 9733544..76a2568 100644
--- a/doc/book-enea-nfv-access-guide/doc/hypervisor_virtualization.xml
+++ b/doc/book-enea-nfv-access-guide/doc/hypervisor_virtualization.xml
@@ -18,23 +18,23 @@
18 18
19 <para>QEMU can make use of KVM when running a target architecture that is 19 <para>QEMU can make use of KVM when running a target architecture that is
20 the same as the host architecture. For instance, when running 20 the same as the host architecture. For instance, when running
21 qemu-system-x86_64 on an x86-64 compatible processor (containing 21 qemu-system-aarch64 on an aarch64 compatible processor (containing
22 virtualization extensions Intel VT or AMD-V), you can take advantage of 22 virtualization extensions AMD-V or Intel VT), you can take advantage of
23 the KVM acceleration, giving you benefit for your host and your guest 23 the KVM acceleration, giving you benefit for your host and your guest
24 system.</para> 24 system.</para>
25 25
26 <para>Enea NFV Access includes an optimizied version of QEMU with KVM-only 26 <para>Enea NFV Access includes an optimized version of QEMU with KVM-only
27 support. To use KVM pass<command> --enable-kvm</command> to QEMU.</para> 27 support. To use KVM pass<command> --enable-kvm</command> to QEMU.</para>
28 28
29 <para>The following is an example of starting a guest:</para> 29 <para>The following is an example of starting a guest:</para>
30 30
31 <programlisting>taskset -c 0,1 qemu-system-x86_64 \ 31 <programlisting>taskset -c 0,1 qemu-system-aarch64 \
32-cpu host -M q35 -smp cores=2,sockets=1 \ 32-cpu host -machine virt,gic_version=3 -smp cores=2,sockets=1 \
33-vcpu 0,affinity=0 -vcpu 1,affinity=1 \ 33-vcpu 0,affinity=0 -vcpu 1,affinity=1 \
34-enable-kvm -nographic \ 34-enable-kvm -nographic \
35-kernel bzImage \ 35-kernel Image \
36-drive file=enea-nfv-access-guest-qemux86-64.ext4,if=virtio,format=raw \ 36-drive file=enea-nfv-access-guest-qemuarm64.ext4,if=virtio,format=raw \
37-append 'root=/dev/vda console=ttyS0,115200' \ 37-append 'root=/dev/vda console=ttyAMA0,115200' \
38-m 4096 \ 38-m 4096 \
39-object memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on \ 39-object memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on \
40-numa node,memdev=mem -mem-prealloc</programlisting> 40-numa node,memdev=mem -mem-prealloc</programlisting>
@@ -97,9 +97,7 @@
97 97
98 <para>If the hardware does not have an IOMMU (known as "Intel VT-d" on 98 <para>If the hardware does not have an IOMMU (known as "Intel VT-d" on
99 Intel-based machines and "AMD I/O Virtualization Technology" on AMD-based 99 Intel-based machines and "AMD I/O Virtualization Technology" on AMD-based
100 machines), it will not be possible to assign devices in KVM. 100 machines), it will not be possible to assign devices in KVM. </para>
101 Virtualization Technology features (VT-d, VT-x, etc.) must be enabled from
102 BIOS on the host target before starting a virtual machine.</para>
103 </section> 101 </section>
104 102
105 <section id="net_in_guest"> 103 <section id="net_in_guest">
@@ -156,19 +154,10 @@
156 to appear and behave as if they were physically attached to the guest 154 to appear and behave as if they were physically attached to the guest
157 operating system.</para> 155 operating system.</para>
158 156
159 <para>Preparing an Intel system for PCI passthrough:</para> 157 <para>Preparing a system for PCI passthrough:</para>
160 158
161 <itemizedlist> 159 <itemizedlist>
162 <listitem> 160 <listitem>
163 <para>Enable the Intel VT-d extensions in BIOS</para>
164 </listitem>
165
166 <listitem>
167 <para>Activate Intel VT-d in the kernel by using
168 <literal>intel_iommu=on</literal> as a kernel boot parameter</para>
169 </listitem>
170
171 <listitem>
172 <para>Allow unsafe interrupts in case the system doesn't support 161 <para>Allow unsafe interrupts in case the system doesn't support
173 interrupt remapping. This can be done using 162 interrupt remapping. This can be done using
174 <literal>vfio_iommu_type1.allow_unsafe_interrupts=1</literal> as a 163 <literal>vfio_iommu_type1.allow_unsafe_interrupts=1</literal> as a
@@ -179,15 +168,17 @@
179 <para>Create guest with direct passthrough via VFIO framework like 168 <para>Create guest with direct passthrough via VFIO framework like
180 so:</para> 169 so:</para>
181 170
182 <programlisting>-device vfio-pci,host=0000:03:10.2 \</programlisting> 171 <programlisting>-device vfio-pci,host=0001:01:00.1 \</programlisting>
172
173 <para>On the host, there are Virtual Functions for each physical
174 Ethernet port. The primary VF has to be used for a guest network to
175 access, before starting QEMU:</para>
183 176
184 <para>On the host, one or more VirtualFunctions (VFs) must be created in 177 <programlisting>$ modprobe vfio_pci
185 order to be allocated for a guest network to access, before starting 178$ dpdk-devbind.py --bind=vfio-pci 0001:01:00.1</programlisting>
186 QEMU:</para>
187 179
188 <programlisting>$ echo 2 &gt; /sys/class/net/eno3/device/sriov_numvfs 180 <para>For more details related to Virtual Functions, see: <ulink
189$ modprobe vfio_pci 181 url="http://dpdk.org/doc/guides/nics/thunderx.html">http://dpdk.org/doc/guides/nics/thunderx.html</ulink>.</para>
190$ dpdk-devbind.py --bind=vfio-pci 0000:03:10.2</programlisting>
191 </section> 182 </section>
192 183
193 <section id="multiqueue"> 184 <section id="multiqueue">
@@ -215,7 +206,7 @@ where vectors is calculated as: 2 + 2 * queues number.</programlisting>
215DPDK Virtio PMD 206DPDK Virtio PMD
216$ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting> 207$ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting>
217 208
218 <para>For QEMU documentation please see: <ulink 209 <para>For QEMU documentation, see: <ulink
219 url="https://qemu.weilnetz.de/doc/qemu-doc.html">https://qemu.weilnetz.de/doc/qemu-doc.html</ulink>.</para> 210 url="https://qemu.weilnetz.de/doc/qemu-doc.html">https://qemu.weilnetz.de/doc/qemu-doc.html</ulink>.</para>
220 </section> 211 </section>
221 </section> 212 </section>
@@ -340,12 +331,12 @@ $ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting>
340 following example:</para> 331 following example:</para>
341 332
342 <programlisting>&lt;os&gt; 333 <programlisting>&lt;os&gt;
343 &lt;kernel&gt;bzImage&lt;/kernel&gt; 334 &lt;kernel&gt;Image&lt;/kernel&gt;
344&lt;/os&gt; 335&lt;/os&gt;
345&lt;devices&gt; 336&lt;devices&gt;
346 &lt;disk type='file' device='disk'&gt; 337 &lt;disk type='file' device='disk'&gt;
347 &lt;driver name='qemu' type='raw' cache='none'/&gt; 338 &lt;driver name='qemu' type='raw' cache='none'/&gt;
348 &lt;source file='enea-nfv-access-guest-qemux86-64.ext4'/&gt; 339 &lt;source file='enea-nfv-access-guest-qemuarm64.ext4'/&gt;
349 &lt;target dev='vda' bus='virtio'/&gt; 340 &lt;target dev='vda' bus='virtio'/&gt;
350 &lt;/disk&gt; 341 &lt;/disk&gt;
351&lt;/devices&gt;</programlisting> 342&lt;/devices&gt;</programlisting>
@@ -356,7 +347,7 @@ $ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting>
356 347
357 <para>Command <command>virsh create</command> starts a guest:</para> 348 <para>Command <command>virsh create</command> starts a guest:</para>
358 349
359 <programlisting>virsh create example-guest-x86.xml</programlisting> 350 <programlisting>virsh create example-guest-arm.xml</programlisting>
360 351
361 <para>If further configurations are needed before the guest is reachable 352 <para>If further configurations are needed before the guest is reachable
362 through <literal>ssh</literal>, a console can be started using command 353 through <literal>ssh</literal>, a console can be started using command
@@ -370,7 +361,7 @@ $ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting>
370 the guest XML file:</para> 361 the guest XML file:</para>
371 362
372 <programlisting>&lt;os&gt; 363 <programlisting>&lt;os&gt;
373 &lt;cmdline&gt;console=ttyS0,115200&lt;/cmdline&gt; 364 &lt;cmdline&gt;console=ttyAMA0,115200&lt;/cmdline&gt;
374&lt;/os&gt; 365&lt;/os&gt;
375&lt;devices&gt; 366&lt;devices&gt;
376 &lt;console type='pty'&gt; 367 &lt;console type='pty'&gt;
@@ -477,14 +468,14 @@ $ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting>
477 now, only bridged networks are supported (those where the user has 468 now, only bridged networks are supported (those where the user has
478 to manually create the bridge).</para> 469 to manually create the bridge).</para>
479 470
480 <programlisting> &lt;interface type='vhostuser'&gt; 471 <programlisting> &lt;qemu:commandline&gt;
481 &lt;mac address='00:00:00:00:00:01'/&gt; 472 &lt;qemu:arg value='-chardev'/&gt;
482 &lt;source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/&gt; 473 &lt;qemu:arg value='socket,id=charnet0,path=/var/run/openvswitch/vhost-user1'/&gt;
483 &lt;model type='virtio'/&gt; 474 &lt;qemu:arg value='-netdev'/&gt;
484 &lt;driver queues='1'&gt; 475 &lt;qemu:arg value='type=vhost-user,id=hostnet0,chardev=charnet0'/&gt;
485 &lt;host mrg_rxbuf='off'/&gt; 476 &lt;qemu:arg value='-device'/&gt;
486 &lt;/driver&gt; 477 &lt;qemu:arg value='virtio-net-pci,netdev=hostnet0,id=net0,mac=00:00:00:00:00:01,bus=pcie.0,addr=0x2'/&gt;
487 &lt;/interface&gt;</programlisting> 478 &lt;/qemu:commandline&gt;</programlisting>
488 </listitem> 479 </listitem>
489 480
490 <listitem> 481 <listitem>
@@ -497,40 +488,68 @@ $ testpmd -c 0x7 -- -i --rxq=2 --txq=2 --nb-cores=2 ...</programlisting>
497 PCI devices to appear and behave as if they were physically attached 488 PCI devices to appear and behave as if they were physically attached
498 to the guest operating system.</para> 489 to the guest operating system.</para>
499 490
500 <para>Preparing an Intel system for PCI passthrough is done like 491 <para>Preparing a system for PCI passthrough is done like so:</para>
501 so:</para>
502 492
503 <itemizedlist> 493 <itemizedlist>
504 <listitem> 494 <listitem>
505 <para>Enable the Intel VT-d extensions in BIOS</para> 495 <para>Allow unsafe interrupts in case the system doesn't support
496 interrupt remapping. This can be done using
497 <literal>vfio_iommu_type1.allow_unsafe_interrupts=1</literal> as
498 a boot kernel parameter.</para>
506 </listitem> 499 </listitem>
507 500
508 <listitem> 501 <listitem>
509 <para>Activate Intel VT-d in the kernel by using 502 <para>Change the owner of the
510 <literal>intel_iommu=on</literal> as a kernel boot 503 <literal>/dev/vfio/&lt;group&gt;</literal> to qemu and edit
511 parameter</para> 504 <literal>/etc/libvirt/qemu.conf</literal> to explicitly allow
505 permission to it:</para>
506
507 <para><programlisting>$ chown qemu:qemu /dev/vfio/66
508$ ls -l /dev/vfio/66
509crw------- 1 qemu qemu 244, 0 Dec 4 08:24 /dev/vfio/66
510
511$ cat /etc/libvirt/qemu.conf
512...
513cgroup_device_acl = [
514 "/dev/null", "/dev/full", "/dev/zero",
515 "/dev/random", "/dev/urandom",
516 "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
517 "/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
518 <command>"/dev/vfio/66"</command>,
519]
520...</programlisting></para>
512 </listitem> 521 </listitem>
513 522
514 <listitem> 523 <listitem>
515 <para>Allow unsafe interrupts in case the system doesn't support 524 <para>Increase the locked memory limits within the libvirtd
516 interrupt remapping. This can be done using 525 service file :</para>
517 <literal>vfio_iommu_type1.allow_unsafe_interrupts=1</literal> as 526
518 a boot kernel parameter.</para> 527 <para><programlisting>$ cat /lib/systemd/system/libvirtd.service
528...
529[Service]
530Type=forking
531PIDFile=/var/run/libvirtd.pid
532EnvironmentFile=-/etc/sysconfig/libvirtd
533<command>LimitMEMLOCK=infinity</command>
534ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS
535ExecReload=/bin/kill -HUP $MAINPID
536KillMode=process
537Restart=on-failure
538# Override the maximum number of opened files
539#LimitNOFILE=2048
540...</programlisting></para>
519 </listitem> 541 </listitem>
520 </itemizedlist> 542 </itemizedlist>
521 543
522 <para>VFs must be created on the host before starting the 544 <para>VFs must be created on the host before starting the
523 guest:</para> 545 guest:</para>
524 546
525 <programlisting>$ echo 2 &gt; /sys/class/net/eno3/device/sriov_numvfs 547 <programlisting>$ modprobe vfio_pci
526$ modprobe vfio_pci 548$ dpdk-devbind.py --bind=vfio-pci 0001:01:00.1
527$ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0 549 &lt;qemu:commandline&gt;
528 &lt;interface type='hostdev' managed='yes'&gt; 550 &lt;qemu:arg value='-device'/&gt;
529 &lt;source&gt; 551 &lt;qemu:arg value='vfio-pci,host=0001:01:00.1'/&gt;
530 &lt;address type='pci' domain='0x0' bus='0x03' slot='0x10' function='0x0'/&gt; 552 &lt;/qemu:commandline&gt;</programlisting>
531 &lt;/source&gt;
532 &lt;mac address='52:54:00:6d:90:02'/&gt;
533 &lt;/interface&gt;</programlisting>
534 </listitem> 553 </listitem>
535 554
536 <listitem> 555 <listitem>
@@ -542,8 +561,8 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
542 <programlisting> &lt;interface type='bridge'&gt; 561 <programlisting> &lt;interface type='bridge'&gt;
543 &lt;mac address='52:54:00:71:b1:b6'/&gt; 562 &lt;mac address='52:54:00:71:b1:b6'/&gt;
544 &lt;source bridge='ovsbr0'/&gt; 563 &lt;source bridge='ovsbr0'/&gt;
564 &lt;model type='rtl8139'/&gt;
545 &lt;virtualport type='openvswitch'/&gt; 565 &lt;virtualport type='openvswitch'/&gt;
546 &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/&gt;
547 &lt;/interface&gt;</programlisting> 566 &lt;/interface&gt;</programlisting>
548 567
549 <para>For further details on the network XML format, see <ulink 568 <para>For further details on the network XML format, see <ulink
@@ -558,58 +577,48 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
558 <section id="guest-config-vhost-user-interface"> 577 <section id="guest-config-vhost-user-interface">
559 <title>Guest configuration with vhost-user interface</title> 578 <title>Guest configuration with vhost-user interface</title>
560 579
561 <programlisting>&lt;domain type='kvm'&gt; 580 <programlisting>&lt;domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'&gt;
562 &lt;name&gt;vm_vhost&lt;/name&gt; 581 &lt;name&gt;vm_vhost&lt;/name&gt;
563 &lt;uuid&gt;4a9b3f53-fa2a-47f3-a757-dd87720d9d1d&lt;/uuid&gt; 582 &lt;uuid&gt;ed204646-1ad5-11e7-93ae-92361f002671&lt;/uuid&gt;
564 &lt;memory unit='KiB'&gt;4194304&lt;/memory&gt; 583 &lt;memory unit='KiB'&gt;4194304&lt;/memory&gt;
565 &lt;currentMemory unit='KiB'&gt;4194304&lt;/currentMemory&gt; 584 &lt;currentMemory unit='KiB'&gt;4194304&lt;/currentMemory&gt;
566 &lt;memoryBacking&gt; 585 &lt;memoryBacking&gt;
567 &lt;hugepages&gt; 586 &lt;hugepages&gt;
568 &lt;page size='1' unit='G' nodeset='0'/&gt; 587 &lt;page size='512' unit='M' nodeset='0'/&gt;
569 &lt;/hugepages&gt; 588 &lt;/hugepages&gt;
570 &lt;/memoryBacking&gt; 589 &lt;/memoryBacking&gt;
571 &lt;vcpu placement='static'&gt;2&lt;/vcpu&gt;
572 &lt;cputune&gt;
573 &lt;shares&gt;4096&lt;/shares&gt;
574 &lt;vcpupin vcpu='0' cpuset='4'/&gt;
575 &lt;vcpupin vcpu='1' cpuset='5'/&gt;
576 &lt;emulatorpin cpuset='4,5'/&gt;
577 &lt;/cputune&gt;
578 &lt;os&gt; 590 &lt;os&gt;
579 &lt;type arch='x86_64' machine='pc'&gt;hvm&lt;/type&gt; 591 &lt;type arch='aarch64' machine='virt,gic_version=3'&gt;hvm&lt;/type&gt;
580 &lt;kernel&gt;/mnt/qemu/bzImage&lt;/kernel&gt; 592 &lt;kernel&gt;/mnt/qemu/Image&lt;/kernel&gt;
581 &lt;cmdline&gt;root=/dev/vda console=ttyS0,115200&lt;/cmdline&gt; 593 &lt;cmdline&gt;root=/dev/vda console=ttyAMA0,115200n8&lt;/cmdline&gt;
582 &lt;boot dev='hd'/&gt; 594 &lt;boot dev='hd'/&gt;
583 &lt;/os&gt; 595 &lt;/os&gt;
584 &lt;features&gt; 596 &lt;features&gt;
585 &lt;acpi/&gt; 597 &lt;acpi/&gt;
586 &lt;apic/&gt; 598 &lt;apic/&gt;
587 &lt;/features&gt; 599 &lt;/features&gt;
600 &lt;vcpu placement='static'&gt;2&lt;/vcpu&gt;
588 &lt;cpu mode='host-model'&gt; 601 &lt;cpu mode='host-model'&gt;
589 &lt;model fallback='allow'/&gt; 602 &lt;model fallback='allow'/&gt;
590 &lt;topology sockets='2' cores='1' threads='1'/&gt; 603 &lt;topology sockets='1' cores='2' threads='1'/&gt;
591 &lt;numa&gt; 604 &lt;numa&gt;
592 &lt;cell id='0' cpus='0-1' memory='4194304' unit='KiB' memAccess='shared'/&gt; 605 &lt;cell id='0' cpus='0' memory='4194304' unit='KiB' memAccess='shared'/&gt;
593 &lt;/numa&gt; 606 &lt;/numa&gt;
594 &lt;/cpu&gt; 607 &lt;/cpu&gt;
608 &lt;cputune&gt;
609 &lt;vcpupin vcpu="0" cpuset="4"/&gt;
610 &lt;vcpupin vcpu="1" cpuset="5"/&gt;
611 &lt;/cputune&gt;
595 &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt; 612 &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
596 &lt;on_reboot&gt;restart&lt;/on_reboot&gt; 613 &lt;on_reboot&gt;restart&lt;/on_reboot&gt;
597 &lt;on_crash&gt;destroy&lt;/on_crash&gt; 614 &lt;on_crash&gt;destroy&lt;/on_crash&gt;
598 &lt;devices&gt; 615 &lt;devices&gt;
599 &lt;emulator&gt;/usr/bin/qemu-system-x86_64&lt;/emulator&gt; 616 &lt;emulator&gt;/usr/bin/qemu-system-aarch64&lt;/emulator&gt;
600 &lt;disk type='file' device='disk'&gt; 617 &lt;disk type='file' device='disk'&gt;
601 &lt;driver name='qemu' type='raw' cache='none'/&gt; 618 &lt;driver name='qemu' type='raw' cache='none'/&gt;
602 &lt;source file='/mnt/qemu/enea-nfv-access-guest-qemux86-64.ext4'/&gt; 619 &lt;source file='/mnt/qemu/enea-nfv-access-guest-qemuarm64.ext4'/&gt;
603 &lt;target dev='vda' bus='virtio'/&gt; 620 &lt;target dev='vda' bus='virtio'/&gt;
604 &lt;/disk&gt; 621 &lt;/disk&gt;
605 &lt;interface type='vhostuser'&gt;
606 &lt;mac address='00:00:00:00:00:01'/&gt;
607 &lt;source type='unix' path='/var/run/openvswitch/vhost-user1' mode='client'/&gt;
608 &lt;model type='virtio'/&gt;
609 &lt;driver queues='1'&gt;
610 &lt;host mrg_rxbuf='off'/&gt;
611 &lt;/driver&gt;
612 &lt;/interface&gt;
613 &lt;serial type='pty'&gt; 622 &lt;serial type='pty'&gt;
614 &lt;target port='0'/&gt; 623 &lt;target port='0'/&gt;
615 &lt;/serial&gt; 624 &lt;/serial&gt;
@@ -617,33 +626,41 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
617 &lt;target type='serial' port='0'/&gt; 626 &lt;target type='serial' port='0'/&gt;
618 &lt;/console&gt; 627 &lt;/console&gt;
619 &lt;/devices&gt; 628 &lt;/devices&gt;
629 &lt;qemu:commandline&gt;
630 &lt;qemu:arg value='-chardev'/&gt;
631 &lt;qemu:arg value='socket,id=charnet0,path=/var/run/openvswitch/vhost-user1'/&gt;
632 &lt;qemu:arg value='-netdev'/&gt;
633 &lt;qemu:arg value='type=vhost-user,id=hostnet0,chardev=charnet0'/&gt;
634 &lt;qemu:arg value='-device'/&gt;
635 &lt;qemu:arg value='virtio-net-pci,netdev=hostnet0,id=net0,mac=00:00:00:00:00:01,bus=pcie.0,addr=0x2'/&gt;
636 &lt;/qemu:commandline&gt;
620&lt;/domain&gt;</programlisting> 637&lt;/domain&gt;</programlisting>
621 </section> 638 </section>
622 639
623 <section id="guest-config-pci-passthrough"> 640 <section id="guest-config-pci-passthrough">
624 <title>Guest configuration with PCI passthrough</title> 641 <title>Guest configuration with PCI passthrough</title>
625 642
626 <programlisting>&lt;domain type='kvm'&gt; 643 <programlisting>&lt;domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'&gt;
627 &lt;name&gt;vm_sriov1&lt;/name&gt; 644 &lt;name&gt;vm_sriov&lt;/name&gt;
628 &lt;uuid&gt;4a9b3f53-fa2a-47f3-a757-dd87720d9d1d&lt;/uuid&gt; 645 &lt;uuid&gt;ed204646-1ad5-11e7-93ae-92361f002671&lt;/uuid&gt;
629 &lt;memory unit='KiB'&gt;4194304&lt;/memory&gt; 646 &lt;memory unit='KiB'&gt;4194304&lt;/memory&gt;
630 &lt;currentMemory unit='KiB'&gt;4194304&lt;/currentMemory&gt; 647 &lt;currentMemory unit='KiB'&gt;4194304&lt;/currentMemory&gt;
631 &lt;memoryBacking&gt; 648 &lt;memoryBacking&gt;
632 &lt;hugepages&gt; 649 &lt;hugepages&gt;
633 &lt;page size='1' unit='G' nodeset='0'/&gt; 650 &lt;page size='512' unit='M' nodeset='0'/&gt;
634 &lt;/hugepages&gt; 651 &lt;/hugepages&gt;
635 &lt;/memoryBacking&gt; 652 &lt;/memoryBacking&gt;
636 &lt;vcpu&gt;2&lt;/vcpu&gt;
637 &lt;os&gt; 653 &lt;os&gt;
638 &lt;type arch='x86_64' machine='q35'&gt;hvm&lt;/type&gt; 654 &lt;type arch='aarch64' machine='virt,gic_version=3'&gt;hvm&lt;/type&gt;
639 &lt;kernel&gt;/mnt/qemu/bzImage&lt;/kernel&gt; 655 &lt;kernel&gt;/mnt/qemu/Image&lt;/kernel&gt;
640 &lt;cmdline&gt;root=/dev/vda console=ttyS0,115200&lt;/cmdline&gt; 656 &lt;cmdline&gt;root=/dev/vda console=ttyAMA0,115200n8&lt;/cmdline&gt;
641 &lt;boot dev='hd'/&gt; 657 &lt;boot dev='hd'/&gt;
642 &lt;/os&gt; 658 &lt;/os&gt;
643 &lt;features&gt; 659 &lt;features&gt;
644 &lt;acpi/&gt; 660 &lt;acpi/&gt;
645 &lt;apic/&gt; 661 &lt;apic/&gt;
646 &lt;/features&gt; 662 &lt;/features&gt;
663 &lt;vcpu placement='static'&gt;2&lt;/vcpu&gt;
647 &lt;cpu mode='host-model'&gt; 664 &lt;cpu mode='host-model'&gt;
648 &lt;model fallback='allow'/&gt; 665 &lt;model fallback='allow'/&gt;
649 &lt;topology sockets='1' cores='2' threads='1'/&gt; 666 &lt;topology sockets='1' cores='2' threads='1'/&gt;
@@ -651,22 +668,20 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
651 &lt;cell id='0' cpus='0' memory='4194304' unit='KiB' memAccess='shared'/&gt; 668 &lt;cell id='0' cpus='0' memory='4194304' unit='KiB' memAccess='shared'/&gt;
652 &lt;/numa&gt; 669 &lt;/numa&gt;
653 &lt;/cpu&gt; 670 &lt;/cpu&gt;
671 &lt;cputune&gt;
672 &lt;vcpupin vcpu="0" cpuset="4"/&gt;
673 &lt;vcpupin vcpu="1" cpuset="5"/&gt;
674 &lt;/cputune&gt;
654 &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt; 675 &lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
655 &lt;on_reboot&gt;restart&lt;/on_reboot&gt; 676 &lt;on_reboot&gt;restart&lt;/on_reboot&gt;
656 &lt;on_crash&gt;destroy&lt;/on_crash&gt; 677 &lt;on_crash&gt;destroy&lt;/on_crash&gt;
657 &lt;devices&gt; 678 &lt;devices&gt;
658 &lt;emulator&gt;/usr/bin/qemu-system-x86_64&lt;/emulator&gt; 679 &lt;emulator&gt;/usr/bin/qemu-system-aarch64&lt;/emulator&gt;
659 &lt;disk type='file' device='disk'&gt; 680 &lt;disk type='file' device='disk'&gt;
660 &lt;driver name='qemu' type='raw' cache='none'/&gt; 681 &lt;driver name='qemu' type='raw' cache='none'/&gt;
661 &lt;source file='/mnt/qemu/enea-nfv-access-guest-qemux86-64.ext4'/&gt; 682 &lt;source file='/mnt/qemu/enea-nfv-access-guest-qemuarm64.ext4'/&gt;
662 &lt;target dev='vda' bus='virtio'/&gt; 683 &lt;target dev='vda' bus='virtio'/&gt;
663 &lt;/disk&gt; 684 &lt;/disk&gt;
664 &lt;interface type='hostdev' managed='yes'&gt;
665 &lt;source&gt;
666 &lt;address type='pci' domain='0x0' bus='0x03' slot='0x10' function='0x0'/&gt;
667 &lt;/source&gt;
668 &lt;mac address='52:54:00:6d:90:02'/&gt;
669 &lt;/interface&gt;
670 &lt;serial type='pty'&gt; 685 &lt;serial type='pty'&gt;
671 &lt;target port='0'/&gt; 686 &lt;target port='0'/&gt;
672 &lt;/serial&gt; 687 &lt;/serial&gt;
@@ -674,6 +689,10 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
674 &lt;target type='serial' port='0'/&gt; 689 &lt;target type='serial' port='0'/&gt;
675 &lt;/console&gt; 690 &lt;/console&gt;
676 &lt;/devices&gt; 691 &lt;/devices&gt;
692 &lt;qemu:commandline&gt;
693 &lt;qemu:arg value='-device'/&gt;
694 &lt;qemu:arg value='vfio-pci,host=0001:01:00.1'/&gt;
695 &lt;/qemu:commandline&gt;
677&lt;/domain&gt;</programlisting> 696&lt;/domain&gt;</programlisting>
678 </section> 697 </section>
679 698
@@ -723,12 +742,12 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
723 &lt;driver name='qemu' type='raw' cache='none'/&gt; 742 &lt;driver name='qemu' type='raw' cache='none'/&gt;
724 &lt;source file='/mnt/qemu/enea-nfv-access-guest-qemux86-64.ext4'/&gt; 743 &lt;source file='/mnt/qemu/enea-nfv-access-guest-qemux86-64.ext4'/&gt;
725 &lt;target dev='vda' bus='virtio'/&gt; 744 &lt;target dev='vda' bus='virtio'/&gt;
726 &lt;/disk&gt; 745 &lt;/disk&gt;vi
727 &lt;interface type='bridge'&gt; 746 &lt;interface type='bridge'&gt;
728 &lt;mac address='52:54:00:71:b1:b6'/&gt; 747 &lt;mac address='52:54:00:71:b1:b6'/&gt;
729 &lt;source bridge='ovsbr0'/&gt; 748 &lt;source bridge='ovsbr0'/&gt;
749 &lt;model type='rtl8139'/&gt;
730 &lt;virtualport type='openvswitch'/&gt; 750 &lt;virtualport type='openvswitch'/&gt;
731 &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/&gt;
732 &lt;/interface&gt; 751 &lt;/interface&gt;
733 &lt;serial type='pty'&gt; 752 &lt;serial type='pty'&gt;
734 &lt;target port='0'/&gt; 753 &lt;target port='0'/&gt;
@@ -741,4 +760,4 @@ $ dpdk-devbind.py --bind=vfio-pci 0000:03:10.0
741 </section> 760 </section>
742 </section> 761 </section>
743 </section> 762 </section>
744</chapter> \ No newline at end of file 763</chapter>