From nobody Sat Nov 23 22:07:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1731036678; cv=none; d=zohomail.com; s=zohoarc; b=NdUgrPMbba1JDo5/yTdZkxN8mbs2MWD+kpVgk306zDPw1QU9J7MgwOylvl+6+VGN6P0qK1G2g+pjwPOI2jrbiqrKxA2gCPc1bBFwP3puOhgzm+2PJnLMGrOEyZhT1F3YGhLFaw1XtiE3cIB35nd6hehQr+9UAgprKI3qP5S07Bk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731036678; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NCrerRQTXGrD00ddnS/Hilq6giLmAcGDIEPH6vUua6s=; b=GNK5uksF2cFfFvHW91cujt2L0531Kaue2K21MYAFlIVLjvjZK61JVDDRaDTEPFywNlxvkdSQcMdtElMQEPsvhIEI1O3Pb73nwPKwX4qRlaaXQICBfrZGT7lcKvz19+V1ebsvqaCCKdzGCHUh9LwnR8rE12VMziuIfD8czZt8fhI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1731036678707493.8282774765621; Thu, 7 Nov 2024 19:31:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9Fhb-0008U1-EA; Thu, 07 Nov 2024 22:30:27 -0500 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 1t9Fha-0008TH-0D for qemu-devel@nongnu.org; Thu, 07 Nov 2024 22:30:26 -0500 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9FhX-0001HH-06 for qemu-devel@nongnu.org; Thu, 07 Nov 2024 22:30:25 -0500 Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3a6adaee7acso6158955ab.0 for ; Thu, 07 Nov 2024 19:30:20 -0800 (PST) Received: from ThinkPad-T14-hirose.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f41f65d358sm2326435a12.84.2024.11.07.19.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 19:30:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20230601.gappssmtp.com; s=20230601; t=1731036620; x=1731641420; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NCrerRQTXGrD00ddnS/Hilq6giLmAcGDIEPH6vUua6s=; b=yf7edY8nuNvwnjwDbIv2YMBf7odxM99ZxDWOuxSTFoZsaFcxLWiesKjte/2taylpFP jkI9QaUOYrXDIOdRWg6Rs3Eebv2Rwy/F6kQfB0Fn/TrX/nMotpJ/xpoBXiY+1YrHuoR8 MzvF7vOwruXln6j3PyPnUTiftJUDv4u7it+viQPi0dxyH6nshKqy8IqGTrPIgHkHonxb sz99qWbsAcpLTgudZUglG4t8tVUEBVquX9pVeO7u06jirs0VOWfJDTi5thtTg1DDMfI/ Y5LE6ZZRkJysFAaLkyrtxXPSc3/G1LstrOAcgm5wiBXYPtbZX6PDUmLLjZ0QC5KsP2eI 9XUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731036620; x=1731641420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NCrerRQTXGrD00ddnS/Hilq6giLmAcGDIEPH6vUua6s=; b=xMd03D41GmCM+31yRVkjaHDKvIedHKr7L7PHQo34rY6HH1jDRjdy5gRUf7/01x7+qs w4QVvTdVeyw2jEvPWqO3yzb3/zk8bzd6mVIwbPQAf1r6iqWUQ2Dd1nsk3Y3idSI31Cp5 fXdAw0FAZL5y8tfCSFRSjZu4ykpk95JAlR1KCs2RfqebzVS79ufpEVPqKmDA1NpZ8Ax5 ID8RiE2O+Iwqt1oMHd/05mYg1K/G/MBySYaB39Q3cbU8Vec/n4XstBMtABXvtJn0UbZb mq2WzmAHgZm0yE1DvNbzkoLmwaPUhMLCY3FPIgDS6Kt5yFAzXpissEIq4ZWS0i+mtfrn 9JuQ== X-Gm-Message-State: AOJu0YxBlFqr/cq3MlR3Fj5klke6zmAsb/8XFLq3MT662xt2BMK3Vosg QD1hwhkum2vvEyAjm44Tc8Yz10UKkJQOQB9r/ltFt3DiINUytxCB3zM10hKN7PJANFSXrAkCaKe W X-Google-Smtp-Source: AGHT+IHuAnySDLoX4U4V6syOdK8a1Qm+ZKR4pIxN3TRjyI4qCO35oUlg7cbch09RdEhXS4e3TMF1/w== X-Received: by 2002:a05:6e02:190e:b0:3a3:9471:8967 with SMTP id e9e14a558f8ab-3a6f19e43cbmr19854955ab.11.1731036619986; Thu, 07 Nov 2024 19:30:19 -0800 (PST) From: Tomoyuki HIROSE To: qemu-devel@nongnu.org Cc: Tomoyuki HIROSE , Keith Busch , Klaus Jensen , Jesper Devantier , qemu-block@nongnu.org (open list:nvme) Subject: [RFC PATCH 1/5] hw/nvme/ctrl: specify the 'valid' field in MemoryRegionOps Date: Fri, 8 Nov 2024 12:29:45 +0900 Message-ID: <20241108032952.56692-2-tomoyuki.hirose@igel.co.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241108032952.56692-1-tomoyuki.hirose@igel.co.jp> References: <20241108032952.56692-1-tomoyuki.hirose@igel.co.jp> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::12a; envelope-from=tomoyuki.hirose@igel.co.jp; helo=mail-il1-x12a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @igel-co-jp.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1731036681284116600 Content-Type: text/plain; charset="utf-8" 'valid' field in MemoryRegionOps struct indicates how the MemoryRegion can be accessed by the guest. In the previous code, the 'valid' field was not specified explicitly. As a result, the CMB area could only be accessed in units of 4 bytes. This commit specifies the 'valid' field in MemoryRegionOps of CMB and the CMB area can be accessed in units of 8 bytes. Signed-off-by: Tomoyuki HIROSE --- hw/nvme/ctrl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 8e4612e035..acbd10628f 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -8166,6 +8166,11 @@ static const MemoryRegionOps nvme_cmb_ops =3D { .min_access_size =3D 1, .max_access_size =3D 8, }, + .valid =3D { + .unaligned =3D true, + .min_access_size =3D 1, + .max_access_size =3D 8, + }, }; =20 static bool nvme_check_params(NvmeCtrl *n, Error **errp) --=20 2.43.0