]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-pciback: return proper values during BAR sizing
authorJan Beulich <JBeulich@suse.com>
Fri, 24 Jun 2016 09:13:34 +0000 (03:13 -0600)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 6 Jul 2016 16:13:33 +0000 (12:13 -0400)
commit72455868bb0677ff917065f532e4f1d9438aedf6
tree3f1fccaeb29610ebb950633b9ed87581326cb3d5
parentc959a5555878265cd44448691938f31f3322d95c
xen-pciback: return proper values during BAR sizing

Reads following writes with all address bits set to 1 should return all
changeable address bits as one, not the BAR size (nor, as was the case
for the upper half of 64-bit BARs, the high half of the region's end
address). Presumably this didn't cause any problems so far because
consumers use the value to calculate the size (usually via val & -val),
and do nothing else with it.

But also consider the exception here: Unimplemented BARs should always
return all zeroes.

And finally, the check for whether to return the sizing address on read
for the ROM BAR should ignore all non-address bits, not just the ROM
Enable one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit d2bd05d88d245c13b64c3bf9c8927a1c56453d8c)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
OraBug: 23585393
drivers/xen/xen-pciback/conf_space_header.c