From patchwork Fri Feb 28 13:27:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 11412279 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 E7113159A for ; Fri, 28 Feb 2020 13:29:53 +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 C414D2469D for ; Fri, 28 Feb 2020 13:29:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="GiEKiV9L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C414D2469D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none 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 1j7fh5-0006Y9-Ck; Fri, 28 Feb 2020 13:28:43 +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 1j7fh4-0006XP-3l for xen-devel@lists.xenproject.org; Fri, 28 Feb 2020 13:28:42 +0000 X-Inumbo-ID: 3c671fb4-5a2e-11ea-993b-12813bfff9fa Received: from smtp-fw-4101.amazon.com (unknown [72.21.198.25]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3c671fb4-5a2e-11ea-993b-12813bfff9fa; Fri, 28 Feb 2020 13:28:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1582896522; x=1614432522; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VwUop21K3G8ExpStnABalvSNIyzshZ8JYuHGn+3MCPA=; b=GiEKiV9LJcgU83WxE9c7OkeB05AXQeUoGDnMV4bb7XfXirhagzlVRnJP I/A1jY82Ei83O59sc66RGOEaDpvWopQd8RzpBQMqBj0ijgobTeGDyRAYw f67MbqW0D2degiDkwvkiuJV4kEIB2OIG1g035r1UtdIyaf4AG+L2Q5/br 4=; IronPort-SDR: +rW9OhTk3zour0JUluQuwudaGWZqiw0GGl7kPZrM7OJaAfjaUKDIwentlCitfqdaTnJIdzn7fJ OwRz/JkVlulQ== X-IronPort-AV: E=Sophos;i="5.70,496,1574121600"; d="scan'208";a="19026438" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2a-538b0bfb.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 28 Feb 2020 13:28:29 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-538b0bfb.us-west-2.amazon.com (Postfix) with ESMTPS id 1A48AA2C09; Fri, 28 Feb 2020 13:28:28 +0000 (UTC) Received: from EX13D32EUC003.ant.amazon.com (10.43.164.24) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Fri, 28 Feb 2020 13:28:16 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D32EUC003.ant.amazon.com (10.43.164.24) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 28 Feb 2020 13:28:14 +0000 Received: from u2f063a87eabd5f.cbg10.amazon.com (10.125.106.135) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 28 Feb 2020 13:28:13 +0000 From: Paul Durrant To: Date: Fri, 28 Feb 2020 13:27:47 +0000 Message-ID: <20200228132749.2929-5-pdurrant@amazon.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200228132749.2929-1-pdurrant@amazon.com> References: <20200228132749.2929-1-pdurrant@amazon.com> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH 4/6] x86 / ioreq: use a MEMF_no_refcount allocation for server pages... X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Paul Durrant , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" ... 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 --- Cc: Paul Durrant Cc: 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 f8a5c81546..648ef9137f 100644 --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -375,7 +375,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;