[PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10

2024-06-27 Thread Philippe Mathieu-Daudé
Deprecate SD spec v1.10, use v3.01 as new default. Philippe Mathieu-Daudé (3): hw/sd/sdcard: Deprecate support for spec v1.10 hw/sd/sdcard: Use spec v3.01 by default hw/sd/sdcard: Remove support for spec v1.10 docs/about/removed-features.rst | 5 + include/hw/sd/sd.h | 1

[PATCH 1/3] hw/sd/sdcard: Deprecate support for spec v1.10

2024-06-27 Thread Philippe Mathieu-Daudé
We use the v2.00 spec by default since commit 2f0939c234 ("sdcard: Add a 'spec_version' property, default to Spec v2.00"). Time to deprecate the v1.10 which doesn't bring much, and is not tested. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 6 ++ 1 file changed, 6 in

[PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default

2024-06-27 Thread Philippe Mathieu-Daudé
Recent SDHCI expect cards to support the v3.01 spec to negociate lower I/O voltage. Select it by default. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index a48010cfc1..d0a1d5db18 100644 --- a/hw/

[PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10

2024-06-27 Thread Philippe Mathieu-Daudé
Support for spec v1.10 was deprecated in QEMU v9.1. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 6 -- docs/about/removed-features.rst | 5 + include/hw/sd/sd.h | 1 - hw/sd/sd.c | 12 ++-- 4 files changed, 7 ins

Re: [PATCH 1/3] hw/sd/sdcard: Deprecate support for spec v1.10

2024-06-27 Thread Cédric Le Goater
On 6/27/24 9:10 AM, Philippe Mathieu-Daudé wrote: We use the v2.00 spec by default since commit 2f0939c234 ("sdcard: Add a 'spec_version' property, default to Spec v2.00"). Time to deprecate the v1.10 which doesn't bring much, and is not tested. Signed-off-by: Philippe Mathieu-Daudé Reviewed

Re: [PATCH 1/3] hw/sd/sdcard: Deprecate support for spec v1.10

2024-06-27 Thread Cédric Le Goater
On 6/27/24 9:10 AM, Philippe Mathieu-Daudé wrote: We use the v2.00 spec by default since commit 2f0939c234 ("sdcard: Add a 'spec_version' property, default to Spec v2.00"). Time to deprecate the v1.10 which doesn't bring much, and is not tested. Signed-off-by: Philippe Mathieu-Daudé Reviewed

Re: [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default

2024-06-27 Thread Cédric Le Goater
On 6/27/24 9:10 AM, Philippe Mathieu-Daudé wrote: Recent SDHCI expect cards to support the v3.01 spec to negociate lower I/O voltage. Select it by default. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/sd.c | 2 +- 1 file changed, 1

Re: [RFC PATCH v3 0/6] Added virtio-net RSS with eBPF support.

2024-06-27 Thread Andrew Melnichenko
Hello all, yes. Curently I have an issue with my workspace. As soon as I get it fixed, I'll send another patches. On Wednesday, June 26, 2024, Michal Prívozník wrote: > On 5/12/24 21:45, Andrew Melnychenko wrote: > > This series of rfc patches adds support for loading the RSS eBPF > > program an

[libvirt PATCH] vircgroup: fix g_variant_new_parsed format string causing abort

2024-06-27 Thread Pavel Hrdina
The original code was incorrect and never tested because at the time of implementing it the cgroup file `io.weight` was not available. Resolves: https://issues.redhat.com/browse/RHEL-45185 Introduced-by: 9c1693eff427661616ce1bd2795688f87288a412 Signed-off-by: Pavel Hrdina --- src/util/vircgroupv

[PATCH v3 00/17] hw/sd/sdcard: Accumulation of cleanups and fixes

2024-06-27 Thread Philippe Mathieu-Daudé
Since v2: - Tested-by from Cédric recorded - more patches added :S Since v1: - various patches merged, few more added Various SD card cleanups and fixes accumulated over the years. Various have been useful to help integrating eMMC support (which will come later). Full series for testing: https://

[PATCH v3 01/17] hw/sd/sdcard: Deprecate support for spec v1.10

2024-06-27 Thread Philippe Mathieu-Daudé
We use the v2.00 spec by default since commit 2f0939c234 ("sdcard: Add a 'spec_version' property, default to Spec v2.00"). Time to deprecate the v1.10 which doesn't bring much, and is not tested. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- docs/about/deprecated.rst |

[PATCH v3 02/17] hw/sd/sdcard: Use spec v3.01 by default

2024-06-27 Thread Philippe Mathieu-Daudé
Recent SDHCI expect cards to support the v3.01 spec to negociate lower I/O voltage. Select it by default. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index a48010cf

[PATCH v3 03/17] hw/sd/sdcard: Track last command used to help logging

2024-06-27 Thread Philippe Mathieu-Daudé
The command is selected on the I/O lines, and further processing might be done on the DAT lines via the sd_read_byte() and sd_write_byte() handlers. Since these methods can't distinct between normal and APP commands, keep the name of the current command in the SDState and use it in the DAT handlers

[PATCH v3 04/17] hw/sd/sdcard: Trace block offset in READ/WRITE data accesses

2024-06-27 Thread Philippe Mathieu-Daudé
Useful to detect out of bound accesses. Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 4 ++-- hw/sd/trace-events | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index bc87807793..090a6fdcdb 100644 ---

[PATCH v3 05/17] hw/sd/sdcard: Trace requested address computed by sd_req_get_address()

2024-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 9 +++-- hw/sd/trace-events | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 090a6fdcdb..464576751a 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -608,10 +608,15 @@ static void sd_r

[PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-06-27 Thread Philippe Mathieu-Daudé
"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 vendor specific format and meaning. Thus this block must not be stored ov

[PATCH v3 07/17] hw/sd/sdcard: Send WRITE_PROT bits MSB first (CMD30)

2024-06-27 Thread Philippe Mathieu-Daudé
Per sections 3.6.1 (SD Bus Protocol) and 7.3.2 (Responses): In the CMD line the Most Significant Bit is transmitted first. Use the stl_be_p() helper to store the value in big-endian. Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- RFC because I'm surprised this has been

[PATCH v3 08/17] hw/sd/sdcard: Send NUM_WR_BLOCKS bits MSB first (ACMD22)

2024-06-27 Thread Philippe Mathieu-Daudé
Per sections 3.6.1 (SD Bus Protocol), 4.3.4 "Data Write" and 7.3.2 (Responses): In the CMD line the Most Significant Bit is transmitted first. Use the stl_be_p() helper to store the value in big-endian. Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- RFC because I'm sur

[PATCH v3 09/17] hw/sd/sdcard: Use READY_FOR_DATA definition instead of magic value

2024-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 1f37d9c93a..135b7d2e23 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -561,7 +561,7 @@ FIELD(CSR, OUT_OF_RANGE,

[PATCH v3 10/17] hw/sd/sdcard: Assign SDCardStates enum values

2024-06-27 Thread Philippe Mathieu-Daudé
SDCardStates enum values are specified, so assign them correspondingly. It will be useful later when we add states from later specs, which might not be continuous. See CURRENT_STATE bits in section 4.10.1 "Card Status". Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/s

[PATCH v3 11/17] hw/sd/sdcard: Simplify sd_inactive_state handling

2024-06-27 Thread Philippe Mathieu-Daudé
Card entering sd_inactive_state powers off, and won't respond anymore. Handle that once when entering sd_do_command(). Remove condition always true in sd_cmd_GO_IDLE_STATE(). Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 12 +++- 1 file changed, 7 i

[PATCH v3 12/17] hw/sd/sdcard: Restrict SWITCH_FUNCTION to sd_transfer_state (CMD6)

2024-06-27 Thread Philippe Mathieu-Daudé
SWITCH_FUNCTION is only allowed in TRANSFER state (See 4.8 "Card State Transition Table). Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 7533a78cf6..8f441e418c 100644 --- a/hw

[PATCH v3 13/17] hw/sd/sdcard: Add direct reference to SDProto in SDState

2024-06-27 Thread Philippe Mathieu-Daudé
Keep direct reference to SDProto in SDState, remove then unnecessary sd_proto(). Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 37 + 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c i

[PATCH v3 14/17] hw/sd/sdcard: Extract sd_blk_len() helper

2024-06-27 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Extract sd_blk_len() helper, use definitions instead of magic values. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c i

[PATCH v3 15/17] tests/qtest: Disable npcm7xx_sdhci tests using hardcoded RCA

2024-06-27 Thread Philippe Mathieu-Daudé
Disable tests using 0x4567 hardcoded RCA otherwise when using random RCA we get: ERROR:../../tests/qtest/npcm7xx_sdhci-test.c:69:write_sdread: assertion failed: (ret == len) not ok /arm/npcm7xx_sdhci/read_sd - ERROR:../../tests/qtest/npcm7xx_sdhci-test.c:69:write_sdread: assertion failed: (

[PATCH v3 16/17] hw/sd/sdcard: Generate random RCA value

2024-06-27 Thread Philippe Mathieu-Daudé
Rather than using the obscure 0x4567 magic value, use a real random one. Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 11 --- hw/sd/trace-events | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c i

[PATCH v3 17/17] hw/sd/sdcard: Introduce definitions for EXT_CSD register

2024-06-27 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdmmc-internal.h | 97 ++ 1 file changed, 97 insertions(+) diff --git a/hw/sd/sdmmc-internal.h b/hw/sd/sdmmc-internal

Re: [PATCH v3 15/17] tests/qtest: Disable npcm7xx_sdhci tests using hardcoded RCA

2024-06-27 Thread Thomas Huth
On 27/06/2024 18.22, Philippe Mathieu-Daudé wrote: Disable tests using 0x4567 hardcoded RCA otherwise when using random RCA we get: ERROR:../../tests/qtest/npcm7xx_sdhci-test.c:69:write_sdread: assertion failed: (ret == len) not ok /arm/npcm7xx_sdhci/read_sd - ERROR:../../tests/qtest/npc

Re: [PATCH v1] security_manager: Ensure top lock is acquired before nested locks

2024-06-27 Thread hongmainquan via Devel
Friendly ping. 在 2024/6/25 6:03 下午, hongmianquan 写道: We need to ensure top lock is acquired before nested lock. Otherwise deadlock issues may arise. We have the stack security driver, which internally manages other security drivers, we call them "top" and "nested". We call virSecurityStackPreFo

[PATCH v2] security_manager: Ensure top lock is acquired before nested locks

2024-06-27 Thread hongmianquan via Devel
Fix libvirtd hang since fork() was called while another thread had security manager locked. We have the stack security driver, which internally manages other security drivers, just call them "top" and "nested". We call virSecurityStackPreFork() to lock the top one, and it also locks and then unlo

Re: [PATCH 0/4] hw/s390x: Alias @dump-skeys -> @dump-s390-skey and deprecate

2024-06-27 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> Philippe Mathieu-Daudé writes: > >> > >> > Hi Daniel, Dave, Markus & Thomas. > >> > > >> > On 4/6/24 06:58, Markus Armbruster wrote: > >> >> "Dr. David Ala

Re: [PATCH] qemu_domain: Check if driver->domainEventState is NULL

2024-06-27 Thread Rayhan Faizel
ping

Re: [PATCH v3 15/17] tests/qtest: Disable npcm7xx_sdhci tests using hardcoded RCA

2024-06-27 Thread Philippe Mathieu-Daudé
On 27/6/24 18:47, Thomas Huth wrote: On 27/06/2024 18.22, Philippe Mathieu-Daudé wrote: Disable tests using 0x4567 hardcoded RCA otherwise when using random RCA we get:    ERROR:../../tests/qtest/npcm7xx_sdhci-test.c:69:write_sdread: assertion failed: (ret == len)    not ok /arm/npcm7xx_sdhci/

[PATCH] qemu: fix switchover-ack regression for old qemu

2024-06-27 Thread Jon Kohler
When enabling switchover-ack on qemu from libvirt, the .party value was set to both source and target; however, qemuMigrationParamsCheck() only takes that into account to validate that the remote side of the migration supports the flag if it is marked optional or auto/always on. In the case of swi

libvirt-10.5.0 release candidate 2

2024-06-27 Thread Jiri Denemark
I have just tagged v10.5.0-rc2 in the repository and pushed signed tarballs to https://download.libvirt.org/ Please give the release candidate some testing and in case you find a serious issue which should have a fix in the upcoming release, feel free to reply to this thread to make sure the issue

Re: [libvirt PATCH] vircgroup: fix g_variant_new_parsed format string causing abort

2024-06-27 Thread Jiri Denemark
On Thu, Jun 27, 2024 at 18:05:18 +0200, Pavel Hrdina wrote: > The original code was incorrect and never tested because at the time of > implementing it the cgroup file `io.weight` was not available. > > Resolves: https://issues.redhat.com/browse/RHEL-45185 > Introduced-by: 9c1693eff427661616ce1bd2

Re: [PATCH] qemu: fix switchover-ack regression for old qemu

2024-06-27 Thread Jiri Denemark
On Thu, Jun 27, 2024 at 11:11:56 -0700, Jon Kohler wrote: > When enabling switchover-ack on qemu from libvirt, the .party value > was set to both source and target; however, qemuMigrationParamsCheck() > only takes that into account to validate that the remote side of the > migration supports the fl