Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jul 2014 09:47:29 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Neel Natu <neelnatu@gmail.com>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Stefan Farfeleder <stefanf@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Neel Natu <neel@freebsd.org>
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
Message-ID:  <CAJ-VmonTy3ZcPOgsVqYSKq4BB4681ZJa%2BT0Bhowt_BU0WrvB3w@mail.gmail.com>
In-Reply-To: <CAFgRE9GzCCOQoVNTcGKg22w_Oij98gVC4_ugx2RaMxM3F1XTXg@mail.gmail.com>
References:  <201407192059.s6JKx8un072543@svn.freebsd.org> <20140720142354.GA1205@mole.fafoe.narf.at> <CAFgRE9GzCCOQoVNTcGKg22w_Oij98gVC4_ugx2RaMxM3F1XTXg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks!


-a


On 20 July 2014 09:37, Neel Natu <neelnatu@gmail.com> wrote:
> Hi,
>
> On Sun, Jul 20, 2014 at 7:23 AM, Stefan Farfeleder <stefanf@freebsd.org> 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
>>
>> <snip>
>>
>>> 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
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonTy3ZcPOgsVqYSKq4BB4681ZJa%2BT0Bhowt_BU0WrvB3w>