kvm-s390.h (6a656832aa75784d02dccd8d37fc5c0896064c2e) kvm-s390.h (a54d806688fe1e482350ce759a8a0fc9ebf814b0)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * definition for kvm on s390
4 *
5 * Copyright IBM Corp. 2008, 2020
6 *
7 * Author(s): Carsten Otte <cotte@de.ibm.com>
8 * Christian Borntraeger <borntraeger@de.ibm.com>

--- 206 unchanged lines hidden (view full) ---

215
216 VM_EVENT(kvm, 3, "%s", "ENABLE: Userspace CPU state control");
217 kvm->arch.user_cpu_state_ctrl = 1;
218}
219
220/* get the end gfn of the last (highest gfn) memslot */
221static inline unsigned long kvm_s390_get_gfn_end(struct kvm_memslots *slots)
222{
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * definition for kvm on s390
4 *
5 * Copyright IBM Corp. 2008, 2020
6 *
7 * Author(s): Carsten Otte <cotte@de.ibm.com>
8 * Christian Borntraeger <borntraeger@de.ibm.com>

--- 206 unchanged lines hidden (view full) ---

215
216 VM_EVENT(kvm, 3, "%s", "ENABLE: Userspace CPU state control");
217 kvm->arch.user_cpu_state_ctrl = 1;
218}
219
220/* get the end gfn of the last (highest gfn) memslot */
221static inline unsigned long kvm_s390_get_gfn_end(struct kvm_memslots *slots)
222{
223 struct rb_node *node;
223 struct kvm_memory_slot *ms;
224
224 struct kvm_memory_slot *ms;
225
225 if (WARN_ON(!slots->used_slots))
226 if (WARN_ON(kvm_memslots_empty(slots)))
226 return 0;
227
227 return 0;
228
228 ms = slots->memslots;
229 node = rb_last(&slots->gfn_tree);
230 ms = container_of(node, struct kvm_memory_slot, gfn_node[slots->node_idx]);
229 return ms->base_gfn + ms->npages;
230}
231
232/* implemented in pv.c */
233int kvm_s390_pv_destroy_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc);
234int kvm_s390_pv_create_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc);
235int kvm_s390_pv_deinit_vm(struct kvm *kvm, u16 *rc, u16 *rrc);
236int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc);

--- 267 unchanged lines hidden ---
231 return ms->base_gfn + ms->npages;
232}
233
234/* implemented in pv.c */
235int kvm_s390_pv_destroy_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc);
236int kvm_s390_pv_create_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc);
237int kvm_s390_pv_deinit_vm(struct kvm *kvm, u16 *rc, u16 *rrc);
238int kvm_s390_pv_init_vm(struct kvm *kvm, u16 *rc, u16 *rrc);

--- 267 unchanged lines hidden ---