Home
last modified time | relevance | path

Searched refs:kvm (Results 1 – 14 of 14) sorted by relevance

/virt/kvm/
Deventfd.c52 struct kvm *kvm = irqfd->kvm; in irqfd_inject() local
55 kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 1, in irqfd_inject()
57 kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, irqfd->gsi, 0, in irqfd_inject()
60 kvm_set_irq(kvm, KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID, in irqfd_inject()
73 struct kvm *kvm; in irqfd_resampler_ack() local
79 kvm = resampler->kvm; in irqfd_resampler_ack()
81 kvm_set_irq(kvm, KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID, in irqfd_resampler_ack()
84 idx = srcu_read_lock(&kvm->irq_srcu); in irqfd_resampler_ack()
89 srcu_read_unlock(&kvm->irq_srcu, idx); in irqfd_resampler_ack()
96 struct kvm *kvm = resampler->kvm; in irqfd_resampler_shutdown() local
[all …]
Dkvm_main.c161 bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req) in kvm_make_all_cpus_request() argument
171 kvm_for_each_vcpu(i, vcpu, kvm) { in kvm_make_all_cpus_request()
194 void kvm_flush_remote_tlbs(struct kvm *kvm) in kvm_flush_remote_tlbs() argument
196 long dirty_count = kvm->tlbs_dirty; in kvm_flush_remote_tlbs()
199 if (kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) in kvm_flush_remote_tlbs()
200 ++kvm->stat.remote_tlb_flush; in kvm_flush_remote_tlbs()
201 cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); in kvm_flush_remote_tlbs()
206 void kvm_reload_remote_mmus(struct kvm *kvm) in kvm_reload_remote_mmus() argument
208 kvm_make_all_cpus_request(kvm, KVM_REQ_MMU_RELOAD); in kvm_reload_remote_mmus()
211 void kvm_make_mclock_inprogress_request(struct kvm *kvm) in kvm_make_mclock_inprogress_request() argument
[all …]
Dcoalesced_mmio.c53 ring = dev->kvm->coalesced_mmio_ring; in coalesced_mmio_has_room()
68 struct kvm_coalesced_mmio_ring *ring = dev->kvm->coalesced_mmio_ring; in coalesced_mmio_write()
74 spin_lock(&dev->kvm->ring_lock); in coalesced_mmio_write()
79 spin_unlock(&dev->kvm->ring_lock); in coalesced_mmio_write()
90 spin_unlock(&dev->kvm->ring_lock); in coalesced_mmio_write()
108 int kvm_coalesced_mmio_init(struct kvm *kvm) in kvm_coalesced_mmio_init() argument
119 kvm->coalesced_mmio_ring = page_address(page); in kvm_coalesced_mmio_init()
126 spin_lock_init(&kvm->ring_lock); in kvm_coalesced_mmio_init()
127 INIT_LIST_HEAD(&kvm->coalesced_zones); in kvm_coalesced_mmio_init()
133 void kvm_coalesced_mmio_free(struct kvm *kvm) in kvm_coalesced_mmio_free() argument
[all …]
Dirqchip.c34 int kvm_irq_map_gsi(struct kvm *kvm, in kvm_irq_map_gsi() argument
41 irq_rt = srcu_dereference_check(kvm->irq_routing, &kvm->irq_srcu, in kvm_irq_map_gsi()
42 lockdep_is_held(&kvm->irq_lock)); in kvm_irq_map_gsi()
53 int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin) in kvm_irq_map_chip_pin() argument
57 irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq_srcu); in kvm_irq_map_chip_pin()
61 int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi) in kvm_send_userspace_msi() argument
65 if (!irqchip_in_kernel(kvm) || msi->flags != 0) in kvm_send_userspace_msi()
72 return kvm_set_msi(&route, kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 1, false); in kvm_send_userspace_msi()
81 int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level, in kvm_set_irq() argument
93 idx = srcu_read_lock(&kvm->irq_srcu); in kvm_set_irq()
[all …]
Dcoalesced_mmio.h20 struct kvm *kvm; member
24 int kvm_coalesced_mmio_init(struct kvm *kvm);
25 void kvm_coalesced_mmio_free(struct kvm *kvm);
26 int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
28 int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,
33 static inline int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; } in kvm_coalesced_mmio_init() argument
34 static inline void kvm_coalesced_mmio_free(struct kvm *kvm) { } in kvm_coalesced_mmio_free() argument
Dvfio.c121 kvm_arch_register_noncoherent_dma(dev->kvm); in kvm_vfio_update_coherency()
123 kvm_arch_unregister_noncoherent_dma(dev->kvm); in kvm_vfio_update_coherency()
174 kvm_arch_start_assignment(dev->kvm); in kvm_vfio_set_group()
206 kvm_arch_end_assignment(dev->kvm); in kvm_vfio_set_group()
257 kvm_arch_end_assignment(dev->kvm); in kvm_vfio_destroy()
282 list_for_each_entry(tmp, &dev->kvm->devices, vm_node) in kvm_vfio_create()
Dasync_pf.c105 kvm_put_kvm(vcpu->kvm); in async_pf_execute()
122 kvm_put_kvm(vcpu->kvm); /* == work->vcpu->kvm */ in kvm_clear_async_pf_completion_queue()
187 kvm_get_kvm(work->vcpu->kvm); in kvm_setup_async_pf()
203 kvm_put_kvm(work->vcpu->kvm); in kvm_setup_async_pf()
/virt/kvm/arm/
Dvgic.c121 vcpu->kvm->arch.vgic.vm_ops.add_sgi_source(vcpu, irq, source); in add_sgi_source()
126 return vcpu->kvm->arch.vgic.vm_ops.queue_sgi(vcpu, irq); in queue_sgi()
129 int kvm_vgic_map_resources(struct kvm *kvm) in kvm_vgic_map_resources() argument
131 return kvm->arch.vgic.vm_ops.map_resources(kvm, vgic); in kvm_vgic_map_resources()
276 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_irq_is_edge()
285 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_irq_is_enabled()
292 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_irq_is_queued()
299 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_irq_is_active()
306 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_irq_set_queued()
313 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_irq_clear_queued()
[all …]
Dvgic.h44 void vgic_update_state(struct kvm *kvm);
45 int vgic_init_common_maps(struct kvm *kvm);
95 int vgic_register_kvm_io_dev(struct kvm *kvm, gpa_t base, int len,
110 bool vgic_handle_enable_reg(struct kvm *kvm, struct kvm_exit_mmio *mmio,
113 bool vgic_handle_set_pending_reg(struct kvm *kvm, struct kvm_exit_mmio *mmio,
116 bool vgic_handle_clear_pending_reg(struct kvm *kvm, struct kvm_exit_mmio *mmio,
119 bool vgic_handle_set_active_reg(struct kvm *kvm,
123 bool vgic_handle_clear_active_reg(struct kvm *kvm,
130 void vgic_kick_vcpus(struct kvm *kvm);
136 int vgic_init(struct kvm *kvm);
[all …]
Dvgic-v2-emul.c51 reg = vcpu->kvm->arch.vgic.enabled; in handle_mmio_misc()
55 vcpu->kvm->arch.vgic.enabled = reg & 1; in handle_mmio_misc()
56 vgic_update_state(vcpu->kvm); in handle_mmio_misc()
62 reg = (atomic_read(&vcpu->kvm->online_vcpus) - 1) << 5; in handle_mmio_misc()
63 reg |= (vcpu->kvm->arch.vgic.nr_irqs >> 5) - 1; in handle_mmio_misc()
82 return vgic_handle_enable_reg(vcpu->kvm, mmio, offset, in handle_mmio_set_enable_reg()
90 return vgic_handle_enable_reg(vcpu->kvm, mmio, offset, in handle_mmio_clear_enable_reg()
98 return vgic_handle_set_pending_reg(vcpu->kvm, mmio, offset, in handle_mmio_set_pending_reg()
106 return vgic_handle_clear_pending_reg(vcpu->kvm, mmio, offset, in handle_mmio_clear_pending_reg()
114 return vgic_handle_set_active_reg(vcpu->kvm, mmio, offset, in handle_mmio_set_active_reg()
[all …]
Dvgic-v3-emul.c72 if (vcpu->kvm->arch.vgic.enabled) in handle_mmio_ctlr()
79 vcpu->kvm->arch.vgic.enabled = !!(reg & GICD_CTLR_ENABLE_SS_G1); in handle_mmio_ctlr()
80 vgic_update_state(vcpu->kvm); in handle_mmio_ctlr()
98 reg = (min(vcpu->kvm->arch.vgic.nr_irqs, 1024) >> 5) - 1; in handle_mmio_typer()
125 return vgic_handle_enable_reg(vcpu->kvm, mmio, offset, in handle_mmio_set_enable_reg_dist()
139 return vgic_handle_enable_reg(vcpu->kvm, mmio, offset, in handle_mmio_clear_enable_reg_dist()
153 return vgic_handle_set_pending_reg(vcpu->kvm, mmio, offset, in handle_mmio_set_pending_reg_dist()
166 return vgic_handle_clear_pending_reg(vcpu->kvm, mmio, offset, in handle_mmio_clear_pending_reg_dist()
179 return vgic_handle_set_active_reg(vcpu->kvm, mmio, offset, in handle_mmio_set_active_reg_dist()
192 return vgic_handle_clear_active_reg(vcpu->kvm, mmio, offset, in handle_mmio_clear_active_reg_dist()
[all …]
Darch_timer.c100 now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff; in kvm_timer_compute_delta()
156 now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff; in kvm_timer_should_fire()
166 BUG_ON(!vgic_initialized(vcpu->kvm)); in kvm_timer_update_irq()
171 ret = kvm_vgic_inject_mapped_irq(vcpu->kvm, vcpu->vcpu_id, in kvm_timer_update_irq()
191 if (!vgic_initialized(vcpu->kvm)) in kvm_timer_update_state()
358 vcpu->kvm->arch.timer.cntvoff = kvm_phys_timer_read() - value; in kvm_arm_timer_set_reg()
379 return kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff; in kvm_arm_timer_get_reg()
478 void kvm_timer_enable(struct kvm *kvm) in kvm_timer_enable() argument
480 if (kvm->arch.timer.enabled) in kvm_timer_enable()
492 kvm->arch.timer.enabled = 1; in kvm_timer_enable()
[all …]
Dtrace.h7 #define TRACE_SYSTEM kvm
58 #define TRACE_INCLUDE_PATH ../../../virt/kvm/arm
Dvgic-v3.c52 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) in vgic_v3_get_lr()
59 vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2) in vgic_v3_get_lr()
91 switch (vcpu->kvm->arch.vgic.vgic_model) { in vgic_v3_set_lr()
199 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) in vgic_v3_enable()