]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commit
xen: properly gate host writes of modified PCI CFG contents
authorJan Beulich <jbeulich@suse.com>
Tue, 2 Jun 2015 15:43:07 +0000 (15:43 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 2 Jun 2015 15:43:07 +0000 (15:43 +0000)
commit8d3b4a8f8075d7e96a9bece8d8371c95b7be5f5a
tree76aa7e9a283a8cf869a11227e350e5ca8bfa2f08
parentf582d00cf2055511153a87cc3c52565a0d1ae571
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/xen/xen_pt.c
hw/xen/xen_pt.h
hw/xen/xen_pt_config_init.c