<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:微软雅黑;
panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
{font-family:"\@微软雅黑";
panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:华文细黑;
panose-1:2 1 6 0 4 1 1 1 1 1;}
@font-face
{font-family:"\@华文细黑";
panose-1:2 1 6 0 4 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"批注框文本 Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
span.Char
{mso-style-name:"批注框文本 Char";
mso-style-priority:99;
mso-style-link:批注框文本;
font-family:"Calibri","sans-serif";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:宋体;}
p.BalloonText, li.BalloonText, div.BalloonText
{mso-style-name:"Balloon Text";
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Segoe UI","sans-serif";}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle25
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle26
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle27
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle28
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle29
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle30
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle31
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle32
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle33
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle34
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The guest is windows 10.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">There is no this issue on windows 7 guest.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:10.0pt;font-family:宋体">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> Zhang, Xiong Y [mailto:xiong.y.zhang@intel.com]
<br>
</span><b><span style="font-size:10.0pt;font-family:宋体">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> 2018</span><span style="font-size:10.0pt;font-family:宋体">年<span lang="EN-US">11</span>月<span lang="EN-US">29</span>日<span lang="EN-US">
9:38<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> jianghuaping (Cloud); Yuan, Hang; 'intel-gvt-dev@lists.freedesktop.org'<br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> Peng, Chao P; wangxuan (Cloud); bailin (Cloud); Zeng, Harris; Wang, Hongbo; wangtao (Cloud); daishijun (Cloud); yandehan (CTS); Zhang, Xiong Y<br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> RE: KVM Intel graphic passthrough cause qemu pause<o:p></o:p></span></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">When this issue happens, it seems the guest Win7 OS doesn’t start.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">If this issue happens during guest OS boot up, I suggest to try win8 or win10, I never try win7.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"></a><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">thanks<o:p></o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><a name="_____replyseparator"></a><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> intel-gvt-dev [<a href="mailto:intel-gvt-dev-bounces@lists.freedesktop.org">mailto:intel-gvt-dev-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Jianghuaping<br>
<b>Sent:</b> Wednesday, November 28, 2018 7:18 PM<br>
<b>To:</b> Yuan, Hang <<a href="mailto:hang.yuan@intel.com">hang.yuan@intel.com</a>>; 'intel-gvt-dev@lists.freedesktop.org' <<a href="mailto:intel-gvt-dev@lists.freedesktop.org">intel-gvt-dev@lists.freedesktop.org</a>><br>
<b>Cc:</b> Peng, Chao P <<a href="mailto:chao.p.peng@intel.com">chao.p.peng@intel.com</a>>; Wangxuan <<a href="mailto:wang.xuan@h3c.com">wang.xuan@h3c.com</a>>; Bailin <<a href="mailto:berlin@h3c.com">berlin@h3c.com</a>>; Zeng, Harris <<a href="mailto:harris.zeng@intel.com">harris.zeng@intel.com</a>>;
Wang, Hongbo <<a href="mailto:hongbo.wang@intel.com">hongbo.wang@intel.com</a>>; Wangtao <<a href="mailto:wang.taoD@h3c.com">wang.taoD@h3c.com</a>>; Daishijun <<a href="mailto:daishijun@h3c.com">daishijun@h3c.com</a>>; Yandehan <<a href="mailto:ydhan@h3c.com">ydhan@h3c.com</a>><br>
<b>Subject:</b> </span><span style="font-size:11.0pt;font-family:宋体">答复</span><span lang="EN-US" style="font-size:11.0pt">: KVM Intel graphic passthrough cause qemu pause<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi Henry<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Double check,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">What you mean is the syslog under /var/log/syslog? We can get it when this issue re-appeared.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Jiang <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:10.0pt;font-family:宋体">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> Yuan, Hang [<a href="mailto:hang.yuan@intel.com">mailto:hang.yuan@intel.com</a>]
<br>
</span><b><span style="font-size:10.0pt;font-family:宋体">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> 2018</span><span style="font-size:10.0pt;font-family:宋体">年<span lang="EN-US">11</span>月<span lang="EN-US">28</span>日<span lang="EN-US">
18:55<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> jianghuaping (Cloud); 'intel-gvt-dev@lists.freedesktop.org'<br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> Zeng, Harris; Peng, Chao P; daishijun (Cloud); Wang, Hongbo; bailin (Cloud); yandehan (CTS); wangxuan (Cloud); wangtao (Cloud)<br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> RE: KVM Intel graphic passthrough cause qemu pause<o:p></o:p></span></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Do you have host kernel log? So we can help to take a look from GVT perspective.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Henry<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> Jianghuaping [<a href="mailto:jiang.huaping@h3c.com">mailto:jiang.huaping@h3c.com</a>]
<br>
<b>Sent:</b> Wednesday, November 28, 2018 5:56 PM<br>
<b>To:</b> Yuan, Hang <<a href="mailto:hang.yuan@intel.com">hang.yuan@intel.com</a>>; 'intel-gvt-dev@lists.freedesktop.org' <<a href="mailto:intel-gvt-dev@lists.freedesktop.org">intel-gvt-dev@lists.freedesktop.org</a>><br>
<b>Cc:</b> Zeng, Harris <<a href="mailto:harris.zeng@intel.com">harris.zeng@intel.com</a>>; Peng, Chao P <<a href="mailto:chao.p.peng@intel.com">chao.p.peng@intel.com</a>>; Daishijun <<a href="mailto:daishijun@h3c.com">daishijun@h3c.com</a>>; Wang, Hongbo <<a href="mailto:hongbo.wang@intel.com">hongbo.wang@intel.com</a>>;
Bailin <<a href="mailto:berlin@h3c.com">berlin@h3c.com</a>>; Yandehan <<a href="mailto:ydhan@h3c.com">ydhan@h3c.com</a>>; Wangxuan <<a href="mailto:wang.xuan@h3c.com">wang.xuan@h3c.com</a>>; Wangtao <<a href="mailto:wang.taoD@h3c.com">wang.taoD@h3c.com</a>><br>
<b>Subject:</b> </span><span style="font-size:11.0pt;font-family:宋体">答复</span><span lang="EN-US" style="font-size:11.0pt">: KVM Intel graphic passthrough cause qemu pause<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi Hang<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The attached is two logs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">v288C1A78-C34C-11E8-94EF-CEFAE916D900.log : suberror 1 qemu</span><span lang="EN-US" style="font-family:宋体;color:#1F497D"> log</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">v8FE70BB0-BC03-11E8-874B-B4FF2E460600.log : suberror 3 qemu</span><span lang="EN-US" style="font-family:宋体;color:#1F497D"> log</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">old kvm parameter is :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">/usr/bin/kvm -name guest=v03000200-0400-0500-0006-000700080009,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/run/lib/libvirt/qemu/domain-1-v03000200-0400-0500-/master-key.aes
-machine pc-i440fx-2.12,accel=kvm,usb=off,dump-guest-core=off -cpu host,hv_time,hv_relaxed,hv_spinlocks=0x2000,host-cache-info=on,l3-cache=off -m 3380 -realtime mlock=off -smp 2,sockets=1,cores=2,threads=1 -uuid 078fe81f-f60a-45ab-9aaa-b6b97028dc35 -display
none -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/run/lib/libvirt/qemu/domain-1-v03000200-0400-0500-/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -chardev socket,id=charmonitor_cas,path=/var/run/lib/libvirt/qemu/domain-1-v03000200-0400-0500-/monitor.sock.cas,server,nowait
-mon chardev=charmonitor_cas,id=monitor_cas,mode=control -rtc base=localtime,clock=vm,driftfix=slew -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device piix3-usb-uhci,id=usb,pci_hotpluggable=off,bus=pci.0,addr=0x1.0x2
-device usb-ehci,id=usb1,pci_hotpluggable=off,bus=pci.0,addr=0x4 -device nec-usb-xhci,id=usb2,pci_hotpluggable=off,bus=pci.0,addr=0x5 -device virtio-scsi-pci,id=scsi1,pci_hotpluggable=off,bus=pci.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,pci_hotpluggable=off,bus=pci.0,addr=0x7
-device usb-hub,id=hub0,bus=usb.0,port=1 -drive file=/vms/idv/data/win7,format=qcow2,if=none,id=drive-virtio-disk0,cache=directsync,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,pci_hotpluggable=off,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive file=/vms/isos/virtio-win7.vfd,format=raw,if=none,id=drive-fdc0-0-0,readonly=on,cache=directsync,aio=native -global isa-fdc.driveA=drive-fdc0-0-0 -global isa-fdc.bootindexA=4 -drive if=none,id=drive-ide0-0-0,readonly=on -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2
-netdev tap,fd=51,id=hostnet0,vhost=on,vhostfd=52 -device virtio-net-pci,pci_hotpluggable=off,netdev=hostnet0,id=net0,mac=9c:06:1b:6f:93:5f,bus=pci.0,addr=0x3,bootindex=3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charchannel0,path=/var/lib/libvirt/qemu/v03000200-0400-0500-0006-000700080009.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=2
-device vfio-pci,pci_hotpluggable=off,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2 -device vfio-pci,pci_hotpluggable=off,host=00:1f.3,id=hostdev1,bus=pci.0,addr=0x9 -device usb-host,hostbus=1,hostaddr=3,id=hostdev2,bus=usb.0,port=1.1 -device usb-host,hostbus=1,hostaddr=2,id=hostdev3,bus=usb.0,port=1.2
-set device.hostdev0.x-igd-opregion=on -set device.hostdev0.x-igd-gms=1 -msg timestamp=on<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Jiang<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:10.0pt;font-family:宋体">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> Yuan, Hang [<a href="mailto:hang.yuan@intel.com">mailto:hang.yuan@intel.com</a>]
<br>
</span><b><span style="font-size:10.0pt;font-family:宋体">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> 2018</span><span style="font-size:10.0pt;font-family:宋体">年<span lang="EN-US">11</span>月<span lang="EN-US">28</span>日<span lang="EN-US">
15:52<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> jianghuaping (Cloud); 'intel-gvt-dev@lists.freedesktop.org'<br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> Zeng, Harris; Peng, Chao P; daishijun (Cloud); Wang, Hongbo; bailin (Cloud)<br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> RE: KVM Intel graphic passthrough cause qemu pause<o:p></o:p></span></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Hi Huaping,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">What’s your Qemu parameters to create the VM? Do you have host kernel log to share?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Henry<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> intel-gvt-dev [<a href="mailto:intel-gvt-dev-bounces@lists.freedesktop.org">mailto:intel-gvt-dev-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Jianghuaping<br>
<b>Sent:</b> Wednesday, November 28, 2018 10:34 AM<br>
<b>To:</b> 'intel-gvt-dev@lists.freedesktop.org' <<a href="mailto:intel-gvt-dev@lists.freedesktop.org">intel-gvt-dev@lists.freedesktop.org</a>><br>
<b>Cc:</b> Zeng, Harris <<a href="mailto:harris.zeng@intel.com">harris.zeng@intel.com</a>>; Peng, Chao P <<a href="mailto:chao.p.peng@intel.com">chao.p.peng@intel.com</a>>; Daishijun <<a href="mailto:daishijun@h3c.com">daishijun@h3c.com</a>>; Wang, Hongbo <<a href="mailto:hongbo.wang@intel.com">hongbo.wang@intel.com</a>>;
Bailin <<a href="mailto:berlin@h3c.com">berlin@h3c.com</a>><br>
<b>Subject:</b> KVM Intel graphic passthrough cause qemu pause<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hello Intel GVT experts.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">we are using Intel skylake I3 processor to run KVM virtualization(1 Centos Hypervisor +1 Windows guest). Intel graphic in I3 processor will be passed through Qemu guest(this is a Windows 10 1703
guest). We found kvm will appear “suberror 3” or “suberror 1”, and Qemu will pause, when win 10 guest reboot or resume from sleep. Looks like this issue related to EPT miconfig, could you please help us on this issue? The following are detail information.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">In these days, Intel kvm expert:Peng chao is also helping analyzing this issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">----------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:16.0pt;color:red">Linux Kernel &Kvm version:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[root@cvknode31 ~]# virsh version<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Compiled against library: libvirt 4.0.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Using library: libvirt 4.0.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Using API: QEMU 4.0.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Running hypervisor: QEMU 2.12.1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[root@cvknode31 ~]# uname -a<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Linux cvknode31 4.14.0-generic #862.el7 SMP Wed May 23 19:40:09 CST 2018 x86_64 x86_64 x86_64 GNU/Linux<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[root@cvknode31 ~]# cat /etc/redhat-release
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CentOS Linux release 7.5.1804 (Core)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">-----------------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:16.0pt;color:red">Reboot caused suberror 3 qemu log<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">KVM internal error. Suberror: 3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">extra data[0]: 80000b0e<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">extra data[1]: 31<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">extra data[2]: 683<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">extra data[3]: 88c70<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">EAX=00000000 EBX=87b84120 ECX=87b862c0 EDX=80843120<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ESI=87b2afac EDI=80843120 EBP=87a3aa44 ESP=87a3aa40<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">EIP=873d5cfa EFL=00210202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ES =0023 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DS =0023 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">FS =0030 87b84000 00004a20 00409300 DPL=0 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GS =0000 00000000 ffffffff 00c00000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">LDT=0000 00000000 ffffffff 00c00000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">TR =0028 87b88a40 000020ab 00008b00 DPL=0 TSS32-busy<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDT= 87b8e5c0 000003ff<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">IDT= 87b8e9c0 000007ff<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CR0=80010033 CR2=87b2afb0 CR3=001a8000 CR4=001406e8<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DR6=00000000ffff0ff0 DR7=0000000000000400<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">EFER=0000000000000800<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">---------------------------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:16.0pt;color:red">Sleep caused suberror 1 qemu log<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">KVM internal error. Suberror: 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">emulation failure<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">EAX=00010008 EBX=00000000 ECX=00024000 EDX=00000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ESI=00000000 EDI=00000000 EBP=b4237a1c ESP=b42379e8<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">EIP=ffd03000 EFL=00010246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ES =0023 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DS =0023 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">FS =0030 81158000 00004a60 00409300 DPL=0 DS [-WA]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GS =0000 00000000 ffffffff 00c00000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">LDT=0000 00000000 ffffffff 00c00000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">TR =0028 8113f000 000020ab 00008b00 DPL=0 TSS32-busy<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">GDT= 81151000 000003ff<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">IDT= 81151400 000007ff<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">CR0=80010033 CR2=8136b000 CR3=9ffd2320 CR4=001406e9<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">DR6=00000000ffff0ff0 DR7=0000000000000400<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">EFER=0000000000000800<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Jiang huaping<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:10.0pt;font-family:宋体">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> bailin (Cloud)
<br>
</span><b><span style="font-size:10.0pt;font-family:宋体">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:10.0pt;font-family:宋体"> 2018</span><span style="font-size:10.0pt;font-family:宋体">年<span lang="EN-US">11</span>月<span lang="EN-US">28</span>日<span lang="EN-US">
8:08<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> Peng, Chao P; Zeng, Harris<br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> jianghuaping (Cloud); changlimin (Cloud)<br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> </span>答复<span lang="EN-US">:
</span>答复<span lang="EN-US">: pause</span>问题<span lang="EN-US"><o:p></o:p></span></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">用户态的堆栈如下</span><span lang="EN-US" style="color:#1F497D">,</span><span style="font-family:宋体;color:#1F497D">感觉这种操作普遍并且正常</span><span lang="EN-US" style="color:#1F497D">.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">一个</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">在</span><span lang="EN-US" style="color:#1F497D">pci</span><span style="font-family:宋体;color:#1F497D">的空间访问</span><span lang="EN-US" style="color:#1F497D">,</span><span style="font-family:宋体;color:#1F497D">导致修改</span><span lang="EN-US" style="color:#1F497D">memslot<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#0 0x00007fee3ede95d7 in ioctl () from /lib64/libc.so.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#1 0x00005624101a28d7 in kvm_vm_ioctl (s=0x8ec8, s@entry=0x5624132e8e20, type=881622144, type@entry=1075883590)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:2075<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#2 0x00005624101a3207 in kvm_set_user_memory_region (slot=slot@entry=0x5624132ea110, kml=0x5624132e9ec0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:277<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#3 0x00005624101a3640 in kvm_set_phys_mem (kml=0x5624132e9ec0, section=<optimized out>, add=true)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:774<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#4 0x00005624101929e1 in address_space_update_topology_pass (as=as@entry=0x562410e3b5e0 <address_space_memory>, adding=adding@entry=true,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> new_view=0x7fee106a03d0, new_view=0x7fee106a03d0, old_view=<optimized out>, old_view=<optimized out>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:933<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#5 0x0000562410192d94 in address_space_set_flatview (as=as@entry=0x562410e3b5e0 <address_space_memory>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:1008<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#6 0x00005624101959c0 in memory_region_transaction_commit ()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:1060<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#7 0x0000562410391ab8 in pci_update_vga (pci_dev=0x562414c97bc0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/hw/pci/pci.c:1167<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#8 0x0000562410392913 in pci_update_vga (pci_dev=0x562414c97bc0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/hw/pci/pci.c:1161<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#9 pci_update_mappings (d=d@entry=0x562414c97bc0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/hw/pci/pci.c:1333<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#10 0x0000562410392f59 in pci_default_write_config (d=d@entry=0x562414c97bc0, addr=addr@entry=4, val_in=val_in@entry=1024, l=2)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/hw/pci/pci.c:1380<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#11 0x00005624101dd49c in vfio_pci_write_config (pdev=0x562414c97bc0, addr=4, val=1024, len=<optimized out>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/hw/vfio/pci.c:1222<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#12 0x00005624103998da in pci_host_config_write_common (pci_dev=0x562414c97bc0, addr=4, limit=256, val=1024, len=2)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/hw/pci/pci_host.c:66<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#13 0x000056241019341b in memory_region_write_accessor (mr=0x5624136715b0, addr=0, value=<optimized out>, size=2, shift=<optimized out>,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> mask=<optimized out>, attrs=...) at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:530<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#14 0x0000562410191029 in access_with_adjusted_size (addr=addr@entry=0, value=value@entry=0x7fee25dbb4a8, size=size@entry=2,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> access_size_min=<optimized out>, access_size_max=<optimized out>,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> access_fn=access_fn@entry=0x5624101933a0 <memory_region_write_accessor>, mr=mr@entry=0x5624136715b0, attrs=attrs@entry=...)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:597<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#15 0x0000562410195f75 in memory_region_dispatch_write (mr=mr@entry=0x5624136715b0, addr=addr@entry=0, data=1024, size=size@entry=2,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> attrs=attrs@entry=...) at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/memory.c:1474<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#16 0x0000562410131342 in flatview_write_continue (mr=0x5624136715b0, l=2, addr1=0, len=2, buf=0x7fee459ed000 "", attrs=..., addr=3324,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> fv=0x7fee1c594e40) at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/exec.c:3166<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#17 flatview_write (fv=0x7fee1c594e40, addr=<optimized out>, attrs=..., buf=<optimized out>, len=<optimized out>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/exec.c:3216<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#18 0x000056241013507f in address_space_write (as=<optimized out>, addr=<optimized out>, attrs=..., buf=<optimized out>, len=<optimized out>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/exec.c:3332<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#19 0x0000562410135125 in address_space_rw (as=<optimized out>, addr=addr@entry=3324, attrs=..., attrs@entry=..., buf=<optimized out>,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> len=len@entry=2, is_write=is_write@entry=true) at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/exec.c:3343<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#20 0x00005624101a4ff6 in kvm_handle_io (count=1, size=2, direction=<optimized out>, data=<optimized out>, attrs=..., port=3324)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:1730<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#21 kvm_cpu_exec (cpu=cpu@entry=0x56241344c3e0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:1970<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#22 0x000056241017f9e6 in qemu_kvm_cpu_thread_fn (arg=0x56241344c3e0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/cpus.c:1229<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#23 0x00007fee3f0c8e25 in start_thread () from /lib64/libpthread.so.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#24 0x00007fee3edf2bad in clone () from /lib64/libc.so.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">异常的</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">的</span><span lang="EN-US" style="color:#1F497D">qemu</span><span style="font-family:宋体;color:#1F497D">堆栈</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#0 0x00007fee3ede95d7 in ioctl () from /lib64/libc.so.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#1 0x00005624101a4d02 in kvm_vcpu_ioctl (cpu=0x0, cpu@entry=0x5624133fe150, type=136, type@entry=44672)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:2093<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#2 0x00005624101a4e5f in kvm_cpu_exec (cpu=cpu@entry=0x5624133fe150)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/accel/kvm/kvm-all.c:1930<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#3 0x000056241017f9e6 in qemu_kvm_cpu_thread_fn (arg=0x5624133fe150)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> at /home/uis-enterprise/f-idv/daemon/qemu/qemu-2.12/rpmbuild/BUILD/qemu-2.12/cpus.c:1229<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#4 0x00007fee3f0c8e25 in start_thread () from /lib64/libpthread.so.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#5 0x00007fee3edf2bad in clone () from /lib64/libc.so.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span style="font-size:11.0pt;font-family:"微软雅黑","sans-serif"">发件人<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"微软雅黑","sans-serif""> Peng, Chao P [<a href="mailto:chao.p.peng@intel.com">mailto:chao.p.peng@intel.com</a>]
<br>
</span><b><span style="font-size:11.0pt;font-family:"微软雅黑","sans-serif"">发送时间<span lang="EN-US">:</span></span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"微软雅黑","sans-serif""> 2018</span><span style="font-size:11.0pt;font-family:"微软雅黑","sans-serif"">年<span lang="EN-US">11</span>月<span lang="EN-US">26</span>日<span lang="EN-US">
16:40<br>
</span><b>收件人<span lang="EN-US">:</span></b><span lang="EN-US"> Zeng, Harris <<a href="mailto:harris.zeng@intel.com">harris.zeng@intel.com</a>>; bailin (Cloud) <<a href="mailto:berlin@h3c.com">berlin@h3c.com</a>><br>
</span><b>抄送<span lang="EN-US">:</span></b><span lang="EN-US"> jianghuaping (Cloud) <<a href="mailto:jiang.huaping@h3c.com">jiang.huaping@h3c.com</a>>; changlimin (Cloud) <<a href="mailto:changlimin@h3c.com">changlimin@h3c.com</a>><br>
</span><b>主题<span lang="EN-US">:</span></b><span lang="EN-US"> RE: </span>答复<span lang="EN-US">: pause</span>问题<span lang="EN-US"><o:p></o:p></span></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">我看了代码,目前的现象和</span><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">RCU</span><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">的本来设计也是吻合的。所以即使</span><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">memslot
</span><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">为空,</span><span style="font-size:11.0pt;color:#1F497D">
</span><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">还不好说这是问题。</span><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">一个思路是看看新添加</span><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">memslot</span><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">的操作是什么时机触发,是否与</span><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">guest</span><span style="font-size:11.0pt;font-family:宋体;color:#1F497D">的特定行为有关?</span><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> Zeng, Harris
<br>
<b>Sent:</b> Saturday, November 24, 2018 10:13 PM<br>
<b>To:</b> Bailin <<a href="mailto:berlin@h3c.com">berlin@h3c.com</a>>; Peng, Chao P <<a href="mailto:chao.p.peng@intel.com">chao.p.peng@intel.com</a>><br>
<b>Cc:</b> Jianghuaping <<a href="mailto:jiang.huaping@h3c.com">jiang.huaping@h3c.com</a>>; Changlimin <<a href="mailto:changlimin@h3c.com">changlimin@h3c.com</a>><br>
<b>Subject:</b> Re: </span><span style="font-size:11.0pt;font-family:宋体">答复</span><span lang="EN-US" style="font-size:11.0pt">: pause</span><span style="font-size:11.0pt;font-family:宋体">问题</span><span lang="EN-US" style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hi Chao,</span><span lang="EN-US" style="font-size:12.0pt"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Can you help to advise?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Harris<o:p></o:p></span></p>
<div id="AppleMailSignature">
<p class="MsoNormal"><span lang="EN-US">Sent from my mobile phone.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><br>
</span><span style="font-family:宋体">在</span><span lang="EN-US"> 2018</span><span style="font-family:宋体">年</span><span lang="EN-US">11</span><span style="font-family:宋体">月</span><span lang="EN-US">22</span><span style="font-family:宋体">日,上午</span><span lang="EN-US">10:47</span><span style="font-family:宋体">,</span><span lang="EN-US">Bailin
<<a href="mailto:berlin@h3c.com">berlin@h3c.com</a>> </span><span style="font-family:宋体">写道:</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">不知道你们那边有没有具体线索</span><span lang="EN-US" style="color:#1F497D">,</span><span style="font-family:宋体;color:#1F497D">目前我们这边分析是内核函数</span><span lang="EN-US" style="color:#1F497D">kvm_vcpu_gfn_to_hva_prot</span><span style="font-family:宋体;color:#1F497D">可能有缺陷</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">目前我们这边没有更好的修改思路</span><span lang="EN-US" style="color:#1F497D">,</span><span style="font-family:宋体;color:#1F497D">也无法确认为什么这里返回错误</span><span lang="EN-US" style="color:#1F497D">,</span><span style="font-family:宋体;color:#1F497D">会最终导致</span><span lang="EN-US" style="color:#1F497D">ept
misconfig.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">出现问题时</span><span lang="EN-US" style="color:#1F497D">,memslot</span><span style="font-family:宋体;color:#1F497D">为空,但是在</span><span lang="EN-US" style="color:#1F497D">coredump</span><span style="font-family:宋体;color:#1F497D">中看到的不为空的准确原因明确了</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">出问题的</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">的堆栈</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#0 [ffffc900009d37a8] machine_kexec at ffffffff8105da32</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#1 [ffffc900009d3800] __crash_kexec at ffffffff8111a9ad</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#2 [ffffc900009d38c8] panic at ffffffff81085e2c</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#3 [ffffc900009d3948] paging64_walk_addr_generic at ffffffffc05cf4b3 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#4 [ffffc900009d3a30] paging64_gva_to_gpa at ffffffffc05cf6df [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#5 [ffffc900009d3b48] emulator_read_write_onepage at ffffffffc05b6f5b [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#6 [ffffc900009d3ba8] emulator_read_write at ffffffffc05b72d2 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#7 [ffffc900009d3bf8] segmented_read at ffffffffc05da519 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#8 [ffffc900009d3c38] x86_emulate_insn at ffffffffc05de3f0 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#9 [ffffc900009d3c88] x86_emulate_instruction at ffffffffc05c0149 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#10 [ffffc900009d3cf8] kvm_mmu_page_fault_ept_violation at ffffffffc05cd9ea [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#11 [ffffc900009d3d30] kvm_arch_vcpu_ioctl_run at ffffffffc05c4510 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#12 [ffffc900009d3df0] kvm_vcpu_ioctl at ffffffffc05aa197 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#13 [ffffc900009d3e80] do_vfs_ioctl at ffffffff8126bbc9</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#14 [ffffc900009d3f00] sys_ioctl at ffffffff8126c1b4</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#15 [ffffc900009d3f38] do_syscall_64 at ffffffff810036fe</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#16 [ffffc900009d3f50] entry_SYSCALL_64_after_hwframe at ffffffff81a00081</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">发生异常的</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">调用</span><span style="color:#1F497D">
</span><span style="font-family:宋体;color:#1F497D">这个函数,获取</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">,是没有问题的,这个函数除了索引数组,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">主要是在内核的</span><span lang="EN-US" style="color:#1F497D">lock debug</span><span style="font-family:宋体;color:#1F497D">打开时检查</span><span lang="EN-US" style="color:#1F497D">kvm->srcu</span><span style="font-family:宋体;color:#1F497D">,</span><span lang="EN-US" style="color:#1F497D">kvm->slots_lock</span><span style="font-family:宋体;color:#1F497D">的状态,而一般情况下</span><span lang="EN-US" style="color:#1F497D">lock
debug</span><span style="font-family:宋体;color:#1F497D">是不打开的</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id)</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">{</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> lockdep_is_held(&</span><b><i><span lang="EN-US" style="color:red">kvm->slots_lock</span></i></b><span lang="EN-US" style="color:#1F497D">) ||</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> !refcount_read(&kvm->users_count));</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">}</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">实际上是</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">取错了,导致根据</span><span lang="EN-US" style="color:#1F497D">gfn</span><span style="font-family:宋体;color:#1F497D">查找的</span><span lang="EN-US" style="color:#1F497D">memslot</span><span style="font-family:宋体;color:#1F497D">错了,修改了调试信息</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">unsigned long kvm_vcpu_gfn_to_hva_prot(struct kvm_vcpu *vcpu, gfn_t gfn, bool *writable)</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">{</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> //struct kvm_memory_slot *slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><b><i><span lang="EN-US" style="color:red">struct kvm_memslots *slots = kvm_vcpu_memslots(vcpu);</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="color:red"> struct kvm_memory_slot *slot = __gfn_to_memslot(slots, gfn);</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> if(NULL == slot){</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> printk("%s,%d,slots=%p,vpuid=%d,gfn=%llx\n",__FUNCTION__,__LINE__,slots,vcpu->vcpu_id,gfn);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> }</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> return gfn_to_hva_memslot_prot(slot, gfn, writable);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">}</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">出问题时的,</span><span lang="EN-US" style="color:#1F497D">memslot</span><span style="font-family:宋体;color:#1F497D">为空,但是</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">不为空,但是和当前内存中的不一致,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">[ 5621.133030] kvm_vcpu_gfn_to_hva_prot,1325,slots=ffff88011b6d0000,vpuid=0,gfn=84</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">而</span><span lang="EN-US" style="color:#1F497D">coredump</span><span style="font-family:宋体;color:#1F497D">中读出的</span><span lang="EN-US" style="color:#1F497D">memslots</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">crash> struct -x kvm.memslots 0xffff880118380000</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> memslots = {</span><b><i><span lang="EN-US" style="color:red">0xffff88011ee40000</span></i></b><span lang="EN-US" style="color:#1F497D">, 0xffff88011ee10000}</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">0xffff88011ee40000</span><span style="font-family:宋体;color:#1F497D">这个</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">里面是有对应</span><span lang="EN-US" style="color:#1F497D">gfn</span><span style="font-family:宋体;color:#1F497D">的</span><span lang="EN-US" style="color:#1F497D">memslot</span><span style="font-family:宋体;color:#1F497D">,</span><span lang="EN-US" style="color:#1F497D">0x
ffff88011b6d0000</span><span style="font-family:宋体;color:#1F497D">是没有的</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">原因是</span><span lang="EN-US" style="color:#1F497D">coredump</span><span style="font-family:宋体;color:#1F497D">中看到的是另外一个</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">在</span><span lang="EN-US" style="color:#1F497D">install_new_memslots</span><span style="font-family:宋体;color:#1F497D">做了更新的</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">而发生异常时的</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">读取的是更新前的</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">。</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:宋体;color:#1F497D">另外一个<span lang="EN-US">cpu</span>的堆栈</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#0 [ffffc900009ffb08] __schedule at ffffffff818f8c6e</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="color:red">#1 [ffffc900009ffb98] preempt_schedule_common at ffffffff818f94ad</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="color:red">#2 [ffffc900009ffba8] _cond_resched at ffffffff818f94d8</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="color:red">#3 [ffffc900009ffbb0] wait_for_completion at ffffffff818fa69c</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="color:red">#4 [ffffc900009ffc08] __synchronize_srcu at ffffffff810f1447</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="color:red">#5 [ffffc900009ffc70] install_new_memslots at ffffffffc05a5d89 [kvm]</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">#6 [ffffc900009ffc90] __kvm_set_memory_region at ffffffffc05a7061 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">#7 [ffffc900009ffda0] kvm_set_memory_region at ffffffffc05a72d6 [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">#8 [ffffc900009ffdc0] kvm_vm_ioctl at ffffffffc05a994b [kvm]</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">#9 [ffffc900009ffe80] do_vfs_ioctl at ffffffff8126bbc9</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">#10 [ffffc900009fff00] sys_ioctl at ffffffff8126c1b4</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">#11 [ffffc900009fff38] do_syscall_64 at ffffffff810036fe</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">#12 [ffffc900009fff50] entry_SYSCALL_64_after_hwframe at ffffffff81a00081</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">static struct kvm_memslots *install_new_memslots(struct kvm *kvm,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> int as_id, struct kvm_memslots *slots)</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">{</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> struct kvm_memslots *old_memslots = __kvm_memslots(kvm, as_id);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> /*</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> * Set the low bit in the generation, which disables SPTE caching</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> * until the end of synchronize_srcu_expedited.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> */</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> WARN_ON(old_memslots->generation & 1);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> slots->generation = old_memslots->generation + 1;</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><b><i><span lang="EN-US" style="color:red">rcu_assign_pointer(kvm->memslots[as_id], slots);</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> synchronize_srcu_expedited(&kvm->srcu);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span style="font-family:宋体;color:#1F497D">实际中另外一个</span><span lang="EN-US" style="color:#1F497D">cpu</span><span style="font-family:宋体;color:#1F497D">在更新</span><span lang="EN-US" style="color:#1F497D">memslots</span><span style="font-family:宋体;color:#1F497D">之前是加了</span><span lang="EN-US" style="color:#1F497D">slots</span><span style="font-family:宋体;color:#1F497D">的锁,</span><span lang="EN-US" style="color:#1F497D">lock
debug</span><span style="font-family:宋体;color:#1F497D">没有打开时其实是检测不到错误的。</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span style="font-family:宋体;color:#1F497D">而更新过程中,数据可能是不准确的。</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">int kvm_set_memory_region(struct kvm *kvm,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> const struct kvm_userspace_memory_region *mem)</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">{</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> int r;</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><b><i><span lang="EN-US" style="color:red">mutex_lock(&kvm->slots_lock);</span></i></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> r = __kvm_set_memory_region(kvm, mem);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> mutex_unlock(&kvm->slots_lock);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> return r;</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D">}</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:0cm;margin-left:41.25pt;margin-bottom:.0001pt">
<span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="mso-margin-top-alt:0cm;margin-right:36.0pt;margin-bottom:5.0pt;margin-left:41.25pt;text-align:left">
<span lang="EN-US" style="font-size:7.5pt;font-family:华文细黑;color:gray">-------------------------------------------------------------------------------------------------------------------------------------<br>
</span><span style="font-size:7.5pt;font-family:宋体;color:gray">本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出</span><span lang="EN-US" style="font-size:7.5pt;font-family:华文细黑;color:gray"><br>
</span><span style="font-size:7.5pt;font-family:宋体;color:gray">的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、</span><span lang="EN-US" style="font-size:7.5pt;font-family:华文细黑;color:gray"><br>
</span><span style="font-size:7.5pt;font-family:宋体;color:gray">或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本</span><span lang="EN-US" style="font-size:7.5pt;font-family:华文细黑;color:gray"><br>
</span><span style="font-size:7.5pt;font-family:宋体;color:gray">邮件!</span><span lang="EN-US" style="font-size:7.5pt;font-family:华文细黑;color:gray"><br>
</span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">This e-mail and its attachments contain confidential information from New H3C, which is
<br>
intended only for the person or entity whose address is listed above. Any use of the
<br>
information contained herein in any way (including, but not limited to, total or partial
<br>
disclosure, reproduction, or dissemination) by persons other than the intended <br>
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
<br>
by phone or email immediately and delete it!</span><span lang="EN-US" style="font-size:12.0pt;font-family:宋体">
</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>