Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-17 Thread José Ramón Muñoz Pekkarinen
On Tuesday 13 September 2016 21:38:01 Alex Williamson wrote:
> [adding the list back]
> 
> On Tue, Sep 13, 2016 at 9:17 PM, fulaiyang  wrote:
> > hello,
> > 
> > my kernel does include simplefb:CONFIG_FB_SIMPLE=y.QEMU does not
> > 
> > print any messages when started but the top tree show that qemu'cpu usage
> > is always about 100%.I have confirmed that the windows 7 os does not
> > boot.I
> > don't know how I can get other qemu information,could you tell me? thanks.
> > 
> >PID USER  PR  NIVIRTRESSHR S  *%CPU* %MEM TIME+
> > 
> > COMMAND
> > 
> >  9542 root  20   0 2768476 2.028g  11848 S * 99.7* 53.3   3:48.82
> > 
> > qemu-system-x86
> 
> Try removing the modprobe.blacklist and video options from your kernel
> command line (the unsafe interrupts thing isn't necessary on your system
> either).  After boot, IGD should be bound to i915.  Unbind it, bind to
> vfio-pci, and try QEMU again.  Since you have simplefb in your kernel, I
> don't trust that it's not claiming device resources as you're using it now.

Hi Alex, Yang.

I've been toying around with this case again, and it seems I got some 
output that can be of any help. I think it points that i915 is reluctant to 
free the resources, but it can highlight something else to your eyes.

[  225.155202] [ cut here ]
[  225.155217] WARNING: CPU: 2 PID: 7101 at drivers/gpu/drm/drm_crtc.c:5939 
drm_mode_config_cleanup+0x20f/0x230 [drm]
[  225.155218] Modules linked in: vfio_pci vfio_iommu_type1 vfio_virqfd vfio 
drbg 
ansi_cprng ctr ccm bridge stp llc af_packet ipt_MASQUERADE 
nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 
nf_defrag_ipv4 iptable_filter ip_tables nf_conntrack_ipv6 nf_defrag_ipv6 
xt_conntrack nf_conntrack ip6table_filter ip6_tables snd_hda_codec_hdmi 
snd_hda_codec_realtek snd_hda_codec_generic binfmt_misc i915 arc4 iwlmvm 
mac80211 loop i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt 
fb_sys_fops drm x86_pkg_temp_thermal intel_powerclamp iwlwifi coretemp 
kvm_intel kvm joydev snd_hda_intel uvcvideo mousedev snd_hda_codec btusb 
cfg80211 btrtl videobuf2_vmalloc videobuf2_memops btbcm btintel snd_hwdep 
videobuf2_v4l2 rtsx_pci_sdmmc videobuf2_core bluetooth mmc_core videodev 
snd_hda_core
[  225.155245]  snd_pcsp rtsx_pci_ms snd_pcm memstick media irqbypass 
crc32c_intel snd_timer psmouse ghash_clmulni_intel snd i2c_hid efi_pstore evdev 
wmi video input_leds efivars i2c_i801 serio_raw rtsx_pci i2c_core backlight 
intel_lpss_acpi intel_lpss thermal tpm_crb soundcore mfd_core button battery 
ac acpi_pad efivarfs unix dm_zero dm_thin_pool dm_persistent_data dm_bio_prison 
dm_service_time dm_round_robin dm_queue_length dm_multipath dm_log_userspace 
cn dm_flakey dm_delay xts aesni_intel glue_helper lrw gf128mul ablk_helper 
cryptd aes_x86_64 cbc sha256_generic scsi_transport_iscsi r8169 mii fuse nfs 
lockd grace sunrpc fscache ext4 jbd2 mbcache multipath linear raid10 raid1 
raid0 dm_raid raid456 libcrc32c md_mod async_raid6_recov async_memcpy async_pq 
async_xor xor async_tx raid6_pq dm_snapshot
[  225.155275]  dm_bufio dm_crypt dm_mirror dm_region_hash dm_log dm_mod 
hid_generic usbhid xhci_pci xhci_hcd ohci_hcd uhci_hcd usb_storage ehci_pci 
ehci_hcd usbcore usb_common scsi_transport_fc sr_mod cdrom sg sd_mod ata_piix 
ahci libahci sata_sx4 pata_oldpiix
[  225.155286] CPU: 2 PID: 7101 Comm: vfio-bind Not tainted 4.7.2 #5
[  225.155287] Hardware name: PC Specialist Limited N24_25JU/N24_25JU, BIOS 
5.11 12/14/2015
[  225.155288]   88035a43fc08 812d18c2 

[  225.155290]   88035a43fc48 8105b211 
1733a0928530
[  225.155292]  88035bfbe498 88035bfbe000 88035bfbe340 
88035e65bb80
[  225.155293] Call Trace:
[  225.155297]  [] dump_stack+0x67/0x95
[  225.155299]  [] __warn+0xd1/0xf0
[  225.155301]  [] warn_slowpath_null+0x1d/0x20
[  225.155310]  [] drm_mode_config_cleanup+0x20f/0x230 [drm]
[  225.155331]  [] intel_modeset_cleanup+0x80/0xa0 [i915]
[  225.155347]  [] i915_driver_unload+0x74/0x1d0 [i915]
[  225.155354]  [] drm_dev_unregister+0x29/0xb0 [drm]
[  225.155361]  [] drm_put_dev+0x23/0x60 [drm]
[  225.155370]  [] i915_pci_remove+0x15/0x20 [i915]
[  225.155372]  [] pci_device_remove+0x39/0xc0
[  225.155375]  [] __device_release_driver+0x9a/0x140
[  225.155376]  [] device_release_driver+0x23/0x30
[  225.155377]  [] unbind_store+0xe7/0x140
[  225.155379]  [] drv_attr_store+0x25/0x30
[  225.155381]  [] sysfs_kf_write+0x37/0x40
[  225.155382]  [] kernfs_fop_write+0x118/0x190
[  225.155384]  [] __vfs_write+0x28/0x120
[  225.155386]  [] ? security_file_permission+0x3d/0xc0
[  225.155388]  [] ? percpu_down_read+0x12/0x60
[  225.155390]  [] vfs_write+0xb8/0x1a0
[  225.155391]  [] SyS_write+0x46/0xb0
[  225.155393]  [] do_syscall_64+0x61/0x110
[  225.155395]  [] entry_SYSCALL64_slow_path+0x25/0x25
[  225.155396] ---[ end trace 

Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-14 Thread Sinisa Tkalec

Forgot link :)
https://github.com/01org/XenGT-Preview-kernel/issues/1

On 09/14/2016 02:59 AM, fulaiyang wrote:
thank you,I also have tried many ways but it still didn't work. I 
want to know what kind of gpu vfio support?


At 2016-09-13 18:05:10, "overfl0w"  wrote:

I tried same thing couple months ago i3-4310 didn't work, but
i7-4770 did. Looks like i3 igpu doesn't support it or smth.

On Tuesday, 13 September 2016, fulaiyang > wrote:

Hello,
I have realized the IGD passthrough with Intel(R) Core(TM)
i7-4770 CPU,but when I change the platform with the Intel
Core i3-6100U,it doesn’t have any VGA output and windows7
refuses to boot with black screen. This problem has been
bothering me for a long time,someone can help me?

*dmesg:*
Sep 12 14:04:39 ruijie-pc kernel: [254939.809585] DMAR: DRHD:
handling fault status reg 2
Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR:
DMAR:[DMA Write] Request device [00:02.0] fault addr 0
Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR:[fault
reason 02] Present bit in context entry is clear
Sep 12 14:10:11 ruijie-pc kernel: [255272.523271] vfio-pci
:00:02.0: enabling device (0400 -> 0403)
Sep 12 14:10:11 ruijie-pc kernel: [255272.627404]
vfio_ecap_init: :00:02.0 hiding ecap 0x1b@0x100
Sep 12 14:10:19 ruijie-pc kernel: [255280.602875] kvm: zapping
shadow pages for mmio generation wraparound

*My environment :*
Intel Core i3-6100U @ 2.30GHz
Intel Corporation Sky Lake Integrated Graphics
Ubuntu 16.04 LTS
Host kernel 4.6.6 x86_64 GNU/Linux
qemu 2.7.0






___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-14 Thread Sinisa Tkalec
This was my issue, long time ago, but like I said it worked with 
i7-4770k not i3 4130, igpu is not same.


On 09/14/2016 02:59 AM, fulaiyang wrote:
thank you,I also have tried many ways but it still didn't work. I 
want to know what kind of gpu vfio support?


At 2016-09-13 18:05:10, "overfl0w"  wrote:

I tried same thing couple months ago i3-4310 didn't work, but
i7-4770 did. Looks like i3 igpu doesn't support it or smth.

On Tuesday, 13 September 2016, fulaiyang > wrote:

Hello,
I have realized the IGD passthrough with Intel(R) Core(TM)
i7-4770 CPU,but when I change the platform with the Intel
Core i3-6100U,it doesn’t have any VGA output and windows7
refuses to boot with black screen. This problem has been
bothering me for a long time,someone can help me?

*dmesg:*
Sep 12 14:04:39 ruijie-pc kernel: [254939.809585] DMAR: DRHD:
handling fault status reg 2
Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR:
DMAR:[DMA Write] Request device [00:02.0] fault addr 0
Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR:[fault
reason 02] Present bit in context entry is clear
Sep 12 14:10:11 ruijie-pc kernel: [255272.523271] vfio-pci
:00:02.0: enabling device (0400 -> 0403)
Sep 12 14:10:11 ruijie-pc kernel: [255272.627404]
vfio_ecap_init: :00:02.0 hiding ecap 0x1b@0x100
Sep 12 14:10:19 ruijie-pc kernel: [255280.602875] kvm: zapping
shadow pages for mmio generation wraparound

*My environment :*
Intel Core i3-6100U @ 2.30GHz
Intel Corporation Sky Lake Integrated Graphics
Ubuntu 16.04 LTS
Host kernel 4.6.6 x86_64 GNU/Linux
qemu 2.7.0






___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-14 Thread fulaiyang
Hi Alex,
 The DMAR show that  'DMAR:[fault reason 02] Present bit in context entry is 
clear'. I read from a book,it shows that DMA data transmission of IGD device is 
invalid. That is to say,GPA can't convert to HPA. Could I confirm that my GPU 
platform has some problems?






At 2016-09-14 11:57:54, "Alex Williamson"  wrote:

[adding the list back, again]


On Tue, Sep 13, 2016 at 9:52 PM, fulaiyang  wrote:

thanks for your advise.
I have removed the modprobe.blacklist and video options and unsafe 
interrupts thing. After reboot, I unbind the i915 driver and bind to the  
vfio-pci. However it still doesn't work,the screen has nothing output.


I don't know then.  You could try adding a serial port in order to collect the 
seabios log.  This processor may just be incompatible with the support we have 
so far, especially if you've already made IGD assignment work with other 
hardware.___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-13 Thread Alex Williamson
[adding the list back, again]

On Tue, Sep 13, 2016 at 9:52 PM, fulaiyang  wrote:

> thanks for your advise.
> I have removed the modprobe.blacklist and video options and unsafe
> interrupts thing. After reboot, I unbind the i915 driver and bind to the  
> vfio-pci.
> However it still doesn't work,the screen has nothing output.
>

I don't know then.  You could try adding a serial port in order to collect
the seabios log.  This processor may just be incompatible with the support
we have so far, especially if you've already made IGD assignment work with
other hardware.
___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-13 Thread Alex Williamson
On Tue, Sep 13, 2016 at 8:37 PM, fulaiyang  wrote:

> hello,
> Thanks for your reply and sorry to provide not enough information.
> The IGD is the the primary graphics on the host and I am trying to do
>  legacy mode. The VM is SeaBIOS based and the system is a a desktop. My
> configuration is as follows:
>
> *environment :*
>
> Intel Core i3-6100U @ 2.30GHz
> Intel Corporation Sky Lake Integrated Graphics
> Ubuntu 16.04 LTS *DESKTOP*
> Host kernel 4.6.6 x86_64 GNU/Linux
> qemu 2.7.0
>
>
> *configuration:*
>
>- */boot/config-4.6.6*
>
> CONFIG_VFIO_IOMMU_TYPE1=m
> CONFIG_VFIO=m
> CONFIG_VFIO_PCI=m
> CONFIG_VFIO_PCI_IGD=y
> CONFIG_VFIO_PCI_VGA=y
> CONFIG_FW_CFG_SYSFS=y
> CONFIG_FW_CFG_SYSFS_COMLINE=y
> CONFIG_INTEL_IOMMU_DEFAULT_ON=y
>
>
>- */boot/grub/grub**.cfg*
>
> /boot/vmlinuz-4.6.6 root=… quiet splash intel_iommu=on
> vfio_iommu_type1.allow_unsafe_interrupts=1 $vt_handoff
> modprobe.blacklist=i915 video=vesafb:off video=efifb:off
>


Does your kernel include simplefb (grep CONFIG_FB_SIMPLE
/boot/config-4.6.6)?  This can sometime claim resources on the IGD and
interfere with assignment.  Reports seem to indicate that an equivalent
video=simplefb:off does not work with that driver.  I've had good luck
booting with i915 claiming IGD and then unbinding it to use for
assignment.  The problem comes with re-binding subsequent times, but i915
prevents the more esoteric console drivers from lighting up.  Does QEMU
print any messages when started?
___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-13 Thread Alex Williamson
On Tue, Sep 13, 2016 at 6:59 PM, fulaiyang  wrote:

> thank you,I also have tried many ways but it still didn't work. I want to
> know what kind of gpu vfio support?


You haven't really provided enough information to begin to help.  Are you
trying to do legacy mode or UPT for the GPU?  What's the QEMU command line
or XML for the VM?  Is IGD the primary graphics on the host?   What are the
CONFIG_VFIO_* options in the host kernel?  Is the VM SeaBIOS based or
OVMF?  Is the system a laptop or a desktop?  The less you can make trying
to help you a game of 20 question, the more help you're potentially going
to get.  Output to a monitor or laptop screen requires opregion support,
which generally works, but is not something Intel officially claims support
for with UPT mode.  I don't know why an i3-6100U would be unique, but I
only have a handful of devices to test and that processor is not among
them.  Thanks,

Alex
___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-13 Thread fulaiyang
thank you,I also have tried many ways but it still didn't work. I want to know 
what kind of gpu vfio support?

At 2016-09-13 18:05:10, "overfl0w"  wrote:
I tried same thing couple months ago i3-4310 didn't work, but i7-4770 did. 
Looks like i3 igpu doesn't support it or smth.

On Tuesday, 13 September 2016, fulaiyang  wrote:

Hello,
I have realized the IGD passthrough with Intel(R) Core(TM) i7-4770 CPU,but 
when I change the platform with the Intel Core i3-6100U,it doesn’t have any VGA 
output and windows7 refuses to boot with black screen. This problem has been 
bothering me for a long time,someone can help me?


dmesg:
Sep 12 14:04:39 ruijie-pc kernel: [254939.809585] DMAR: DRHD: handling fault 
status reg 2
Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR: DMAR:[DMA Write] 
Request device [00:02.0] fault addr 0
Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR:[fault reason 02] 
Present bit in context entry is clear
Sep 12 14:10:11 ruijie-pc kernel: [255272.523271] vfio-pci :00:02.0: 
enabling device (0400 -> 0403)
Sep 12 14:10:11 ruijie-pc kernel: [255272.627404] vfio_ecap_init: :00:02.0 
hiding ecap 0x1b@0x100
Sep 12 14:10:19 ruijie-pc kernel: [255280.602875] kvm: zapping shadow pages for 
mmio generation wraparound


My environment :
Intel Core i3-6100U @ 2.30GHz
Intel Corporation Sky Lake Integrated Graphics 
Ubuntu 16.04 LTS
Host kernel 4.6.6 x86_64 GNU/Linux
qemu 2.7.0




 ___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] issues about igd-passthrough using vfio-pci

2016-09-13 Thread overfl0w
I tried same thing couple months ago i3-4310 didn't work, but i7-4770 did.
Looks like i3 igpu doesn't support it or smth.

On Tuesday, 13 September 2016, fulaiyang  wrote:

> Hello,
> I have realized the IGD passthrough with Intel(R) Core(TM) i7-4770 CPU
> ,but when I change the platform with the Intel Core i3-6100U,it doesn’t
> have any VGA output and windows7 refuses to boot with black screen. This
> problem has been bothering me for a long time,someone can help me?
>
> *dmesg:*
> Sep 12 14:04:39 ruijie-pc kernel: [254939.809585] DMAR: DRHD: handling
> fault status reg 2
> Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR: DMAR:[DMA Write]
> Request device [00:02.0] fault addr 0
> Sep 12 14:04:39 ruijie-pc kernel: [254939.809592] DMAR:[fault reason 02]
> Present bit in context entry is clear
> Sep 12 14:10:11 ruijie-pc kernel: [255272.523271] vfio-pci :00:02.0:
> enabling device (0400 -> 0403)
> Sep 12 14:10:11 ruijie-pc kernel: [255272.627404] vfio_ecap_init:
> :00:02.0 hiding ecap 0x1b@0x100
> Sep 12 14:10:19 ruijie-pc kernel: [255280.602875] kvm: zapping shadow
> pages for mmio generation wraparound
>
> *My environment :*
> Intel Core i3-6100U @ 2.30GHz
> Intel Corporation Sky Lake Integrated Graphics
> Ubuntu 16.04 LTS
> Host kernel 4.6.6 x86_64 GNU/Linux
> qemu 2.7.0
>
>
>
>
___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users