From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
Gleb Natapov <gleb@redhat.com>
Subject: Re: [RFC][PATCH] qemu-kvm: Introduce writeback scope for cpu_synchronize_state
Date: Tue, 17 Nov 2009 16:25:22 +0200 [thread overview]
Message-ID: <4B02B252.5080207@redhat.com> (raw)
In-Reply-To: <4B02AF58.4010407@web.de>
On 11/17/2009 04:12 PM, Jan Kiszka wrote:
>>
>>> The alternative would be a complex get&lock/put&unlock + a queue for
>>> async events during the lock + an option to ignore what was queued when
>>> doing a true reset. Back to square #1: we would still need the proposed
>>> high-level interface to communicate the difference between replay and
>>> drop queue.
>>>
>>>
>> There's no need for get+lock / put+unlock; a normal get/put with the
>>
> You need to track when to queue and when to apply directly. Call it lock
> or call it something else.
>
You always queue. When starting vcpu_run() or reading state to
userspace you flush the queue.
The hardware equivalent is posting APIC messages, and the core executing
them.
>> addition that get flushes the queue suffices. To make sure queued
>> events don't affect set you need to stop the entire VM before setting
>> state, but you need to do that anyway for non-rmw writes.
>>
>>
> Well, sounds good, but it will be a non-trivial change in the interface
> semantics. At bare minimum, we would need a new mp_state interface. If
> we would count mp_state to our new event structure (hmm...), then we
> could confine the semantical changes to that new IOCTL pair. But how to
> deal with existing KVM kernels with their mp_state interface? It's a bit
> like the vcpu state thing: we are already down a specific road, and it's
> hard to turn around.
>
I think we're not on the same page here. As I see it, no interface
change is needed at all.
It's true that existing kernels don't handle this properly, which is why
I said I'm willing to treat it as a bug (and thus the -stable treatment
etc.). I admit it's a stretch since this is not going to be trivial
(though I think less complex that you believe).
Putting mp_state into the events structure is reasonable regardless of
this issue (and doable since we haven't pushed it to 2.6.33 yet). But I
want to understand why you think it's needed.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-11-17 14:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 17:00 [RFC][PATCH] qemu-kvm: Introduce writeback scope for cpu_synchronize_state Jan Kiszka
2009-11-16 18:20 ` Alexander Graf
2009-11-16 19:14 ` Avi Kivity
2009-11-16 21:22 ` Jan Kiszka
2009-11-17 8:05 ` Avi Kivity
2009-11-17 8:14 ` Jan Kiszka
2009-11-17 8:37 ` Avi Kivity
2009-11-17 9:16 ` Jan Kiszka
2009-11-17 12:37 ` Avi Kivity
2009-11-17 13:05 ` Jan Kiszka
2009-11-17 13:28 ` Avi Kivity
2009-11-17 14:12 ` Jan Kiszka
2009-11-17 14:25 ` Avi Kivity [this message]
2009-11-17 16:50 ` Jan Kiszka
2009-11-17 16:58 ` Jan Kiszka
2009-11-18 13:48 ` Avi Kivity
2009-11-17 16:59 ` Avi Kivity
2009-11-18 9:50 ` Jan Kiszka
2009-11-18 13:46 ` 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=4B02B252.5080207@redhat.com \
--to=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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