From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC][PATCH] qemu-kvm: Introduce writeback scope for cpu_synchronize_state Date: Tue, 17 Nov 2009 14:37:04 +0200 Message-ID: <4B0298F0.3080007@redhat.com> References: <4B018542.3020602@siemens.com> <4B01A487.3020808@redhat.com> <4B01C2B0.3000205@web.de> <4B02592C.6060004@redhat.com> <4B025B50.4070505@web.de> <4B0260D7.1060107@redhat.com> <4B026A03.4080600@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Gleb Natapov To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39931 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548AbZKQMg7 (ORCPT ); Tue, 17 Nov 2009 07:36:59 -0500 In-Reply-To: <4B026A03.4080600@web.de> Sender: kvm-owner@vger.kernel.org List-ID: 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. -- error compiling committee.c: too many arguments to function