Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4225064pxb; Mon, 30 Aug 2021 23:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSjg8QeKggOU20wPYpqv6F3VVyh+YhIDROTSkTl2M6TYMTKVPZKBgKuUt+LrZ78deq4v5t X-Received: by 2002:a02:878f:: with SMTP id t15mr1310161jai.102.1630390327957; Mon, 30 Aug 2021 23:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630390327; cv=none; d=google.com; s=arc-20160816; b=w+29rGrtNwVEfaDPZ5Yb6omu4vZw6zCthDO/6hojRcvSdCHk/1uoy9adQXVwI5V4xi QAy2x8mXBgRDkVeOpYMZXQXxib3LPtL1M5HHvEBt4wzPh6xgpQMvF50TTMjHGxbkY7tq 41SostIXz7baNcWFVPb1qxUkhTLJ2ibxfgfpz46CAM8J+4mJQ79VKL2s4rnYKFr+k1s8 QyrYhegG+ekOh0Gb54qk7fFDDJHsDlK4FDGLY76JBO0kPBSMFIhtxmPP+pja59yus84U daqL3e3sYSZOOoSbHOI06eJjNitbAfcnS6jqB4VZdVZgVXSb0d0vnz+3vnaYiVOjCU6d BqCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=uGh4XR7hh4cdTdvHDQPpS85qHRzf56+WaORfU4yCnos=; b=BjUifraOlnge/+yVrCg+p2I8UB57jzJOIH50dhTqP+3WHparNwY0n9BR5d6xEGECSa RHhIEV3jnZDG4WlCMYhNhkE3tz2Y2DA8vNMdtDtux0vfqJ2QUdORGP+xanu9iDJ5gwcL meUl3fATERjb1LgJScZjGO0GsT434TyUSErgMFSPoAfpuHQdVOR/wb6SEHZqc6bgAAcb 9lMnGgFFIe8iw2pXo/TGqk1z4f7jig6c7V9E5qyTy1F7fnVRR1vE8N2uZLYQ5rmb0weV NHEEaHnREFHwjP03LlchraTR7D60f/QofGz1bEvl8OwGphZb76Te5apLZj345F55K9ch Fnnw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r195si6676883ior.17.2021.08.30.23.11.55; Mon, 30 Aug 2021 23:12:07 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbhHaGKu (ORCPT + 99 others); Tue, 31 Aug 2021 02:10:50 -0400 Received: from mga18.intel.com ([134.134.136.126]:63991 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhHaGKt (ORCPT ); Tue, 31 Aug 2021 02:10:49 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10092"; a="205539843" X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="205539843" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 23:09:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="687546018" Received: from louislifei-optiplex-7050.sh.intel.com (HELO louislifei-OptiPlex-7050) ([10.239.154.151]) by fmsmga006.fm.intel.com with ESMTP; 30 Aug 2021 23:09:52 -0700 Date: Tue, 31 Aug 2021 14:10:27 +0800 From: Li Fei1 To: Greg KH Cc: linux-kernel@vger.kernel.org, yu1.wang@intel.com, shuox.liu@gmail.com, fei1.li@intel.com Subject: Re: [PATCH v2 1/3] virt: acrn: Introduce interfaces for MMIO device passthrough Message-ID: <20210831061027.GA8717@louislifei-OptiPlex-7050> References: <20210825090142.4418-1-fei1.li@intel.com> <20210825090142.4418-2-fei1.li@intel.com> <20210826013838.GA7915@louislifei-OptiPlex-7050> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 27, 2021 at 10:45:32AM +0200, Greg KH wrote: > On Thu, Aug 26, 2021 at 09:38:38AM +0800, Li Fei1 wrote: > > On Wed, Aug 25, 2021 at 10:43:29PM +0200, Greg KH wrote: > > > On Wed, Aug 25, 2021 at 05:01:40PM +0800, Fei Li wrote: > > > > From: Shuo Liu > > > > > > > > MMIO device passthrough enables an OS in a virtual machine to directly > > > > access a MMIO device in the host. It promises almost the native > > > > performance, which is required in performance-critical scenarios of > > > > ACRN. > > > > > > > > HSM provides the following ioctls: > > > > - Assign - ACRN_IOCTL_ASSIGN_MMIODEV > > > > Pass data struct acrn_mmiodev from userspace to the hypervisor, and > > > > inform the hypervisor to assign a MMIO device to a User VM. > > > > > > > > - De-assign - ACRN_IOCTL_DEASSIGN_PCIDEV > > > > Pass data struct acrn_mmiodev from userspace to the hypervisor, and > > > > inform the hypervisor to de-assign a MMIO device from a User VM. > > > > > > > > Signed-off-by: Shuo Liu > > > > Signed-off-by: Fei Li > > > > > > Where is the userspace code that uses this new api? > > > > Hi Greg > > > > An ACRN userspace application (like QEMU) would uses these new apis in > > https://github.com/projectacrn/acrn-hypervisor/blob/master/devicemodel/core/vmmapi.c#L562 > > and > > https://github.com/projectacrn/acrn-hypervisor/blob/master/devicemodel/core/vmmapi.c#L568 Hi Greg Sorry to reply late. > > Please provide links in all of these patches when you resend them, to > the userspace code as well, so that we know how it all works together. > Sure. > thanks, > > greg k-h