acrn-hypervisor/devicemodel/include
Jian Jun Chen b98096ea06 dm: pci: fix the MMIO regions overlap when getting bar size
PCI spec says that the procedure of sizing a BAR is as follows:
1) disable the decode via command register
2) save the original value of BAR register
3) write all-1 to the BAR register
4) read BAR register back, calculate the size
5) restore the original value to BAR register
6) re-enable the decode via command register

Some driver does not disable the decode of BAR register via the
command register before sizing a BAR. This will lead to a overlay
of the BAR addresses when trying to register the intermediate
BAR address via register_bar. A stateful variable sizing is used
to keep track of such kind of BAR address changes and workaroud
this violation.

Currently this issue is only found when audio device is passed
through to Windows 10 guest. When it is fixed in the Windows
audio driver, this patch should be reverted.

v1 -> v2:
- change the commit message to add the procedure of BAR sizing from
  PCI spec

Tracked-On: #2962
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-06-03 09:14:15 +08:00
..
public dm: add IOCTL command to get platform information 2019-04-18 15:02:48 +08:00
acpi_hpet.h dm: vhpet: add HPET-related header files 2019-01-23 10:33:28 +08:00
acpi.h dm: disable ACPI PM timer 2019-04-16 15:03:04 +08:00
ahci.h
ata.h
atkbdc.h
atomic.h DM: add wrappers to gcc built-in atomic operations 2018-08-08 15:53:07 +08:00
att_keybox.h DM: Attestation Keybox support in SOS DM 2019-02-25 16:40:25 +08:00
block_if.h dm: virtio-block: extend the max iov number of virtio block 2019-04-16 15:03:04 +08:00
console.h DM: remove unused function console_ptr_event 2019-05-24 11:51:00 +08:00
cpuset.h
dm_string.h doc: replace return with retval 2018-11-30 14:55:17 +08:00
dm.h DM/HV: Increase VM name len 2019-05-27 12:13:51 +08:00
gc.h DM: remove unused function gc_init 2019-05-24 11:51:00 +08:00
gpio_dm.h DM: virtio-gpio: implement GPIO operations via accessing PIO 2019-04-08 10:51:49 +08:00
hpet.h dm: vhpet: add HPET-related header files 2019-01-23 10:33:28 +08:00
i8253reg.h dm: vpit: add PIT-related header files 2018-10-09 13:24:47 +08:00
inout.h dm: completely remove enable_bar()/disable_bar() functions 2019-04-22 15:18:21 +08:00
ioapic.h
ioc.h IOC mediator: dynamically enable dummy channels 2019-02-01 16:05:43 +08:00
iodev.h
irq.h
log.h DM: add logger setting parser function 2019-05-05 19:13:07 +08:00
lpc.h
macros.h dm: vpit: add vPIT support 2018-10-09 13:24:47 +08:00
mc146818rtc.h
mei.h dm: mei: add mei hbm protocol definitions header. 2018-10-23 11:40:15 +08:00
mem.h dm: completely remove enable_bar()/disable_bar() functions 2019-04-22 15:18:21 +08:00
mevent.h dm: enhence the mevent API 2018-12-07 20:21:33 +08:00
monitor.h DM: Virtio-Blk Rescan 2019-05-07 09:08:50 +08:00
mptable.h
mptbl.h DM: remove unused function mptable_add_oemtbl 2019-05-24 11:51:00 +08:00
netmap_user.h
netmap.h
npk.h DM: implement emulated npk pci device 2018-06-07 16:11:49 +08:00
ns16550.h
pci_core.h dm: pci: fix the MMIO regions overlap when getting bar size 2019-06-03 09:14:15 +08:00
pciio.h
pcireg.h dm: Disable stolen memory for passthru graphics 2018-06-29 00:50:01 +08:00
pit.h dm: vpit: add PIT-related header files 2018-10-09 13:24:47 +08:00
pm.h DM: register pm ops to monitor 2018-08-02 13:14:03 +08:00
ps2kbd.h
ps2mouse.h
rpmb_backend.h
rpmb_sim.h dm: inline functions defined in header must be static 2018-10-11 19:04:18 +08:00
rpmb.h dm: rpmb: DM customized changes for RPMB mux kernel module 2018-10-19 22:31:28 +08:00
rtc.h DM: remove unused function vrtc_reset 2019-05-24 11:51:00 +08:00
segments.h
specialreg.h
sw_load.h dm: e820: reserve memory range for EPC resource 2019-05-29 11:24:13 +08:00
timer.h dm: vhpet: add vHPET support 2019-01-23 10:33:28 +08:00
tpm.h DM: Add support for virtual TPM enabling 2018-11-29 09:19:16 +08:00
tree.h dm: clean up mem.c 2019-03-21 10:28:17 +08:00
types.h DM: use soft link of acrn_common.h in HV 2019-03-26 21:23:16 +08:00
uart_core.h dm: refine the uart_core 2018-12-27 09:58:20 +08:00
usb_core.h DM: remove unused function usb_native_is_ss_port 2019-05-24 11:51:00 +08:00
usb_pmapper.h DM USB: fix memory leak during reboot 2019-04-04 18:35:02 +08:00
usb.h DM USB: move the UREQ macro into common header 2018-05-29 10:35:05 +08:00
usbdi.h
vbs_common_if.h dm: virtio: add support for VBS-K device reset 2018-08-16 16:22:43 +08:00
vhost.h dm: vhost: remove support for non-msix devices 2018-12-14 19:49:55 +08:00
virtio_kernel.h doc: update virtio related functions doc comments 2018-11-04 20:32:50 -08:00
virtio.h DM: remove unused function virtio_pci_modern_cfgread and virtio_pci_modern_cfgwrite 2019-05-24 11:51:00 +08:00
vmm.h DM: adapt to the new VHM request state transitions 2018-08-08 15:53:07 +08:00
vmmapi.h DM: remove unused function vm_get_device_fd 2019-05-24 11:51:00 +08:00
vrpmb.h
xhci.h HV/DM: Unify the usage of aligned for structure definition with alignment 2018-12-20 14:08:28 +08:00
xhcireg.h DM USB: xHCI: re-implement the emulation of extented capabilities 2019-05-24 13:21:12 +08:00