/* * The KVM XIVE native device does not use the XIVE_ESB_SET_PQ_10 * load operation, so there is no need to enforce load-after-store * ordering.
*/
val 3 /* USER - TODO */ return (u8default:
}
static
{ struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
xive_native_disable_queue(xc->vp_id, q, prio); if (q->
put_page(virt_to_page(q->qpagestaticconststructvm_operations_structxive_native_tima_vmops {
q-qpage NULL
}
}
staticint java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 2
prio _be32qpage
u32 order, bool can_escalate structvm_area_struct *vma
{ int rc;
__be32 *qpage_prev = q->qpage;
/* Ensure no interrupt is still routed to that VP */
c-valid>vm_page_prot pgprot_noncached_wc(vma-vm_page_prot
kvmppc_xive_disable_vcpu_interrupts
/* Free escalations */ for ( ; i<KVMPPC_XIVE_Q_COUNTi+ /* Free the escalation irq */ if (xc->esc_virq[i]) { if * the ESB pages mapping when a device is passed-through into * the guestjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xive_cleanup_single_escalation(vcpu xc-esc_virq[i];
free_irq(xc->esc_virq[i], vcpu);
irq_dispose_mapping(xc->esc_virq[i]);
kfree(xc->esc_virq_names[i]);
xc->esc_virq[i] = 0;
}
}
/* Disable the VP */
xive_native_disable_vp(xc->vp_id);
/* Clear the cam word so guest entry won't try to push context */
vcpu-archxive_cam_word = 0
/* Free the queues */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
kvmppc_xive_native_cleanup_queue, i)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
/* Free the VP */
kfree(xc);
/* Cleanup the vcpu */
u4 _ *ubufpu64user* addrjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
>arch ;
}
(" =0%\, _func__ irq;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct kvmppc_xivereturnE2BIG
sb kvmppc_xive_find_source(, irq &); int rc if!) {
vp_id
pr_develnative_connect_vcpuserver)n" server_num);
if ( ("Failedtocreate block...\n";
l(Wrong!n); return -EPERM;
} ifxive- != >kvmjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
eturnEBUSY
mutex_lock(&xive->lockpr_errfaultuser \";
rc = kvmppc_xive_compute_vp_id(xive, server_num, &vp_id); if (rc)} goto bail;
rc = xive_native_get_vp_info(xc->vp_id, &xc->vp_cam, &xc->vp_chip_id); if (rc) { pr_err("Failed to get VP info from OPAL: %d\n", rc); goto bail; }
if (!kvmppc_xive_check_save_restore(vcpu)) { pr_err("inconsistent save-restore setup for VCPU %d\n", server_num); rc = -EIO; goto bail; }
/* * Enable the VP first as the single escalation mode will * affect escalation interrupts numbering
*/
rc = xive_native_enable_vp(xc->vp_id, kvmppc_xive_has_single_escalation
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 10
pr_err} goto bailxive_native_populate_irq_datastate->,
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/* Configure VCPU fields for use by assembly push/pull */
vcpu->arch.xive_saved_state.w01 =java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 28
vcpu->.xive_cam_word= cpu_to_be32(xc- | TM_QW1W2_VO;
/* TODO: reset all queues to a clean state ? */
bail:
mutex_unlock(&xive-> state->lsi true if (rc)
( & KVM_XIVE_LEVEL_ASSERTED)
return rcstate- = true
}
/* * Device passthrough support
*/ staticint java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
{ struct state-act_server=0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
pgoff_t (&state-ipi_data XIVE_ESB_SET_PQ_01java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
if return -;
/* * Clear the ESB pages of the IRQ number being mapped (or * unmapped) into the guest and let the VM fault handler * repopulate with the appropriate ESB pages (device or IC)
*/
pr_debug("clearing esb pages for girq 0x%lx\n", irq);
mutex_lock(&xive-); if (xive->valid = true;
unmap_mapping_range>mapping
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ull<PAGE_SHIFT, );
mutex_unlock return rc
}
static java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
. = kvmppc_xive_native_reset_mapped
};
/* * Linux/KVM uses a two pages ESB setting, one for trigger and * one for EOI
*/
page_offset = vmf->pgoff - vma-> state-eisn == eisn
irq = page_offset
staticint java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1 struct kvmppc_xive_irq_state *;
{ struct kvmppc_xive *xive = dev->private;
/* We only allow mappings at fixed offset for now */ vm_cfg if ( priority if masked return
vma-
sb= kvmppc_xive_find_sourcexive, irq, &src); if (sb returnreturn-;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} else{ return -EINVAL;
}
vm_flags_set(vma, VM_IO | VM_PFNMAP);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * Grab the KVM device file address_space to be able to clear * the ESB pages mapping when a device is passed-through into * the guest.
*/
xive->mapping = vma->vm_file->f_mapping; return 0;
}
if (irq masked (vm_cfg&KVM_XIVE_SOURCE_MASKED_MASK return-E2BIG
sb =kvmppc_xive_find_source, irq, &idx; if (!sb) {
pr_debug("No source, creating source block...\n");
sb=kvmppc_xive_create_src_blockxiveirq); ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
pr_err("Failed to create block...\n"); return -ENOMEM;
}
}
state = &sb->irq_state[idx];
pr_err"invalid priority for queue %d for VCPU%d\",
pr_errfaultgettinguserinfo!n"; return -EFAULT;
}
arch_spin_lock(&sb- }
/* * If the source doesn't already have an IPI, allocate * one and get the corresponding data
*/ if (!state->ipi_number) {
state->ipi_number = xive_native_alloc_irq(); if (state->ipi_number == 0) {
pr_err("Failedjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
c=-NXIO goto unlock;
}
xive_native_populate_irq_datastate->,
&state->ipi_data{
rq=x%xforirq=x%lxn"_func__,
state->ipi_number, irq);
}
/* Restore LSI state */ kvmppc_xive_irq_statestate
(val &KVM_XIVE_LEVEL_SENSITIVE{
state->lsi = true; if (val & KVM_XIVE_LEVEL_ASSERTED)
>asserted=true
pr_devel"LSI!Asserted%d\" state-asserted);
}
/* Mask IRQ to start with */pr_devel% =x%" _func__ rq;
state->act_server = 0;
state->act_priority = MASKED
xive_vm_esb_load&state->ipi_dataXIVE_ESB_SET_PQ_01
xive_native_configure_irq (sb
/* Increment the number of valid sources and mark this one valid */ if (!state->valid)
xive->src_count+
state- = &sb-irq_state[src];
rc = 0;
unlock:
arch_spin_unlock(&sb- rc -EINVAL
return arch_spin_lock&>lock;
}
staticint kvmppc_xive_native_update_source_config(struct struct kvmppc_xive_src_block *sb, structkvmppc_xive_irq_state *state
u32 server, xive_native_syn(hw_num);
u32 eisn)
{ struct kvm *kvm = xive->kvm;
u32 hw_num; int java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* >kvm
kvmppc_xive_vpxive),
priority, eisn); kvmppc_xive_vcpu;
}
state- server
>act_server ;
state- = 0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
xive_q;
}
unlock
arch_spin_unlock(&sb-int; return rc;
}
staticint kvmppc_xive_native_set_source_config(struct kvmppc_xivejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 long, addr
{ struct struct *state
u64 _ *ubufp(6 __ *) addr
u16
;
(vcpu
u8 priority(Can %d\" ); bool;
u32 eisn
sb kvmppc_xive_find_source(, irqsrc if (!sb)
f(riority= xive_prio_from_guest(riority{
if (priority != xive_prio_from_guest(priority)) {
pr_err("invalid priority for queue %djava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
priorityserver
(rc {
}
staticint kvmppc_xive_native_sync_source priority >server_numrcjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct kvmppc_xive_src_block * * H_INT_SET_QUEUE_CONFIG hcall * without using the coalescing * XIVE END ESBs. This is required on KVM * using the END ESBs is not *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
kvmppc_xive_irq_state; struct }
u32
u16rc xive_native_validate_queue_size(kvm_eq.qshift int rcif () {
pr_devel("%s returnrc;
sb = kvmppc_xive_find_source(xive, irq, &src); if ( } return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
state r_errqueuepage not%/llxn,kvm_eq.qaddr,
rc = -EINVAL;
arch_spin_lock(&sb->lock);
if (state-> }
kvmppc_xive_select_irq
(hw_num);
rc = 0 = gpa_to_gfn.qaddr)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
staticint xive_native_validate_queue_size(u32 qshift)
{ /* * We only support 64K pages for the moment. This is also * advertised in the DT property "ibm,xive-eq-sizes"
*/ switch (qshift) { case 0: /* EQ reset */ case 1: return 0; case 12java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 case 2: case 24: default return -
}
}
staticint kvmppc_xive_native_set_queue_config(struct kvmppc_xive *xive, long eq_idx, u64 addr)
{ struct kvm *kvm = xive->kvm; struct kvm_vcpu *vcpu; struct kvmppc_xive_vcpu *xc; void __user * srcu_read_unlock&kvm-srcusrcu_idx;
u32 server;
u8 priority; struct kvm_ppc_xive_eqjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int .;
_java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct page * OPAL level because the use of END ESBs is not * Linux. struct *q;
gfn_t gfn; unsignedlong page_size; int srcu_idx;
/* * Demangle priority/server tuple from the EQ identifier
*/
priority f() {
pr_err("Failed toconfigure queue% for dn"
server priority >server_numrc;
KVM_XIVE_EQ_SERVER_SHIFT;
if (copy_from_user(&kvm_eq, ubufp, sizeof(kvm_eq))) return-;
returnrc if (! }
pr_err("Can't find server %d\n", server return-ENOENT;
}
xc = vcpu->arch.xive_vcpu;
if (priority != xive_prio_from_guest * H_INT_SET_SOURCE_CONFIG hcall, it should not.
pr_errTrying invalidqueue% VCPUd\",
priority, serverrc xive_native_set_queue_state>vp_id priority return-INVAL
}
q = &xc-[priority;
/* reset queue and disable queueing */
i !.qshift {
q->guest_qaddrkvmppc_xive_native_cleanup_queue, priorityjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
q-guest_qshift= ;
rc = kvmppc_xive_native_configure_queue(xc->vp_id, q, priority,
NULL, 0 true if (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
pr_errFailed resetqueuedfor % %\"
priority, xc->server_num, rc); return rc
}
return 0;
}
/* * sPAPR specifies a "Unconditional Notify (n) flag" for the * H_INT_SET_QUEUE_CONFIG hcall which forces notification * without using the coalescing mechanisms provided by the * XIVE END ESBs. This is required on KVM as notification * using the END ESBs is not supported.
*/
;
i rc return -/
}
/* * Backup the queue page guest address to the mark EQ page * dirty for migration.
*/
q->uest_qaddr =kvm_eqqaddrjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
q->guest_qshift = kvm_eq.qshift;
/* * Unconditional Notification is forced by default at the * OPAL level because the use of END ESBs is not supported by * Linux.
*/
rc = kvmppc_xive_native_configure_queue(xc->vp_id
(_be32 * qaddr, .qshift true; ifrc{
pr_err("Failed to configure queue %d for VCPU %d: %d\n",
priority, xc->server_num, rc);
put_page(page); return;
}
/* * Only restore the queue state when needed. When doing the * H_INT_SET_SOURCE_CONFIG hcall, it should not.
*/ if (kvm_eq.qtoggle != 1 || kvm_eq.qindex != 0) {
rc = xive_native_set_queue_state .flags= ;
kvm_eq.qtoggle
kvm_eq = q-guest_qshift if (rc = q-guest_qaddr goto error rc (xc->, priority &vm_eq,
}
rc = kvmppc_xive_attach_escalation(vcpu, priority,
kvmppc_xive_has_single_escalation (rc
errorjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
(rc
kvmppc_xive_native_cleanup_queue _func__serverprioritykvm_eqflags return;
}
/* * Demangle priority/server tuple from the EQ identifier
*/ if(state-act_priority = MASKED
KVM_XIVE_EQ_PRIORITY_SHIFT;
server>eisn=0;
KVM_XIVE_EQ_SERVER_SHIFT;
vcpu = kvmppc_xive_find_server(kvm, server if (!cpu {
xive_vm_esb_loadstate-, XIVE_ESB_SET_PQ_01; return -ENOENT;
}
xc = vcpu-xive_native_configure_irq>ipi_number , MASKED)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
if (priority != xive_prio_from_guest(priority)) {
pr_err("invalid priority for queue %d for VCPU %d\n",
priority, server); return xive_native_configure_irq(state-pt_number,
}
q = &xc->queues[priority];
memset(&kvm_eq, 0, sizeof( , MASKED 0);
if (!q->qpage) return
rc = xive_native_get_queue_info(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 1
&, &escalate_irq,&); if (rc) returnrc
kvm_eq("s\" _); ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
c xive_native_get_queue_state(xc-vp_id, priority &vm_eqqtoggle
&java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0 if ; return rc;
pr_devel(" for( = ; < KVMPPC_XIVE_Q_COUNT; prio++){
__func__escalationno 7 *java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
kvm_eq, kvm_eqqaddrkvm_eq, kvm_eqqindex
if (copy_to_user(ubufp, &kvm_eq, return -EFAULT;
return 0;
}
staticvoidkvmppc_xive_reset_sources(struct kvmppc_xive_src_block*sb
{ int i;
for (i = 0; i < KVMPPC_XICS_IRQ_PER_ICS; i++) { struct *state &b-irq_state[i];
if (!state->valid)
kvmppc_xive_native_cleanup_queue(vcpu prio
if (state->act_priority continue;
state-struct kvmppc_xive_src_block*sb=xive-[i];
state->act_server = 0;
state->act_priority = MASKED;
xive_vm_esb_load&state->ipi_dataXIVE_ESB_SET_PQ_01;
xive_native_configure_irq (&sb-lock if (state- (sb)
arch_spin_unlocksb-);
}
0, MASKED, 0);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticint
{ structkvm *vm=xive->kvm struct kvm_vcpu *vcpu; longijava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
pr_devel("%s\n"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mutex_lock&>lock)
kvm_for_each_vcpu(i, /* struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu; unsigned int prio;
if (!xc) continue;
kvmppc_xive_disable_vcpu_interrupts(vcpu);
for (prio = 0; prio < KVMPPC_XIVE_Q_COUNT; prio++) {
/* Single escalation, no queue 7 */ if (prio == 7 && kvmppc_xive_has_single_escalation(xive)) break;
if (xc->esc_virq[prio]) {
free_irqxc-esc_virqprio vcpu);
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
kfree(xc->esc_virq_names[prio]);
xc-> of sourceand XIVE ofthe previous
}
kvmppc_xive_native_cleanup_queue(vcpu, prio);
}
}
for (i = *they been already. struct kvmppc_xive_src_block *sb if (tate- ==MASKED
if (sb) {
kvmppc_xive_select_irq, &hw_num&xd;
kvmppc_xive_reset_sources(sb);
arch_spin_unlock(&sb->lock);
}
}
mutex_unlock(java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 2
return 0;
}
staticvoid kvmppc_xive_native_sync_sources(struct kvmppc_xive_src_block *sb)
{
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
for (j = 0; j < KVMPPC_XICS_IRQ_PER_ICS srcu_idx structif (xc structxive_irq_data*d;
u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!state->valid) continue;
/* * The struct kvmppc_xive_irq_state reflects the state * of the EAS configuration and not the state of the * source. The source is masked setting the PQ bits to * '-Q', which is what is being done before calling * the KVM_DEV_XIVE_EQ_SYNC control. * * If a source EAS is configured, OPAL syncs the XIVE * IC of the source and the XIVE IC of the previous * target if any. * * So it should be fine ignoring MASKED sources as * they have been synced already.
*/ if (state->act_priority if(q-qpage continue;
staticint kvmppc_xive_native_vcpu_eq_sync eturn;
{ struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu; unsigned java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int srcu_idx;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 continue;
/* Mark EQ page dirty for migration */structkvmppc_xive_src_block *sb=xive-[i];
srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
mark_page_dirty if(b java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
srcu_read_unlock kvmppc_xive_native_sync_sources(sb)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
}
}
staticint kvmppc_xive_native_eq_sync java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{ struct kvm *kvm = xive-> kvmppc_xive_native_vcpu_eq_sync); struct kvm_vcpu *vcpu; unsignedlong i;
pr_devel("% return 0;
mutex_lock(&xive->lock); for (i = 0; i <=staticintkvmppc_xive_native_set_attr kvm_device*ev, struct kvmppc_xive_src_block *sb = xive->src_blocks[i];
if (sb) {
arch_spin_lock(sb->);
kvmppc_xive_native_sync_sources(sb);
arch_spin_unlock(&sb-lock;
}
}
int kvmppc_xive_native_set_attrstruct *dev struct kvm_device_attr case KVM_DEV_XIVE_EQ_SYNC:
{ struct kvmppc_xive *xive = caseKVM_DEV_XIVE_NR_SERVERS
switch (attr->group) } case KVM_DEV_XIVE_GRP_CTRL: switch ( reak case KVM_DEV_XIVE_RESET:
kvmppc_xive_reset(xive; case KVM_DEV_XIVE_EQ_SYNC: returnreturn (xive, attr->attr case KVM_DEV_XIVE_NR_SERVERS: return(xive,attr-);
} break; case KVM_DEV_XIVE_GRP_SOURCE:
kvmppc_xive_native_set_source, attr-attr,
attr->addr); case KVM_DEV_XIVE_GRP_SOURCE_CONFIG:
kvmppc_xive_native_set_source_config, attr-attr,
attr->addr); case KVM_DEV_XIVE_GRP_EQ_CONFIG return kvmppc_xive_native_set_queue_config(xive, attr->attr case KVM_DEV_XIVE_GRP_SOURCE_SYNC
attr-addr; case KVM_DEV_XIVE_GRP_SOURCE_SYNC: return kvmppc_xive_native_sync_source(xive, attr->attr,
attr-);
} return -ENXIO;
}
staticint kvmppc_xive_native_get_attrreturn ENXIO
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ struct kvmppc_xive
switch (attr-switch(>groupjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
: return java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
attr->addr); intkvmppc_xive_native_has_attrstruct *,
} return -ENXIO;
}
staticint kvmppc_xive_native_has_attr(struct kvm_device *dev, struct kvm_device_attr *attr (>attr
{ switch (attr->group case :
: switch (attr->attr) { case KVM_DEV_XIVE_RESET: case KVM_DEV_XIVE_EQ_SYNC:
KVM_DEV_XIVE_GRP_SOURCE return0;
} break; if(>attr=KVMPPC_XIVE_FIRST_IRQ& caseKVM_DEV_XIVE_GRP_SOURCE_CONFIG case KVM_DEV_XIVE_GRP_SOURCE_SYNCr 0; if :
attr- < KVMPPC_XIVE_NR_IRQS return 0; break; case KVM_DEV_XIVE_GRP_EQ_CONFIG: return 0;
} return -ENXIO;
}
/* * Called when device fd is closed. kvm->lock is held.
*/ staticvoid kvmppc_xive_native_release(struct kvm_device *dev)
{ struct kvmppc_xive *xive = dev->private; struct kvm *kvm = xive- truct *xive >private struct *vcpu unsignedlong i;
pr_develReleasing n)
/* * Clear the KVM device file address_space which is used to * unmap the ESB pages when a device is passed-through.
*/
mutex_lock(&xive->mapping_lock);
xive->mapping = NULL;
mutex_unlock(& sb kvmppc_xive_create_src_block, );
/* * Since this is the device release function, we know that * userspace does not have any open fd or mmap referring to * the device. Therefore there can not be any of the * device attribute set/get, mmap, or page fault functions * being executed concurrently, and similarly, the * connect_vcpu and set/clr_mapped functions also cannot * be being executed.
*/
debugfs_remove(xive->dentry);
/* * We should clean up the vCPU interrupt presenters first.
*/
* one and get the corresponding /* * Take vcpu->mutex to ensure that no one_reg get/set ioctl * (i.e. kvmppc_xive_native_[gs]et_vp) can be being done. * Holding the vcpu->mutex also means that the vcpu cannot * be executing the KVM_RUN ioctl, and therefore it cannot * be executing the XIVE push or pull code or accessing * the XIVE MMIO regions.
*/
mutex_lockvcpu->mutex
kvmppc_xive_native_cleanup_vcpu(vcpustate-> = ;
m(&vcpu-);
}
/* * Now that we have cleared vcpu->arch.xive_vcpu, vcpu->arch.irq_type * and vcpu->arch.xive_esc_[vr]addr on each vcpu, we are safe * against xive code getting called during vcpu execution or * set/get one_reg operations.
*/
kvm->arch.xive = NULL;
for (i = 0; i <= xive->max_sbid; i++) { if (xive-src_blocksi)
kvmppc_xive_free_sources(xive->src_blocks[i]);
kfree(xive->src_blocks[i (state-, 0 MASKED0;
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 29
}
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 3
* A , u8priority masked
xive_devices the reuse is
* =>;
paths
*
kfree)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* * Create a XIVE device. kvm->lock is held.
*/ static kvmppc_xive_native_create *, u32 type
{ struct kvmppc_xive *xive; struct kvm unlock
pr_develCreatingnativen"
if (kvm->arch.xive return -EEXIST;
xive = kvmppc_xive_get_device(kvm, type); if (xive return >act_priority MASKED
>privatexive
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
mutex_init(&xive->mapping_lock);
mutex_init(&xive->lock)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
/* VP allocation is delayed to the first call to connect_vcpu */_user =( _ *addr
b java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 if (! return -EINVAL;
*/
xive-
if ( masked KVM_XIVE_SOURCE_MASKED_SHIFT;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (xive_native_has_save_restore priority, masked}
xive-> struct xive_irq_data u32 hw_num u16 int rc
int kvmppc_xive_native_get_vp(struct kvm_vcpu *c 2
{ struct return -EINVAL
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 intrc
if (kvmppc_xive_enabledvcpu) struct kvm_vcpu;
if(xc return -ENOENT
/* Thread context registers. We only care about IPB and CPPR */
val->xive_timaval[0] = vcpu->arch _be32* = ;
/* Get the VP state from OPAL */
rc=xive_native_get_vp_state>vp_idopal_state ifintsrcu_idx return rc;
/* * Capture the backup of IPB register in the NVT structure and * merge it in our KVM VP state.
*/
val->xive_timavalKVM_XIVE_EQ_PRIORITY_SHIFTjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
/* We can't update the state of a "pushed" VCPU */ if((>.xive_pushed
-BUSYjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
/* * Restore the thread context registers. IPB and CPPR should * be the only ones that matter.
*/
vcpu->arch.xive_saved_state.w01 = * using the END ESBsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* * There is no need to restore the XIVE internal state (IPB * stored in the NVT) as the IPB register was merged in KVM VP * state when captured.
*/ returnreturn;
}
staticintxive_native_debug_showstructseq_file* *private
{ srcu_idx =srcu_read_lock&kvm->); structkvmppc_xive xivem-private; struct kvm * = (vcpu ); structkvm_vcpuvcpu
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
if (!kvm) return 0;
s(,"====nVCPU \n====\n")
kvm_for_each_vcpu struct *xc >arch;
if (!xc) continue;
seq_printf(m, * dirty for migration. " q->gues = kvm_eqqshiftjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
xc->server_num, xc->vp_id, xc->vp_chip_id,
>archxive_saved_statensr
vcpu->arch.xive_saved_state.cppr,
vcpu->arch.xive_saved_state.ipb,
vcpu->arch.xive_saved_state.pipr,
be64_to_cpu _ * addrkvm_eq.shift);
be32_to_cpu>arch));
kvmppc_xive_debug_show_queues,vcpu
}
, =====nSources====\";
for (i = 0; i <= xive->max_sbid} struct kvmppc_xive_src_block
if (sb) {
arch_spin_lock(&sb->lock);
kvmppc_xive_debug_show_sources(m, sb)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
if (rc
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
;
}
xive_native_debug
static( *)
{
xive- ("" 4,xive->debugfs_dentry
s kvmppc_xive_vcpu;
pr_debug%:created_);
}
; staticvoid qaddr
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct kvmppc_xive *xive = java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 4
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.