Skip to contentSkip to conversation

Xen 4.10.x and PCI passthrough

DISCUSSION Andreas Kinzler 3 participants 5 messages Sep 7, 2018 – Sep 19, 2018

lore
Share & tools
lore
#0 lore raw

Hello Roger,

in August 2017, I reported a problem with PCI passthrough and MSI interrupts (https://lists.xenproject.org/archives/html/xen-devel/2017-08/msg01433.html).

That report lead to some patches for Xen and qemu.

Some weeks ago I tried a quite new version of Xen 4.10.2-pre (http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=a645331a9f4190e92ccf41a950bc4692f8904239) and the PCI card (LSI SAS HBA) using Windows 2012 R2 as a guest. Everything works but only to the point where Windows reboots -> then the card is no longer usable. If you destroy the domain and recreate the card again works.

Did I miss something simple or should we analyze the problem again using similar debug prints as before?

Regards Andreas

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw
Quoted 7 lines · Andreas Kinzler

Hello Roger,

in August 2017, I reported a problem with PCI passthrough and MSI interrupts
(https://lists.xenproject.org/archives/html/xen-devel/2017-08/msg01433.html).

That report lead to some patches for Xen and qemu.

Quoted 7 lines

Some weeks ago I tried a quite new version of Xen 4.10.2-pre (http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=a645331a9f4190e92ccf41a950bc4692f8904239)
and the PCI card (LSI SAS HBA) using Windows 2012 R2 as a guest. Everything
works but only to the point where Windows reboots -> then the card is no
longer usable. If you destroy the domain and recreate the card again works.

Did I miss something simple or should we analyze the problem again using similar debug prints as before?

Not sure, but it doesn't look to me like this issue is related to the one fixed by the patches mentioned above, I think this is a different issue, and by the looks of it it's a toolstack issue.

Can you paste the output of xl -vvv create <config.cfg> and the contents of the log that you will find in /var/log/xen/xl-<domain-name>.log after you have attempted a reboot?

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw

Hello Roger,

Quoted 11 lines
Quoted 5 lines

Some weeks ago I tried a quite new version of Xen 4.10.2-pre (http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=a645331a9f4190e92ccf41a950bc4692f8904239)
and the PCI card (LSI SAS HBA) using Windows 2012 R2 as a guest. Everything
works but only to the point where Windows reboots -> then the card is no
longer usable. If you destroy the domain and recreate the card again Did I miss something simple or should we analyze the problem again using similar debug prints as before?

Not sure, but it doesn't look to me like this issue is related to the one fixed by the patches mentioned above, I think this is a different issue, and by the looks of it it's a toolstack issue.
Can you paste the output of xl -vvv create <config.cfg> and the contents of the log that you will find in /var/log/xen/xl-<domain-name>.log after you have attempted a reboot?

xl-domain.log is attached. From what I can see, the problem is that the card is deleted after domid 3 and not added back later. To confirm I ran "xl pci-list winsrv" during domid 3 and the card is shown. After Windows reboot (domid 4) "xl pci-list winsrv" gives an empty output.

Regards Andreas

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 17 lines · Andreas Kinzler

Hello Roger,

Quoted 8 lines
Quoted 8 lines

Some weeks ago I tried a quite new version of Xen 4.10.2-pre (http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=a645331a9f4190e92ccf41a950bc4692f8904239)
and the PCI card (LSI SAS HBA) using Windows 2012 R2 as a guest.
Everything
works but only to the point where Windows reboots -> then the card is no
longer usable. If you destroy the domain and recreate the card again
Did I miss something simple or should we analyze the problem again
using
similar debug prints as before?

Quoted 6 lines

Not sure, but it doesn't look to me like this issue is related to the one fixed by the patches mentioned above, I think this is a different issue, and by the looks of it it's a toolstack issue.
Can you paste the output of xl -vvv create <config.cfg> and the contents of the log that you will find in /var/log/xen/xl-<domain-name>.log after you have attempted a reboot?

Quoted 4 lines

xl-domain.log is attached. From what I can see, the problem is that the card is deleted after domid 3 and not added back later. To confirm I ran "xl pci-list winsrv" during domid 3 and the card is shown. After Windows reboot (domid 4) "xl pci-list winsrv" gives an empty output.

Hello,

I'm not very familiar with the way xl/libxl keeps state between reboots, I think Wei (now on Cc) was the last one to look into this. If not I can try to take a look later this week.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 23 lines · Roger Pau Monné
Quoted 17 lines · Andreas Kinzler

Hello Roger,

Quoted 8 lines
Quoted 8 lines

Some weeks ago I tried a quite new version of Xen 4.10.2-pre (http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=a645331a9f4190e92ccf41a950bc4692f8904239)
and the PCI card (LSI SAS HBA) using Windows 2012 R2 as a guest.
Everything
works but only to the point where Windows reboots -> then the card is no
longer usable. If you destroy the domain and recreate the card again
Did I miss something simple or should we analyze the problem again
using
similar debug prints as before?

Quoted 6 lines

Not sure, but it doesn't look to me like this issue is related to the one fixed by the patches mentioned above, I think this is a different issue, and by the looks of it it's a toolstack issue.
Can you paste the output of xl -vvv create <config.cfg> and the contents of the log that you will find in /var/log/xen/xl-<domain-name>.log after you have attempted a reboot?

Quoted 4 lines

xl-domain.log is attached. From what I can see, the problem is that the card is deleted after domid 3 and not added back later. To confirm I ran "xl pci-list winsrv" during domid 3 and the card is shown. After Windows reboot (domid 4) "xl pci-list winsrv" gives an empty output.

Quoted 5 lines

Hello,

I'm not very familiar with the way xl/libxl keeps state between reboots, I think Wei (now on Cc) was the last one to look into this. If not I can try to take a look later this week.

Rebooting the domain involves saving the domain state and recreating the guest from that state.

PCI devices don't get saved when saving domain state. The framework is generic, but there are some missing hooks for PCI type devices.

See libxl_domain.c:libxl_retrieve_domain_configuration and libxl_pci.c.

Wei.

Quoted 2 lines

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel