On 28.10.2008, at 19:38, Mike Day wrote:
On 20/10/08 19:04 +0200, Alexander Graf wrote:
+static int vmrun_interception(struct vcpu_svm *svm, struct kvm_run
*kvm_run)
+{
+ nsvm_printk("VMrun\n");
+ if (nested_svm_check_permissions(svm))
+ return 1;
+
+ svm->next_rip = kvm_rip_read(&svm->vcpu) + 3;
+ skip_emulated_instruction(&svm->vcpu);
+
+ if (nested_svm_do(svm, svm->vmcb->save.rax, 0,
+ NULL, nested_svm_vmrun))
+ return 1;
+
+ if (nested_svm_do(svm, svm->vmcb->control.msrpm_base_pa, 0,
+ NULL, nested_svm_vmrun_msrpm))
+ return 1;
+
+ return 1;
+}
A nitpick, but you could remove the last if() statement and one of
the last two return statements. Unless you forsee more calls to
nested_svm_do() in here.
I had the IOPM merger in here and actually like the fall-through
aspect of the function :-). But I guess this again is a personal taste
thing.
Alex
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html