Commit ac2a2303 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

Merge branch 'topic/ppc-kvm' into next

Merge KVM related commits we are keeping in a topic branch in case of
any conflicts with generic KVM changes.
parents 7e74dabc 81e9685d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -350,6 +350,14 @@
/* Platform specific hcalls, used by KVM */
#define H_RTAS			0xf000

/*
 * Platform specific hcalls, used by QEMU/SLOF. These are ignored by
 * KVM and only kept here so we can identify them during tracing.
 */
#define H_LOGICAL_MEMOP  0xF001
#define H_CAS            0XF002
#define H_UPDATE_DT      0XF003

/* "Platform specific hcalls", provided by PHYP */
#define H_GET_24X7_CATALOG_PAGE	0xF078
#define H_GET_24X7_DATA		0xF07C
+15 −1
Original line number Diff line number Diff line
@@ -523,7 +523,11 @@ struct kvm_vcpu_arch {
	struct kvmppc_book3s_shadow_vcpu *shadow_vcpu;
#endif

	struct pt_regs regs;
	/*
	 * This is passed along to the HV via H_ENTER_NESTED. Align to
	 * prevent it crossing a real 4K page.
	 */
	struct pt_regs regs __aligned(512);

	struct thread_fp_state fp;

@@ -830,11 +834,21 @@ struct kvm_vcpu_arch {
#ifdef CONFIG_KVM_BOOK3S_HV_EXIT_TIMING
	struct kvmhv_tb_accumulator *cur_activity;	/* What we're timing */
	u64	cur_tb_start;			/* when it started */
#ifdef CONFIG_KVM_BOOK3S_HV_P9_TIMING
	struct kvmhv_tb_accumulator vcpu_entry;
	struct kvmhv_tb_accumulator vcpu_exit;
	struct kvmhv_tb_accumulator in_guest;
	struct kvmhv_tb_accumulator hcall;
	struct kvmhv_tb_accumulator pg_fault;
	struct kvmhv_tb_accumulator guest_entry;
	struct kvmhv_tb_accumulator guest_exit;
#else
	struct kvmhv_tb_accumulator rm_entry;	/* real-mode entry code */
	struct kvmhv_tb_accumulator rm_intr;	/* real-mode intr handling */
	struct kvmhv_tb_accumulator rm_exit;	/* real-mode exit code */
	struct kvmhv_tb_accumulator guest_time;	/* guest execution */
	struct kvmhv_tb_accumulator cede_time;	/* time napping inside guest */
#endif
#endif /* CONFIG_KVM_BOOK3S_HV_EXIT_TIMING */
};

+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ int main(void)
	OFFSET(VCPU_SPRG2, kvm_vcpu, arch.shregs.sprg2);
	OFFSET(VCPU_SPRG3, kvm_vcpu, arch.shregs.sprg3);
#endif
#ifdef CONFIG_KVM_BOOK3S_HV_EXIT_TIMING
#ifdef CONFIG_KVM_BOOK3S_HV_P8_TIMING
	OFFSET(VCPU_TB_RMENTRY, kvm_vcpu, arch.rm_entry);
	OFFSET(VCPU_TB_RMINTR, kvm_vcpu, arch.rm_intr);
	OFFSET(VCPU_TB_RMEXIT, kvm_vcpu, arch.rm_exit);
+19 −2
Original line number Diff line number Diff line
@@ -128,8 +128,25 @@ config KVM_BOOK3S_64_PR
	  and system calls on the host.

config KVM_BOOK3S_HV_EXIT_TIMING
	bool "Detailed timing for hypervisor real-mode code"
	bool

config KVM_BOOK3S_HV_P9_TIMING
	bool "Detailed timing for the P9 entry point"
	select KVM_BOOK3S_HV_EXIT_TIMING
	depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS
	help
	  Calculate time taken for each vcpu during vcpu entry and
	  exit, time spent inside the guest and time spent handling
	  hypercalls and page faults. The total, minimum and maximum
	  times in nanoseconds together with the number of executions
	  are reported in debugfs in kvm/vm#/vcpu#/timings.

	  If unsure, say N.

config KVM_BOOK3S_HV_P8_TIMING
	bool "Detailed timing for hypervisor real-mode code (for POWER8)"
	select KVM_BOOK3S_HV_EXIT_TIMING
	depends on KVM_BOOK3S_HV_POSSIBLE && DEBUG_FS && !KVM_BOOK3S_HV_P9_TIMING
	help
	  Calculate time taken for each vcpu in the real-mode guest entry,
	  exit, and interrupt handling code, plus time spent in the guest
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
		return ret;

	ret = -ENOMEM;
	stt = kzalloc(struct_size(stt, pages, npages), GFP_KERNEL);
	stt = kzalloc(struct_size(stt, pages, npages), GFP_KERNEL | __GFP_NOWARN);
	if (!stt)
		goto fail_acct;

Loading