acrn-hypervisor/hypervisor/include/debug
Zide Chen b6b5373818 hv: deny access to HV owned legacy PIO UART from SOS
We need to deny accesses from SOS to the HV owned UART device, otherwise
SOS could have direct access to this physical device and mess up the HV
console.

If ACRN debug UART is configured as PIO based, For example,
CONFIG_SERIAL_PIO_BASE is generated from acrn-config tool, or the UART
config is overwritten by hypervisor parameter "uart=port@<port address>",
it could run into problem if ACRN doesn't emulate this UART PIO port
to SOS. For example:

- none of the ACRN emulated vUART devices has same PIO port with the
  port of the debug UART device.
- ACRN emulates PCI vUART for SOS (configure "console_vuart" with
  PCI_VUART in the scenario configuration)

This patch fixes the above issue by masking PIO accesses from SOS.
deny_hv_owned_devices() is moved after setup_io_bitmap() where
vm->arch_vm.io_bitmap is initialized.

Commit 50d852561 ("HV: deny HV owned PCI bar access from SOS") handles
the case that ACRN debug UART is configured as a PCI device. e.g.,
hypervisor parameter "uart=bdf@<BDF value>" is appended.

If the hypervisor debug UART is MMIO based, need to configured it as
a PCI type device, so that it can be hidden from SOS.

Tracked-On: #5923
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-06-08 16:16:14 +08:00
..
console.h HV: vuart: remove console related code from vuart 2019-04-29 15:25:39 +08:00
dbg_cmd.h hv:cleanup console.h 2019-02-27 11:12:48 +08:00
dump.h hv: clean up function definitions in dump.h 2018-11-28 14:57:49 +08:00
logmsg.h hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
npk_log.h hv: clean up function definitions in npk_log.h 2018-11-28 14:57:49 +08:00
profiling_internal.h hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
profiling.h hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
sbuf.h hv: bugfix for sbuf reset 2019-06-27 15:40:19 +08:00
shell.h hv:cleanup console.h 2019-02-27 11:12:48 +08:00
trace.h hv: mod: do not use explicit arch name when including headers 2021-05-08 11:15:46 +08:00
uart16550.h hv: deny access to HV owned legacy PIO UART from SOS 2021-06-08 16:16:14 +08:00