All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
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 14:05:44 +0100	[thread overview]
Message-ID: <4B029FA8.5080205@web.de> (raw)
In-Reply-To: <4B0298F0.3080007@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

Avi Kivity wrote:
> On 11/17/2009 11:16 AM, Jan Kiszka wrote:
>>
>>> That's because qemu has no need for this.  But kvm is more than just
>>> serving qemu, we try to be more general.  That said, I can't really see
>>> anyone wanting to arbitrarily inject an exception.
>>>      
>> Well, the current API comes with millions of ways to shoot yourself into
>> the foot. I don't think we can avoid them all.
>>    
> 
> It would be nice to make the API saner.  Do you know of more holes?
> 
>>> The current interface is subtly dangerous, you can't run set(get()) as
>>> you would expect.
>>>
>>> (well you can't with the lapic or the tsc msr either...)
>>>
>>>      
>> We may start documenting such dependency in kvm/api.txt. On the other
>> hand, if you have a get/set interface vs. an inject channel, I think
>> it's obvious that one can overwrite the other.
>>    
> 
> Problem is, the inject channels are implied (APIC messages in smp
> guests).  Documentation is good, but if we can avoid it that's better.
> 
> Note the only way to rmw vcpu events during smp is pausing the guest,
> because of this race.

That's what qemu does on reset and load.

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.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-11-17 13:05 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 [this message]
2009-11-17 13:28                 ` Avi Kivity
2009-11-17 14:12                   ` Jan Kiszka
2009-11-17 14:25                     ` Avi Kivity
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=4B029FA8.5080205@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --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 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.