Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp18472pxb; Wed, 25 Aug 2021 18:39:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLVWsWAXvHes7bPpW1L/Uf4vV7XzHWNp1lSjTJ5wRitR/2dcE2CHZ3bNHL4YBjg4N7niuM X-Received: by 2002:a17:906:a18b:: with SMTP id s11mr1657801ejy.8.1629941991599; Wed, 25 Aug 2021 18:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629941991; cv=none; d=google.com; s=arc-20160816; b=lRAlFPJTe5MfhqC2yEIJm7MFsdnda40WWnAzHbN5TjIBIMxBKxp0hItY82AxS32GBp uZwsyKn2BLpEJ9Jc+GEjvHkyWlf6oHAI/YbtLxLRJCAU0ZgEQKfw33KJXxzm8cbKTZNo iSa7xUpcQLj0Q+V1QB/KBPn8d1wH/q+jDD+vqSBFkQseL7u9A4wuGB7V0UL1CUlzjuKk ga8NRv+yKg0RdDHMR3SndrRXD070gy4pvu45m2DRJzxJiUW7Ek8ohSHuf9PDZ6iyKcEz p6JrCAC5HqWTCj8/X0BYn5UHajbFWHG31EyAnyNftXVuhRlWj0BooLMAJ8dw90vzEXle EMuw== 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=17dsuwMh2Ptqre6qZSxHuUdA4Lnu4R8Rla9fxZZR5RQ=; b=XOPBc2OwfBLl9KLxd0tKVmva5XQ1yi99RO3gXRm3YMDIs0GTKpAqnZSMUXR/1snkwU 4ekXkhMMFEq7zslFTbN4b2BMrbgj/fgBlYTz50YYrGsYXhAvZUaopR/wxbUHNzqB0fNd awILiA5Y1TquvGIHD76DKvyMQltnC4Xa/VTqoREeUn+a3f7WJCwbVGusRVvdOhocy0L4 2drRgywizcV2yDXS221/UWUZcqxWgV0EwypqCVwSci0XIEktqLEg+AJRPxUbdZsqyaPR /EKfNKJl4VjYyvxkaQkwHH5eOJkeGlfJnKVghgAT4cFjkgiwYvCf8LImQwGwixtJZ1+E E5Sw== 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 ga29si1188071ejc.306.2021.08.25.18.39.27; Wed, 25 Aug 2021 18:39:51 -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 S235823AbhHZBiy (ORCPT + 99 others); Wed, 25 Aug 2021 21:38:54 -0400 Received: from mga09.intel.com ([134.134.136.24]:21666 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235677AbhHZBix (ORCPT ); Wed, 25 Aug 2021 21:38:53 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10087"; a="217648801" X-IronPort-AV: E=Sophos;i="5.84,352,1620716400"; d="scan'208";a="217648801" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 18:38:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,352,1620716400"; d="scan'208";a="684711931" Received: from louislifei-optiplex-7050.sh.intel.com (HELO louislifei-OptiPlex-7050) ([10.239.154.151]) by fmsmga006.fm.intel.com with ESMTP; 25 Aug 2021 18:37:59 -0700 Date: Thu, 26 Aug 2021 09:38:38 +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: <20210826013838.GA7915@louislifei-OptiPlex-7050> References: <20210825090142.4418-1-fei1.li@intel.com> <20210825090142.4418-2-fei1.li@intel.com> 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 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 thanks. > > thanks, > > greg k-h