public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Cc: Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: Question on skip_emulated_instructions()
Date: Thu, 8 Apr 2010 09:56:20 +0300	[thread overview]
Message-ID: <20100408065620.GH303@redhat.com> (raw)
In-Reply-To: <4BBD6959.6080003@lab.ntt.co.jp>

On Thu, Apr 08, 2010 at 02:27:53PM +0900, Yoshiaki Tamura wrote:
> >Currently we complete instructions for output operations and leave them
> >incomplete for input operations. Deferring completion for output
> >operations should work, except it may break the vmware backdoor port
> >(see hw/vmport.c), which changes register state following an output
> >instruction, and KVM_EXIT_TPR_ACCESS, where userspace reads the state
> >following a write instruction.
> >
> >Do you really need to transfer the vcpu state before the instruction, or
> >do you just need a consistent state? If the latter, then you can get
> >away by posting a signal and re-entering the guest. kvm will complete
> >the instruction and exit immediately, and you will have fully consistent
> >state.
> 
> The requirement is that the guest must always be able to replay at
> least the instruction which triggered the synchronization on the
> primary.  From that point of view, I think I need to transfer the
> vcpu state before the instruction.  If I post a signal and let the
> guest or emulator proceed, I'm not sure whether the guest on the
> secondary can be replay as expected.  Please point out if I were
> misunderstanding.
All you need is some consistent sate to restart VM from, no? So if you
transfer VM state after instruction that caused IO is completed you can
restart VM on secondary from that state in case primary fails. I guess
my question is: Can you make synchronization point to be immediately after
IO instruction instead of before?

--
			Gleb.

  parent reply	other threads:[~2010-04-08  6:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06  4:11 Question on skip_emulated_instructions() Yoshiaki Tamura
2010-04-06 10:05 ` Gleb Natapov
2010-04-07  6:25   ` Yoshiaki Tamura
2010-04-07 15:43     ` Gleb Natapov
2010-04-07 17:21       ` Yoshiaki Tamura
2010-04-07 17:37         ` Avi Kivity
2010-04-08  5:27           ` Yoshiaki Tamura
2010-04-08  5:41             ` Gleb Natapov
2010-04-08  6:18               ` Yoshiaki Tamura
2010-04-08  6:56             ` Gleb Natapov [this message]
2010-04-08  7:30               ` Yoshiaki Tamura
2010-04-08  7:37                 ` Avi Kivity
2010-04-08  8:30                   ` Yoshiaki Tamura
2010-04-08  8:38                     ` Avi Kivity
2010-04-08  7:17             ` Avi Kivity
2010-04-08  7:19               ` Gleb Natapov
2010-04-08  8:10                 ` Yoshiaki Tamura
2010-04-08  8:40                   ` Avi Kivity
2010-04-08  9:14                     ` Yoshiaki Tamura
2010-04-08 11:49                       ` Avi Kivity
2010-04-08 13:42                         ` Yoshiaki Tamura
2010-04-08 13:47                           ` 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=20100408065620.GH303@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=tamura.yoshiaki@lab.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox