From patchwork Wed Mar 18 17:32:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 11445791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8BF5139A for ; Wed, 18 Mar 2020 17:35:45 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8536320724 for ; Wed, 18 Mar 2020 17:35:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="dtNQy8Tx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8536320724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEcYn-0006Rc-JU; Wed, 18 Mar 2020 17:32:53 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEcYm-0006RX-SK for xen-devel@lists.xenproject.org; Wed, 18 Mar 2020 17:32:52 +0000 X-Inumbo-ID: 7e1cb080-693e-11ea-bb3a-12813bfff9fa Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 7e1cb080-693e-11ea-bb3a-12813bfff9fa; Wed, 18 Mar 2020 17:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1R8tZJcYN4tYZnqAnW3BaOpJQtbMY/9yYaflzyTYuJE=; b=dtNQy8TxkeFh+7l8jHLk3WBSsM LpOWWbel6YloxsMfvEuiWcAdk0htrSbL8gOQF6jitSP+hCJf7K3MK+xL/XCw5WF8ssTeH9Vg++rTZ qDDd19EZItmZQMdMsQc8KDs24xIG3oVbX45MhUt5tSDzrb9TxxQugbZ2DbTWknc2jR/c=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEcYk-0005UC-In; Wed, 18 Mar 2020 17:32:50 +0000 Received: from 54-240-197-232.amazon.com ([54.240.197.232] helo=u2f063a87eabd5f.cbg10.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jEcYk-0007B3-9d; Wed, 18 Mar 2020 17:32:50 +0000 From: Paul Durrant To: xen-devel@lists.xenproject.org Date: Wed, 18 Mar 2020 17:32:42 +0000 Message-Id: <20200318173243.29183-3-paul@xen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200318173243.29183-1-paul@xen.org> References: <20200318173243.29183-1-paul@xen.org> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 2/3] x86 / ioreq: use a MEMF_no_refcount allocation for server pages... X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Paul Durrant , Andrew Cooper , Paul Durrant , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Paul Durrant ... now that it is safe to assign them. This avoids relying on libxl (or whatever toolstack is in use) setting max_pages up with sufficient 'slop' to allow all necessary ioreq server pages to be allocated. Signed-off-by: Paul Durrant Reviewed-by: Jan Beulich --- Cc: Andrew Cooper Cc: Wei Liu Cc: "Roger Pau Monné" v2: - New in v2 --- xen/arch/x86/hvm/ioreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c index 36fbbcf0ea..70e61788d7 100644 --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -376,7 +376,7 @@ static int hvm_alloc_ioreq_mfn(struct hvm_ioreq_server *s, bool buf) return 0; } - page = alloc_domheap_page(s->target, 0); + page = alloc_domheap_page(s->target, MEMF_no_refcount); if ( !page ) return -ENOMEM;