x86: don't allow MSI pIRQ mapping on unowned device

MSI setup should be permitted only for existing devices owned by the
respective guest (the operation may still be carried out by the domain
controlling that guest).

This is part of XSA-237.

Reported-by: HW42 <hw42@ipsumj.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 3308374b1b
master date: 2017-10-12 14:35:14 +0200
This commit is contained in:
Jan Beulich committed 2017-10-12 15:34:58 +02:00
1 parent 78fd0c3765
commit b0239cd726
1 file changed
+4 -1
+4 -1
View File
@@ -1961,7 +1961,10 @@ int map_domain_pirq(
if ( !cpu_has_apic )
goto done;
pdev = pci_get_pdev(msi->seg, msi->bus, msi->devfn);
pdev = pci_get_pdev_by_domain(d, msi->seg, msi->bus, msi->devfn);
if ( !pdev )
goto done;
ret = pci_enable_msi(msi, &msi_desc);
if ( ret )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.