.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2012 Michael Ellerman, IBM Corporation. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License, version 2, as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | */ |
---|
8 | 5 | |
---|
9 | 6 | #include <linux/kernel.h> |
---|
.. | .. |
---|
33 | 30 | server = be32_to_cpu(args->args[1]); |
---|
34 | 31 | priority = be32_to_cpu(args->args[2]); |
---|
35 | 32 | |
---|
36 | | - if (xive_enabled()) |
---|
| 33 | + if (xics_on_xive()) |
---|
37 | 34 | rc = kvmppc_xive_set_xive(vcpu->kvm, irq, server, priority); |
---|
38 | 35 | else |
---|
39 | 36 | rc = kvmppc_xics_set_xive(vcpu->kvm, irq, server, priority); |
---|
.. | .. |
---|
56 | 53 | irq = be32_to_cpu(args->args[0]); |
---|
57 | 54 | |
---|
58 | 55 | server = priority = 0; |
---|
59 | | - if (xive_enabled()) |
---|
| 56 | + if (xics_on_xive()) |
---|
60 | 57 | rc = kvmppc_xive_get_xive(vcpu->kvm, irq, &server, &priority); |
---|
61 | 58 | else |
---|
62 | 59 | rc = kvmppc_xics_get_xive(vcpu->kvm, irq, &server, &priority); |
---|
.. | .. |
---|
83 | 80 | |
---|
84 | 81 | irq = be32_to_cpu(args->args[0]); |
---|
85 | 82 | |
---|
86 | | - if (xive_enabled()) |
---|
| 83 | + if (xics_on_xive()) |
---|
87 | 84 | rc = kvmppc_xive_int_off(vcpu->kvm, irq); |
---|
88 | 85 | else |
---|
89 | 86 | rc = kvmppc_xics_int_off(vcpu->kvm, irq); |
---|
.. | .. |
---|
105 | 102 | |
---|
106 | 103 | irq = be32_to_cpu(args->args[0]); |
---|
107 | 104 | |
---|
108 | | - if (xive_enabled()) |
---|
| 105 | + if (xics_on_xive()) |
---|
109 | 106 | rc = kvmppc_xive_int_on(vcpu->kvm, irq); |
---|
110 | 107 | else |
---|
111 | 108 | rc = kvmppc_xics_int_on(vcpu->kvm, irq); |
---|
.. | .. |
---|
232 | 229 | */ |
---|
233 | 230 | args_phys = kvmppc_get_gpr(vcpu, 4) & KVM_PAM; |
---|
234 | 231 | |
---|
| 232 | + vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); |
---|
235 | 233 | rc = kvm_read_guest(vcpu->kvm, args_phys, &args, sizeof(args)); |
---|
| 234 | + srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); |
---|
236 | 235 | if (rc) |
---|
237 | 236 | goto fail; |
---|
238 | 237 | |
---|