[Qemu-block] [PATCH] nvme: Only generate interupt if warranted

2018-11-25 Thread Guenter Roeck
So far the code generates interrupts even if it doesn't pass any new information to the user. This can result in spurious interrupts as sometimes observed with Linux. Only generate interrupts if warranted, ie if anything new is passed to the emulated code. Signed-off-by: Guenter Roeck --- hw

Re: [Qemu-block] [PATCH] nvme: Fix spurious interrupts

2018-11-26 Thread Guenter Roeck
if there are un-acknowledged > completion queue entries available. > > Reported-by: Guenter Roeck > Signed-off-by: Keith Busch Tested-by: Guenter Roeck > --- > hw/block/nvme.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/block/n

Re: [Qemu-block] [PATCH] nvme: Only generate interupt if warranted

2018-11-26 Thread Guenter Roeck
Hi Keith, On Mon, Nov 26, 2018 at 09:17:17AM -0700, Keith Busch wrote: > On Sun, Nov 25, 2018 at 03:03:55PM -0800, Guenter Roeck wrote: > > So far the code generates interrupts even if it doesn't pass any new > > information to the user. This can result in spurious interrupts a

Re: Question about (and problem with) pflash data access

2020-02-13 Thread Guenter Roeck
On 2/13/20 1:51 AM, Paolo Bonzini wrote: On 13/02/20 08:40, Alexey Kardashevskiy wrote: memory-region: system    - (prio 0, i/o): system -01ff (prio 0, romd): omap_sx1.flash0-1 -01ff (prio 0,

Re: Question about (and problem with) pflash data access

2020-02-13 Thread Guenter Roeck
On Thu, Feb 13, 2020 at 04:24:24PM +0100, Philippe Mathieu-Daudé wrote: > On 2/13/20 3:39 PM, Peter Maydell wrote: > > On Thu, 13 Feb 2020 at 14:26, Guenter Roeck wrote: > > > What really puzzles me is that there is no trace output for > > > flash data acces

Question about (and problem with) pflash data access

2020-02-12 Thread Guenter Roeck
Hi, I have been playing with pflash recently. For the most part it works, but I do have an odd problem when trying to instantiate pflash on sx1. My data file looks as follows. 000 0001 020 * 0002000 0002

Re: [PATCH 2/3] m25p80: Improve command handling for Jedec and unsupported commands

2020-02-05 Thread Guenter Roeck
On Wed, Feb 05, 2020 at 11:08:07AM +0100, Cédric Le Goater wrote: > On 2/4/20 3:28 PM, Guenter Roeck wrote: > > On 2/4/20 12:53 AM, Cédric Le Goater wrote: > >> On 2/3/20 7:09 PM, Guenter Roeck wrote: > >>> Always report 6 bytes of JEDEC da

Re: [PATCH 1/3] m25p80: Convert to support tracing

2020-02-05 Thread Guenter Roeck
On Wed, Feb 05, 2020 at 06:10:44PM +0100, Cédric Le Goater wrote: > On 2/5/20 5:35 PM, Guenter Roeck wrote: > > On Wed, Feb 05, 2020 at 11:05:04AM +0100, Cédric Le Goater wrote: > >> On 2/3/20 7:09 PM, Guenter Roeck wrote: > >>> While at it, add some trace m

Re: [PATCH 2/3] m25p80: Improve command handling for Jedec and unsupported commands

2020-02-06 Thread Guenter Roeck
On 2/5/20 11:04 PM, Joel Stanley wrote: On Wed, 5 Feb 2020 at 17:43, Guenter Roeck wrote: On Wed, Feb 05, 2020 at 11:08:07AM +0100, Cédric Le Goater wrote: ok. we will need to model SFDP one day. Are you using the OpenBMC images or do you have your own ? I am running images built from

[PATCH v2 1/4] m25p80: Convert to support tracing

2020-02-06 Thread Guenter Roeck
While at it, add some trace messages to help debug problems seen when running the latest Linux kernel. Signed-off-by: Guenter Roeck --- v2: Print pointer to Flash data structure as flash ID with each trace message to support systems with more than one instantiated flash. hw/block/m25p80.c

[PATCH v2 3/4] m25p80: Improve command handling for unsupported commands

2020-02-06 Thread Guenter Roeck
encountering an unsupported command. Signed-off-by: Guenter Roeck --- v2: Split patch into two parts; improved description. hw/block/m25p80.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 53bf63856f..8227088441 100644 --- a/hw/block/m25p80.c +++ b/hw

[PATCH v2 2/4] m25p80: Improve command handling for Jedec commands

2020-02-06 Thread Guenter Roeck
the problem, always report up to 6 bytes of JEDEC data. Fill remaining data with 0. Signed-off-by: Guenter Roeck --- v2: Split patch into two parts; improved decription hw/block/m25p80.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80

[PATCH v2 4/4] aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command

2020-02-06 Thread Guenter Roeck
speed/smc: snoop SPI transfers to fake dummy cycles") Reviewed-by: Cédric Le Goater Signed-off-by: Guenter Roeck --- v2: No change hw/ssi/aspeed_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 23c8d2f062..0444570

[PATCH 2/3] m25p80: Improve command handling for Jedec and unsupported commands

2020-02-03 Thread Guenter Roeck
6 bytes, and with all unsupported commands. Signed-off-by: Guenter Roeck --- hw/block/m25p80.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 63e050d7d3..aca75edcc1 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c

[PATCH 1/3] m25p80: Convert to support tracing

2020-02-03 Thread Guenter Roeck
While at it, add some trace messages to help debug problems seen when running the latest Linux kernel. Signed-off-by: Guenter Roeck --- hw/block/m25p80.c | 48 --- hw/block/trace-events | 16 +++ 2 files changed, 38 insertions(+), 26

[PATCH 3/3] aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command

2020-02-03 Thread Guenter Roeck
The Linux kernel recently started using FAST_READ_4 commands. This results in flash read failures. At the same time, the m25p80 emulation is seen to read 8 more bytes than expected. Adjusting the expected number of dummy cycles to match FAST_READ fixes the problem. Signed-off-by: Guenter Roeck

Re: [PATCH 1/3] m25p80: Convert to support tracing

2020-02-05 Thread Guenter Roeck
On Wed, Feb 05, 2020 at 11:05:04AM +0100, Cédric Le Goater wrote: > On 2/3/20 7:09 PM, Guenter Roeck wrote: > > While at it, add some trace messages to help debug problems > > seen when running the latest Linux kernel. > > In case you resend, It would be nice to printout a fl

Re: [PATCH 2/3] m25p80: Improve command handling for Jedec and unsupported commands

2020-02-04 Thread Guenter Roeck
On 2/4/20 12:53 AM, Cédric Le Goater wrote: On 2/3/20 7:09 PM, Guenter Roeck wrote: Always report 6 bytes of JEDEC data. Fill remaining data with 0. For unsupported commands, keep sending a value of 0 until the chip is deselected. Both changes avoid attempts to decode random commands. Up

Re: [PATCH 1/3] m25p80: Convert to support tracing

2020-02-04 Thread Guenter Roeck
On 2/3/20 11:16 PM, Cédric Le Goater wrote: On 2/3/20 7:09 PM, Guenter Roeck wrote: While at it, add some trace messages to help debug problems seen when running the latest Linux kernel. Signed-off-by: Guenter Roeck Reviewed-by: Cédric Le Goater We have been chasing a bug for years

Re: [PATCH 3/3] aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command

2020-02-04 Thread Guenter Roeck
On 2/3/20 11:45 PM, Cédric Le Goater wrote: On 2/3/20 7:09 PM, Guenter Roeck wrote: The Linux kernel recently started using FAST_READ_4 commands. This results in flash read failures. At the same time, the m25p80 emulation is seen to read 8 more bytes than expected. Adjusting the expected number

Re: Question about (and problem with) pflash data access

2020-02-12 Thread Guenter Roeck
On Wed, Feb 12, 2020 at 10:39:30PM +0100, Philippe Mathieu-Daudé wrote: > Cc'ing Jean-Christophe and Peter. > > On 2/12/20 7:46 PM, Guenter Roeck wrote: > > Hi, > > > > I have been playing with pflash recently. For the most part it works, > > but I d

Re: [PATCH v2 2/4] m25p80: Improve command handling for Jedec commands

2020-07-21 Thread Guenter Roeck
On 7/21/20 10:36 AM, Cédric Le Goater wrote: > Hello, > > On 2/6/20 7:32 PM, Guenter Roeck wrote: >> When requesting JEDEC data using the JEDEC_READ command, the Linux kernel >> always requests 6 bytes. The current implementation only returns three >> bytes, and int

[PATCH] pflash: cfi02: Convert debug log to tracing

2020-06-04 Thread Guenter Roeck
When trying to track down problems such as failing unlock sequences it is essential to have a complete trace log. Having part of it as debug output and the rest as trace output is counter-productive. Convert all debug logs to tracing. Signed-off-by: Guenter Roeck --- hw/block/pflash_cfi02.c

Re: [PATCH] m25p80: Add the is25wp256 SFPD table

2023-01-02 Thread Guenter Roeck
On Mon, Jan 02, 2023 at 06:42:03PM +0100, Michael Walle wrote: > Am 2023-01-02 17:23, schrieb Guenter Roeck: > > On Mon, Jan 02, 2023 at 04:43:49PM +0100, Michael Walle wrote: > > > Am 2023-01-02 14:53, schrieb Cédric Le Goater: > > > > On 12/27

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-12 Thread Guenter Roeck
On 1/12/23 05:10, Klaus Jensen wrote: Hi all (linux-nvme, qemu-devel, maintainers), On QEMU riscv64, which does not use MSI/MSI-X and thus relies on pin-based interrupts, I'm seeing occasional completion timeouts, i.e. nvme nvme0: I/O 333 QID 1 timeout, completion polled To rule out issues

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-12 Thread Guenter Roeck
On 1/12/23 09:45, Klaus Jensen wrote: On Jan 12 09:34, Keith Busch wrote: On Thu, Jan 12, 2023 at 02:10:51PM +0100, Klaus Jensen wrote: The pin-based interrupt logic in hw/nvme seems sound enough to me, so I am wondering if there is something going on with the kernel driver (but I certainly

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-12 Thread Guenter Roeck
On 1/12/23 11:27, Keith Busch wrote: On Thu, Jan 12, 2023 at 06:45:55PM +0100, Klaus Jensen wrote: On Jan 12 09:34, Keith Busch wrote: On Thu, Jan 12, 2023 at 02:10:51PM +0100, Klaus Jensen wrote: The pin-based interrupt logic in hw/nvme seems sound enough to me, so I am wondering if there

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-12 Thread Guenter Roeck
On 1/12/23 09:45, Klaus Jensen wrote: On Jan 12 09:34, Keith Busch wrote: On Thu, Jan 12, 2023 at 02:10:51PM +0100, Klaus Jensen wrote: The pin-based interrupt logic in hw/nvme seems sound enough to me, so I am wondering if there is something going on with the kernel driver (but I certainly

Re: [PATCH] m25p80: Add the is25wp256 SFPD table

2023-01-02 Thread Guenter Roeck
2022 at 06:36:02PM +0100, Cédric Le Goater wrote: > > > > > On 12/21/22 13:22, Guenter Roeck wrote: > > > > > > Generated from hardware using the following command and > > > > > > then padding > > > > > > with 0xff to fill out a p

Re: [PATCH v2 3/3] hw/nvme: fix missing cq eventidx update

2022-12-08 Thread Guenter Roeck
rted by Guenter. > > Adding the missing update to the cq eventidx fixes the issue. > > Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") > Cc: qemu-sta...@nongnu.org > Cc: qemu-ri...@nongnu.org > Reported-by: Guenter Roeck > Signed-off-by: Klaus Jen

[PATCH] m25p80: Add the is25wp256 SFPD table

2022-12-21 Thread Guenter Roeck
Generated from hardware using the following command and then padding with 0xff to fill out a power-of-2: xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp Cc: Michael Walle Cc: Tudor Ambarus Signed-off-by: Guenter Roeck --- hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 40

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-17 Thread Guenter Roeck
On Tue, Jan 17, 2023 at 04:18:14PM +, Peter Maydell wrote: > On Tue, 17 Jan 2023 at 16:10, Guenter Roeck wrote: > > > > On Mon, Jan 16, 2023 at 09:58:13PM -0700, Keith Busch wrote: > > > On Mon, Jan 16, 2023 at 10:14:07PM +0100, Klaus Jensen wrote: > > > >

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-19 Thread Guenter Roeck
On 1/19/23 00:02, Klaus Jensen wrote: On Jan 19 08:28, Klaus Jensen wrote: On Jan 18 21:03, Keith Busch wrote: On Thu, Jan 19, 2023 at 01:10:57PM +1000, Alistair Francis wrote: On Thu, Jan 19, 2023 at 12:44 PM Keith Busch wrote: Further up, it says the "interrupt gateway" is responsible

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-17 Thread Guenter Roeck
On Mon, Jan 16, 2023 at 10:14:07PM +0100, Klaus Jensen wrote: [ ... ] > > I noticed that the Linux driver does not use the INTMS/INTMC registers > to mask interrupts on the controller while processing CQEs. While not > required by the spec, it is *recommended* in setups not using MSI-X to >

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-17 Thread Guenter Roeck
On Mon, Jan 16, 2023 at 09:58:13PM -0700, Keith Busch wrote: > On Mon, Jan 16, 2023 at 10:14:07PM +0100, Klaus Jensen wrote: > > I noticed that the Linux driver does not use the INTMS/INTMC registers > > to mask interrupts on the controller while processing CQEs. While not > > required by the

Re: [PATCH] scsi: megasas: Internal cdbs have 16-byte length

2023-03-03 Thread Guenter Roeck
On 3/3/23 01:02, Fiona Ebner wrote: Am 28.02.23 um 18:11 schrieb Guenter Roeck: Host drivers do not necessarily set cdb_len in megasas io commands. With commits 6d1511cea0 ("scsi: Reject commands if the CDB length exceeds buf_len") and fe9d8927e2 ("scsi: Add buf_len parameter

[PATCH] scsi: megasas: Internal cdbs have 16-byte length

2023-02-28 Thread Guenter Roeck
ives because cdb_len is set to 0 by the host driver. Set the cdb length to its actual size to solve the problem. Signed-off-by: Guenter Roeck --- hw/scsi/megasas.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 9c

Re: [PATCH v6 2/3] hw/sd/sdhci: Support big endian SD host controller interfaces

2023-04-29 Thread Guenter Roeck
Hi, On Tue, Nov 01, 2022 at 11:29:33PM +0100, Philippe Mathieu-Daudé wrote: > Some SDHCI IP can be synthetized in various endianness: > https://github.com/u-boot/u-boot/blob/v2021.04/doc/README.fsl-esdhc > > - CONFIG_SYS_FSL_ESDHC_BE > >ESDHC IP is in big-endian mode. Accessing ESDHC

Re: [PATCH v6 2/3] hw/sd/sdhci: Support big endian SD host controller interfaces

2023-04-29 Thread Guenter Roeck
On Sat, Apr 29, 2023 at 01:46:26PM -0700, Guenter Roeck wrote: > Hi, > > On Tue, Nov 01, 2022 at 11:29:33PM +0100, Philippe Mathieu-Daudé wrote: > > Some SDHCI IP can be synthetized in various endianness: > > https://github.com/u-boot/u-boot/blob/v2021.04

Re: [PATCH] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-09 Thread Guenter Roeck
ndian and switch to big endian in sdhci_common_realize() only if there is a matchig big endian variant available. Fixes: c0a55a0c9da2 ("hw/sd/sdhci: Support big endian SD host controller interfaces") Signed-off-by: Bernhard Beschow Tested-by: Guenter Roeck --- hw/sd/sdhci.c | 8 +

Re: [PATCH] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-10 Thread Guenter Roeck
On Mon, Jul 10, 2023 at 12:16:35PM +0200, Philippe Mathieu-Daudé wrote: > On 9/7/23 10:09, Bernhard Beschow wrote: > > Since commit c0a55a0c9da2 "hw/sd/sdhci: Support big endian SD host > > controller > > interfaces" sdhci_common_realize() forces all SD card controllers to use > > either > >

Re: [PATCH] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-24 Thread Guenter Roeck
On 7/24/23 00:18, Bernhard Beschow wrote: Am 16. Juli 2023 19:53:37 UTC schrieb Bernhard Beschow : Am 10. Juli 2023 16:01:46 UTC schrieb Bernhard Beschow : Am 10. Juli 2023 10:16:35 UTC schrieb "Philippe Mathieu-Daudé" : On 9/7/23 10:09, Bernhard Beschow wrote: Since commit

Re: [PATCH] scsi: megasas: Internal cdbs have 16-byte length

2024-02-17 Thread Guenter Roeck
On 2/17/24 01:06, Michael Tokarev wrote: 28.02.2023 20:11, Guenter Roeck wrote: Host drivers do not necessarily set cdb_len in megasas io commands. With commits 6d1511cea0 ("scsi: Reject commands if the CDB length exceeds buf_len") and fe9d8927e2 ("scsi: Add buf_len parameter

Re: [RFC 1/1] hw: tpmtisspi: add SPI support to QEMU TPM implementation

2023-12-13 Thread Guenter Roeck
Hi, On Tue, Aug 02, 2022 at 07:32:41PM -0700, Iris Chen wrote: > From: Iris Chen > > Signed-off-by: Iris Chen > --- Are there any plans to submit a new version of this patch ? Thanks, Guenter > configs/devices/arm-softmmu/default.mak | 1 + > hw/arm/Kconfig | 5

Re: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it

2024-05-03 Thread Guenter Roeck
Hi, On Thu, Feb 08, 2024 at 07:12:40PM +0100, Philippe Mathieu-Daudé wrote: > We should not wire IRQs on unrealized device. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Peter Maydell > Reviewed-by: Yoshinori Sato qemu 9.0 fails to boot Linux from ide/ata drives with the sh4 and