> From: Tamas K Lengyel [mailto:tamas.leng...@zentific.com] > Sent: Friday, July 08, 2016 10:32 AM > > This patch implements sending notification to a monitor subscriber when an > x86/vmx guest executes the CPUID instruction. > > Signed-off-by: Tamas K Lengyel <tamas.leng...@zentific.com>
> @@ -3525,10 +3527,23 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs) > hvm_task_switch((uint16_t)exit_qualification, reasons[source], > ecode); > break; > } > - case EXIT_REASON_CPUID: > - is_pvh_vcpu(v) ? pv_cpuid(regs) : vmx_do_cpuid(regs); > - update_guest_eip(); /* Safe: CPUID */ > + case EXIT_REASON_CPUID: { > + int rc; > + > + if ( is_pvh_vcpu(v) ) > + { > + pv_cpuid(regs); > + rc = 0; > + } > + else > + rc = vmx_do_cpuid(regs); > + > + if ( rc < 0 ) > + goto exit_and_crash; > + if ( !rc ) > + update_guest_eip(); /* Safe: CPUID */ favor a simple comment to explain policies on various rc values, as you have done in other places. Thanks Kevin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel