From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4 0/6] Nonatomic interrupt injection Date: Sun, 19 Sep 2010 12:09:32 +0200 Message-ID: <4C95E15C.7030103@redhat.com> References: <1283168222-2242-1-git-send-email-avi@redhat.com> <4C921D17.3010603@redhat.com> <20100917191254.GA22281@amt.cnet> <4C95D714.9080408@redhat.com> <4C95D7B2.7010903@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Gleb Natapov To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55229 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870Ab0ISKJg (ORCPT ); Sun, 19 Sep 2010 06:09:36 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8JA9a70002488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 19 Sep 2010 06:09:36 -0400 In-Reply-To: <4C95D7B2.7010903@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/19/2010 11:28 AM, Avi Kivity wrote: > On 09/19/2010 11:25 AM, Avi Kivity wrote: >> >> Let's assume that this is so (I'll check). > > It's trivially so. If a completion causes an interrupt to be raised, > the vcpu's apic code is executed in the iothread context. > > However, that's a bug even with the optimization removed: iothread vcpu ioapic interrrupt apic: set isr mov $large_value, cr8 on_vcpu(inject) inject interrupt even though cr8 inhibits it Setting the isr and injecting the interrupt should be an atomic operation (easily done be running the apic code on the vcpu thread). -- error compiling committee.c: too many arguments to function