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)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 7 Mar 2016 17:26:27 +0000 (12:26 -0500)
commit05584b5815ecb05a6b8f394eef566781eb66b821
tree97063cd10a4155da2078b5dc3d293a413fd407de
parentb0a4f565b1dba16cb98842d3129fa0f57445b044
xen/pciback: Save the number of MSI-X entries to be copied later.

[ Upstream commit 4cf5aa2ffe17403385d75a5b1d9d97071500ea18 ]

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/xen/xen-pciback/pciback_ops.c