Re: [RFC PATCH 2/2] KVM: x86 emulator: Cleanup emulate_push() writebacks

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

 



On 03/28/2011 06:34 PM, Takuya Yoshikawa wrote:
From: Takuya Yoshikawa<yoshikawa.takuya@xxxxxxxxxxxxx>

Recently, emulate_push family functions started to call writeback()
during their emulation.  This clearly shows that the usual writeback()
which is done at the end of x86_emulate_insn() cannot cover all cases.
Furthermore, suppressing writeback by changing dst operand's type is
not simple when conditional writeback must be taken care of.

This patch improves this situation a bit by making emulate_push()
itself do writeback and removes scattered writebacks from callers.

This is done by splitting the writeback for OP_MEM case out from
writeback() as a new helper function, writeback_to_mem(), and call it
directly from emulate_push().

I think it's easier to just write directly instead of going through 'struct operand'.

Probably emulate_push() should do the write (look at segmented_write() in my 'Emulator segment checks' patchset), and everything else can call that. 'struct operand' is for multiplexing register/memory accesses, which is not the case with the stack.

--
error compiling committee.c: too many arguments to function

--
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