[vfio-users] Why we need redirect the access to bar0 through the PCI config space access function

wuzongyong (A) wuzongyong1 at huawei.com
Fri May 5 09:49:33 UTC 2017


Hi,

I’m testing gpu passthrough on KVM with NVIDIA gpu card(M60, 10de:13f2) based on vfio. And I noticed the function vfio_nvidia_bar0_mirror_quirk in qemu/hw/vfio/pci-quirks.c, could someone please explain the aim of these codes in detail to me? I don’t think it is necessary if we don’t need read config address through this backdoor. If I just don’t do these quirks, what negative results could  be caused?


I use the simple code to read the offset from 0x88000 to 0x88fff in bar0 , and found that:
On the host, the partial result like that, what does the error code badf5040 represent list below?

13f210de 00100007 030000a1 00000000 93000000 1000000c 0000183e 2000000c
0000183e 00002001 00000000 115e10de 00000000 00000060 00000000 00000107
115e10de badf5040 badf5040 badf5040 00000003 00000001 0023d6ce 00000000
00036801 00000008 00807805 fee00718 00000000 00000000 00020010 00648de1
00002137 08453103 11010100 00000000 00000000 badf5040 badf5040 00040013
00000000 0000000e 001e0003 00000000 00000000 01140009 00000000 00000000
00000000 00000000 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 00000002 badf5040 badf5040 badf5040
25810002 00000000 00000000 00000000 00000000 800000ff 00000000 badf5040
badf5040 badf5040 42010004 00000000 00078121 00000000 badf5040 badf5040
badf5040 01000030 badf5040 8b00001b e0000195 06507120 badf5040 00078121
00058121 00038002 00018002 001f8006 001d8006 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040
badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040 badf5040

but, if I use the code on the vm with gpupassthough, it runs ok.

13f210de 00100103 030000a1 00000000 fd000000 e000000c 00000000 f200000c
00000000 0000c101 00000000 115e10de 00000000 00000060 00000000 0000010a
115e10de 00000000 00000000 00000000 00000002 00000001 0023d6ce 00000000
00036801 00000008 00807805 00000000 00000000 00000000 00020010 00648de1
00002137 08454103 11030100 00000000 00000000 00000000 00000000 00040813
00000000 0000000e 001e0003 00000000 00000000 01140009 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000002 00000000 00000000 00000000
25010002 00000000 00000000 00000000 00000000 800000ff 00000000 00000000
00000000 00000000 42010004 00000000 00078121 00000000 00000000 00000000
00000000 00000010 00000000 0b00001b e0000195 06507120 00000000 00078121
00058121 00038002 00018002 001f8006 001d8006 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 12810018 00000000 1281001e 00000010



________________________________
华为技术有限公司 Huawei Technologies Co., Ltd.
[Company_logo]
个人签名:邬宗勇
手  机:15656583887
电子邮件:wuzongyong1 at huawei.com
________________________________
 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170505/52364dec/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5474 bytes
Desc: image001.png
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170505/52364dec/attachment.png>


More information about the vfio-users mailing list