Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp801373pxj; Thu, 27 May 2021 11:58:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb4uKsZ5Smvb74KvkzKCMJRl+H3TOVUkOvKh6t/qEpzhpekOFwtg7kG9WErAXQSl4gxtm+ X-Received: by 2002:a05:6402:268f:: with SMTP id w15mr5700870edd.321.1622141888727; Thu, 27 May 2021 11:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622141888; cv=none; d=google.com; s=arc-20160816; b=yXjOzCJc3cg5R7b/l1vrF5PAx4waKSbSFEt79GaWVbCqZAp5/6ZyuVD9K8j+Kv2wRi nEQ+6dEzN6tMa8Jiqwkg9N9ZoV9jyVINV9UzDzo3SBNxZJMKNLLHCqjNvltmAZyVhyyv /8Tt5P4AaEu845X3xLgQY230CYzLdasu7kk5glE8a69l1Spcovos2d8+w9kWGlqcEMbl RdK2XggnSTJIM9V71o1c4qgW/WIrq0bLDR5+UjhiXgI5EYYY5tWdtZGoygtvOdG9DXUh l8AymQkd0IcRCum01uiMCq6HR/Q4CVoOFapM4jWCGYz2QEvow6NH7RmkBQ0kveUMadSS 6xUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=GOs4o9P7MW3xf962v8OmDYwflfOn7MeLduQg4KcUsT0=; b=NKpSCRJ1sUgkSWZGeUroRCuGAwYvalNyRXeZknTvl7XDZ2PAnp6RNmU8yVY+l3YNfQ Wj6ZhcTdMts0Qg1yLleKQN2tKcQ11PGnk+uGawV7cmT3JYxOR96w8EkYXnegkhhezECw 51QmzpAZGtiKqxm0ug/gK+M0NMOuY41MIvNAZHDNzFMsRVtrY5i+YVhdAMFS9ZMjlMsy NjBRgukK9IvWvMJyaiQ6EoCoNquY3bjqPTbc3d/0QgJ0Adki+I6ZQycAv491v7RNoh3z lUEOruPlws1U2wHu0Qsj6sQ0xEgCP4+kHFVH+yGRYFEY5+q0vcP7p+JVKq22zzKKz5xp 93tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si2855005edw.373.2021.05.27.11.57.45; Thu, 27 May 2021 11:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234190AbhE0Qlt (ORCPT + 99 others); Thu, 27 May 2021 12:41:49 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:43874 "EHLO mail-pf1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236541AbhE0Qli (ORCPT ); Thu, 27 May 2021 12:41:38 -0400 Received: by mail-pf1-f172.google.com with SMTP id d78so992262pfd.10; Thu, 27 May 2021 09:40:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GOs4o9P7MW3xf962v8OmDYwflfOn7MeLduQg4KcUsT0=; b=U22bmK+LVnSA+5I+gGqG1cqsZ4Keb/8QKkfxXprlztXC3wVAF38eJznm5sQ+WEUKks KbZwQNbg5iuullgzYBwKWOshVakJ9onplMmBhLgV+TEV1Kk1hpVhjRAE8liGn7jcPGPx icKCLEEJVSUW9ZDQAKW+pCfozIIR8cazWp7laQMyBfPGh4US91sC1go7aLfJnvbLGxT7 KI8GGS1hO9JLa6DJY8ge1TsIsp/t9JzFWRe2xaGS/2D+QVT8P2wcHkBO8zPpzYEvDtLt OshUudSUklkEuivslq1sY/Y2y55L/Yo52yu+uqTG6UlJnKsw7Nm9q92dyWMHUvyU4X/B vndg== X-Gm-Message-State: AOAM530NvNYKZFqPKgoWRvrI+IZjyrE0f7eCXtK/hGR+gGBsihIa0c7S XoKkK/VRWwfOLIOc5016o+k= X-Received: by 2002:aa7:8f37:0:b029:2db:551f:ed8e with SMTP id y23-20020aa78f370000b02902db551fed8emr4478007pfr.43.1622133604807; Thu, 27 May 2021 09:40:04 -0700 (PDT) Received: from [192.168.3.217] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id g15sm2122855pfv.127.2021.05.27.09.40.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 May 2021 09:40:04 -0700 (PDT) Subject: Re: [PATCH 0/3] Add quirk to support exynos ufshci To: jongmin jeong , jejb@linux.ibm.com, martin.petersen@oracle.com Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, cang@codeaurora.org, beanhuo@micron.com, adrian.hunter@intel.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig References: <20210527030901.88403-1-jjmin.jeong@samsung.com> From: Bart Van Assche Message-ID: <8bc342ef-b434-6a56-97e8-582a6588e920@acm.org> Date: Thu, 27 May 2021 09:40:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210527030901.88403-1-jjmin.jeong@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/26/21 8:08 PM, jongmin jeong wrote: > In ExynosAuto(variant of the Exynos for automotive), the UFS Storage needs > to be accessed from multi-OS. > To increase IO performance and reduce SW complexity, we implemented UFS-IOV > to support storage IO virtualization feature on UFS. > > IO virtualization increases IO performance and reduce SW complexity > with small area cost. And IO virtualization supports virtual machine isolation > for Security and Safety which are requested by Multi-OS system such as > automotive application. > > Below figure is the conception of UFS-IOV architeture. > > +------+ +------+ > | OS#1 | | OS#2 | > +------+ +------+ > | | > +------------+ +------------+ > | Physical | | Virtual | > | Host | | Host | > +------------+ +------------+ > | | | <-- UTP_CMD_SAP, UTP_TM_SAP > | +-------------------------+ > | | Function Arbitor | > | +-------------------------+ > +-------------------------------+ > | UTP Layer | > +-------------------------------+ > +-------------------------------+ > | UIC Layer | > +-------------------------------+ > > There are two types of host controllers on the UFS host controller > that we designed. > The UFS device has a Function Arbitor that arranges commands of each host. > When each host transmits a command to the Arbitor, the Arbitor transmits it > to the UTP layer. > Physical Host(PH) support all UFSHCI functions(all SAPs) same as conventional > UFSHCI. > Virtual Host(VH) support only data transfer function(UTP_CMD_SAP and UTP_TM_SAP). > > In an environment where multiple OSs are used, the OS that has the leadership of > the system is called System OS. This system OS uses PH and controls error handling. > > Since VH can only use less functions than PH, it is necessary to send a request > to PH for Detected Error Handling in VH. To interface among PH and VHs, > UFSHCI HW supports mailbox. PH can broadcast mail to other VH at the same time > with arguments and VH can mail to PH with arguments. > PH and VH generate interrupts when mails from PH or VH. > > In this structure, the virtual host can't support some feature and need to skip > the some part of ufshcd code by using quirk. > This patchs add quirks so that the UIC command is ignored and the ufshcd init > process can be skipped for VH. Also, according to our UFS-IOV policy, > we added a quirk to the abort handler or device reset handler to call > the host reset handler. More information is needed about how multiple operating systems share a single UFS device. Are LUNs shared across operating systems, does each OS access separate LUNs or does each OS access different partitions on the same LUN? Do you agree that for the latter two it is not necessary to provide the virtual host access to the UTP layer? Bart.