All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20130711115046.GD21353@iris.ozlabs.ibm.com>

diff --git a/a/1.txt b/N1/1.txt
index cc2f447..5bb8336 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -183,9 +183,9 @@ index 08891d0..5d68f6c 100644
  
  	/* Load the instruction manually if it failed to do so in the
  	 * exit path */
--	if (svcpu->last_inst = KVM_INST_FETCH_FAILED)
+-	if (svcpu->last_inst == KVM_INST_FETCH_FAILED)
 -		kvmppc_ld(vcpu, &pc, sizeof(u32), &svcpu->last_inst, false);
-+	if (vcpu->arch.last_inst = KVM_INST_FETCH_FAILED)
++	if (vcpu->arch.last_inst == KVM_INST_FETCH_FAILED)
 +		kvmppc_ld(vcpu, &pc, sizeof(u32), &vcpu->arch.last_inst, false);
  
 -	r = svcpu->last_inst;
@@ -291,7 +291,7 @@ index 08891d0..5d68f6c 100644
 -
 -	/* Load the instruction manually if it failed to do so in the
 -	 * exit path */
--	if (vcpu->arch.last_inst = KVM_INST_FETCH_FAILED)
+-	if (vcpu->arch.last_inst == KVM_INST_FETCH_FAILED)
 -		kvmppc_ld(vcpu, &pc, sizeof(u32), &vcpu->arch.last_inst, false);
 -
 -	return vcpu->arch.last_inst;
@@ -367,7 +367,7 @@ index 360ce68..34044b1 100644
 @@ -267,12 +267,9 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
  
  			r = kvmppc_st(vcpu, &addr, 32, zeros, true);
- 			if ((r = -ENOENT) || (r = -EPERM)) {
+ 			if ((r == -ENOENT) || (r == -EPERM)) {
 -				struct kvmppc_book3s_shadow_vcpu *svcpu;
 -
 -				svcpu = svcpu_get(vcpu);
@@ -377,7 +377,7 @@ index 360ce68..34044b1 100644
 +				vcpu->arch.fault_dar = vaddr;
  
  				dsisr = DSISR_ISSTORE;
- 				if (r = -ENOENT)
+ 				if (r == -ENOENT)
 @@ -281,8 +278,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
  					dsisr |= DSISR_PROTFAULT;
  
@@ -549,28 +549,30 @@ index ddfaf56..5aa64e2 100644
  #endif
 @@ -388,22 +384,18 @@ int kvmppc_handle_pagefault(struct kvm_run *run, struct kvm_vcpu *vcpu,
  
- 	if (page_found = -ENOENT) {
+ 	if (page_found == -ENOENT) {
  		/* Page not found in guest PTE entries */
 -		struct kvmppc_book3s_shadow_vcpu *svcpu = svcpu_get(vcpu);
  		vcpu->arch.shared->dar = kvmppc_get_fault_dar(vcpu);
 -		vcpu->arch.shared->dsisr = svcpu->fault_dsisr;
 +		vcpu->arch.shared->dsisr = vcpu->arch.fault_dsisr;
- 		vcpu->arch.shared->msr |-			(svcpu->shadow_srr1 & 0x00000000f8000000ULL);
+ 		vcpu->arch.shared->msr |=
+-			(svcpu->shadow_srr1 & 0x00000000f8000000ULL);
 -		svcpu_put(svcpu);
 +			vcpu->arch.shadow_srr1 & 0x00000000f8000000ULL;
  		kvmppc_book3s_queue_irqprio(vcpu, vec);
- 	} else if (page_found = -EPERM) {
+ 	} else if (page_found == -EPERM) {
  		/* Storage protection */
 -		struct kvmppc_book3s_shadow_vcpu *svcpu = svcpu_get(vcpu);
  		vcpu->arch.shared->dar = kvmppc_get_fault_dar(vcpu);
 -		vcpu->arch.shared->dsisr = svcpu->fault_dsisr & ~DSISR_NOHPTE;
 +		vcpu->arch.shared->dsisr = vcpu->arch.fault_dsisr & ~DSISR_NOHPTE;
  		vcpu->arch.shared->dsisr |= DSISR_PROTFAULT;
- 		vcpu->arch.shared->msr |-			svcpu->shadow_srr1 & 0x00000000f8000000ULL;
+ 		vcpu->arch.shared->msr |=
+-			svcpu->shadow_srr1 & 0x00000000f8000000ULL;
 -		svcpu_put(svcpu);
 +			vcpu->arch.shadow_srr1 & 0x00000000f8000000ULL;
  		kvmppc_book3s_queue_irqprio(vcpu, vec);
- 	} else if (page_found = -EINVAL) {
+ 	} else if (page_found == -EINVAL) {
  		/* Page not found in guest SLB */
 @@ -623,21 +615,26 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
  	switch (exit_nr) {
@@ -584,7 +586,7 @@ index ddfaf56..5aa64e2 100644
  #ifdef CONFIG_PPC_BOOK3S_32
  		/* We set segments as unused segments when invalidating them. So
  		 * treat the respective fault as segment fault. */
--		if (svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT] = SR_INVALID) {
+-		if (svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT] == SR_INVALID) {
 -			kvmppc_mmu_map_segment(vcpu, kvmppc_get_pc(vcpu));
 -			r = RESUME_GUEST;
 +		{
@@ -595,7 +597,7 @@ index ddfaf56..5aa64e2 100644
 +			sr = svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT];
  			svcpu_put(svcpu);
 -			break;
-+			if (sr = SR_INVALID) {
++			if (sr == SR_INVALID) {
 +				kvmppc_mmu_map_segment(vcpu, kvmppc_get_pc(vcpu));
 +				r = RESUME_GUEST;
 +				break;
@@ -618,7 +620,7 @@ index ddfaf56..5aa64e2 100644
  #ifdef CONFIG_PPC_BOOK3S_32
  		/* We set segments as unused segments when invalidating them. So
  		 * treat the respective fault as segment fault. */
--		if ((svcpu->sr[dar >> SID_SHIFT]) = SR_INVALID) {
+-		if ((svcpu->sr[dar >> SID_SHIFT]) == SR_INVALID) {
 -			kvmppc_mmu_map_segment(vcpu, dar);
 -			r = RESUME_GUEST;
 +		{
@@ -629,7 +631,7 @@ index ddfaf56..5aa64e2 100644
 +			sr = svcpu->sr[dar >> SID_SHIFT];
  			svcpu_put(svcpu);
 -			break;
-+			if (sr = SR_INVALID) {
++			if (sr == SR_INVALID) {
 +				kvmppc_mmu_map_segment(vcpu, dar);
 +				r = RESUME_GUEST;
 +				break;
@@ -671,7 +673,8 @@ index ddfaf56..5aa64e2 100644
  		goto out;
  
 +#ifdef CONFIG_KVM_BOOK3S_32
- 	vcpu_book3s->shadow_vcpu  		kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL);
+ 	vcpu_book3s->shadow_vcpu =
+ 		kzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL);
  	if (!vcpu_book3s->shadow_vcpu)
  		goto free_vcpu;
 -
diff --git a/a/content_digest b/N1/content_digest
index 53189ca..d4c100e 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,7 +1,7 @@
  "ref\020130711114839.GB21353@iris.ozlabs.ibm.com\0"
  "From\0Paul Mackerras <paulus@samba.org>\0"
  "Subject\0[PATCH 2/8] KVM: PPC: Book3S PR: Keep volatile reg values in vcpu rather than shadow_vcpu\0"
- "Date\0Thu, 11 Jul 2013 11:50:46 +0000\0"
+ "Date\0Thu, 11 Jul 2013 21:50:46 +1000\0"
  "To\0Alexander Graf <agraf@suse.de>\0"
  "Cc\0kvm-ppc@vger.kernel.org"
  " kvm@vger.kernel.org\0"
@@ -192,9 +192,9 @@
  " \n"
  " \t/* Load the instruction manually if it failed to do so in the\n"
  " \t * exit path */\n"
- "-\tif (svcpu->last_inst = KVM_INST_FETCH_FAILED)\n"
+ "-\tif (svcpu->last_inst == KVM_INST_FETCH_FAILED)\n"
  "-\t\tkvmppc_ld(vcpu, &pc, sizeof(u32), &svcpu->last_inst, false);\n"
- "+\tif (vcpu->arch.last_inst = KVM_INST_FETCH_FAILED)\n"
+ "+\tif (vcpu->arch.last_inst == KVM_INST_FETCH_FAILED)\n"
  "+\t\tkvmppc_ld(vcpu, &pc, sizeof(u32), &vcpu->arch.last_inst, false);\n"
  " \n"
  "-\tr = svcpu->last_inst;\n"
@@ -300,7 +300,7 @@
  "-\n"
  "-\t/* Load the instruction manually if it failed to do so in the\n"
  "-\t * exit path */\n"
- "-\tif (vcpu->arch.last_inst = KVM_INST_FETCH_FAILED)\n"
+ "-\tif (vcpu->arch.last_inst == KVM_INST_FETCH_FAILED)\n"
  "-\t\tkvmppc_ld(vcpu, &pc, sizeof(u32), &vcpu->arch.last_inst, false);\n"
  "-\n"
  "-\treturn vcpu->arch.last_inst;\n"
@@ -376,7 +376,7 @@
  "@@ -267,12 +267,9 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,\n"
  " \n"
  " \t\t\tr = kvmppc_st(vcpu, &addr, 32, zeros, true);\n"
- " \t\t\tif ((r = -ENOENT) || (r = -EPERM)) {\n"
+ " \t\t\tif ((r == -ENOENT) || (r == -EPERM)) {\n"
  "-\t\t\t\tstruct kvmppc_book3s_shadow_vcpu *svcpu;\n"
  "-\n"
  "-\t\t\t\tsvcpu = svcpu_get(vcpu);\n"
@@ -386,7 +386,7 @@
  "+\t\t\t\tvcpu->arch.fault_dar = vaddr;\n"
  " \n"
  " \t\t\t\tdsisr = DSISR_ISSTORE;\n"
- " \t\t\t\tif (r = -ENOENT)\n"
+ " \t\t\t\tif (r == -ENOENT)\n"
  "@@ -281,8 +278,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,\n"
  " \t\t\t\t\tdsisr |= DSISR_PROTFAULT;\n"
  " \n"
@@ -558,28 +558,30 @@
  " #endif\n"
  "@@ -388,22 +384,18 @@ int kvmppc_handle_pagefault(struct kvm_run *run, struct kvm_vcpu *vcpu,\n"
  " \n"
- " \tif (page_found = -ENOENT) {\n"
+ " \tif (page_found == -ENOENT) {\n"
  " \t\t/* Page not found in guest PTE entries */\n"
  "-\t\tstruct kvmppc_book3s_shadow_vcpu *svcpu = svcpu_get(vcpu);\n"
  " \t\tvcpu->arch.shared->dar = kvmppc_get_fault_dar(vcpu);\n"
  "-\t\tvcpu->arch.shared->dsisr = svcpu->fault_dsisr;\n"
  "+\t\tvcpu->arch.shared->dsisr = vcpu->arch.fault_dsisr;\n"
- " \t\tvcpu->arch.shared->msr |-\t\t\t(svcpu->shadow_srr1 & 0x00000000f8000000ULL);\n"
+ " \t\tvcpu->arch.shared->msr |=\n"
+ "-\t\t\t(svcpu->shadow_srr1 & 0x00000000f8000000ULL);\n"
  "-\t\tsvcpu_put(svcpu);\n"
  "+\t\t\tvcpu->arch.shadow_srr1 & 0x00000000f8000000ULL;\n"
  " \t\tkvmppc_book3s_queue_irqprio(vcpu, vec);\n"
- " \t} else if (page_found = -EPERM) {\n"
+ " \t} else if (page_found == -EPERM) {\n"
  " \t\t/* Storage protection */\n"
  "-\t\tstruct kvmppc_book3s_shadow_vcpu *svcpu = svcpu_get(vcpu);\n"
  " \t\tvcpu->arch.shared->dar = kvmppc_get_fault_dar(vcpu);\n"
  "-\t\tvcpu->arch.shared->dsisr = svcpu->fault_dsisr & ~DSISR_NOHPTE;\n"
  "+\t\tvcpu->arch.shared->dsisr = vcpu->arch.fault_dsisr & ~DSISR_NOHPTE;\n"
  " \t\tvcpu->arch.shared->dsisr |= DSISR_PROTFAULT;\n"
- " \t\tvcpu->arch.shared->msr |-\t\t\tsvcpu->shadow_srr1 & 0x00000000f8000000ULL;\n"
+ " \t\tvcpu->arch.shared->msr |=\n"
+ "-\t\t\tsvcpu->shadow_srr1 & 0x00000000f8000000ULL;\n"
  "-\t\tsvcpu_put(svcpu);\n"
  "+\t\t\tvcpu->arch.shadow_srr1 & 0x00000000f8000000ULL;\n"
  " \t\tkvmppc_book3s_queue_irqprio(vcpu, vec);\n"
- " \t} else if (page_found = -EINVAL) {\n"
+ " \t} else if (page_found == -EINVAL) {\n"
  " \t\t/* Page not found in guest SLB */\n"
  "@@ -623,21 +615,26 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,\n"
  " \tswitch (exit_nr) {\n"
@@ -593,7 +595,7 @@
  " #ifdef CONFIG_PPC_BOOK3S_32\n"
  " \t\t/* We set segments as unused segments when invalidating them. So\n"
  " \t\t * treat the respective fault as segment fault. */\n"
- "-\t\tif (svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT] = SR_INVALID) {\n"
+ "-\t\tif (svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT] == SR_INVALID) {\n"
  "-\t\t\tkvmppc_mmu_map_segment(vcpu, kvmppc_get_pc(vcpu));\n"
  "-\t\t\tr = RESUME_GUEST;\n"
  "+\t\t{\n"
@@ -604,7 +606,7 @@
  "+\t\t\tsr = svcpu->sr[kvmppc_get_pc(vcpu) >> SID_SHIFT];\n"
  " \t\t\tsvcpu_put(svcpu);\n"
  "-\t\t\tbreak;\n"
- "+\t\t\tif (sr = SR_INVALID) {\n"
+ "+\t\t\tif (sr == SR_INVALID) {\n"
  "+\t\t\t\tkvmppc_mmu_map_segment(vcpu, kvmppc_get_pc(vcpu));\n"
  "+\t\t\t\tr = RESUME_GUEST;\n"
  "+\t\t\t\tbreak;\n"
@@ -627,7 +629,7 @@
  " #ifdef CONFIG_PPC_BOOK3S_32\n"
  " \t\t/* We set segments as unused segments when invalidating them. So\n"
  " \t\t * treat the respective fault as segment fault. */\n"
- "-\t\tif ((svcpu->sr[dar >> SID_SHIFT]) = SR_INVALID) {\n"
+ "-\t\tif ((svcpu->sr[dar >> SID_SHIFT]) == SR_INVALID) {\n"
  "-\t\t\tkvmppc_mmu_map_segment(vcpu, dar);\n"
  "-\t\t\tr = RESUME_GUEST;\n"
  "+\t\t{\n"
@@ -638,7 +640,7 @@
  "+\t\t\tsr = svcpu->sr[dar >> SID_SHIFT];\n"
  " \t\t\tsvcpu_put(svcpu);\n"
  "-\t\t\tbreak;\n"
- "+\t\t\tif (sr = SR_INVALID) {\n"
+ "+\t\t\tif (sr == SR_INVALID) {\n"
  "+\t\t\t\tkvmppc_mmu_map_segment(vcpu, dar);\n"
  "+\t\t\t\tr = RESUME_GUEST;\n"
  "+\t\t\t\tbreak;\n"
@@ -680,7 +682,8 @@
  " \t\tgoto out;\n"
  " \n"
  "+#ifdef CONFIG_KVM_BOOK3S_32\n"
- " \tvcpu_book3s->shadow_vcpu  \t\tkzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL);\n"
+ " \tvcpu_book3s->shadow_vcpu =\n"
+ " \t\tkzalloc(sizeof(*vcpu_book3s->shadow_vcpu), GFP_KERNEL);\n"
  " \tif (!vcpu_book3s->shadow_vcpu)\n"
  " \t\tgoto free_vcpu;\n"
  "-\n"
@@ -741,4 +744,4 @@
  "-- \n"
  1.8.3.1
 
-85c3ec6be7602802397278207a9ec7653ca4af6932b5479d15bee08de90ea96b
+6fe5c9c100251d9a60f3dbdefa353952cb5264fde16285c8d2c52544ccbeb67b

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.