From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6475C6786E for ; Fri, 26 Oct 2018 14:48:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B5E02054F for ; Fri, 26 Oct 2018 14:48:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="yD5aawgX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B5E02054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727751AbeJZXZi (ORCPT ); Fri, 26 Oct 2018 19:25:38 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:39740 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbeJZXZi (ORCPT ); Fri, 26 Oct 2018 19:25:38 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9QEclBp130283; Fri, 26 Oct 2018 14:48:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=CC0IBocFSsNMaDpJz1cHicVYSmQwD9NiE4PRlK9uIp0=; b=yD5aawgXrkCw3wW/h5CnMIXeuIH5D8Gku2iLfkXi4odRtJ7GeRz9e6HpwIQUjz69XScW 2/UWPPI/o/fEvggR7bFjsyggCzTvEPhtBo4xflV/oTfH/347rk11K+LJ6Wz1yoLX2/K2 IrpxkeuENXCB7RohbEi4JaXi4ivAnkrkA+b//Z6kqyVhd8WKx/xKr2wPT42RLXP7aR+r 5bqwFExy9atg3IqGvf0GWsz91ORy2RAj18VJh7sR0HC7fClMfR9HJn5E9bkQHEcfD0Kz A5f2b/JF5nBZhSI6qNivGCkCetRL4M1Fbzf7IUBDtkY79+x5N4C5gTE+9bwzvcnoSl9C gQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2n7vaqfnxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Oct 2018 14:48:11 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9QEmAnM003122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Oct 2018 14:48:10 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9QEmAPJ023196; Fri, 26 Oct 2018 14:48:10 GMT Received: from [10.211.46.56] (/10.211.46.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 26 Oct 2018 07:48:09 -0700 Subject: Re: [PATCH] xen-swiotlb: exchange memory with Xen only when pages are contiguous To: Dongli Zhang Cc: Christoph Helwig , Boris Ostrovsky , Konrad Rzeszutek Wilk , konrad@kernel.org, John Sobecki , "xen-devel@lists.xenproject.org" , "linux-kernel@vger.kernel.org" References: <20181024130246.GA22616@localhost.localdomain> <83900cf4-690c-9725-d022-d427fdeb4f7d@oracle.com> <581cb7ea-3112-791d-918d-9bb887e4744f@oracle.com> <24a62522-1629-5d0b-398e-6d2c1a0b97f7@oracle.com> <922914c9-22db-c5d1-33da-d07691ebd7d7@oracle.com> <45f5ffe8-3f48-4485-53f0-5a056be69b0c@oracle.com> <5b64850f-9142-0360-fe4e-9e7bc74d2368@oracle.com> <20181026074802.GA4768@lst.de> <10301c25-5bbf-51b6-6cb2-77e30bcd9a99@oracle.com> From: Joe Jin Message-ID: Date: Fri, 26 Oct 2018 07:48:09 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <10301c25-5bbf-51b6-6cb2-77e30bcd9a99@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9057 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=614 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810260126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/18 1:54 AM, Dongli Zhang wrote: > If dom0 (or any domain) is happy, although it could try to exchange all its > continuous dma pages back to xen hypervisor. From the perspective of each > domain, they always would like to keep as much continuous dma page as possible. > > I am thinking something different. If there is malicious domU keep exchanging > memory and allocating continuous pages from xen hypervisor, will the > continuously dma pages be used up (sort of DoS attack)? This is a problem. > > I am not sure if there is anything in xen hypervisor to prevent such behavior? I'm not sure but I guess it hard to prevent it, xen hypervisor could not identify if the requirement is reasonable or no. Maybe Xen reserve some low memory for guest start? Thanks, Joe