[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[question] Shall we flush ITS tables into guest RAM when shutdown the VM
From: |
Kunkun Jiang |
Subject: |
[question] Shall we flush ITS tables into guest RAM when shutdown the VM? |
Date: |
Tue, 29 Jun 2021 17:33:49 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
Hi all,
Accroding to the patch cddafd8f353d2d251b1a5c6c948a577a85838582,
our original intention is to flush the ITS tables into guest RAM at the
point
RUN_STATE_FINISH_MIGRATE, but sometimes the VM gets stopped before
migration launch so let's simply flush the tables each time the VM gets
stopped.
But I encountered an error when I shut down the virtual machine.
qemu-system-aarch64: KVM_SET_DEVICE_ATTR failed: Group 4 attr
0x0000000000000001: Permission denied
Shall we need to flush ITS tables into guest RAM when 'shutdown' the VM?
Or do you think this error is normal?
This error occurs in the following scenario:
Kunpeng 920 、enable GICv4、passthrough a accelerator Hisilicon SEC to the
VM.
The flow is as follows:
QEMU:
vm_shutdown
do_vm_stop(RUN_STATE_SHUTDOWN)
vm_state_notify
...
vm_change_state_handler (hw/intc/arm_gicv3_its_kvm.c)
kvm_device_access
Kernel:
vgic_its_save_tables_v0
vgic_its_save_device_tables
vgic_its_save_itt
There is such a code in vgic_its_save_itt():
/*
* If an LPI carries the HW bit, this means that this
* interrupt is controlled by GICv4, and we do not
* have direct access to that state without GICv4.1.
* Let's simply fail the save operation...
*/
if (ite->irq->hw && !kvm_vgic_global_state.has_gicv4_1)
return -EACCES;
Looking forward to your reply.
Thanks,
Kunkun Jiang
- [question] Shall we flush ITS tables into guest RAM when shutdown the VM?,
Kunkun Jiang <=