]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commit
xen: properly gate host writes of modified PCI CFG contents
authorJan Beulich <jbeulich@suse.com>
Wed, 10 Jun 2015 13:13:52 +0000 (14:13 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 10 Jun 2015 13:13:52 +0000 (14:13 +0100)
commit835bc3eeba2cc52cc54b53578d78a2a7e56c54b6
tree26200d6b3511804bbabefdf264b96b1f74d8170a
parentc545d0dfcc5ab5e69d0eabc14ec101293236055c
xen: properly gate host writes of modified PCI CFG contents

The old logic didn't work as intended when an access spanned multiple
fields (for example a 32-bit access to the location of the MSI Message
Data field with the high 16 bits not being covered by any known field).
Remove it and derive which fields not to write to from the accessed
fields' emulation masks: When they're all ones, there's no point in
doing any host write.

This fixes a secondary issue at once: We obviously shouldn't make any
host write attempt when already the host read failed.

This is XSA-128.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/pass-through.c
hw/pass-through.h