This repository has been archived by the owner on Mar 14, 2020. It is now read-only.
/
README.kvmgt
105 lines (60 loc) · 2.04 KB
/
README.kvmgt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
0. get the source code
qemu & seabios:
$ git clone git://github.com/01org/KVMGT-qemu
$ cd KVMGT-qemu
$ git submodule update --init dtc
$ git submodule update --init roms/seabios
kernel:
$ git clone git://github.com/01org/KVMGT-kernel
1. build and run the host kernel
$ cd KVMGT-kernel
build the kernel, there is a "config-3.14.1-host" to be referred.
install necessary files:
# cp vgt.rules /etc/udev/rules.d/
# cp vgt_mgr /usr/bin/
boot the new kernel with cmdline:
intel_iommu=igfx_off i915.hvm_boot_foreground=1
2. build qemu/seabios
$ cd KVMGT-qemu
config and make qemu. FWIW, configurations options I used:
--enable-kvm
--disable-xen
--enable-debug-info
--enable-debug
--enable-sdl
--enable-vhost-net
--target-list=x86_64-softmmu
make a new "x86_64-softmmu/qemu-system-x86_64"
$ git submodule init
$ git submodule update --init roms/seabios
$ cd roms/seabios
make a new "out/bios.bin"
link binaries of qemu and bios:
$ cd KVMGT-qemu
# ln -sf `pwd`/x86_64-softmmu/qemu-system-x86_64 /path/to/qemu-system-x86_64
# ln -sf `pwd`/roms/seabios/out/bios.bin /path/to/bios.bin
3. run KVMGT host
add this to kernel cmdline:
intel_iommu=igfx_off i915.hvm_boot_foreground=1
4. run KVMGT guest
FYI: https://github.com/01org/XenGT-Preview-kernel/blob/master/XenGT_Setup_Guide.pdf
At first, you have to enable the VGPU support in guest kernel, you may want
either:
- Copy the host kernel to guest. Refer to XenGT_Setup_Guide.pdf,
section 3.6.3: Linux Guest Setup for XenGT;
or:
- Use a new kernel. From tag v4.1-rc1 on, the vanilla kernel
contains VGPU support;
after that, you can run that image with:
# /path/to/qemu-system-x86_64 -bios /path/to/bios.bin \
-enable-kvm \
-M pc -smp 2 -cpu host -m 1024 \
-machine kernel_irqchip=on \
-vgt -vga vgt \
{snip}
Currently KVMGT doesn't support PPGTT shadowing, so don't forget to
disable the PPGTT support in guest i915, adding:
i915.enable_ppgtt=0
or:
i915.i915_enable_ppgtt=0
according your kernel version.