From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 5/6] x86: Enable ack interrupt on vmexit Date: Sun, 25 Nov 2012 14:55:26 +0200 Message-ID: <50B2153E.2040003@redhat.com> References: <1353485379-6823-1-git-send-email-yang.z.zhang@intel.com> <1353485379-6823-6-git-send-email-yang.z.zhang@intel.com> <20121122152201.GH21208@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Yang Zhang , kvm@vger.kernel.org, mtosatti@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12795 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752347Ab2KYMza (ORCPT ); Sun, 25 Nov 2012 07:55:30 -0500 In-Reply-To: <20121122152201.GH21208@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/22/2012 05:22 PM, Gleb Natapov wrote: > On Wed, Nov 21, 2012 at 04:09:38PM +0800, Yang Zhang wrote: >> Ack interrupt on vmexit is required by Posted Interrupt. With it, >> when external interrupt caused vmexit, the cpu will acknowledge the >> interrupt controller and save the interrupt's vector in vmcs. >> >> There are several approaches to enable it. This patch uses a simply >> way: re-generate an interrupt via self ipi. >> >> >> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c >> index 7949d21..f6ef090 100644 >> --- a/arch/x86/kvm/vmx.c >> +++ b/arch/x86/kvm/vmx.c >> @@ -2525,7 +2525,8 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) >> #ifdef CONFIG_X86_64 >> min |= VM_EXIT_HOST_ADDR_SPACE_SIZE; >> #endif >> - opt = VM_EXIT_SAVE_IA32_PAT | VM_EXIT_LOAD_IA32_PAT; >> + opt = VM_EXIT_SAVE_IA32_PAT | VM_EXIT_LOAD_IA32_PAT | >> + VM_EXIT_ACK_INTR_ON_EXIT; > Always? Do it only if posted interrupts are actually available > and going to be used. Why not always? Better to have a single code path for host interrupts (and as Yang notes, the new path is faster as well). -- error compiling committee.c: too many arguments to function