You are not logged in.

#1 2013-07-10 15:09:38

abarahc
Member
Registered: 2010-04-30
Posts: 128

xen vga passthrough

Hello everybody! Sorry if I posted in the wrong board, but I really did not know where it would fit.

Well, I've been on the wiki and read all about xen. There is no specific instruction on how I use the vga passthrough. So I went on the Xen wiki. I managed some clues of what to do. One is related to flags that should enable to run Xen.

http://wiki.xen.org/wiki/Mainline_Linux_Kernel_Configs

So I went on the arch wiki again. I read about how could recompile the kernel and install the new version of the same by pacman. Flags activated, many hours of compilation. The build of the new kernel was installed and ready.

I installed the package XEN located in AUR. I noticed that it downloads a kernel with XEN name. There in the arch wiki as well as in the xen wiki, which is necessary to modify the grub boot to do this special XEN kernel. I made the change. Researched how the procedure could be done to vga passthrough, but it did not work.

So i realized that there are two possibilities to run a virtual machine.

1 - Using XEND

and the other used when boot the XEN kernel.

2 - (xenstored, xendomaind, and some others I've forgotten at the moment)

Option 2 is not possible to use it when using the vanilla kernel (even after the change of flags) but in the arch wiki is saying that the vanilla kernel is already suffcient to run xen, but because the xen package in AUR downloads an extra called xen kernel?


A i'm using a notebook with an NVIDIA 630M, so i've bumblebeed running here. If more info is need, just ask and i'll post. I really really need to test this vga passthrough working on :'/


here are some links that i've been reading
http://wiki.xen.org/wiki/Xen_PCI_Passth … assthrough
http://wiki.xen.org/wiki/Xen_VGA_Passthrough
http://wiki.xen.org/wiki/Xen_VGA_Passth … d_Adapters
http://wiki.xen.org/wiki/Secondary_GPU_Passthrough


here are some configs i've using

This is the virtual machine config. If this config i can boot normaly, but no VGA with NVIDIA. Em enable gfx_passthru, the machine cant boot. I've tryied do attach it do to PCI list via xl command, but not positive results. Xen always complain about the device cant be attached or what else hmm

name = "xenwin"
arch_libdir = 'lib64'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 4096
vcpus = 2
shadow_memory = 8
#vif = [ 'type=ioemu, bridge=tmpbridge' ]
#acpi = 1
#apic = 1
#boot_disk = [ 'file:/archives/vm/xenwin7.img,hda,w']
disk = ['file:/archives/vm/xenwin7.img,hda,w','file:/archives/vm/iso/winseven32.iso,hdc:cdrom,r']
#device_model = '/usr/lib64/xen/bin/qemu-dm'
boot = "c"
#boot = "dc"#only for installation
sdl = 1
vnc = 0
pea=1
nx=1
stdvga=0
videoram=256
usb=1
#vncconsole = 1
#vncpasswd = ''
#serial = 'pty'
#usbdevice = 'tablet'
#stdvga = 0
#iommu=soft
#gfx_passthru = 1
#pci=['01:00.0']
#pci = [ '01:00.0' ]
#tsc_mode = 0
#viridian = 1
pci = [
'01:00.0'
]

grub

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  60a137b9-8cd5-47c9-ade3-4812e06e6dcd
else
  search --no-floppy --fs-uuid --set=root 60a137b9-8cd5-47c9-ade3-4812e06e6dcd
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/09_xen ###
menuentry 'Xen 4.2.2 / Arch GNU/Linux, with Linux linux' --class xen --class arch --class gnu-linux --class gnu --class os {
	insmod part_gpt
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  3D6B-9469
	else
	  search --no-floppy --fs-uuid --set=root 3D6B-9469
	fi
       echo    'Loading Xen 4.2.2 ...'
       multiboot       /xen-4.2.2.gz /xen-4.2.2.gz xsave=1
       echo    Loading Linux linux ...
       module  /vmlinuz-linux /vmlinuz-linux root=UUID=60a137b9-8cd5-47c9-ade3-4812e06e6dcd ro console=tty0
       echo    "Loading initial ramdisk ..."
       module  /initramfs-linux.img
}
### END /etc/grub.d/09_xen ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-60a137b9-8cd5-47c9-ade3-4812e06e6dcd' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  3D6B-9469
	else
	  search --no-floppy --fs-uuid --set=root 3D6B-9469
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/vmlinuz-linux root=UUID=60a137b9-8cd5-47c9-ade3-4812e06e6dcd ro  quiet xen-pciback.hide=(01:00.0)
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-60a137b9-8cd5-47c9-ade3-4812e06e6dcd' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  3D6B-9469
	else
	  search --no-floppy --fs-uuid --set=root 3D6B-9469
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/vmlinuz-linux root=UUID=60a137b9-8cd5-47c9-ade3-4812e06e6dcd ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

lspci

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 630M] (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 07)
03:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)

lsmod

Module                  Size  Used by
nls_cp437               5953  1 
vfat                   10119  1 
fat                    49421  1 vfat
intel_powerclamp        8802  0 
coretemp                6102  0 
kvm_intel             125437  0 
snd_hda_codec_hdmi     29298  1 
uvcvideo               72921  0 
i915                  563638  2 
kvm                   390263  1 kvm_intel
videobuf2_vmalloc       3304  1 uvcvideo
videobuf2_memops        2367  1 videobuf2_vmalloc
videobuf2_core         27541  1 uvcvideo
videodev              105273  2 uvcvideo,videobuf2_core
media                  10309  2 uvcvideo,videodev
snd_hda_codec_realtek    30893  1 
ums_realtek             7327  0 
intel_agp              10936  1 i915
intel_gtt              12664  2 i915,intel_agp
snd_hda_intel          35816  4 
arc4                    2000  2 
drm_kms_helper         35086  1 i915
joydev                  9695  0 
drm                   230045  3 i915,drm_kms_helper
ath9k                  88740  0 
ath9k_common            2096  1 ath9k
ath9k_hw              373214  2 ath9k_common,ath9k
ath                    15489  3 ath9k_common,ath9k,ath9k_hw
mac80211              488494  1 ath9k
asus_nb_wmi             6280  0 
asus_wmi               16274  1 asus_nb_wmi
r8169                  56491  0 
iTCO_wdt                5407  0 
iTCO_vendor_support     1929  1 iTCO_wdt
crc32_pclmul            2987  0 
snd_hda_codec         145920  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
sparse_keymap           3114  1 asus_wmi
mii                     4059  1 r8169
i2c_algo_bit            5391  1 i915
cfg80211              452332  3 ath,ath9k,mac80211
crc32c_intel           14249  0 
mei                    58142  0 
ghash_clmulni_intel     4469  0 
aesni_intel            45385  1 
aes_x86_64              7399  1 aesni_intel
xts                     3007  1 aesni_intel
lrw                     3565  1 aesni_intel
gf128mul                6018  2 lrw,xts
pci_hotplug            22930  1 asus_wmi
psmouse                84588  0 
serio_raw               5041  0 
i2c_i801               11269  0 
mxm_wmi                 1467  0 
i2c_core               22479  6 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,videodev
snd_hwdep               6364  1 snd_hda_codec
rfkill                 15626  3 cfg80211,asus_wmi
pcspkr                  2027  0 
lpc_ich                12849  0 
ablk_helper             1972  1 aesni_intel
cryptd                  8537  3 ghash_clmulni_intel,aesni_intel,ablk_helper
ac                      2536  0 
thermal                 8652  0 
battery                 6970  0 
fan                     2753  0 
wmi                     8347  2 mxm_wmi,asus_wmi
acpi_cpufreq           10726  0 
microcode              13204  0 
evdev                   9912  18 
video                  11203  2 i915,asus_wmi
mperf                   1235  1 acpi_cpufreq
button                  4669  1 i915
processor              27555  1 acpi_cpufreq
ext4                  486052  2 
crc16                   1359  1 ext4
mbcache                 5930  1 ext4
jbd2                   85240  1 ext4
usb_storage            47063  1 ums_realtek
hid_generic             1153  0 
usbhid                 40956  0 
hid                    87539  2 hid_generic,usbhid
sr_mod                 14930  0 
sd_mod                 30858  4 
cdrom                  35104  1 sr_mod
ahci                   22696  3 
libahci                21201  1 ahci
libata                171414  2 ahci,libahci
ehci_pci                4120  0 
xhci_hcd               89711  0 
ehci_hcd               47343  1 ehci_pci
scsi_mod              129660  4 usb_storage,libata,sd_mod,sr_mod
usbcore               177059  7 uvcvideo,ums_realtek,usb_storage,ehci_hcd,ehci_pci,usbhid,xhci_hcd
usb_common               954  1 usbcore
snd_pcm_oss            38479  0 
snd_mixer_oss          14995  1 snd_pcm_oss
snd_pcm                76860  5 snd_pcm_oss,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          7298  2 snd_pcm,snd_hda_intel
snd_timer              18687  2 snd_pcm
snd                    58893  15 snd_hda_codec_realtek,snd_pcm_oss,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec,snd_hda_intel,snd_mixer_oss
soundcore               5418  1 snd

user@localhost $ grep -rnw "." -e "hacking"

Offline

Board footer

Powered by FluxBB