xen/pciback: Save the number of MSI-X entries to be copied later.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 11 Feb 2016 21:10:24 +0000 (16:10 -0500)
committerZefan Li <lizefan@huawei.com>
Wed, 26 Oct 2016 15:15:45 +0000 (23:15 +0800)
commit658ba629ae9263312ea373c5f9faac0b2dabf070
treea64bc8897df6583c20a1216cb9524398730d1394
parent98c6556471132b8676f9ab6536e501475dce7df2
xen/pciback: Save the number of MSI-X entries to be copied later.

commit d159457b84395927b5a52adb72f748dd089ad5e5 upstream.

Commit 8135cf8b092723dbfcc611fe6fdcb3a36c9951c5 (xen/pciback: Save
xen_pci_op commands before processing it) broke enabling MSI-X because
it would never copy the resulting vectors into the response.  The
number of vectors requested was being overwritten by the return value
(typically zero for success).

Save the number of vectors before processing the op, so the correct
number of vectors are copied afterwards.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/xen/xen-pciback/pciback_ops.c