mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
dm: Use new MMIO device passthrough management ioctls
IC_ASSIGN_MMIODEV -> ACRN_IOCTL_ASSIGN_MMIODEV IC_DEASSIGN_MMIODEV -> ACRN_IOCTL_DEASSIGN_MMIODEV struct acrn_mmiodev has slight change. Move struct acrn_mmiodev into acrn_common.h because it is used by both DM and HV. Tracked-On: #6282 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
@@ -136,10 +136,10 @@ void register_vgpio_handler(struct acrn_vm *vm, const struct acrn_mmiodev *mmiod
|
||||
uint64_t gpa_start, gpa_end, gpio_pcr_sz;
|
||||
uint64_t base_hpa;
|
||||
|
||||
gpa_start = mmiodev->base_gpa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
|
||||
gpa_start = mmiodev->user_vm_pa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
|
||||
gpio_pcr_sz = P2SB_PCR_SPACE_SIZE_PER_AGENT * P2SB_MAX_GPIO_COMMUNITIES;
|
||||
gpa_end = gpa_start + gpio_pcr_sz;
|
||||
base_hpa = mmiodev->base_hpa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
|
||||
base_hpa = mmiodev->service_vm_pa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
|
||||
|
||||
/* emulate MMIO access to the GPIO private configuration space registers */
|
||||
set_paging_supervisor((uint64_t)hpa2hva(base_hpa), gpio_pcr_sz);
|
||||
|
Reference in New Issue
Block a user