#983862 PVH -- cannot remove vm with pci passthrough

Package:
src:xen
Source:
xen
Submitter:
Adi Kriegisch
Date:
2021-03-07 21:09:07 UTC
Severity:
minor
Tags:
#983862#5
Date:
2021-03-02 11:46:03 UTC
From:
To:
Dear maintainers,

we, by accident, added a pci passthrough device config to a pvh vm and were
able to boot that machine. But shutdown did not work with the following
error message:
  | xl: libxl_pci.c:1427: do_pci_remove: Assertion `type == LIBXL_DOMAIN_TYPE_PV' failed.
To remove the virtual machine and free its resources a reboot of Dom0 was
necessary. A corresponding assert when creating the machine seems to be
missing.
We consider this to be a bug, because we should not have been able to 'xl
create' that machine in the first place (or would have needed a way to
dispose the vm).

best regards,
    Adi Kriegisch

#983862#10
Date:
2021-03-07 20:56:32 UTC
From:
To:
reassign 983862 src:xen 4.11.4+57-g41a822c392-2
tags 983862 + upstream
thanks

Hi Adi!

Aha. Interesting. I just had a look at libxl_pci.c in the latest
upstream code, and I think the same bug still exists.

PCI passthrough is still not supported for PVH, so it should refuse, a
bit higher up in the call stack. Probably not with an assert, but with a
nice error message. :)

I think I'm going to have a closer look at it somewhere in the next week.

Note that the bug fix will not reach Xen 4.11 (or our package) any more.

Regards,
Hans van Kranenburg