Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10869836imu; Thu, 6 Dec 2018 08:03:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/XAPd8A1dvHQM660AUU8vFz7ii143x//SvP+/5Hao8jhZlae3YelLWGO1rB8iLwQqh2Zezc X-Received: by 2002:a62:5003:: with SMTP id e3mr29941234pfb.23.1544112207113; Thu, 06 Dec 2018 08:03:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544112207; cv=none; d=google.com; s=arc-20160816; b=a89qlf0xa/BqDW6fZ7+PxfbFuBhj4MCeDN5ytlvGJfU9QxRGHdfn00iNoJwlBaVAx5 QEzuCtDu1hSNcHl5ftKgGj9AQAQ5VWlB4MfCssZQ5CQRQQ01WUk/Jww573BXnfBgD1Yx 9imPXtoWX0CNDU6+2OWV9ti7XIluAtd2nY4TqI05a0UsPQBogkeSMOm3TECgm1zx2gz+ xphspTAUz3q+lK39GeshQRZj8INomi4yWsOzg5TtA1WbPEKvNQMvGyNT5BIMaX9VddZC x43al/T/I2rxLfcQb+OarQi/wRM+IW7eDyQ8XumpILHmEOGvEzAQPp080LcUnm/cjmU/ OsXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hcOIepnvEy/olyRd0jHJfwjqlLsqT+6CFo+IXGedwe4=; b=BEhmuTD/RZRJxHq9wpvS+jJHdo0eMMQXua6lG+YYeSpjv8M0JuzYwRV0fQcASXKgwk 7z6OYOrKbVr56yFCe4P1CsRatWtXhIpMJRAPDCPeSrZn2ZU/yOkS7wpQVnirxL0GI+7K Qh4Vyl3yLTpC/Xeqh4D2SXwIva1nKcNZVkAi0X3dG0DSSTimS/uBjuFq0y5dXJ4NvLHV wIzNd/GKVBG/XEc7vg3GyLBvX8D6fIptbFTo/aei25XtN9OE2AdOeUmiQdsyMgpykKyP p/oUcCifnjADrh5ocXccCgHENAM58rBHEm7wSKO+0h1GvPl1njIUY6F+a8lDd69zaKMA Hiow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=ceifFKY4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si475216pgl.481.2018.12.06.08.02.57; Thu, 06 Dec 2018 08:03:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=ceifFKY4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726159AbeLFQCF (ORCPT + 99 others); Thu, 6 Dec 2018 11:02:05 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:40104 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbeLFQCF (ORCPT ); Thu, 6 Dec 2018 11:02:05 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB6FwYew076488; Thu, 6 Dec 2018 16:01:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=hcOIepnvEy/olyRd0jHJfwjqlLsqT+6CFo+IXGedwe4=; b=ceifFKY4XXltXKxcIau5/srTM1IoPhINh5+GEqkoV7dzgu/og179M2nvFD72q7cAuNdD 20KEunWvDyqvmD/w+tCxO+dgbZVz8zIJYLyk7GV45XXJit4kMmkfKzd2Dd/PWtU+mwD+ ZjJwOY1OJLdPNcDqRnah13rLTcVyClRuPcLMivWpp3CkKT2absgfOzRFVn1cGz/ekuFW sCnBgMQTg2XXRczuzokxhTEKEp7/B7gf2a1PMsaEd1l2OSwBFWq6qYouKNPu4VDqu8Hp ImSsuF87ethFm3KqeRSImojLwRwm0x9iEkqFRhZM5CbPKiA+e+cawa26RLJJ9+unYvVp Cw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2p3jxrs0ra-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 06 Dec 2018 16:01:59 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wB6G1wix021844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Dec 2018 16:01:58 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB6G1wkG007462; Thu, 6 Dec 2018 16:01:58 GMT Received: from char.us.oracle.com (/10.152.32.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Dec 2018 08:01:57 -0800 Received: by char.us.oracle.com (Postfix, from userid 1000) id B24C86A00D6; Thu, 6 Dec 2018 11:01:56 -0500 (EST) Date: Thu, 6 Dec 2018 11:01:56 -0500 From: Konrad Rzeszutek Wilk To: KarimAllah Ahmed Cc: rkrcmar@redhat.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, jmattson@google.com Subject: Re: [PATCH v4 00/14] KVM/X86: Introduce a new guest mapping interface Message-ID: <20181206160156.GB25299@char.us.oracle.com> References: <1543829467-18025-1-git-send-email-karahmed@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1543829467-18025-1-git-send-email-karahmed@amazon.de> User-Agent: Mutt/1.8.3 (2017-05-23) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9098 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=830 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812060136 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 03, 2018 at 10:30:53AM +0100, KarimAllah Ahmed wrote: > Guest memory can either be directly managed by the kernel (i.e. have a "struct > page") or they can simply live outside kernel control (i.e. do not have a > "struct page"). KVM mostly support these two modes, except in a few places > where the code seems to assume that guest memory must have a "struct page". > > This patchset introduces a new mapping interface to map guest memory into host > kernel memory which also supports PFN-based memory (i.e. memory without 'struct > page'). It also converts all offending code to this interface or simply > read/write directly from guest memory. > > As far as I can see all offending code is now fixed except the APIC-access page > which I will handle in a seperate series along with dropping > kvm_vcpu_gfn_to_page and kvm_vcpu_gpa_to_page from the internal KVM API. > > The current implementation of the new API uses memremap to map memory that does > not have a "struct page". This proves to be very slow for high frequency > mappings. Since this does not affect the normal use-case where a "struct page" > is available, the performance of this API will be handled by a seperate patch > series. How (if any) does it affect performance? Thanks!