Re: [PATCH 1/2] KVM: x86 emulator: put register operand write back to a function

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

 



 On 08/16/2010 04:58 AM, Wei Yongjun wrote:
>     
>> It's cleaner to take val and bytes from struct operand, and do the
>> assignment from the callers, no?
>>   
> take val and bytes from struct operand may have other issue, when we
> writeback
> the source register, we need do the assignment from the caller, and then
> change
> the val back before write src val to dst val. Such as xadd:
> c->src.val = c->dst.val;
> write_register_operand(&c->src);
> c->src.val = c->src.orig_val;
> goto add;

Or avoid the 'goto add'. XADD is not ADD.

write_register_operand(struct operand *) is easy to understand. With the
two additional arguments it becomes confusing since it uses some parts
of the operand but ignores others.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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