From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:505:56a3:b0:1be9:327d:8ee3 with SMTP id ya3csp384850njb; Wed, 10 Jul 2024 07:08:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVzPgKcrS1L9lBKCnThtjHs4KQKfrL+cFzzeY5R5UyQDmLvOkoh5/+0rcZ1nyRkKuP0NWPj+L+vu6CZAylm8XDlxvzLxzxs X-Google-Smtp-Source: AGHT+IGaU5EDn7ckykMvHA0PeVgEtlFqwBCbtkwpznFaEpmQL+86zzWbdI50VJRXu5Uc9SJ6xJrQ X-Received: by 2002:ac8:5910:0:b0:447:ed12:77dd with SMTP id d75a77b69052e-447faa83ee8mr65137251cf.52.1720620515352; Wed, 10 Jul 2024 07:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720620515; cv=none; d=google.com; s=arc-20160816; b=VIP18YuT1OQjN0Dj5fmUaDibVJ1BbnZpNmgPSmoGy/oFIN5JN9ceO9ekJ8uxXfO/ri ZRajO0+bNeSTJlVQm2Ynyu9PEDjUWqdSjVZS5Legmnpd5wxrfdd94lL/bctfQ57yUVE7 KUTDz05VuX7cI2ImQxtJNpRUrBcPfHXXGiF2u9dYsDW4i9bx2+QrDBCyrnZU/gCoEve8 T8Z+HJSVOqZEmaxF36YLZwycH+DSkq6Mxze82HFKYT/HVuEi4uVyiU9/UAhZ2w1H3nNf +cuANkzeJyoBXI3feytZtf+zLDeHavzhiMNoPPloTTN0lsCo7NP943WSAH+Yo5Fev7/3 kaGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=QxBSaZMT0BEUWVwIq7OYkllCdR6/YSjPnnCo840jolM=; fh=umL8zxbWF4W2pS9nVgc4z5DWwZX8pLHcZx531lKXiRo=; b=pDxH8Tw1kso70T5xA2/p6RxcSA8tukZ85v107XMbLbE9j++Jo03G/aT2WtwBoNVmsL GNrRC5lF9qCUj4nQOfcMFpul0GhikRO3Q7PgoWBLH5T06acUi86K69TdMwDn/eqZMIA7 F7HE2U0vI0FmxDbdcR0IDOKPMK27yzw3S3ItfAR58tvKc6ykTeaMRNP6YuYyU+SaQp7f /+/cxd/N2YXv92UICoS19Y2Pz22uBxns0SJn7nPceaAMEd/mADp5dmpwEXHwXNZWbgde nHbq9GG2Vl696XSqwFDbLMd3kG8YQol/E7fnawmGPFwYdra52KYUeyXWF0t9/hFQh2tv s1Yg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eSaS2UjI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eSaS2UjI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-447f9ba909esi46106251cf.367.2024.07.10.07.08.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2024 07:08:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eSaS2UjI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=eSaS2UjI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRXzh-0006oF-Gs; Wed, 10 Jul 2024 10:08:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRXzf-0006m0-V4; Wed, 10 Jul 2024 10:08:27 -0400 Received: from smtp-out1.suse.de ([195.135.223.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRXzd-0002Yp-Mz; Wed, 10 Jul 2024 10:08:27 -0400 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 703DF21BD4; Wed, 10 Jul 2024 14:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720620503; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxBSaZMT0BEUWVwIq7OYkllCdR6/YSjPnnCo840jolM=; b=eSaS2UjISRAqdgslSA1Hh9oRwWLPxDx/0hrCnSnbbie5aP/Mzdf+xWFJBB0Cp50KlJ257K uzxSjnJ490MAiCP92oQbmZSd9o48xVhZCZYnae9LPKN6HZkC8IQ2yTqqscFhGK9EJHTRae 2UB9bggK0tRqJRXEmWd23mdWQWhyHqg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720620503; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxBSaZMT0BEUWVwIq7OYkllCdR6/YSjPnnCo840jolM=; b=a2tcPPtjL+ljN+4w1wknOlefGcDwB3XCeVU7DXLFy+ppoomUYTZbpcPBfUMUzzS6cvB9Ym OtmoLIPSE9VGbQCg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=eSaS2UjI; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=a2tcPPtj DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720620503; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxBSaZMT0BEUWVwIq7OYkllCdR6/YSjPnnCo840jolM=; b=eSaS2UjISRAqdgslSA1Hh9oRwWLPxDx/0hrCnSnbbie5aP/Mzdf+xWFJBB0Cp50KlJ257K uzxSjnJ490MAiCP92oQbmZSd9o48xVhZCZYnae9LPKN6HZkC8IQ2yTqqscFhGK9EJHTRae 2UB9bggK0tRqJRXEmWd23mdWQWhyHqg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720620503; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QxBSaZMT0BEUWVwIq7OYkllCdR6/YSjPnnCo840jolM=; b=a2tcPPtjL+ljN+4w1wknOlefGcDwB3XCeVU7DXLFy+ppoomUYTZbpcPBfUMUzzS6cvB9Ym OtmoLIPSE9VGbQCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E5495137D2; Wed, 10 Jul 2024 14:08:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sU+OKtaVjmaRNQAAD6G6ig (envelope-from ); Wed, 10 Jul 2024 14:08:22 +0000 From: Fabiano Rosas To: Peter Xu Cc: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, qemu-block@nongnu.org, Laurent Vivier , Tyrone Ting , Bin Meng , Hao Wu , Francisco Iglesias , Paolo Bonzini , Thomas Huth , =?utf-8?Q?C=C3=A9dric?= Le Goater , qemu-arm@nongnu.org, Joel Stanley , Sai Pavan Boddu , devel@lists.libvirt.org, Luc Michel , =?utf-8?Q?C?= =?utf-8?Q?=C3=A9dric?= Le Goater Subject: Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56) In-Reply-To: References: <20240627162232.80428-1-philmd@linaro.org> <20240627162232.80428-7-philmd@linaro.org> <87cynmfggx.fsf@suse.de> Date: Wed, 10 Jul 2024 11:08:20 -0300 Message-ID: <87a5ipfigb.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 703DF21BD4 X-Spam-Score: -3.01 X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCPT_COUNT_TWELVE(0.00)[18]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; FREEMAIL_CC(0.00)[linaro.org,nongnu.org,redhat.com,nuvoton.com,gmail.com,google.com,amd.com,kaod.org,jms.id.au,lists.libvirt.org]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; MISSING_XM_UA(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org Received-SPF: pass client-ip=195.135.223.130; envelope-from=farosas@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: CpFy0H5JVSe8 Peter Xu writes: > On Tue, Jul 09, 2024 at 05:38:54PM -0300, Fabiano Rosas wrote: >> Philippe Mathieu-Daud=C3=A9 writes: >>=20 >> > "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 overwriting data block >> > on underlying storage drive. Keep it in a dedicated >> > 'vendor_data[]' array. >> > >> > Signed-off-by: Philippe Mathieu-Daud=C3=A9 >> > Tested-by: C=C3=A9dric Le Goater >> > --- >> > RFC: Is it safe to reuse VMSTATE_UNUSED_V() (which happens >> > to be the same size)? >>=20 >> Hi, sorry it took some time to get to this, I had just left for vacation >> when you first posted. > > And I totally overlooked there's the email.. until you replied. Welcome > back. Thanks! > >>=20 >> I think it's ok: >>=20 >> { >> "field": "unused", >> "version_id": 1, >> "field_exists": false, >> "size": 512 >> }, >>=20 >> vs. >>=20 >> { >> "field": "vendor_data", >> "version_id": 0, >> "field_exists": false, >> "num": 512, >> "size": 1 >> }, >>=20 >> The unused field was introduced in 2016 so there's no chance of >> migrating a QEMU that old to/from 9.1. > > What happens if an old qemu 9.0 sends rubbish here to a new QEMU, while t= he > new QEMU would consider it meaningful data? It will send zeros, no? The code will have to cope with that. The alternative is to put the vendor_data in a subsection and the code will also have to cope with the lack of data when the old QEMU doesn't send it.