All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: Re: [PATCH] hw/input/tsc210x: Don't abort on bad SPI word widths
Date: Mon, 21 Feb 2022 15:43:50 +0000	[thread overview]
Message-ID: <87sfscmdhg.fsf@linaro.org> (raw)
In-Reply-To: <20220221140750.514557-1-peter.maydell@linaro.org>


Peter Maydell <peter.maydell@linaro.org> writes:

> The tsc210x doesn't support anything other than 16-bit reads on the
> SPI bus, but the guest can program the SPI controller to attempt
> them anyway. If this happens, don't abort QEMU, just log this as
> a guest error.
>
> This fixes our machine_arm_n8x0.py:N8x0Machine.test_n800
> acceptance test, which hits this assertion.
>
> The reason we hit the assertion is because the guest kernel thinks
> there is a TSC2005 on this SPI bus address, not a TSC210x.  (The n810
> *does* have a TSC2005 at this address.) The TSC2005 supports the
> 24-bit accesses which the guest driver makes, and the TSC210x does
> not (that is, our TSC210x emulation is not missing support for a word
> width the hardware can handle).  It's not clear whether the problem
> here is that the guest kernel incorrectly thinks the n800 has the
> same device at this SPI bus address as the n810, or that QEMU's n810
> board model doesn't get the SPI devices right.  At this late date
> there no longer appears to be any reliable information on the web
> about the hardware behaviour, but I am inclined to think this is a
> guest kernel bug.  In any case, we prefer not to abort QEMU for
> guest-triggerable conditions, so logging the error is the right thing
> to do.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/736
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée

WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Cleber Rosa" <crosa@redhat.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH] hw/input/tsc210x: Don't abort on bad SPI word widths
Date: Mon, 21 Feb 2022 15:43:50 +0000	[thread overview]
Message-ID: <87sfscmdhg.fsf@linaro.org> (raw)
In-Reply-To: <20220221140750.514557-1-peter.maydell@linaro.org>


Peter Maydell <peter.maydell@linaro.org> writes:

> The tsc210x doesn't support anything other than 16-bit reads on the
> SPI bus, but the guest can program the SPI controller to attempt
> them anyway. If this happens, don't abort QEMU, just log this as
> a guest error.
>
> This fixes our machine_arm_n8x0.py:N8x0Machine.test_n800
> acceptance test, which hits this assertion.
>
> The reason we hit the assertion is because the guest kernel thinks
> there is a TSC2005 on this SPI bus address, not a TSC210x.  (The n810
> *does* have a TSC2005 at this address.) The TSC2005 supports the
> 24-bit accesses which the guest driver makes, and the TSC210x does
> not (that is, our TSC210x emulation is not missing support for a word
> width the hardware can handle).  It's not clear whether the problem
> here is that the guest kernel incorrectly thinks the n800 has the
> same device at this SPI bus address as the n810, or that QEMU's n810
> board model doesn't get the SPI devices right.  At this late date
> there no longer appears to be any reliable information on the web
> about the hardware behaviour, but I am inclined to think this is a
> guest kernel bug.  In any case, we prefer not to abort QEMU for
> guest-triggerable conditions, so logging the error is the right thing
> to do.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/736
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée


  reply	other threads:[~2022-02-21 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 14:07 [PATCH] hw/input/tsc210x: Don't abort on bad SPI word widths Peter Maydell
2022-02-21 15:43 ` Alex Bennée [this message]
2022-02-21 15:43   ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfscmdhg.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.