mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 02:08:04 +00:00
ACRN: hv: Unify terminology for service vm
Rename is_sos_vm to is_service_vm Tracked-On: #6744 Signed-off-by: Liu Long <longliu@intel.com>
This commit is contained in:
@@ -404,7 +404,7 @@ hv_emulate_pio(struct acrn_vcpu *vcpu, struct io_request *io_req)
|
||||
io_read_fn_t io_read = NULL;
|
||||
io_write_fn_t io_write = NULL;
|
||||
|
||||
if (is_sos_vm(vcpu->vm) || is_prelaunched_vm(vcpu->vm)) {
|
||||
if (is_service_vm(vcpu->vm) || is_prelaunched_vm(vcpu->vm)) {
|
||||
io_read = pio_default_read;
|
||||
io_write = pio_default_write;
|
||||
}
|
||||
@@ -468,7 +468,7 @@ hv_emulate_mmio(struct acrn_vcpu *vcpu, struct io_request *io_req)
|
||||
hv_mem_io_handler_t read_write = NULL;
|
||||
void *handler_private_data = NULL;
|
||||
|
||||
if (is_sos_vm(vcpu->vm) || is_prelaunched_vm(vcpu->vm)) {
|
||||
if (is_service_vm(vcpu->vm) || is_prelaunched_vm(vcpu->vm)) {
|
||||
read_write = mmio_default_access_handler;
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ emulate_io(struct acrn_vcpu *vcpu, struct io_request *io_req)
|
||||
void register_pio_emulation_handler(struct acrn_vm *vm, uint32_t pio_idx,
|
||||
const struct vm_io_range *range, io_read_fn_t io_read_fn_ptr, io_write_fn_t io_write_fn_ptr)
|
||||
{
|
||||
if (is_sos_vm(vm)) {
|
||||
if (is_service_vm(vm)) {
|
||||
deny_guest_pio_access(vm, range->base, range->len);
|
||||
}
|
||||
vm->emul_pio[pio_idx].port_start = range->base;
|
||||
|
@@ -24,7 +24,7 @@ int32_t assign_mmio_dev(struct acrn_vm *vm, const struct acrn_mmiodev *mmiodev)
|
||||
mem_aligned_check(res->host_pa, PAGE_SIZE) &&
|
||||
mem_aligned_check(res->size, PAGE_SIZE)) {
|
||||
ept_add_mr(vm, (uint64_t *)vm->arch_vm.nworld_eptp, res->host_pa,
|
||||
is_sos_vm(vm) ? res->host_pa : res->user_vm_pa,
|
||||
is_service_vm(vm) ? res->host_pa : res->user_vm_pa,
|
||||
res->size, EPT_RWX | (res->mem_type & EPT_MT_MASK));
|
||||
} else {
|
||||
pr_err("%s invalid mmio res[%d] gpa:0x%lx hpa:0x%lx size:0x%lx",
|
||||
@@ -45,7 +45,7 @@ int32_t deassign_mmio_dev(struct acrn_vm *vm, const struct acrn_mmiodev *mmiodev
|
||||
|
||||
for (i = 0; i < MMIODEV_RES_NUM; i++) {
|
||||
res = &mmiodev->res[i];
|
||||
gpa = is_sos_vm(vm) ? res->host_pa : res->user_vm_pa;
|
||||
gpa = is_service_vm(vm) ? res->host_pa : res->user_vm_pa;
|
||||
if (ept_is_valid_mr(vm, gpa, res->size)) {
|
||||
if (mem_aligned_check(gpa, PAGE_SIZE) &&
|
||||
mem_aligned_check(res->size, PAGE_SIZE)) {
|
||||
|
@@ -120,7 +120,7 @@ vgsi_to_vioapic_and_vpin(const struct acrn_vm *vm, uint32_t vgsi, uint32_t *vpin
|
||||
struct acrn_single_vioapic *vioapic;
|
||||
uint8_t vioapic_index = 0U;
|
||||
|
||||
if (is_sos_vm(vm)) {
|
||||
if (is_service_vm(vm)) {
|
||||
/*
|
||||
* Utilize platform ioapic_info for SOS VM
|
||||
*/
|
||||
@@ -532,7 +532,7 @@ vioapic_init(struct acrn_vm *vm)
|
||||
uint8_t vioapic_index;
|
||||
struct acrn_single_vioapic *vioapic = NULL;
|
||||
|
||||
if (is_sos_vm(vm)) {
|
||||
if (is_service_vm(vm)) {
|
||||
vm->arch_vm.vioapics.ioapic_num = get_platform_ioapic_info(&vioapic_info);
|
||||
} else {
|
||||
vm->arch_vm.vioapics.ioapic_num = 1U;
|
||||
|
@@ -259,7 +259,7 @@ static void vdev_pt_allow_io_vbar(struct pci_vdev *vdev, uint32_t idx)
|
||||
struct acrn_vm *vm = vpci2vm(vdev->vpci);
|
||||
|
||||
/* For SOS, all port IO access is allowed by default, so skip SOS here */
|
||||
if (!is_sos_vm(vm)) {
|
||||
if (!is_service_vm(vm)) {
|
||||
struct pci_vbar *vbar = &vdev->vbars[idx];
|
||||
if (vbar->base_gpa != 0UL) {
|
||||
allow_guest_pio_access(vm, (uint16_t)vbar->base_gpa, (uint32_t)(vbar->size));
|
||||
@@ -277,7 +277,7 @@ static void vdev_pt_deny_io_vbar(struct pci_vdev *vdev, uint32_t idx)
|
||||
struct acrn_vm *vm = vpci2vm(vdev->vpci);
|
||||
|
||||
/* For SOS, all port IO access is allowed by default, so skip SOS here */
|
||||
if (!is_sos_vm(vm)) {
|
||||
if (!is_service_vm(vm)) {
|
||||
struct pci_vbar *vbar = &vdev->vbars[idx];
|
||||
if (vbar->base_gpa != 0UL) {
|
||||
deny_guest_pio_access(vm, (uint16_t)(vbar->base_gpa), (uint32_t)(vbar->size));
|
||||
@@ -540,7 +540,7 @@ void init_vdev_pt(struct pci_vdev *vdev, bool is_pf_vdev)
|
||||
if (vdev->phyfun == NULL) {
|
||||
init_bars(vdev, is_pf_vdev);
|
||||
init_vmsix_on_msi(vdev);
|
||||
if (is_sos_vm(vpci2vm(vdev->vpci)) && (vdev->pdev->bdf.value == CONFIG_GPU_SBDF)) {
|
||||
if (is_service_vm(vpci2vm(vdev->vpci)) && (vdev->pdev->bdf.value == CONFIG_GPU_SBDF)) {
|
||||
pci_vdev_write_vcfg(vdev, PCIR_ASLS_CTL, 4U, pci_pdev_read_cfg(vdev->pdev->bdf, PCIR_ASLS_CTL, 4U));
|
||||
}
|
||||
if (is_prelaunched_vm(vpci2vm(vdev->vpci)) && (!is_pf_vdev)) {
|
||||
@@ -576,7 +576,7 @@ void init_vdev_pt(struct pci_vdev *vdev, bool is_pf_vdev)
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_sos_vm(vpci2vm(vdev->vpci)) && (has_sriov_cap(vdev))) {
|
||||
if (!is_service_vm(vpci2vm(vdev->vpci)) && (has_sriov_cap(vdev))) {
|
||||
vdev_pt_hide_sriov_cap(vdev);
|
||||
}
|
||||
|
||||
|
@@ -325,7 +325,7 @@ static uint32_t vpin_to_vgsi(const struct acrn_vm *vm, uint32_t vpin)
|
||||
* Remap depending on the type of VM
|
||||
*/
|
||||
|
||||
if (is_sos_vm(vm)) {
|
||||
if (is_service_vm(vm)) {
|
||||
/*
|
||||
* For SOS VM vPIC pin to GSI is same as the one
|
||||
* that is used for platform
|
||||
@@ -361,7 +361,7 @@ static uint32_t vgsi_to_vpin(const struct acrn_vm *vm, uint32_t vgsi)
|
||||
* Remap depending on the type of VM
|
||||
*/
|
||||
|
||||
if (is_sos_vm(vm)) {
|
||||
if (is_service_vm(vm)) {
|
||||
/*
|
||||
* For SOS VM vPIC pin to GSI is same as the one
|
||||
* that is used for platform
|
||||
|
Reference in New Issue
Block a user