qemu/hw/xen
Jan Beulich b38ec5ee7a xen/MSI-X: limit error messages
Limit error messages resulting from bad guest behavior to avoid allowing
the guest to cause the control domain's disk to fill.

The first message in pci_msix_write() can simply be deleted, as this
is indeed bad guest behavior, but such out of bounds writes don't
really need to be logged.

The second one is more problematic, as there guest behavior may only
appear to be wrong: For one, the old logic didn't take the mask-all bit
into account. And then this shouldn't depend on host device state (i.e.
the host may have masked the entry without the guest having done so).
Plus these writes shouldn't be dropped even when an entry is unmasked.
Instead, if they can't be made take effect right away, they should take
effect on the next unmasking or enabling operation - the specification
explicitly describes such caching behavior. Until we can validly drop
the message (implementing such caching/latching behavior), issue the
message just once per MSI-X table entry.

Note that the log message in pci_msix_read() similar to the one being
removed here is not an issue: "addr" being of unsigned type, and the
maximum size of the MSI-X table being 32k, entry_nr simply can't be
negative and hence the conditonal guarding issuing of the message will
never be true.

This is XSA-130.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2015-06-02 15:07:00 +00:00
..
Makefile.objs xen: move Xen HVM files under hw/i386/xen 2014-05-07 16:14:56 +00:00
xen-host-pci-device.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen-host-pci-device.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
xen_backend.c xen_backend: introduce xenstore_read_uint64 and xenstore_read_fe_uint64 2014-07-07 10:37:40 +00:00
xen_devconfig.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
xen_pt.c xen: properly gate host writes of modified PCI CFG contents 2015-06-02 15:07:00 +00:00
xen_pt.h xen/MSI-X: limit error messages 2015-06-02 15:07:00 +00:00
xen_pt_config_init.c xen: don't allow guest to control MSI mask register 2015-06-02 15:07:00 +00:00
xen_pt_msi.c xen/MSI-X: limit error messages 2015-06-02 15:07:00 +00:00