1*0b57c816SEdgar E. IglesiasXen PVH machine (``xenpvh``) 2*0b57c816SEdgar E. Iglesias========================================= 3*0b57c816SEdgar E. Iglesias 4*0b57c816SEdgar E. IglesiasXen supports a spectrum of types of guests that vary in how they depend 5*0b57c816SEdgar E. Iglesiason HW virtualization features, emulation models and paravirtualization. 6*0b57c816SEdgar E. IglesiasPVH is a mode that uses HW virtualization features (like HVM) but tries 7*0b57c816SEdgar E. Iglesiasto avoid emulation models and instead use passthrough or 8*0b57c816SEdgar E. Iglesiasparavirtualized devices. 9*0b57c816SEdgar E. Iglesias 10*0b57c816SEdgar E. IglesiasQEMU can be used to provide PV virtio devices on an emulated PCIe controller. 11*0b57c816SEdgar E. IglesiasThat is the purpose of this minimal machine. 12*0b57c816SEdgar E. Iglesias 13*0b57c816SEdgar E. IglesiasSupported devices 14*0b57c816SEdgar E. Iglesias----------------- 15*0b57c816SEdgar E. Iglesias 16*0b57c816SEdgar E. IglesiasThe x86 Xen PVH QEMU machine provide the following devices: 17*0b57c816SEdgar E. Iglesias 18*0b57c816SEdgar E. Iglesias- RAM 19*0b57c816SEdgar E. Iglesias- GPEX host bridge 20*0b57c816SEdgar E. Iglesias- virtio-pci devices 21*0b57c816SEdgar E. Iglesias 22*0b57c816SEdgar E. IglesiasThe idea is to only connect virtio-pci devices but in theory any compatible 23*0b57c816SEdgar E. IglesiasPCI device model will work depending on Xen and guest support. 24*0b57c816SEdgar E. Iglesias 25*0b57c816SEdgar E. IglesiasRunning 26*0b57c816SEdgar E. Iglesias------- 27*0b57c816SEdgar E. Iglesias 28*0b57c816SEdgar E. IglesiasThe Xen tools will typically construct a command-line and launch QEMU 29*0b57c816SEdgar E. Iglesiasfor you when needed. But here's an example of what it can look like in 30*0b57c816SEdgar E. Iglesiascase you need to construct one manually: 31*0b57c816SEdgar E. Iglesias 32*0b57c816SEdgar E. Iglesias.. code-block:: console 33*0b57c816SEdgar E. Iglesias 34*0b57c816SEdgar E. Iglesias qemu-system-i386 -xen-domid 3 -no-shutdown \ 35*0b57c816SEdgar E. Iglesias -chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-3,server=on,wait=off \ 36*0b57c816SEdgar E. Iglesias -mon chardev=libxl-cmd,mode=control \ 37*0b57c816SEdgar E. Iglesias -chardev socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-3,server=on,wait=off \ 38*0b57c816SEdgar E. Iglesias -mon chardev=libxenstat-cmd,mode=control \ 39*0b57c816SEdgar E. Iglesias -nodefaults \ 40*0b57c816SEdgar E. Iglesias -no-user-config \ 41*0b57c816SEdgar E. Iglesias -xen-attach -name g0 \ 42*0b57c816SEdgar E. Iglesias -vnc none \ 43*0b57c816SEdgar E. Iglesias -display none \ 44*0b57c816SEdgar E. Iglesias -device virtio-net-pci,id=nic0,netdev=net0,mac=00:16:3e:5c:81:78 \ 45*0b57c816SEdgar E. Iglesias -netdev type=tap,id=net0,ifname=vif3.0-emu,br=xenbr0,script=no,downscript=no \ 46*0b57c816SEdgar E. Iglesias -smp 4,maxcpus=4 \ 47*0b57c816SEdgar E. Iglesias -nographic \ 48*0b57c816SEdgar E. Iglesias -machine xenpvh,ram-low-base=0,ram-low-size=2147483648,ram-high-base=4294967296,ram-high-size=2147483648,pci-ecam-base=824633720832,pci-ecam-size=268435456,pci-mmio-base=4026531840,pci-mmio-size=33554432,pci-mmio-high-base=824902156288,pci-mmio-high-size=68719476736 \ 49*0b57c816SEdgar E. Iglesias -m 4096 50