HV: rename the term of vm0 to sos vm

Under sharing mode, VM0 is identical with SOS VM. But the coupling of
SOS VM and VM 0 is not friendly for partition mode.

This patch is a pure term change of vm0 to sos VM, it does not change
any code logic or senmantic.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-01-21 14:48:31 +08:00
committed by Eddie Dong
parent 55e5ed2e1a
commit 49e6deaf26
39 changed files with 174 additions and 174 deletions

View File

@@ -328,7 +328,7 @@ static void decode_msix_table_bar(struct pci_vdev *vdev)
}
vdev->msix.mmio_hva = (uint64_t)hpa2hva(base);
vdev->msix.mmio_gpa = vm0_hpa2gpa(base);
vdev->msix.mmio_gpa = sos_vm_hpa2gpa(base);
/* Sizing the BAR */
size = 0U;

View File

@@ -38,7 +38,7 @@ struct pci_vdev *sharing_mode_find_vdev(union pci_bdf pbdf)
struct pci_vdev *vdev = NULL;
uint32_t i;
/* in VM0, it uses phys BDF */
/* in SOS_VM, it uses phys BDF */
for (i = 0U; i < num_pci_vdev; i++) {
if (sharing_mode_vdev_array[i].pdev.bdf.value == pbdf.value) {
vdev = &sharing_mode_vdev_array[i];
@@ -140,16 +140,16 @@ static int32_t sharing_mode_vpci_init(const struct acrn_vm *vm)
/*
* Only setup IO bitmap for SOS.
* IO/MMIO requests from non-vm0 guests will be injected to device model.
* IO/MMIO requests from non-sos_vm guests will be injected to device model.
*/
if (!is_vm0(vm)) {
if (!is_sos_vm(vm)) {
ret = -ENODEV;
} else {
/* Initialize PCI vdev array */
num_pci_vdev = 0U;
(void)memset((void *)sharing_mode_vdev_array, 0U, sizeof(sharing_mode_vdev_array));
/* build up vdev array for vm0 */
/* build up vdev array for sos_vm */
pci_scan_bus(enumerate_pci_dev, vm);
for (i = 0U; i < num_pci_vdev; i++) {
@@ -171,7 +171,7 @@ static void sharing_mode_vpci_deinit(__unused const struct acrn_vm *vm)
struct pci_vdev *vdev;
uint32_t i, j;
if (is_vm0(vm)) {
if (is_sos_vm(vm)) {
for (i = 0U; i < num_pci_vdev; i++) {
vdev = &sharing_mode_vdev_array[i];
for (j = 0U; j < vdev->nr_ops; j++) {