Lines Matching full:gpc

40 	struct gfn_to_pfn_cache *gpc = &kvm->arch.xen.shinfo_cache;  in kvm_xen_shared_info_init()  local
48 read_lock_irq(&gpc->lock); in kvm_xen_shared_info_init()
49 while (!kvm_gpc_check(gpc, PAGE_SIZE)) { in kvm_xen_shared_info_init()
50 read_unlock_irq(&gpc->lock); in kvm_xen_shared_info_init()
52 ret = kvm_gpc_refresh(gpc, PAGE_SIZE); in kvm_xen_shared_info_init()
56 read_lock_irq(&gpc->lock); in kvm_xen_shared_info_init()
76 struct shared_info *shinfo = gpc->khva; in kvm_xen_shared_info_init()
83 struct compat_shared_info *shinfo = gpc->khva; in kvm_xen_shared_info_init()
99 read_unlock_irq(&gpc->lock); in kvm_xen_shared_info_init()
372 * Attempt to obtain the GPC lock on *both* (if there are two) in kvm_xen_update_runstate_guest()
400 * struct in the guest (via the GPC). in kvm_xen_update_runstate_guest()
441 * 64-bit mode, the second GPC won't have been set up. in kvm_xen_update_runstate_guest()
471 * via one GPC or the other. in kvm_xen_update_runstate_guest()
594 struct gfn_to_pfn_cache *gpc = &v->arch.xen.vcpu_info_cache; in kvm_xen_inject_pending_events() local
605 read_lock_irqsave(&gpc->lock, flags); in kvm_xen_inject_pending_events()
606 while (!kvm_gpc_check(gpc, sizeof(struct vcpu_info))) { in kvm_xen_inject_pending_events()
607 read_unlock_irqrestore(&gpc->lock, flags); in kvm_xen_inject_pending_events()
609 if (kvm_gpc_refresh(gpc, sizeof(struct vcpu_info))) in kvm_xen_inject_pending_events()
612 read_lock_irqsave(&gpc->lock, flags); in kvm_xen_inject_pending_events()
615 /* Now gpc->khva is a valid kernel address for the vcpu_info */ in kvm_xen_inject_pending_events()
617 struct vcpu_info *vi = gpc->khva; in kvm_xen_inject_pending_events()
629 struct compat_vcpu_info *vi = gpc->khva; in kvm_xen_inject_pending_events()
641 kvm_gpc_mark_dirty_in_slot(gpc); in kvm_xen_inject_pending_events()
642 read_unlock_irqrestore(&gpc->lock, flags); in kvm_xen_inject_pending_events()
651 struct gfn_to_pfn_cache *gpc = &v->arch.xen.vcpu_info_cache; in __kvm_xen_has_interrupt() local
668 read_lock_irqsave(&gpc->lock, flags); in __kvm_xen_has_interrupt()
669 while (!kvm_gpc_check(gpc, sizeof(struct vcpu_info))) { in __kvm_xen_has_interrupt()
670 read_unlock_irqrestore(&gpc->lock, flags); in __kvm_xen_has_interrupt()
683 if (kvm_gpc_refresh(gpc, sizeof(struct vcpu_info))) { in __kvm_xen_has_interrupt()
690 read_lock_irqsave(&gpc->lock, flags); in __kvm_xen_has_interrupt()
693 rc = ((struct vcpu_info *)gpc->khva)->evtchn_upcall_pending; in __kvm_xen_has_interrupt()
694 read_unlock_irqrestore(&gpc->lock, flags); in __kvm_xen_has_interrupt()
945 /* Either map the second page, or deactivate the second GPC */ in kvm_xen_vcpu_set_attr()
1383 struct gfn_to_pfn_cache *gpc = &kvm->arch.xen.shinfo_cache; in wait_pending_event() local
1390 read_lock_irqsave(&gpc->lock, flags); in wait_pending_event()
1391 if (!kvm_gpc_check(gpc, PAGE_SIZE)) in wait_pending_event()
1396 struct shared_info *shinfo = gpc->khva; in wait_pending_event()
1399 struct compat_shared_info *shinfo = gpc->khva; in wait_pending_event()
1411 read_unlock_irqrestore(&gpc->lock, flags); in wait_pending_event()
1740 struct gfn_to_pfn_cache *gpc = &kvm->arch.xen.shinfo_cache; in kvm_xen_set_evtchn_fast() local
1765 read_lock_irqsave(&gpc->lock, flags); in kvm_xen_set_evtchn_fast()
1766 if (!kvm_gpc_check(gpc, PAGE_SIZE)) in kvm_xen_set_evtchn_fast()
1770 struct shared_info *shinfo = gpc->khva; in kvm_xen_set_evtchn_fast()
1775 struct compat_shared_info *shinfo = gpc->khva; in kvm_xen_set_evtchn_fast()
1796 read_unlock_irqrestore(&gpc->lock, flags); in kvm_xen_set_evtchn_fast()
1797 gpc = &vcpu->arch.xen.vcpu_info_cache; in kvm_xen_set_evtchn_fast()
1799 read_lock_irqsave(&gpc->lock, flags); in kvm_xen_set_evtchn_fast()
1800 if (!kvm_gpc_check(gpc, sizeof(struct vcpu_info))) { in kvm_xen_set_evtchn_fast()
1811 struct vcpu_info *vcpu_info = gpc->khva; in kvm_xen_set_evtchn_fast()
1817 struct compat_vcpu_info *vcpu_info = gpc->khva; in kvm_xen_set_evtchn_fast()
1833 read_unlock_irqrestore(&gpc->lock, flags); in kvm_xen_set_evtchn_fast()
1880 struct gfn_to_pfn_cache *gpc = &kvm->arch.xen.shinfo_cache; in kvm_xen_set_evtchn() local
1888 rc = kvm_gpc_refresh(gpc, PAGE_SIZE); in kvm_xen_set_evtchn()