All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1839367] [NEW] Wrong interrupts generated for I.MX6 FEC controller
@ 2019-08-07 17:46 Aaron Hill
  2021-04-22  7:19 ` [Bug 1839367] " Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aaron Hill @ 2019-08-07 17:46 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

The imx_eth_update function in hw/net/imx_fec.c has the following
comment
(https://github.com/qemu/qemu/blob/864ab314f1d924129d06ac7b571f105a2b76a4b2/hw/net/imx_fec.c#L421-L445):

    /*
     * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_MAC
     * interrupts swapped. This worked with older versions of Linux (4.14
     * and older) since Linux associated both interrupt lines with Ethernet
     * MAC interrupts. Specifically,
     * - Linux 4.15 and later have separate interrupt handlers for the MAC and
     *   timer interrupts. Those versions of Linux fail with versions of QEMU
     *   with swapped interrupt assignments.
     * - In linux 4.14, both interrupt lines were registered with the Ethernet
     *   MAC interrupt handler. As a result, all versions of qemu happen to
     *   work, though that is accidental.
     * - In Linux 4.9 and older, the timer interrupt was registered directly
     *   with the Ethernet MAC interrupt handler. The MAC interrupt was
     *   redirected to a GPIO interrupt to work around erratum ERR006687.
     *   This was implemented using the SOC's IOMUX block. In qemu, this GPIO
     *   interrupt never fired since IOMUX is currently not supported in qemu.
     *   Linux instead received MAC interrupts on the timer interrupt.
     *   As a result, qemu versions with the swapped interrupt assignment work,
     *   albeit accidentally, but qemu versions with the correct interrupt
     *   assignment fail.
     *
     * To ensure that all versions of Linux work, generate ENET_INT_MAC
     * interrrupts on both interrupt lines. This should be changed if and when
     * qemu supports IOMUX.
     */

Unfortunately, this behavior causes the QNX Sabrelite BSP
(http://blackberry.qnx.com/en/developers/bsp) to hang on ethernet
initialization. This is caused by the fact that QEMU is firing the
ENET_INT_TS_TIMER timer interrupt unexpectedly (when the ENET_INT_MAC
flag is set). The BSP functions correctly on the actual hardware, but it
is unable to handle the deliberately incorrect interrupt firing by QEMU.

>From reading the comment, it appears that this behavior is necessary to
support certain versions of Linux. However, it would be very useful to
be able to restore the correct interrupt behavior (possibly via a
command-line flag).

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1839367

Title:
  Wrong interrupts generated for I.MX6 FEC controller

Status in QEMU:
  New

Bug description:
  The imx_eth_update function in hw/net/imx_fec.c has the following
  comment
  (https://github.com/qemu/qemu/blob/864ab314f1d924129d06ac7b571f105a2b76a4b2/hw/net/imx_fec.c#L421-L445):

      /*
       * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_MAC
       * interrupts swapped. This worked with older versions of Linux (4.14
       * and older) since Linux associated both interrupt lines with Ethernet
       * MAC interrupts. Specifically,
       * - Linux 4.15 and later have separate interrupt handlers for the MAC and
       *   timer interrupts. Those versions of Linux fail with versions of QEMU
       *   with swapped interrupt assignments.
       * - In linux 4.14, both interrupt lines were registered with the Ethernet
       *   MAC interrupt handler. As a result, all versions of qemu happen to
       *   work, though that is accidental.
       * - In Linux 4.9 and older, the timer interrupt was registered directly
       *   with the Ethernet MAC interrupt handler. The MAC interrupt was
       *   redirected to a GPIO interrupt to work around erratum ERR006687.
       *   This was implemented using the SOC's IOMUX block. In qemu, this GPIO
       *   interrupt never fired since IOMUX is currently not supported in qemu.
       *   Linux instead received MAC interrupts on the timer interrupt.
       *   As a result, qemu versions with the swapped interrupt assignment work,
       *   albeit accidentally, but qemu versions with the correct interrupt
       *   assignment fail.
       *
       * To ensure that all versions of Linux work, generate ENET_INT_MAC
       * interrrupts on both interrupt lines. This should be changed if and when
       * qemu supports IOMUX.
       */

  Unfortunately, this behavior causes the QNX Sabrelite BSP
  (http://blackberry.qnx.com/en/developers/bsp) to hang on ethernet
  initialization. This is caused by the fact that QEMU is firing the
  ENET_INT_TS_TIMER timer interrupt unexpectedly (when the ENET_INT_MAC
  flag is set). The BSP functions correctly on the actual hardware, but
  it is unable to handle the deliberately incorrect interrupt firing by
  QEMU.

  From reading the comment, it appears that this behavior is necessary
  to support certain versions of Linux. However, it would be very useful
  to be able to restore the correct interrupt behavior (possibly via a
  command-line flag).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1839367/+subscriptions


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1839367] Re: Wrong interrupts generated for I.MX6 FEC controller
  2019-08-07 17:46 [Qemu-devel] [Bug 1839367] [NEW] Wrong interrupts generated for I.MX6 FEC controller Aaron Hill
@ 2021-04-22  7:19 ` Thomas Huth
  2021-04-22  9:24 ` Peter Maydell
  2021-05-09 15:11 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-04-22  7:19 UTC (permalink / raw)
  To: qemu-devel

The QEMU project is currently considering to move its bug tracking to
another system. For this we need to know which bugs are still valid
and which could be closed already. Thus we are setting older bugs to
"Incomplete" now.

If you still think this bug report here is valid, then please switch
the state back to "New" within the next 60 days, otherwise this report
will be marked as "Expired". Or please mark it as "Fix Released" if
the problem has been solved with a newer version of QEMU already.

Thank you and sorry for the inconvenience.


** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1839367

Title:
  Wrong interrupts generated for I.MX6 FEC controller

Status in QEMU:
  Incomplete

Bug description:
  The imx_eth_update function in hw/net/imx_fec.c has the following
  comment
  (https://github.com/qemu/qemu/blob/864ab314f1d924129d06ac7b571f105a2b76a4b2/hw/net/imx_fec.c#L421-L445):

      /*
       * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_MAC
       * interrupts swapped. This worked with older versions of Linux (4.14
       * and older) since Linux associated both interrupt lines with Ethernet
       * MAC interrupts. Specifically,
       * - Linux 4.15 and later have separate interrupt handlers for the MAC and
       *   timer interrupts. Those versions of Linux fail with versions of QEMU
       *   with swapped interrupt assignments.
       * - In linux 4.14, both interrupt lines were registered with the Ethernet
       *   MAC interrupt handler. As a result, all versions of qemu happen to
       *   work, though that is accidental.
       * - In Linux 4.9 and older, the timer interrupt was registered directly
       *   with the Ethernet MAC interrupt handler. The MAC interrupt was
       *   redirected to a GPIO interrupt to work around erratum ERR006687.
       *   This was implemented using the SOC's IOMUX block. In qemu, this GPIO
       *   interrupt never fired since IOMUX is currently not supported in qemu.
       *   Linux instead received MAC interrupts on the timer interrupt.
       *   As a result, qemu versions with the swapped interrupt assignment work,
       *   albeit accidentally, but qemu versions with the correct interrupt
       *   assignment fail.
       *
       * To ensure that all versions of Linux work, generate ENET_INT_MAC
       * interrrupts on both interrupt lines. This should be changed if and when
       * qemu supports IOMUX.
       */

  Unfortunately, this behavior causes the QNX Sabrelite BSP
  (http://blackberry.qnx.com/en/developers/bsp) to hang on ethernet
  initialization. This is caused by the fact that QEMU is firing the
  ENET_INT_TS_TIMER timer interrupt unexpectedly (when the ENET_INT_MAC
  flag is set). The BSP functions correctly on the actual hardware, but
  it is unable to handle the deliberately incorrect interrupt firing by
  QEMU.

  From reading the comment, it appears that this behavior is necessary
  to support certain versions of Linux. However, it would be very useful
  to be able to restore the correct interrupt behavior (possibly via a
  command-line flag).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1839367/+subscriptions


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1839367] Re: Wrong interrupts generated for I.MX6 FEC controller
  2019-08-07 17:46 [Qemu-devel] [Bug 1839367] [NEW] Wrong interrupts generated for I.MX6 FEC controller Aaron Hill
  2021-04-22  7:19 ` [Bug 1839367] " Thomas Huth
@ 2021-04-22  9:24 ` Peter Maydell
  2021-05-09 15:11 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2021-04-22  9:24 UTC (permalink / raw)
  To: qemu-devel

Still a bug.


** Changed in: qemu
       Status: Incomplete => Confirmed

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1839367

Title:
  Wrong interrupts generated for I.MX6 FEC controller

Status in QEMU:
  Confirmed

Bug description:
  The imx_eth_update function in hw/net/imx_fec.c has the following
  comment
  (https://github.com/qemu/qemu/blob/864ab314f1d924129d06ac7b571f105a2b76a4b2/hw/net/imx_fec.c#L421-L445):

      /*
       * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_MAC
       * interrupts swapped. This worked with older versions of Linux (4.14
       * and older) since Linux associated both interrupt lines with Ethernet
       * MAC interrupts. Specifically,
       * - Linux 4.15 and later have separate interrupt handlers for the MAC and
       *   timer interrupts. Those versions of Linux fail with versions of QEMU
       *   with swapped interrupt assignments.
       * - In linux 4.14, both interrupt lines were registered with the Ethernet
       *   MAC interrupt handler. As a result, all versions of qemu happen to
       *   work, though that is accidental.
       * - In Linux 4.9 and older, the timer interrupt was registered directly
       *   with the Ethernet MAC interrupt handler. The MAC interrupt was
       *   redirected to a GPIO interrupt to work around erratum ERR006687.
       *   This was implemented using the SOC's IOMUX block. In qemu, this GPIO
       *   interrupt never fired since IOMUX is currently not supported in qemu.
       *   Linux instead received MAC interrupts on the timer interrupt.
       *   As a result, qemu versions with the swapped interrupt assignment work,
       *   albeit accidentally, but qemu versions with the correct interrupt
       *   assignment fail.
       *
       * To ensure that all versions of Linux work, generate ENET_INT_MAC
       * interrrupts on both interrupt lines. This should be changed if and when
       * qemu supports IOMUX.
       */

  Unfortunately, this behavior causes the QNX Sabrelite BSP
  (http://blackberry.qnx.com/en/developers/bsp) to hang on ethernet
  initialization. This is caused by the fact that QEMU is firing the
  ENET_INT_TS_TIMER timer interrupt unexpectedly (when the ENET_INT_MAC
  flag is set). The BSP functions correctly on the actual hardware, but
  it is unable to handle the deliberately incorrect interrupt firing by
  QEMU.

  From reading the comment, it appears that this behavior is necessary
  to support certain versions of Linux. However, it would be very useful
  to be able to restore the correct interrupt behavior (possibly via a
  command-line flag).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1839367/+subscriptions


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 1839367] Re: Wrong interrupts generated for I.MX6 FEC controller
  2019-08-07 17:46 [Qemu-devel] [Bug 1839367] [NEW] Wrong interrupts generated for I.MX6 FEC controller Aaron Hill
  2021-04-22  7:19 ` [Bug 1839367] " Thomas Huth
  2021-04-22  9:24 ` Peter Maydell
@ 2021-05-09 15:11 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-05-09 15:11 UTC (permalink / raw)
  To: qemu-devel

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/224


** Changed in: qemu
       Status: Confirmed => Expired

** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #224
   https://gitlab.com/qemu-project/qemu/-/issues/224

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1839367

Title:
  Wrong interrupts generated for I.MX6 FEC controller

Status in QEMU:
  Expired

Bug description:
  The imx_eth_update function in hw/net/imx_fec.c has the following
  comment
  (https://github.com/qemu/qemu/blob/864ab314f1d924129d06ac7b571f105a2b76a4b2/hw/net/imx_fec.c#L421-L445):

      /*
       * Previous versions of qemu had the ENET_INT_MAC and ENET_INT_MAC
       * interrupts swapped. This worked with older versions of Linux (4.14
       * and older) since Linux associated both interrupt lines with Ethernet
       * MAC interrupts. Specifically,
       * - Linux 4.15 and later have separate interrupt handlers for the MAC and
       *   timer interrupts. Those versions of Linux fail with versions of QEMU
       *   with swapped interrupt assignments.
       * - In linux 4.14, both interrupt lines were registered with the Ethernet
       *   MAC interrupt handler. As a result, all versions of qemu happen to
       *   work, though that is accidental.
       * - In Linux 4.9 and older, the timer interrupt was registered directly
       *   with the Ethernet MAC interrupt handler. The MAC interrupt was
       *   redirected to a GPIO interrupt to work around erratum ERR006687.
       *   This was implemented using the SOC's IOMUX block. In qemu, this GPIO
       *   interrupt never fired since IOMUX is currently not supported in qemu.
       *   Linux instead received MAC interrupts on the timer interrupt.
       *   As a result, qemu versions with the swapped interrupt assignment work,
       *   albeit accidentally, but qemu versions with the correct interrupt
       *   assignment fail.
       *
       * To ensure that all versions of Linux work, generate ENET_INT_MAC
       * interrrupts on both interrupt lines. This should be changed if and when
       * qemu supports IOMUX.
       */

  Unfortunately, this behavior causes the QNX Sabrelite BSP
  (http://blackberry.qnx.com/en/developers/bsp) to hang on ethernet
  initialization. This is caused by the fact that QEMU is firing the
  ENET_INT_TS_TIMER timer interrupt unexpectedly (when the ENET_INT_MAC
  flag is set). The BSP functions correctly on the actual hardware, but
  it is unable to handle the deliberately incorrect interrupt firing by
  QEMU.

  From reading the comment, it appears that this behavior is necessary
  to support certain versions of Linux. However, it would be very useful
  to be able to restore the correct interrupt behavior (possibly via a
  command-line flag).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1839367/+subscriptions


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-09 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 17:46 [Qemu-devel] [Bug 1839367] [NEW] Wrong interrupts generated for I.MX6 FEC controller Aaron Hill
2021-04-22  7:19 ` [Bug 1839367] " Thomas Huth
2021-04-22  9:24 ` Peter Maydell
2021-05-09 15:11 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.