All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org,
	yoshikawa.takuya@oss.ntt.co.jp, gleb@redhat.com
Subject: Re: [RFC PATCH 2/2] KVM: x86 emulator: Cleanup emulate_push() writebacks
Date: Sun, 03 Apr 2011 17:50:15 +0300	[thread overview]
Message-ID: <4D988927.4020003@redhat.com> (raw)
In-Reply-To: <20110329013407.c7bcadcc.takuya.yoshikawa@gmail.com>

On 03/28/2011 06:34 PM, Takuya Yoshikawa wrote:
> From: Takuya Yoshikawa<yoshikawa.takuya@oss.ntt.co.jp>
>
> 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


  parent reply	other threads:[~2011-04-03 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 16:32 [PATCH 1/2] KVM: x86 emulator: Disable writeback for CMP emulation Takuya Yoshikawa
2011-03-28 16:34 ` [RFC PATCH 2/2] KVM: x86 emulator: Cleanup emulate_push() writebacks Takuya Yoshikawa
2011-03-30  6:51   ` Takuya Yoshikawa
2011-04-03 14:50   ` Avi Kivity [this message]
2011-04-03 15:59     ` Takuya Yoshikawa
2011-04-03 16:04       ` Avi Kivity
2011-04-03 16:09         ` Takuya Yoshikawa
2011-04-03 16:11           ` Avi Kivity
2011-04-03 14:42 ` [PATCH 1/2] KVM: x86 emulator: Disable writeback for CMP emulation Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D988927.4020003@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=takuya.yoshikawa@gmail.com \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.