commit | 7b336e8570fc08d99eeb8d34f84ebcaeac908a1a | [log] [tgz] |
---|---|---|
author | Tinghao Zhang <tinghao.zhang@intel.corp-partner.google.com> | Fri Mar 04 18:34:53 2022 +0800 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jun 16 22:40:47 2022 +0000 |
tree | 9991c379b34f66d7478f37986f4ee5fba5a673ec | |
parent | 13313d403ac27761463732ba9cb883b93f56aa53 [diff] |
devices: pcie: pcie_bridge: refactor configure_bridge_window() To support pcie switch, we need a correct way to calculate pci bridge window. This patch is refactoring configure_bridge_window() for preparation. This patch does 3 things: 1. The original code does not calculate bridge window correctly. For the following bar_ranges, the old version would fail: [[0xd0400000, 0x1000, false], [0xd0000000, 0x100000, false], [0xd0100000, 0x1000, false]], [0xd0200000, 0x200000, false]] This patch fixes this bug. 2. We need to round bridge window base down to 1MB aligned, round window size up to 1MB aligned. 3. Since bridge window are also bar ranges, we need to return the configured bridge window so that parent bridge can use it. BUG=b:199986018 TEST=./tools/presubmit Change-Id: Iff26fdd7e500671688897652ac16aff792882707 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3503102 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.