Commit 084071d5 authored by Marcelo Tosatti's avatar Marcelo Tosatti Committed by Paolo Bonzini
Browse files

KVM: rename KVM_REQ_PENDING_TIMER to KVM_REQ_UNBLOCK



KVM_REQ_UNBLOCK will be used to exit a vcpu from
its inner vcpu halt emulation loop.

Rename KVM_REQ_PENDING_TIMER to KVM_REQ_UNBLOCK, switch
PowerPC to arch specific request bit.

Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>

Message-Id: <20210525134321.303768132@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 57ab8794
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -118,10 +118,12 @@ KVM_REQ_MMU_RELOAD
  necessary to inform each VCPU to completely refresh the tables.  This
  request is used for that.

KVM_REQ_PENDING_TIMER
KVM_REQ_UNBLOCK

  This request may be made from a timer handler run on the host on behalf
  of a VCPU.  It informs the VCPU thread to inject a timer interrupt.
  This request informs the vCPU to exit kvm_vcpu_block.  It is used for
  example from timer handlers that run on the host on behalf of a vCPU,
  or in order to update the interrupt routing and ensure that assigned
  devices will wake up the vCPU.

KVM_REQ_UNHALT

+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@
/* PPC-specific vcpu->requests bit members */
#define KVM_REQ_WATCHDOG	KVM_ARCH_REQ(0)
#define KVM_REQ_EPR_EXIT	KVM_ARCH_REQ(1)
#define KVM_REQ_PENDING_TIMER	KVM_ARCH_REQ(2)

#include <linux/mmu_notifier.h>

+1 −1
Original line number Diff line number Diff line
@@ -1669,7 +1669,7 @@ static void apic_timer_expired(struct kvm_lapic *apic, bool from_timer_fn)
	}

	atomic_inc(&apic->lapic_timer.pending);
	kvm_make_request(KVM_REQ_PENDING_TIMER, vcpu);
	kvm_make_request(KVM_REQ_UNBLOCK, vcpu);
	if (from_timer_fn)
		kvm_vcpu_kick(vcpu);
}
+1 −1
Original line number Diff line number Diff line
@@ -9501,7 +9501,7 @@ static int vcpu_run(struct kvm_vcpu *vcpu)
		if (r <= 0)
			break;

		kvm_clear_request(KVM_REQ_PENDING_TIMER, vcpu);
		kvm_clear_request(KVM_REQ_UNBLOCK, vcpu);
		if (kvm_cpu_has_pending_timer(vcpu))
			kvm_inject_pending_timer_irqs(vcpu);

+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ static inline bool is_error_page(struct page *page)
 */
#define KVM_REQ_TLB_FLUSH         (0 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
#define KVM_REQ_MMU_RELOAD        (1 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
#define KVM_REQ_PENDING_TIMER     2
#define KVM_REQ_UNBLOCK           2
#define KVM_REQ_UNHALT            3
#define KVM_REQUEST_ARCH_BASE     8

Loading