Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2019 09:51:09 +0800
From:      Marcelo Araujo <araujobsdport@gmail.com>
To:        Conrad Meyer <cem@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r345158 - head/usr.sbin/bhyve
Message-ID:  <CAOfEmZjpt0K5krJFjKx0z5M8kp=ze9FWNJPPX_C8yjAD13MZUw@mail.gmail.com>
In-Reply-To: <201903142108.x2EL8mGv018392@repo.freebsd.org>
References:  <201903142108.x2EL8mGv018392@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Em sex, 15 de mar de 2019 =C3=A0s 05:09, Conrad Meyer <cem@freebsd.org> esc=
reveu:

> Author: cem
> Date: Thu Mar 14 21:08:48 2019
> New Revision: 345158
> URL: https://svnweb.freebsd.org/changeset/base/345158
>
> Log:
>   bhyve(8): Fix uart emulation bug
>
>   THRE is always asserted in LSR reads, so REG_IER writes that raise
>   IER_ETXRDY must also set thre_int_pending.
>
>   Reported by:  Illumos, according to emaste@
>                 https://twitter.com/ed_maste/status/1106195949087584258
>   MFC after:    2 weeks
>
> Modified:
>   head/usr.sbin/bhyve/uart_emul.c
>
> Modified: head/usr.sbin/bhyve/uart_emul.c
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/usr.sbin/bhyve/uart_emul.c     Thu Mar 14 20:32:48 2019
> (r345157)
> +++ head/usr.sbin/bhyve/uart_emul.c     Thu Mar 14 21:08:48 2019
> (r345158)
> @@ -431,6 +431,9 @@ uart_write(struct uart_softc *sc, int offset, uint8_t
>                 sc->thre_int_pending =3D true;
>                 break;
>         case REG_IER:
> +               /* Set pending when IER_ETXRDY is raised (edge-triggered)=
.
> */
> +               if ((sc->ier & IER_ETXRDY) =3D=3D 0 && (value & IER_ETXRD=
Y) !=3D
> 0)
> +                       sc->thre_int_pending =3D true;
>                 /*
>                  * Apply mask so that bits 4-7 are 0
>                  * Also enables bits 0-3 only if they're 1
>
>
Hi cem@,

FYI: https://svnweb.freebsd.org/base?view=3Drevision&revision=3D344057

So there is some license concern around this patch, core@ reverted my first
attempt to import this patch from Illumos.

I guess core@ will ping you soon to do the same.

There is a review made by the Illumos guys:
https://reviews.freebsd.org/D19499
Pending now bhyve maintainer to approve it.

Dark days, we had 2 committers trying to fix the same thing and our hands
are tied.


Best,
--=20

--=20
Marcelo Araujo            (__)araujo@FreeBSD.org
\\\'',)http://www.FreeBSD.org <http://www.freebsd.org/>;   \/  \ ^
Power To Server.         .\. /_)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfEmZjpt0K5krJFjKx0z5M8kp=ze9FWNJPPX_C8yjAD13MZUw>