intel / XenGT-Preview-xen

20 stars 7 forks source link

Suggest a better format for installation doc #23

Open codyit opened 9 years ago

codyit commented 9 years ago

At least for evince on Ubuntu, if you copy and paste the commands, the character "-" would be messed up, causing a lot of errors.

That is actually pretty minor. Anyway, the main reason for me being here is that I'm toying with the idea of running this on my Macbook Pro Retina late'13 (11,1), and I can't find a better place for questions like mailing list/forum/IRC.

Obviously using your stock config it won't boot, not even any display, so please spare some time to answer a few questions:

From the vague system requirement, it seems it would work? Since I'm still trying to figure out the correct kernel config, I'd love to know if it's worth trying in the first place.

Do you have any suggestion for the bare minimum config so I can at least get some console output just to figure out why it's failing?

Thanks mate.

l1viathan commented 9 years ago

At least for evince on Ubuntu, if you copy and paste the commands, the character "-" would be messed up, causing a lot of errors.

We are fixing that, thanks for reporting.

Anyway, the main reason for me being here is that I'm toying with the idea of running this on my Macbook Pro Retina late'13 (11,1), and I can't find a better place for questions like mailing list/forum/IRC.

Ha, we just set a mailing list:

      https://lists.01.org/mailman/listinfo/igvt-g

Please have a try :)

Obviously using your stock config it won't boot, not even any display, so please spare some time to answer a few questions: From the vague system requirement, it seems it would work? Since I'm still trying to figure out the correct kernel config, I'd love to know if it's worth trying in the first place. Do you have any suggestion for the bare minimum config so I can at least get some console output just to figure out why it's failing?

Current implementation supports only Haswell and Broadwell. As for kernel configs, please make sure the following are selected:

CONFIG_XEN_VGT_I915 CONFIG_DRM_I915=y

You have the choices on other config items, probably using a distribution-based .config should make our life a little easier :)

codyit commented 9 years ago

Thanks for tips, made my life a lot easier! I have a feeling it's not the right place for this follow-up, but I've gone pretty far already, and hey we got markdown here... so...

After managing to boot Xen (not without it's perks!), I figured I've got everything working and it's not Xen general problem.

(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging (HAP) detected
(XEN) I/O virtualisation enabled 
(XEN) Intel VT-d iommu 0 supported page sizes: 4kB.
(XEN) Intel VT-d iommu 1 supported page sizes: 4kB.
(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.

Except my Iris is not supported :

Kernel command line: root=/dev/sda3 ro ignore_loglevel console=tty0 console=hvc0 \
    consoleblank=0 log_buf_len=4M earlyprintk=xen xen_vgt.hvm_boot_foreground=1
vGT error:(vgt_set_device_type:490) Unknown chip 0xa2e
vGT error:(vgt_initialize_pgt_device:649) failed to initalize device info.
i915_start_vgt: fail
Wrong vgt_if magic number!

More info:

[drm] Initialized drm 1.1.0 20060810
[drm] Memory usable by graphics device = 2048M
fb: switching to inteldrmfb from EFI VGA
[drm] Replacing VGA console driver
[drm:hsw_unclaimed_reg_detect.isra.29] *ERROR* Unclaimed register detected. 
    Please use the i915.mmio_debug=1 to debug this problem.i915: the number of
    the fence registers (32)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
fbcon: inteldrmfb (fb0) is primary device
[drm] Initialized i915 1.6.0 20141121 for 0000:00:02.0 on minor 0
i915 0000:00:02.0: fb0: inteldrmfb frame buffer device

Please rate the likelihood for my chip to be supported ;)

codyit commented 9 years ago

I'd play nice and put these on the mailing list any time if you feel it's more apporiate, otherwise here it goes after I patched my device ID into devtable.h/_is_haswell() https://gist.github.com/codyit/4c80895d9a65625232db

What is the easiest way to tell I'm using the driver and in direct display mode?

dmesg:

vGT info:(vgt_set_device_type:480) Detected Haswell
[drm:hsw_unclaimed_reg_detect.isra.29] *ERROR* Unclaimed register detected. Please use the i915.mmio_debug=1 to debug this problem.vGT: GMBUS2 init value: 800, 800
vGT info:(initialize_gm_fence_allocation_bitmaps:320) total aperture: 0x10000000 bytes, total GM space: 0x80000000 bytes
vGT info:(initialize_gm_fence_allocation_bitmaps:342) reserved aperture: [0xae000000, 0xb0000000)
vGT: setup tracked reg info
vGT: irq map [upstream] group: 1, bit: 28 -> [downstream] group: 2, bitmask: 0xffffffff
vGT info:(create_vgt_instance:119) vm_id=0, low_gm_sz=96MB, high_gm_sz=384MB, fence_sz=4, vgt_primary=1
vGT info:(create_vgt_instance:201) aperture: [0xa0000000, 0xa5ffffff] guest [0xa0000000, 0xa5ffffff] va(0xffffc9000c400000)
vGT info:(create_vgt_instance:212) GM: [0x0, 0x5ffffff], [0x10000000, 0x27ffffff], guest[0x0, 0x5ffffff], [0x10000000, 0x27ffffff]
vGT info:(create_vgt_instance:249) filling VGT_PVINFO_PAGE for dom0:
vGT(0): create debugfs node: virtual_mmio_space
vGT(0): create debugfs node: shadow_mmio_space
vGT(0): create debugfs node: virtual_mmio_space
vGT(0): create debugfs node: frame_buffer_format
vGT(0): create debugfs node: frame_buffer_format
vGT: clear all GTT entries.
vGT: allocate vGT aperture
vGT: start kthread for dev (0, 10)
vGT: found matching pgt_device when registering irq for dev (0x10)
vGT: allocate virq (-1) for i915, while keep original irq (78) for vgt
vGT: track_nest: enabled
vGT info:(vga_control_w:1782) VM(0): Disable VGA mode 80002900
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (AUX Channel A)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 58 (AUX Channel A)
vGT warning:(vgt_emulate_read:326) vGT: untracked MMIO read: vm_id(0), offset=0x43408,len=4, val=0x0!!!
vGT warning:(vgt_emulate_read:326) vGT: untracked MMIO read: vm_id(0), offset=0x43408,len=4, val=0x0!!!
vGT: activate vgt (0) on ring (0)
vGT-0: add to render run queue!
vGT: activate vgt (0) on ring (1)
vGT: activate vgt (0) on ring (2)
vGT: activate vgt (0) on ring (3)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (Render Command Streamer MI USER INTERRUPT)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 0 (Render Command Streamer MI USER INTERRUPT)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (Gmbus)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 80 (Gmbus)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (GSE)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 56 (GSE)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (Primary Plane A flip done)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 48 (Primary Plane A flip done)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (Pipe A vblank)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 42 (Pipe A vblank)
vGT warning:(vgt_emulate_write:423) vGT: untracked MMIO write: vm_id(0), offset=0x43408,len=4, val=0x80000000!!!
vGT warning:(vgt_emulate_read:326) vGT: untracked MMIO read: vm_id(0), offset=0x43408,len=4, val=0x80000000!!!
vGT warning:(vgt_emulate_read:326) vGT: untracked MMIO read: vm_id(0), offset=0x43408,len=4, val=0x80000000!!!
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (Blitter Command Streamer MI USER INTERRUPT)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 20 (Blitter Command Streamer MI USER INTERRUPT)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (RP DOWN threshold interrupt)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (Render Frequency Downward Timeout During RC6 interrupt)
vGT info:(vgt_handle_default_event_virt:1008) IRQHow do I know if I'm using the dr: VM(0) receive event 65 (RP DOWN threshold interrupt)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 67 (Render Frequency Downward Timeout During RC6 interrupt)
vGT info:(vgt_handle_default_event_phys:1196) IRQ: receive event (RP UP threshold interrupt)
vGT info:(vgt_handle_default_event_virt:1008) IRQ: VM(0) receive event 66 (RP UP threshold interrupt)
codyit commented 9 years ago

First thing it's not worth trying for Iris 5100 on mbpr late'13 except for fun, you get responsive UI for both win10 and win7, but the moment you fire up youtube you'd know how choppy it is. It random crashes every time I stress test it by updating a game (lot's of network and disk IO plus a bloated graphic launcher), otherwise I'd have made a more extensive howto in a proper place.

In case anyone found this via Google, and still wanna do it, a few unintuitive things: . Obviously you have to patch your chip ID into devtable.h . Patch the Windows driver if you're trying win10, there's a howto if you google it . To avoid ACPI errors you have to boot with xen.efi instead, preferably via rEFInd . Put a xen.cfg right next to xen.efi . Add pci-phantom=$BUSID to options into xen.cfg, with $BUSID = lspci -d'1b4b:9183' |cut -d. -f1, so you can use your SSD . The boot parameters path in xen.cfg is relative to the location of itself, also it won't boot a kernel in another partition . xen.cfg seems to be not processing root=UUID properly, better use the format root=/dev/sdX instead . After it boots, wlan should just work after you you symlink the XenGT kernel path to/usr/src/uname -r` thendpkg-reconfigure bcmwl-kernel-source`

Anyway, thanks guys for making it possible, still pretty exciting stuff.