From: Andrew Cooper Subject: Re: PCI passthrough will cause unknown device appearance in device manager of Windows OS via xenstore keys Date: Mon, 10 Apr 2017 13:46:20 +0100 Message-ID: References: <9B58885955C6DD468CCDB27E993605EE0BA6DC19@SZXEMI502-MBS.china.huawei.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1699796452385971916==" Return-path: In-Reply-To: <9B58885955C6DD468CCDB27E993605EE0BA6DC19@SZXEMI502-MBS.china.huawei.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Ian Jackson Cc: "Xuquan (Quan Xu)" , "sstabellini@kernel.org" , "Wei Liu (wei.liu2@citrix.com)" , Yanqiangjun , lidonglin , "xen-devel@lists.xen.org" , Fanhenglong , "dengkai (A)" List-Id: xen-devel@lists.xenproject.org --===============1699796452385971916== Content-Type: multipart/alternative; boundary="------------86FAE26731C6CD3AA9B3559B" --------------86FAE26731C6CD3AA9B3559B Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On 10/04/17 12:24, lidonglin wrote: > > Hi all: > > I have one question about PCI passthrough. I found > that if I created a VM with host pci device(cfg file as below), there > were some xenstore keys exsiting in /local/domain/0 and > /local/domain/DomID/. Besides I found one unknown device in device > manager of Windows OS with Class ID FF80 from vendor ID 5853. My > questions are as below: > > > > 1. Why do we create frontend and backend key pairs in xenstore? > I think Passthrough is not PV, was it possible that we just used > these keys to record something? > > 2. After review the code, I think backend keys are used to > record state of hostdev, some codes will query something using these > keys. But for frontend keys, can we delete them? > > 3. if frontend keys exist in xenstore, then unknown device will > appear in device manager. Can we fix this? For an obsessive, he > can’t stand for this. > This is a libxl bug which has been reported before, but nothing happened. libxl must not start a PV pci-back when doing HVM PCI passthrough using qemu, because absolutely nothing good can come of having two different ways of poking at PCI state. The patch, unchanged from before, is https://github.com/xenserver/xen-4.7.pg/blob/master/master/0001-libxl-Don-t-insert-PCI-device-into-xenstore-for-HVM-.patch ~Andrew --------------86FAE26731C6CD3AA9B3559B Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit
On 10/04/17 12:24, lidonglin wrote:

Hi all:

                I have one question about PCI passthrough. I found that if I created a VM with host pci device(cfg file as below), there were some xenstore keys exsiting in /local/domain/0 and /local/domain/DomID/. Besides I found one unknown device in device manager of Windows OS with Class ID FF80 from vendor ID 5853. My questions  are as below:

 

1.       Why do we create frontend and backend key pairs in xenstore?  I think  Passthrough is not PV,  was it possible that we just used these keys to record something?

2.        After review the code, I think backend keys are used to record state of hostdev, some codes will query something using these keys. But for frontend keys, can we delete them?

3.       if frontend keys exist in xenstore, then unknown device will appear in device manager. Can we fix this?  For  an obsessive,  he can’t stand for this.


This is a libxl bug which has been reported before, but nothing happened.

libxl must not start a PV pci-back when doing HVM PCI passthrough using qemu, because absolutely nothing good can come of having two different ways of poking at PCI state.

The patch, unchanged from before, is https://github.com/xenserver/xen-4.7.pg/blob/master/master/0001-libxl-Don-t-insert-PCI-device-into-xenstore-for-HVM-.patch

~Andrew --------------86FAE26731C6CD3AA9B3559B-- --===============1699796452385971916== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============1699796452385971916==--