From owner-svn-src-head@FreeBSD.ORG Sun Jul 20 16:37:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6ED57F47; Sun, 20 Jul 2014 16:37:47 +0000 (UTC) Received: from mail-qa0-x230.google.com (mail-qa0-x230.google.com [IPv6:2607:f8b0:400d:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E19562442; Sun, 20 Jul 2014 16:37:46 +0000 (UTC) Received: by mail-qa0-f48.google.com with SMTP id m5so4408098qaj.21 for ; Sun, 20 Jul 2014 09:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=41sUlijyg8JhWpmVDKKU7lBviJ0pTw+t6HgaW+lB2FQ=; b=F7xGYHNk8CUxTPLZNpacZ9e3Ymu7dVMv8BKyo3vESC3ozfspSB6Syi9Kls2X5Y8jUq tXPwY+I2L9FRe5kfRRcZDPsOKBL0NZ70DDipYPkFH3FeIcE7xlJQZCiFMZ7SbN206QVi 6SmG7QZNv6c34Lr8vuQmXOeo0OOkjA40nJH0zrNNJXoKOdtSoTwNmS4KhtG+A+qlvTse TMk99DAXldbHQ1dE7mE8Z+5RUA5L6i15V+BngyP805MqPeo/Fc0udCQZgvKlh5oZ4yKM YDLAYV+5j7yWQJ1/1Nz6QzZ0YYtuPmm9SOVENBNCPPMv0pYeewLdPWJWFOHti+Bp6c6W TLMQ== MIME-Version: 1.0 X-Received: by 10.140.40.165 with SMTP id x34mr29875881qgx.23.1405874265953; Sun, 20 Jul 2014 09:37:45 -0700 (PDT) Received: by 10.140.48.37 with HTTP; Sun, 20 Jul 2014 09:37:45 -0700 (PDT) In-Reply-To: <20140720142354.GA1205@mole.fafoe.narf.at> References: <201407192059.s6JKx8un072543@svn.freebsd.org> <20140720142354.GA1205@mole.fafoe.narf.at> Date: Sun, 20 Jul 2014 09:37:45 -0700 Message-ID: Subject: Re: svn commit: r268889 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve usr.sbin/bhyvectl From: Neel Natu To: Stefan Farfeleder Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Neel Natu X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 16:37:47 -0000 Hi, On Sun, Jul 20, 2014 at 7:23 AM, Stefan Farfeleder wrote: > Hi, > > On Sat, Jul 19, 2014 at 08:59:08PM +0000, Neel Natu wrote: >> Author: neel >> Date: Sat Jul 19 20:59:08 2014 >> New Revision: 268889 >> URL: http://svnweb.freebsd.org/changeset/base/268889 > > > >> Modified: head/sys/amd64/vmm/intel/vmx.c >> ============================================================================== >> --- head/sys/amd64/vmm/intel/vmx.c Sat Jul 19 20:55:13 2014 (r268888) >> +++ head/sys/amd64/vmm/intel/vmx.c Sat Jul 19 20:59:08 2014 (r268889) >> @@ -1213,22 +1213,31 @@ vmx_inject_interrupts(struct vmx *vmx, i >> { >> struct vm_exception exc; >> int vector, need_nmi_exiting, extint_pending; >> - uint64_t rflags; >> + uint64_t rflags, entryinfo; >> uint32_t gi, info; >> >> - if (vm_exception_pending(vmx->vm, vcpu, &exc)) { >> - KASSERT(exc.vector >= 0 && exc.vector < 32, >> - ("%s: invalid exception vector %d", __func__, exc.vector)); >> + if (vm_entry_intinfo(vmx->vm, vcpu, &entryinfo)) { >> + KASSERT((entryinfo & VMCS_INTR_VALID) != 0, ("%s: entry " >> + "intinfo is not valid: %#lx", __func__, entryinfo)); >> >> info = vmcs_read(VMCS_ENTRY_INTR_INFO); >> KASSERT((info & VMCS_INTR_VALID) == 0, ("%s: cannot inject " >> "pending exception %d: %#x", __func__, exc.vector, info)); >> > > /usr/src/sys/modules/vmm/../../amd64/vmm/intel/vmx.c:1214:22: error: unused variable 'exc' [-Werror,-Wunused-variable] > struct vm_exception exc; > ^ > 1 error generated. > > Printing the uninitialised object in the KASSERT is most probably wrong. > Fixed in r268922. best Neel > BR, > Stefan