On 3/7/24 09:39, Luc Michel wrote:
On 18:10 Tue 02 Jul , Philippe Mathieu-Daudé wrote:
"General command" (GEN_CMD, CMD56) is described as:
GEN_CMD is the same as the single block read or write
commands (CMD24 or CMD17). The difference is that [...]
the data block is no
(patches from v42 already reviewed not reposted)
- Addressed review comments from Daniel & Luc wrt migration
- Remove old comment
Philippe Mathieu-Daudé (3):
hw/sd/sdcard: Use spec v3.01 by default
hw/sd/sdcard: Do not store vendor data on block drive (CMD56)
hw/sd/sdcard: Remove left
Commit c3287c0f70 ("hw/sd: Introduce a "sd-card" SPI variant
model") removed the 'spi' property. Remove the comment left
over.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index
be stored overwriting data block
on underlying storage drive. Keep it in a dedicated
'vendor_data[]' array.
Signed-off-by: Philippe Mathieu-Daudé
---
v43: Do not re-use VMSTATE_UNUSED_V (danpb)
v44: Use subsection (Luc)
---
hw/sd/sd.c | 26 +++---
1 file changed,
Recent SDHCI expect cards to support the v3.01 spec
to negociate lower I/O voltage. Select it by default.
Versioned machine types with a version of 9.0 or
earlier retain the old default (spec v2.00).
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Cédric Le Goater
---
v43: update versioned
On 3/7/24 10:51, Philippe Mathieu-Daudé wrote:
"General command" (GEN_CMD, CMD56) is described as:
GEN_CMD is the same as the single block read or write
commands (CMD24 or CMD17). The difference is that [...]
the data block is not a memory payload data but has a
vendo
(patches from v42 already reviewed not reposted)
- Addressed review comments from Daniel & Luc wrt migration
- Remove old comment
Philippe Mathieu-Daudé (3):
hw/sd/sdcard: Remove leftover comment about removed 'spi' Property
hw/sd/sdcard: Use spec v3.01 by default
hw/sd/
Commit c3287c0f70 ("hw/sd: Introduce a "sd-card" SPI variant
model") removed the 'spi' property. Remove the comment left
over.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 4
1 file changed, 4 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index
Recent SDHCI expect cards to support the v3.01 spec
to negociate lower I/O voltage. Select it by default.
Versioned machine types with a version of 9.0 or
earlier retain the old default (spec v2.00).
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Cédric Le Goater
---
v43: update versioned
be stored overwriting data block
on underlying storage drive. Keep it in a dedicated
'vendor_data[]' array.
Signed-off-by: Philippe Mathieu-Daudé
---
v43: Do not re-use VMSTATE_UNUSED_V (danpb)
v44: Use subsection (Luc)
v45: Remove APP_READ_BLOCK/APP_WRITE_BLOCK macros
On 3/7/24 14:24, Manos Pitsidianakis wrote:
On Wed, 03 Jul 2024 11:59, Philippe Mathieu-Daudé
wrote:
"General command" (GEN_CMD, CMD56) is described as:
GEN_CMD is the same as the single block read or write
commands (CMD24 or CMD17). The difference is that [...]
the data bloc
Recent SDHCI expect cards to support the v3.01 spec
to negociate lower I/O voltage. Select it by default.
Versioned machine types with a version of 9.0 or
earlier retain the old default (spec v2.00).
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Cédric Le Goater
---
v43: update versioned
be stored overwriting data block
on underlying storage drive. Handle as RAZ/WI.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 54 --
1 file changed, 20 insertions(+), 34 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index
In preparation of introducing eMMC support which have
different CSD/CID structures, introduce a pair of handlers
in SDCardClass.
Signed-off-by: Philippe Mathieu-Daudé
---
include/hw/sd/sd.h | 2 ++
hw/sd/sd.c | 7 +--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a
The correct command name is 'SD SEND_OP_COND',
rename accordingly.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 04e8fdb262..10f2764a53 100644
--- a/hw/sd/sd.c
+++ b/
In order to keep eMMC model simpler to maintain,
extract common properties and the common code from
class_init to the (internal) TYPE_SDMMC_COMMON.
Update the corresponding QOM cast macros.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sdmmc-internal.h | 3 +++
hw/sd/core.c | 29
(patches from v42 already reviewed not reposted)
Since v45:
- RAZ/WI on GEN_CMD (Luc & Manos)
- Rename sd_cmd_SEND_OP_COND
- Introduce TYPE_SDMMC_COMMON
Philippe Mathieu-Daudé (5):
hw/sd/sdcard: Use spec v3.01 by default
hw/sd/sdcard: Add sd_cmd_GEN_CMD handler (CMD56)
hw/sd/sdcard: Re
On 3/7/24 16:02, Cédric Le Goater wrote:
On 7/3/24 3:43 PM, Philippe Mathieu-Daudé wrote:
In order to keep eMMC model simpler to maintain,
extract common properties and the common code from
class_init to the (internal) TYPE_SDMMC_COMMON.
Update the corresponding QOM cast macros.
Signed-off-by
le changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé
On 5/7/24 14:39, Philippe Mathieu-Daudé wrote:
On 5/7/24 11:08, Thomas Huth wrote:
Now that we've got a "virt" machine for or1k that supports PCI, too,
we can also enable the virtio device aliases like we do on other
similar platforms. This will e.g. help to run the iotests w
On 3/7/24 15:43, Philippe Mathieu-Daudé wrote:
(patches from v42 already reviewed not reposted)
Since v45:
- RAZ/WI on GEN_CMD (Luc & Manos)
- Rename sd_cmd_SEND_OP_COND
- Introduce TYPE_SDMMC_COMMON
Philippe Mathieu-Daudé (5):
hw/sd/sdcard: Use spec v3.01 by default
hw/sd/sdcard:
On 2/7/24 16:08, Philippe Mathieu-Daudé wrote:
Philippe Mathieu-Daudé (4):
hw/sd/npcm7xx_sdhci: Use TYPE_SYSBUS_SDHCI definition
hw/sd/sdhci: Log non-sequencial access as GUEST_ERROR
tests/qtest/npcm7xx_sdhci: Access the card using its published address
hw/sd/sdcard: Generate random
On 3/7/24 15:43, Philippe Mathieu-Daudé wrote:
Philippe Mathieu-Daudé (5):
hw/sd/sdcard: Use spec v3.01 by default
hw/sd/sdcard: Add sd_cmd_GEN_CMD handler (CMD56)
hw/sd/sdcard: Rename sd_cmd_SEND_OP_COND handler
hw/sd/sdcard: Introduce set_csd/set_cid handlers
hw/sd/sdcard
On 6/7/24 13:59, Akihiko Odaki wrote:
On 2024/07/03 2:44, Peter Xu wrote:
On Thu, Jun 27, 2024 at 10:37:52PM +0900, Akihiko Odaki wrote:
A memory region does not use their own reference counters, but instead
piggybacks on another QOM object, "owner" (unless the owner is not the
memory region it
el Stanley (3):
hw/sd/sdcard: Support boot area in emmc image
hw/sd/sdcard: Subtract bootarea size from blk
hw/sd/sdcard: Add boot config support
Luc Michel (1):
hw/sd/sdcard: Implement eMMC sleep state (CMD5)
Philippe Mathieu-Daudé (11):
hw/sd/sdcard: Basis for eMMC support
hw/sd/sdca
From: Philippe Mathieu-Daudé
Add basis for supporting eMMC.
Since eMMC are soldered on boards, it is not user-creatable.
Currently TYPE_EMMC is just a stub, so disabled (marked abstract).
RCA register is initialized to 1, per spec v4.3,
chapter 8.5 "RCA register":
The default va
Per the spec v4.3 these commands are mandatory,
but we don't implement them.
Reviewed-by: Cédric Le Goater
Tested-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20240628070216.92609-85-phi...@linaro.org>
---
hw/sd/sd.c | 9 +
1 file changed, 9
Signed-off-by: Philippe Mathieu-Daudé
Tested-by: Cédric Le Goater
Reviewed-by: Cédric Le Goater
Message-Id: <20240628070216.92609-89-phi...@linaro.org>
---
hw/sd/sd.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 216d
eMMC CID register is slightly different from SD:
- One extra PNM (5 -> 6)
- MDT is only 1 byte (2 -> 1).
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 097c9cc61f..2d737a836f
Tested-by: Cédric Le Goater
Reviewed-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20240628070216.92609-84-phi...@linaro.org>
---
hw/sd/sd.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 91a7
ff-by: Philippe Mathieu-Daudé
Tested-by: Cédric Le Goater
Reviewed-by: Cédric Le Goater
Message-Id: <20240628070216.92609-90-phi...@linaro.org>
---
hw/sd/sd.c | 47 +--
1 file changed, 45 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b
roed at reset
. EXT_CSD_BOOT_INFO
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 50 ++
1 file changed, 18 insertions(+), 32 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index df0e2345c0..2a687977d1 100644
--- a/hw/sd/sd.c
+++ b/h
From: Joel Stanley
The userdata size is derived from the file the user passes on the
command line, but we must take into account the boot areas.
Signed-off-by: Joel Stanley
Signed-off-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
---
Squash in previous?
---
hw/sd/sd.c | 4
From: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20240628070216.92609-86-phi...@linaro.org>
---
hw/sd/sd.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/hw/sd/sd.c b/hw/s
From: Cédric Le Goater
The number of blocks is defined in the lower bits [15:0].
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20240628070216.92609-88-phi...@linaro.org>
---
hw/sd/sd.c | 3 +++
1 file chan
.
Signed-off-by: Sai Pavan Boddu
Signed-off-by: Edgar E. Iglesias
Signed-off-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 56 ++
hw/sd/trace-events | 2 ++
2 files changed, 58
Avoid hardcoding 1MiB boot size in EXT_CSD_BOOT_MULT,
expose it as QOM property.
By default, do not use any size. Board is responsible
to set the boot size property.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw
t, add the sd_uptime_ns() helper.
When the first command is received, check at least 74 clocks
are elapsed (during the identification phase, at a 10kHz rate)
then enable BOOT_MODE in the Ext_CSD register.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c
eMMC CSD register is very similar to SD one.
Most notable change: the version announced is v4.3.
Signed-off-by: Philippe Mathieu-Daudé
---
TODO: comment magic values?
---
hw/sd/sd.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd
Pavan Boddu
Signed-off-by: Edgar E. Iglesias
Signed-off-by: Cédric Le Goater
[PMD: Remove deprecated EXT_CSD_SEC_ERASE_MULT/EXT_CSD_SEC_TRIM_MULT]
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 59 ++
1 file changed, 59 insertions
Now than the implementation is functional, allow
to instantiate it.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 6aa83251f7..4a6e9cc035 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2941,7 +2941,6 @@ static
img,if=mtd,format=raw
Signed-off-by: Joel Stanley
Signed-off-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
---
TODO: Update QEMU command in description
---
include/hw/sd/sd.h | 1 +
hw/sd/sd.c | 33 +
2 files changed, 34 insertions(+)
d
The lower 192 bytes are the Modes segment,
which defines the configuration the card is working in.
Only migrate the Modes segment (192 lower bytes).
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --g
From: Joel Stanley
With this correctly set we can use the enable bit to detect if
partition support is enabled.
Signed-off-by: Joel Stanley
Signed-off-by: Cédric Le Goater
Signed-off-by: Philippe Mathieu-Daudé
---
Also squash?
---
hw/sd/sd.c | 6 ++
1 file changed, 6 insertions(+)
diff
On 9/7/24 17:52, Cédric Le Goater wrote:
On 7/9/24 5:25 PM, Philippe Mathieu-Daudé wrote:
From: Joel Stanley
With this correctly set we can use the enable bit to detect if
partition support is enabled.
Signed-off-by: Joel Stanley
Signed-off-by: Cédric Le Goater
Signed-off-by: Philippe
On 9/7/24 17:43, Cédric Le Goater wrote:
On 7/9/24 5:25 PM, Philippe Mathieu-Daudé wrote:
- Set some keys to not defined / implemented:
. EXT_CSD_HPI_FEATURES
. EXT_CSD_BKOPS_SUPPORT
. EXT_CSD_SEC_FEATURE_SUPPORT
. EXT_CSD_ERASE_TIMEOUT_MULT
. EXT_CSD_PART_SWITCH_TIME
On 9/7/24 17:58, Cédric Le Goater wrote:
On 7/9/24 5:25 PM, Philippe Mathieu-Daudé wrote:
Since v42:
- Stick to spec v4.3 (re-simplified EXT_CSD register & migrate)
- Fill CID register
- Few changes to CSD register
- Implement 'boot-mode' reset timing
- Add 'boot-size' p
Per the spec v4.3 these commands are mandatory,
but we don't implement them.
Reviewed-by: Cédric Le Goater
Tested-by: Cédric Le Goater
Tested-by: Andrew Jeffery
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/sd/sd.c
Tested-by: Cédric Le Goater
Reviewed-by: Cédric Le Goater
Tested-by: Andrew Jeffery
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 23 +++
1 file changed, 23 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index a4b6c7baba..fc78d4e561 100644
--- a/hw/sd/sd.c
From: Cédric Le Goater
The number of blocks is defined in the lower bits [15:0].
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Cédric Le Goater
Tested-by: Andrew Jeffery
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/sd
From: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Cédric Le Goater
Tested-by: Andrew Jeffery
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 0e36b0cc2e..7e17bd0736
ff-by: Philippe Mathieu-Daudé
Tested-by: Cédric Le Goater
Reviewed-by: Cédric Le Goater
---
hw/sd/sd.c | 47 +--
1 file changed, 45 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 3628686832..cf130ad1e3 100644
--- a/hw/sd/sd.c
Signed-off-by: Philippe Mathieu-Daudé
Tested-by: Cédric Le Goater
Reviewed-by: Cédric Le Goater
Tested-by: Andrew Jeffery
---
hw/sd/sd.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 550f63418e..3628686832 100644
--- a/hw/sd/sd.c
rd: Implement eMMC sleep state (CMD5)
Philippe Mathieu-Daudé (6):
hw/sd/sdcard: Basis for eMMC support
hw/sd/sdcard: Register generic command handlers
hw/sd/sdcard: Register unimplemented command handlers
hw/sd/sdcard: Add mmc_cmd_PROGRAM_CID handler (CMD26)
hw/sd/sdcard: Add eMMC
From: Philippe Mathieu-Daudé
Since eMMC are soldered on boards, it is not user-creatable.
RCA register is initialized to 0x0001, per spec v4.3,
chapter 8.5 "RCA register":
The default value of the RCA register is 0x0001.
The value 0x is reserved to set all cards into
th
Avoid hardcoding 1MiB boot size in EXT_CSD_BOOT_MULT,
expose it as QOM property.
By default, do not use any size. The board is responsible
to set the boot size property.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a
.
Signed-off-by: Sai Pavan Boddu
Signed-off-by: Edgar E. Iglesias
Signed-off-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
[PMD: Convert to SDProto handlers, add trace events]
Signed-off-by: Philippe Mathieu-Daudé
Tested-by: Andrew Jeffery
---
hw/sd/sd.c | 56
on the card is working in.
These modes can be changed by the host by means of the
SWITCH command.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 70 ++
1 file changed, 70 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index
t, add the sd_uptime_ns() helper.
When the first command is received, check at least 74 clocks
are elapsed (during the identification phase, at a 10kHz rate)
then enable BOOT_MODE in the Ext_CSD register.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c
ter
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 86b857d414..8c68494b8b 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -774,6 +774,40 @@ static uint32_t sd_blk_len(SDState
On 10/7/24 17:35, Cédric Le Goater wrote:
On 7/10/24 4:13 PM, Philippe Mathieu-Daudé wrote:
Tag to test Aspeed tree:
https://gitlab.com/philmd/qemu/-/tags/aspeed_emmc-v8
Since v43:
- Reordered and squashed commits (Cédric)
Cédric Le Goater (2):
hw/sd/sdcard: Add
On 11/7/24 13:03, Cédric Le Goater wrote:
Hello,
On 7/10/24 4:13 PM, Philippe Mathieu-Daudé wrote:
Tag to test Aspeed tree:
https://gitlab.com/philmd/qemu/-/tags/aspeed_emmc-v8
I gave this branch a try and the rainier machine boots correctly with
a baked emmc image :
Tested-by: Cédric
) {
error_setg(errp, "bad thread-pool-min/thread-pool-max values");
return;
}
Reviewed-by: Philippe Mathieu-Daudé
I don't get the point of using signed min/max here...
On 23/7/24 17:51, Peter Maydell wrote:
On Tue, 23 Jul 2024 at 16:44, Philippe Mathieu-Daudé wrote:
On 23/7/24 17:09, Peter Maydell wrote:
aio_context_set_thread_pool_params() takes two int64_t arguments to
set the minimum and maximum number of threads in the pool. We do
some bounds checking
On 14/1/24 13:39, Bernhard Beschow wrote:
Some SuperI/O devices such as the VIA south bridges or the PC87312 controller
are able to relocate their SuperI/O functions. Add a convenience function for
implementing this in the VIA south bridges.
This convenience function relies on previous simplific
On 14/1/24 13:39, Bernhard Beschow wrote:
The VIA south bridges are able to relocate and toggle (enable or disable) their
SuperI/O functions. So far this is hardcoded such that all functions are always
enabled and are located at fixed addresses.
Some PC BIOSes seem to probe for I/O occupancy bef
On 29/7/24 23:07, Bernhard Beschow wrote:
Am 29. Juli 2024 09:26:19 UTC schrieb "Philippe Mathieu-Daudé"
:
On 14/1/24 13:39, Bernhard Beschow wrote:
Some SuperI/O devices such as the VIA south bridges or the PC87312 controller
are able to relocate their SuperI/O functions. Add a c
b.com/qemu-project/qemu/-/issues/2455
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sdhci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index d02c3e3963..8293d83556 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -846,6 +846,7 @@ static void sdhci_do_adma(SDH
On error the DAT lines are left unmodified to their
previous states. QEMU returns 0x00 for convenience.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 07cb97d88c..c02f04f1ea
b.com/qemu-project/qemu/-/issues/2454
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index c02f04f1ea..b1e6e36b44 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2540,7 +2540,9 @@ uint8_t sd_read_byte(S
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sdhci.c | 8
hw/sd/trace-events | 1 +
2 files changed, 9 insertions(+)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 8293d83556..66b9364e9e 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -693,6 +693,11 @@ typedef struct
Since malicious guest can write invalid addresses to
the ADMASYSADDR register, we need to check whether the
descriptor could be correctly filled or not.
Cc: qemu-sta...@nongnu.org
Fixes: d7dfca0807 ("hw/sdhci: introduce standard SD host controller")
Signed-off-by: Philippe Mathieu-Daud
3 fixes (2 fuzzed).
Philippe Mathieu-Daudé (5):
hw/sd/sdcard: Explicit dummy byte value
hw/sd/sdcard: Do not abort when reading DAT lines on invalid cmd state
hw/sd/sdhci: Reset @data_count index on invalid ADMA transfers
hw/sd/sdhci: Trace ADMA descriptors
hw/sd/sdhci: Check ADMA
On 30/7/24 11:47, Andrey Drobyshev wrote:
Apparently 'qemu-img info' doesn't report the backing file format field
for qed (as it does for qcow2):
$ qemu-img create -f qed base.qed 1M && qemu-img create -f qed -b base.qed -F
qed top.qed 1M
$ qemu-img create -f qcow2 base.qcow2 1M && qemu-img cre
On 30/7/24 11:21, Philippe Mathieu-Daudé wrote:
Since malicious guest can write invalid addresses to
the ADMASYSADDR register, we need to check whether the
descriptor could be correctly filled or not.
Cc: qemu-sta...@nongnu.org
Fixes: d7dfca0807 ("hw/sdhci: introduce standard SD host contr
never need 'str' outside the loop.
Resolves: Coverity CID 1527385
Signed-off-by: Peter Maydell
---
block/gluster.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé
igned-off-by: Peter Maydell
---
hw/block/fdc-isa.c | 2 ++
1 file changed, 2 insertions(+)
Reviewed-by: Philippe Mathieu-Daudé
imit)
}
}
-qemu_sglist_destroy(&s->sg);
-s->io_buffer_size = 0;
-return -1;
+return s->sg.size;
}
---
Either way:
Reviewed-by: Kevin Wolf
Reviewed-by: Philippe Mathieu-Daudé
Since v1:
- split patch
- do not return MemTxResult from get_adma_description()
- single DMA read in SDHC_CTRL_ADMA2_64 case
Based-on: <20240730092138.32443-5-phi...@linaro.org>
Philippe Mathieu-Daudé (4):
hw/sd/sdhci: Reduce variables scope in sdhci_do_adma()
hw/sd/sdhci: Reduce var
Since malicious guest can write invalid addresses to
the ADMASYSADDR register, we need to check whether the
descriptor could be correctly filled or not.
Cc: qemu-sta...@nongnu.org
Fixes: d7dfca0807 ("hw/sdhci: introduce standard SD host controller")
Signed-off-by: Philippe Mathieu-Daud
All variables are only used within the for loop.
Declare them within it. In particular this resets
'dscr' on each iteration.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sdhci.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/
e 0xF000 -> ~0xfff to align with our codebase style.
No functional change intended.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sdhci.c | 87 ---
1 file changed, 48 insertions(+), 39 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
Instead of 3 consecutive dma_memory_read() calls, use
a packed structure to read the descriptor in a single
call.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sdhci.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
Hi Philipp,
On 31/7/24 17:17, Philipp Reisner wrote:
As with many syscalls, open() might be interrupted by a signal.
The call trace
img_open_file()
blk_new_open()
raw_open()
raw_open_common()
qemu_open()
qemu_open_internal()
qemu_open_cloexec()
E
clude/qemu/unicode.h | 3 ++
qobject/json-writer.c | 47 +--
util/unicode.c | 84 ++
3 files changed, 88 insertions(+), 46 deletions(-)
Preferably moving the docstring help to the header,
Reviewed-by: Philippe Mathieu-Daudé
ossible knock-on effects if trace output
changes unexpectedly for a tool expecting something unsanitized).
I doubt the trace core layer sanitizes, but it feels it is the
trace backend responsibility, since core layer might just pass
pointer to the backends.
---
nbd/client.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé
On 31/7/24 23:24, Philippe Mathieu-Daudé wrote:
Since v1:
- split patch
- do not return MemTxResult from get_adma_description()
- single DMA read in SDHC_CTRL_ADMA2_64 case
Based-on: <20240730092138.32443-5-phi...@linaro.org>
Philippe Mathieu-Daudé (4):
hw/sd/sdhci: Reduce variables
: Coverity CID 1547611
Signed-off-by: Peter Maydell
---
hw/block/pflash_cfi01.c | 1 +
1 file changed, 1 insertion(+)
Reviewed-by: Philippe Mathieu-Daudé
On 31/7/24 16:36, Peter Maydell wrote:
Peter Maydell (7):
hw/block/pflash_cfi01: Don't decrement pfl->counter below 0
hw/ide/atapi: Be explicit that assigning to s->lcyl truncates
hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found
something
hw/ide/pci.c: Remove dead
t, but didn't notice that this meant we should also remove the code
at the end of the loop.
Remove the dead code.
Resolves: Coverity CID 1547772
Signed-off-by: Peter Maydell
Reviewed-by: Kevin Wolf
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé
---
v2: Bre
On 30/7/24 11:21, Philippe Mathieu-Daudé wrote:
3 fixes (2 fuzzed).
Philippe Mathieu-Daudé (5):
hw/sd/sdcard: Explicit dummy byte value
hw/sd/sdcard: Do not abort when reading DAT lines on invalid cmd state
hw/sd/sdhci: Reset @data_count index on invalid ADMA transfers
Patches #1-3
On 31/7/24 16:36, Peter Maydell wrote:
hw/block/pflash_cfi01: Don't decrement pfl->counter below 0
hw/ide/atapi: Be explicit that assigning to s->lcyl truncates
hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found
something
Patches 3-5 queued, thanks.
On 5/8/24 20:24, Philippe Mathieu-Daudé wrote:
From: Peter Maydell
Coverity notes that the code at the end of the loop in
bmdma_prepare_buf() is unreachable. This is because in commit
9fbf0fa81fca8f527 ("ide: remove hardcoded 2GiB transactional limit")
we removed the only codepath i
s(-)
Reviewed-by: Philippe Mathieu-Daudé
Hi Klaus,
On 20/8/24 06:45, Klaus Jensen wrote:
From: Klaus Jensen
Yutaro Shimizu from the Cyber Defense Institute discovered a bug in the
NVMe emulation that leaks contents of an uninitialized heap buffer if
subsystem and FDP emulation are enabled.
Was this patch posted on the list for revi
Hi,
(old patch)
On 24/6/21 12:38, Gerd Hoffmann wrote:
With target-specific modules we can have multiple modules implementing
the same object. Therefore we have to check the target arch on lookup
to find the correct module.
"multiple modules implementing the same object." seems a design
mist
The SHIX machine is deprecated since v9.0 (commit
322b038c94 "target/sh4: Deprecate the shix machine").
Time to remove it.
Signed-off-by: Philippe Mathieu-Daudé
---
MAINTAINERS | 7 +-
docs/about/deprecated.rst | 6 --
docs/about/removed-fe
sh7750_register_io_device() was only used by the TC58128
NAND EEPROM which has been removed in the previous commit.
Remove it as unused code.
Signed-off-by: Philippe Mathieu-Daudé
---
include/hw/sh4/sh.h | 16 -
hw/sh4/sh7750.c | 57
The TC58128 NAND EEPROM is not user creatable and
needs to be instanciated in the code via tc58128_init().
Only the SHIX machine was using it, and it was removed
in the previous commit. Since the TC58128 has no more
users, remove it too.
Signed-off-by: Philippe Mathieu-Daudé
---
MAINTAINERS
Remove the deprecated SH4 SHIX machine, along
with the TC58128 NAND EEPROM.
Philippe Mathieu-Daudé (3):
hw/sh4: Remove the deprecated SHIX machine
hw/block: Remove TC58128 NAND EEPROM
hw/sh4: Remove sh7750_register_io_device() helper
MAINTAINERS | 11 --
docs
201 - 300 of 5881 matches
Mail list logo