From owner-svn-src-all@FreeBSD.ORG Tue Jun 10 01:38:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E07A45F; Tue, 10 Jun 2014 01:38:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B3CB2800; Tue, 10 Jun 2014 01:38:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A1c3cq059421; Tue, 10 Jun 2014 01:38:03 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A1c3Ge059420; Tue, 10 Jun 2014 01:38:03 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201406100138.s5A1c3Ge059420@svn.freebsd.org> From: Neel Natu Date: Tue, 10 Jun 2014 01:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267311 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 01:38:03 -0000 Author: neel Date: Tue Jun 10 01:38:02 2014 New Revision: 267311 URL: http://svnweb.freebsd.org/changeset/base/267311 Log: Turn on interrupt window exiting unconditionally when an ExtINT is being injected into the guest. This allows the hypervisor to inject another ExtINT or APIC vector as soon as the guest is able to process interrupts. This change is not to address any correctness issue but to guarantee that any pending APIC vector that was preempted by the ExtINT will be injected as soon as possible. Prior to this change such pending interrupts could be delayed until the next VM exit. Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Jun 10 01:19:48 2014 (r267310) +++ head/sys/amd64/vmm/intel/vmx.c Tue Jun 10 01:38:02 2014 (r267311) @@ -1311,9 +1311,13 @@ vmx_inject_interrupts(struct vmx *vmx, i * have posted another one. If that is the case, set * the Interrupt Window Exiting execution control so * we can inject that one too. + * + * Also, interrupt window exiting allows us to inject any + * pending APIC vector that was preempted by the ExtINT + * as soon as possible. This applies both for the software + * emulated vlapic and the hardware assisted virtual APIC. */ - if (vm_extint_pending(vmx->vm, vcpu)) - vmx_set_int_window_exiting(vmx, vcpu); + vmx_set_int_window_exiting(vmx, vcpu); } VCPU_CTR1(vmx->vm, vcpu, "Injecting hwintr at vector %d", vector);