From: Kenneth Lee Subject: Re: [RFC PATCH 3/7] vfio: add spimdev support Date: Thu, 2 Aug 2018 11:47:27 +0800 Message-ID: <20180802034727.GK160746@Turing-Arch-b> References: <20180801102221.5308-1-nek.in.cn@gmail.com> <20180801102221.5308-4-nek.in.cn@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: Kenneth Lee , Herbert Xu , "kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Jonathan Corbet , Greg Kroah-Hartman , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "Kumar, Sanjay K" , Hao Fang , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org" , Alex Williamson , Thomas Gleixner , "linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Philippe Ombredanne , Zaibo Xu , "David S . Miller" , "linux-accelerators-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" To: "Tian, Kevin" Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: linux-crypto.vger.kernel.org T24gVGh1LCBBdWcgMDIsIDIwMTggYXQgMDM6MjE6MjVBTSArMDAwMCwgVGlhbiwgS2V2aW4gd3Jv dGU6Cj4gRGF0ZTogVGh1LCAyIEF1ZyAyMDE4IDAzOjIxOjI1ICswMDAwCj4gRnJvbTogIlRpYW4s IEtldmluIiA8a2V2aW4udGlhbkBpbnRlbC5jb20+Cj4gVG86IEtlbm5ldGggTGVlIDxuZWsua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