From nobody Mon Nov 25 11:53:12 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; dmarc=pass(p=quarantine dis=none) header.from=bytedance.com ARC-Seal: i=1; a=rsa-sha256; t=1715572484; cv=none; d=zohomail.com; s=zohoarc; b=jS2nUtqAlBgaQHO66Niw1N30iSaReW6zsPM8wZqDssK/aZuYg2ab/mRv2pYLJjlfd1cFHk+EVXykNod5gMU/92npJmx0l0AmIkaCBD31eKbl5+4gepec8LjPv6msbWPfCR5uYqDEUui5iWe1ouVAfZsjnmq/wHvxTkGHEVI68O4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715572484; 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=T+J5rbIfUpvehIGmWcPG1zjcR1aPta5xb+LZyWF/KhY=; b=f8QAXrTrSOckH+tiQ4jkNdCnP/S22FD4qTpqZJJWT3evVcspa00KYh4D+sY2jLe9EmdC3ghO9U0OgjzASDnI5WrJfq8czjNVTyD5ryan8FZ29XghvKjdORJI8hlcjhDZealMORRXD9btpY8b1T+NU5SgSRDI3YEVWaMfzXF/dxA= 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; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171557248442945.780737784318944; Sun, 12 May 2024 20:54:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6Mkn-0001Oe-ET; Sun, 12 May 2024 23:53:33 -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 1s6MkX-0001Jj-0x for qemu-devel@nongnu.org; Sun, 12 May 2024 23:53:17 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6MkT-0008Lk-Sm for qemu-devel@nongnu.org; Sun, 12 May 2024 23:53:15 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6f472d550cbso3144910b3a.1 for ; Sun, 12 May 2024 20:53:13 -0700 (PDT) Received: from n37-006-243.byted.org ([180.184.51.40]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a8137asm6407947b3a.45.2024.05.12.20.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 20:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1715572391; x=1716177191; 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=T+J5rbIfUpvehIGmWcPG1zjcR1aPta5xb+LZyWF/KhY=; b=U/AFihFqjz0mxS2uWdaoQYnur6EU6ikH/W2qV39ZiQgsYS3bzEyydcVw+A2B2AfWMB xmUWaMQamEV+79Bqnt+gAnZn/LmhGoW4vLO+c61r6RSryUEWKAD4mVtRP1llmp2XJpwI 1RpV4UkFDj+y1F1G8ZC59bUgwLwlUNvb4LEDyju9R9Ogw9ODJJqcP+mrciBJFpeyMMap V1YwYUkGMIoku5YTzePV3uS14Q7pOPxlRd8dGFNz+DFPgOU1Jg84y3mxlLLwPTibAOKg IQOqzvrUrx6ejMkvTBWHRYLRugHynllMTOiffdzgVEpZpXYcn/dMRjgwXLZov5qNUujZ cc+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715572391; x=1716177191; 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=T+J5rbIfUpvehIGmWcPG1zjcR1aPta5xb+LZyWF/KhY=; b=GSMMeZfFL1VmOj0vQNgpmFRtTvrIIzyV7dLhcHnLwYfYJhohoepyaRV5U3tlDuuHGH bMP8p5LMnBnabittzYsgXtrg/yKpwdBjQ2Ypu9bkq6VgmzOn4XUF13dynZLdPCS1/Fh1 /D/zU08104tNcgO6Frj7TGAyIp+TriYIMcniyG+r9SbTMG47zE2XnUgd5RhYl5zzuUQB I42p1RUYsAK3ZvYPm4fv2LjfdYuqfu//2rPdxub20LHdnpIygZvHY4tmb3VRyLJ2XnKy FDUPvqWzxpJeJKecxj9aiA5VNqS+BQ9sXOaVVJEEzQQ89EHubp/ebjuNxCvXMFWRAH6R gmyA== X-Forwarded-Encrypted: i=1; AJvYcCXKpGD1k0r0m1cWjJVX5OZ69/OgpzcjmQr9KzGQOrC5z5sEZllCAxmeqs0GNdbgz5/beHczDkl9qcZvuWPdQe2HXpd8aWM= X-Gm-Message-State: AOJu0YxVXyXQboxauXSqPgYLRVBLl7ocHCqgfjzQBPtpFsNUdwxGL8p/ tXLXIeeOE02d7zb49RvZVTkTB+WvZkmz9p9lwLy6M/4ARaZ3S4cpGihKSwJi0So= X-Google-Smtp-Source: AGHT+IEb7YcESQVycOnJJGFN5KAkU52Zg4YkDArryJlm1dUVePR5yJf0hOPDtfrIZHqX9wXiWCTFqg== X-Received: by 2002:a05:6a20:7faa:b0:1ad:1168:a417 with SMTP id adf61e73a8af0-1afde0e6b67mr13703910637.28.1715572391490; Sun, 12 May 2024 20:53:11 -0700 (PDT) From: Changqi Lu To: qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: kwolf@redhat.com, hreitz@redhat.com, stefanha@redhat.com, fam@euphon.net, ronniesahlberg@gmail.com, pbonzini@redhat.com, pl@dlhnet.de, kbusch@kernel.org, its@irrelevant.dk, foss@defmacro.it, philmd@linaro.org, pizhenwei@bytedance.com, Changqi Lu Subject: [PATCH v2 08/11] hw/nvme: enable ONCS reservations Date: Mon, 13 May 2024 11:52:27 +0800 Message-Id: <20240513035230.60162-9-luchangqi.123@bytedance.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240513035230.60162-1-luchangqi.123@bytedance.com> References: <20240513035230.60162-1-luchangqi.123@bytedance.com> 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::42b; envelope-from=luchangqi.123@bytedance.com; helo=mail-pf1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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 @bytedance.com) X-ZM-MESSAGEID: 1715572486137100003 Content-Type: text/plain; charset="utf-8" This commit enables ONCS to support the reservation function at the controller level. It also lays the groundwork for detecting and enabling the reservation function on a per-namespace basis in RESCAP. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 127c3d2383..182307a48b 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -8248,7 +8248,8 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pc= i_dev) id->nn =3D cpu_to_le32(NVME_MAX_NAMESPACES); id->oncs =3D cpu_to_le16(NVME_ONCS_WRITE_ZEROES | NVME_ONCS_TIMESTAMP | NVME_ONCS_FEATURES | NVME_ONCS_DSM | - NVME_ONCS_COMPARE | NVME_ONCS_COPY); + NVME_ONCS_COMPARE | NVME_ONCS_COPY | + NVME_ONCS_RESRVATIONS); =20 /* * NOTE: If this device ever supports a command set that does NOT use = 0x0 --=20 2.20.1