Lines Matching full:the

6  * This code is licensed under the GPL version 2 or later. See the
7 * COPYING file in the top-level directory.
85 /* word0 and word1 of the OS ring. */ in kvmppc_xive_cpu_set_state()
115 /* word0 and word1 of the OS ring. */ in kvmppc_xive_cpu_get_state()
143 * Kick the vCPU to make sure they are available for the KVM ioctl. in kvmppc_xive_cpu_synchronize_state()
230 * At reset, the interrupt sources are simply created and MASKED. We
231 * only need to inform the KVM XIVE device about their type: LSI or
276 * This is used to perform the magic loads on the ESB pages, described
291 /* Prevent the compiler from optimizing away the load */ in xive_esb_rw()
316 * and the interrupt should be re-triggered if the level is still in kvmppc_xive_esb_rw()
343 /* Perform a load without side effect to retrieve the PQ bits */ in kvmppc_xive_source_get_state()
381 /* Encode the tuple (server, prio) as a KVM EQ index */ in kvmppc_xive_get_queue_config()
396 * The EQ index and toggle bit are updated by HW. These are the in kvmppc_xive_get_queue_config()
397 * only fields from KVM we want to update QEMU with. The other END in kvmppc_xive_get_queue_config()
398 * fields should already be in the QEMU END table. in kvmppc_xive_get_queue_config()
416 * Build the KVM state from the local END structure. in kvmppc_xive_set_queue_config()
425 * If the hcall is disabling the EQ, set the size and page address in kvmppc_xive_set_queue_config()
433 * The EQ toggle bit and index should only be relevant when in kvmppc_xive_set_queue_config()
434 * restoring the EQ state in kvmppc_xive_set_queue_config()
443 /* Encode the tuple (server, prio) as a KVM EQ index */ in kvmppc_xive_set_queue_config()
483 * The primary goal of the XIVE VM change handler is to mark the EQ
486 * Whenever the VM is stopped, the VM change handler sets the source
487 * PQs to PENDING to stop the flow of events and to possibly catch a
488 * triggered interrupt occurring while the VM is stopped. The previous
489 * state is saved in anticipation of a migration. The XIVE controller
491 * notification and stabilize the EQs.
493 * At this stage, we can mark the EQ page dirty and let a migration
494 * sequence transfer the EQ pages to the destination, which is done
495 * just after the stop state.
497 * The previous configuration of the sources is restored when the VM
498 * runs again. If an interrupt was queued while the VM was stopped,
510 * Restore the sources to their initial state. This is called when in kvmppc_xive_change_state_handler()
511 * the VM resumes after a stop or a migration. in kvmppc_xive_change_state_handler()
526 * An interrupt was queued while the VM was stopped, in kvmppc_xive_change_state_handler()
538 * Mask the sources, to stop the flow of event notifications, and in kvmppc_xive_change_state_handler()
539 * save the PQs locally in the XiveSource object. The XiveSource in kvmppc_xive_change_state_handler()
554 * interrupt occurring while the VM is stopped (hotplug event in kvmppc_xive_change_state_handler()
564 * Sync the XIVE controller in KVM, to flush in-flight event in kvmppc_xive_change_state_handler()
565 * notification that should be enqueued in the EQs and mark the in kvmppc_xive_change_state_handler()
581 * When the VM is stopped, the sources are masked and the previous in kvmppc_xive_synchronize_state()
583 * synchronize the source state in that case else we will override in kvmppc_xive_synchronize_state()
584 * the saved state. in kvmppc_xive_synchronize_state()
597 * The SpaprXive 'pre_save' method is called by the vmstate handler of
598 * the SpaprXive model, after the XIVE controller is synced in the VM
621 * The SpaprXive 'post_load' method is not called by a vmstate
622 * handler. It is called at the sPAPR machine level at the end of the
623 * migration sequence by the sPAPR IRQ backend 'post_load' method,
633 /* The KVM XIVE device should be in use */ in kvmppc_xive_post_load()
636 /* Restore the ENDT first. The targeting depends on it. */ in kvmppc_xive_post_load()
649 /* Restore the EAT */ in kvmppc_xive_post_load()
656 * We can only restore the source config if the source has been in kvmppc_xive_post_load()
672 * Restore the thread interrupt contexts of initial CPUs. in kvmppc_xive_post_load()
674 * The context of hotplugged CPUs is restored later, by the in kvmppc_xive_post_load()
675 * 'post_load' handler of the XiveTCTX model because they are not in kvmppc_xive_post_load()
676 * available at the time the SpaprXive 'post_load' method is in kvmppc_xive_post_load()
677 * called. We can not restore the context of all CPUs in the in kvmppc_xive_post_load()
678 * 'post_load' handler of XiveTCTX because the machine is not in kvmppc_xive_post_load()
679 * necessarily connected to the KVM device at that time. in kvmppc_xive_post_load()
690 /* The source states will be restored when the machine starts running */ in kvmppc_xive_post_load()
715 * All the XIVE memory regions are now backed by mappings from the KVM
731 * The KVM XIVE device already in use. This is the case when in kvmppc_xive_connect()
732 * rebooting under the XIVE-only interrupt mode. in kvmppc_xive_connect()
743 /* First, create the KVM XIVE device */ in kvmppc_xive_connect()
751 /* Tell KVM about the # of VCPUs we may have */ in kvmppc_xive_connect()
797 /* Connect the presenters to the initial VCPUs of the machine */ in kvmppc_xive_connect()
807 /* Update the KVM sources */ in kvmppc_xive_connect()
831 /* Clear the KVM mapping */ in kvmppc_xive_disconnect()
850 * When the KVM device fd is closed, the KVM device is destroyed in kvmppc_xive_disconnect()
851 * and removed from the list of devices of the VM. The VCPU in kvmppc_xive_disconnect()
852 * presenters are also detached from the device. in kvmppc_xive_disconnect()
861 /* Clear the local list of presenter (hotplug) */ in kvmppc_xive_disconnect()