Re: [PATCH v5 1/2] KVM: X86: Introduce handle_ud()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/04/2018 13:54, David Hildenbrand wrote:
>> +{
>> +	enum emulation_result er;
>> +
>> +	er = emulate_instruction(vcpu, EMULTYPE_TRAP_UD);
>> +	if (er == EMULATE_USER_EXIT)
>> +		return 0;
>> +	if (er != EMULATE_DONE)
>> +		kvm_queue_exception(vcpu, UD_VECTOR);
>> +	return 1;
> I would now actually prefer
> 
> if (er == EMULATE_DONE)
> 	return 1 ...

Why?  The return statement would be duplicated.

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux