mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
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>
This commit is contained in:
parent
3fc827d591
commit
5c83b2f5b4
3 changed files with 21 additions and 10 deletions
|
@ -105,8 +105,6 @@ struct XenPTRegInfo {
|
|||
uint32_t ro_mask;
|
||||
/* reg emulate field mask (ON:emu, OFF:passthrough) */
|
||||
uint32_t emu_mask;
|
||||
/* no write back allowed */
|
||||
uint32_t no_wb;
|
||||
xen_pt_conf_reg_init init;
|
||||
/* read/write function pointer
|
||||
* for double_word/word/byte size */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue