2019-10-24 07:29:52 +08:00
|
|
|
.. _hostbridge_virt_hld:
|
|
|
|
|
2022-03-19 03:09:02 +08:00
|
|
|
Host Bridge Emulation
|
|
|
|
######################
|
2019-10-24 07:29:52 +08:00
|
|
|
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
2022-03-19 03:09:02 +08:00
|
|
|
Host bridge emulation is based on PCI emulation; however, the host bridge
|
2021-11-25 03:18:19 +08:00
|
|
|
emulation only sets the PCI configuration space. The Device Model (DM) sets the
|
2022-03-19 03:09:02 +08:00
|
|
|
PCI configuration space for host bridge in the Service VM and then exposes it to
|
|
|
|
the User VM to detect the PCI host bridge.
|
2019-10-24 07:29:52 +08:00
|
|
|
|
2021-02-13 08:27:24 +08:00
|
|
|
PCI Host Bridge and Hierarchy
|
2019-10-24 07:29:52 +08:00
|
|
|
*****************************
|
|
|
|
|
2022-03-19 03:09:02 +08:00
|
|
|
For PCI host bridge emulation, the bus hierarchy is determined by ``acrn-dm``
|
|
|
|
command line input. Using this command line, as an example::
|
2019-10-24 07:29:52 +08:00
|
|
|
|
2021-12-30 15:59:26 +08:00
|
|
|
acrn-dm -m $mem_size -s 0:0,hostbridge \
|
2019-10-24 07:29:52 +08:00
|
|
|
-s 5,virtio-console,@stdio:stdio_port \
|
|
|
|
-s 6,virtio-hyper_dmabuf \
|
2021-11-25 03:18:19 +08:00
|
|
|
-s 3,virtio-blk,/home/acrn/UserVM.img \
|
2022-03-21 09:58:25 +08:00
|
|
|
-s 4,virtio-net,tap=tap0,mac_seed=$mac_seed \
|
2019-10-24 07:29:52 +08:00
|
|
|
-s 7,virtio-rnd \
|
|
|
|
--ovmf /usr/share/acrn/bios/OVMF.fd \
|
|
|
|
$logger_setting \
|
|
|
|
$vm_name
|
|
|
|
|
|
|
|
the bus hierarchy would be:
|
|
|
|
|
|
|
|
.. code-block:: console
|
2019-11-08 07:24:31 +08:00
|
|
|
|
2019-10-24 07:29:52 +08:00
|
|
|
# lspci
|
|
|
|
00:00.0 Host bridge: Network Appliance Corporation Device 1275
|
|
|
|
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
|
|
|
|
00:03.0 SCSI storage controller: Red Hat, Inc. Virtio block device
|
|
|
|
00:05.0 Serial controller: Red Hat, Inc. Virtio console
|
|
|
|
00:06.0 RAM memory: Intel Corporation Device 8606
|
|
|
|
00:08.0 Network and computing encryption device: Red Hat, Inc. Virtio RNG
|
|
|
|
00:09.0 Ethernet controller: Red Hat, Inc. Virtio network device
|