summaryrefslogtreecommitdiffstats
path: root/arch/nios2/Makefile
diff options
context:
space:
mode:
authorCédric Le Goater2019-04-18 12:39:42 +0200
committerPaul Mackerras2019-04-30 11:40:39 +0200
commit5422e95103cf9663bc86cf1056a3ea44c2e2f09e (patch)
treef23b2a675c09c60a5bf7ced8d481e31923d19e31 /arch/nios2/Makefile
parentKVM: Introduce a 'release' method for KVM devices (diff)
downloadkernel-qcow2-linux-5422e95103cf9663bc86cf1056a3ea44c2e2f09e.tar.gz
kernel-qcow2-linux-5422e95103cf9663bc86cf1056a3ea44c2e2f09e.tar.xz
kernel-qcow2-linux-5422e95103cf9663bc86cf1056a3ea44c2e2f09e.zip
KVM: PPC: Book3S HV: XIVE: Replace the 'destroy' method by a 'release' method
When a P9 sPAPR VM boots, the CAS negotiation process determines which interrupt mode to use (XICS legacy or XIVE native) and invokes a machine reset to activate the chosen mode. We introduce 'release' methods for the XICS-on-XIVE and the XIVE native KVM devices which are called when the file descriptor of the device is closed after the TIMA and ESB pages have been unmapped. They perform the necessary cleanups : clear the vCPU interrupt presenters that could be attached and then destroy the device. The 'release' methods replace the 'destroy' methods as 'destroy' is not called anymore once 'release' is. Compatibility with older QEMU is nevertheless maintained. This is not considered as a safe operation as the vCPUs are still running and could be referencing the KVM device through their presenters. To protect the system from any breakage, the kvmppc_xive objects representing both KVM devices are now stored in an array under the VM. Allocation is performed on first usage and memory is freed only when the VM exits. [paulus@ozlabs.org - Moved freeing of xive structures to book3s.c, put it under #ifdef CONFIG_KVM_XICS.] Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/nios2/Makefile')
0 files changed, 0 insertions, 0 deletions