From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09DD933F8B7 for ; Tue, 16 Dec 2025 22:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765925118; cv=none; b=X5uTmI+oK3i/qp69yZY/Zu3LYN7sVNnc7kQMFnj3wq0RHnQ3114ucGRY+bJtO4j87tStrkr01TdGexrQF9Nc5K3+fCrPkr4XF/cn/fyQAhdGdwfPTaGKb/lgbq12629q01GXt3SlO7jJ8HPkmklRtD8Btzph5keEmtu82d40trE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765925118; c=relaxed/simple; bh=3NEQ5V9RhdJFlg/bSRdDII08BAgyJYCFrsNJhWAbvGs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MgBPkxHQDOGTVx7hykdofvXnDcMclPGIwyEJGreAeiNXfdsWDLMZAY8+RiWV1vuKweZlzGGMt/V+QwPf073G0pHUvGdsBnAORxPetY4tdUOc1x8Cww0MQnI1jLKksFGL0Ryf00QhovWUvxkUpjF3UAwgGol6RA7GzxZ6crSInYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=LiHsyrvL; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LiHsyrvL" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2a0d6f647e2so44666585ad.1 for ; Tue, 16 Dec 2025 14:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765925116; x=1766529916; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=AR1JGVCrYOq5uwCMMI70hgFcm+ktjWSWnpXwIlRejaE=; b=LiHsyrvLKpsMOBJYKqP8FyKmSUimoSKQUqlhFTA4X4ET4O8KDXt4VRdr+8TX9LTF96 WXzedgREoFXUp6fP4sYm2LFuIdnUhKQDMUkKO3R4NfBoe0HkUlUd8+OHZi2O3mutTCgU xOmt8LNF/GpDHjvtUMERsEM7MtRkrDqEKAR5e7YZIpdnLuimzT26U+ng6tGLu5SsDrdx t7GIZVqL/HuqccKhTRE3VMSRBxc8DpW7wJuQWbgST0v1iYhlhQxd9YtD/AlVjWGA57Uq lZ7xJrt9JNW5CuINBrTMkxGy+vZqU4fIqy64FftdrYYTRE8aJWU1ydc8++wd80zX0yIk NhxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765925116; x=1766529916; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AR1JGVCrYOq5uwCMMI70hgFcm+ktjWSWnpXwIlRejaE=; b=UfdQ2k1kuuEVXxU4ZFv3UhzIsFsfj6BpU5sHEpeimH7Mz3rhf1zUAHW5A6wHJvrdCE NeJoCjcX+PChRSmiwSPH4uU5EuxcSS/jThKmCKrycr52+o8Mqo/tKg5tkrxy0WaqbTE9 EhospyK0TamrB19TEQwyphSQ7cGYMwo5RfDQzaOfuAR/RdI6J5G6dv049hNXzCUkXog8 94Q9UuLBVUJfWE5BCH3rvFlR0lT33kQ/Rm4OFImPNdFrrum/OXOUcl1b5TjhJwozaDCo EVPc042JjeXPZSrQRvZPKmOXKvUCH+y1xrne5hrsn4/CGXkYCjh0+LY2q/rrEz9P+m8c suhA== X-Forwarded-Encrypted: i=1; AJvYcCXDD+urarE4sppDhz0GtqEIRPVxzTp/TiLJBRPxUrGMEgU4L+99YYaUxnyxau9RsY8jmA3BFfkirzztAtg=@vger.kernel.org X-Gm-Message-State: AOJu0YzcQDYfUJrqc4fmuXHzrWPeVwBG+wq/uaSQ7mX+Hgr5JsClV5zN wr+f+/24VNu9y3HsvvPr2owkVQMBJXGJ2IAsn/eECAvyzaU7S+60L/JCXkdhqfd4obk= X-Gm-Gg: AY/fxX7vDcN9+w9kMVY1WG3uOPVtO7RQT+03VEPjXO9CK2eNzuhluMMca5U64hGeBNz GGea6o8cSssPYSxmZspe+3xIy1gntMJzB5VV/IcCOtCm58axV90qSzCzM7qlKv/XZxmxLwqjnR0 kFp+IUiFXYbG9isuFZxC+QToETmU6ZgvaoLstOu6mb/uClX9Asrvtju5CrLnmRbkb+7hDVbyUW7 JtgUgPMFtXasE4pBvqnd8nBEpDQZUm7sSGtCWe9hlB+3Gt7srRPZVCjf1yXU+w5rf49dqoh+Oj0 x2xHNhtA9S4zomXVY4qUwpVQiC1gtiKNXl+aOdktUCnNrnWMpUk2IGWk2ZhUlf5tb6nAy/VPyhP LjuoXwo+9SVFL3y+HfOttc4kN340DUEXPPswgG82WJ7lKaqvLjRw4wYXmFZwV/W+Ds4qwkSKuCv 3a4lVstn8DhXr+dQ== X-Google-Smtp-Source: AGHT+IHlf022sKmg9PvWm1g6x5qCleg7CGbhTD0sTz9lR3tqhWCn1Hso1Ql/qQ0jJj968JLmuQBbrw== X-Received: by 2002:a17:902:f9c3:b0:295:96bc:8699 with SMTP id d9443c01a7336-29f23b53ef6mr108947955ad.20.1765925116256; Tue, 16 Dec 2025 14:45:16 -0800 (PST) Received: from p14s ([2604:3d09:148c:c800:ba5d:91e2:900a:fb01]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29eea03fa7bsm179137035ad.68.2025.12.16.14.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 14:45:15 -0800 (PST) Date: Tue, 16 Dec 2025 15:45:13 -0700 From: Mathieu Poirier To: Tanmay Shah Cc: "Michael S. Tsirkin" , Zhongqiu Han , andersson@kernel.org, jasowang@redhat.com, xuanzhuo@linux.alibaba.com, eperezma@redhat.com, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, virtualization@lists.linux.dev, xiaoxiang@xiaomi.com, Xiang Xiao , arnaud.pouliquen@foss.st.com Subject: Re: [RFC PATCH 2/2] rpmsg: virtio_rpmsg_bus: get buffer size from config space Message-ID: References: <20251114184640.3020427-1-tanmay.shah@amd.com> <20251114184640.3020427-3-tanmay.shah@amd.com> <11280877-95f0-4361-9112-23bb17372e91@oss.qualcomm.com> <20251203142540-mutt-send-email-mst@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Dec 04, 2025 at 10:55:10AM -0600, Tanmay Shah wrote: > > > On 12/3/25 1:35 PM, Michael S. Tsirkin wrote: > > On Wed, Dec 03, 2025 at 12:12:46PM -0600, Tanmay Shah wrote: > > > Hello, > > > > > > Thanks for your reviews. Please find the response below. > > > > > > On 11/22/25 6:05 AM, Zhongqiu Han wrote: > > > > On 11/15/2025 2:46 AM, Tanmay Shah wrote: > > > > > From: Xiang Xiao > > > > > > > [...] > > > > > > > Thanks, that's a good question. I keept id 2 unmodified from the original > > > series. I don't know why ID 2 was chosen in the original series. I will have > > > to discuss this with the linux remoteproc/rpmsg maintainers and choose the > > > correct ID. > > > > > > I don't see any problem choosing ID 1, but for some reason if ID 1 was > > > assigned and deprecated (I don't think that is the case) then only we should > > > use ID 2. > > > > > > > > > Arnaud, Mathieu, Bjorn any input here? > > > > > > > > + > > > > > +struct virtio_rpmsg_config { > > > > > +    /* The tx/rx individual buffer size(if VIRTIO_RPMSG_F_BUFSZ) */ > > > > > +    __u32 txbuf_size; > > > > > +    __u32 rxbuf_size; > > > > > +    __u32 reserved[14]; /* Reserve for the future use */ > > > > > > > > Should we use __virtio32 instead of __u32 to avoid endianness issues? > > > > > > > > > > > > > > Sure, if that is the standard in other virtio headers I will modify it. > > > > > > Thanks, > > > Tanmay > > > > rpmsg is still not standardized, sadly. It's really time it was. > > > > > > > > Modern virtio devices use __le32. > > Accordingly, accessed with virtio_cread_le > > > > > > __virtioXX and virtio_cread are for legacy compatible parts of config space. > > > > As of now, I am using virtio_cread so I think it is legacy compatible. > > > > > Does rpmsg want to be modern or keep using legacy? I donnu. > > > > I don't know either. This we have to discuss with the maintainers and other > vendors. > I would certainly like to see a modernization effort, but it needs to be backward compatible. Probably outside the scope of this set though. > > > Ideally it should finally be documented and at that point we > > definitely will want to switch to __le32. > > > > > > For now, run sparse to make sure you don't introduce new endian-ness > > issues. > > Ack. > > > > > > > > > > > > > +    /* Put the customize config here */ > > > > > +} __attribute__((packed)); > > > > > + > > > > > +#endif /* _LINUX_VIRTIO_RPMSG_H */ > > > > > > > > > > >