From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607972744; cv=none; d=zohomail.com; s=zohoarc; b=fJaWgYB+TitVh4WXAztIXnH/VtPDWrtf2tATdnFnmKdyp/eAbRINH+aYU0fMxXq+m84Ghjt6rc9xzInoOnqds4+k42dF9WyMn10BlKA9aYem/chqE3ecP6qBkeHAya8snAzWu0suTv3EQO9Mk9Vct15Z4DDMSMxfmo5ypTYCRGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607972744; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eS4Xxshhz9HQjB33/d59/PNlO8d9JjCQ44zrDeIouvk=; b=M4a6l+vJI8wSdHK11HeatdJeatUKFAJ9pQYIhpgQQgvwYO6Y9dXFHVo3oFL/iuGh+LjzsQgEEfNkI1SRgSWXG459D6uLQcFui72Ftx8EqDZc08yeD79CRRnIMDkVuN4pFzZFAT/7Lhu+lHrSPf5LjioshswDkvGkM6o2TVUzpTY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607972744178881.0776645741656; Mon, 14 Dec 2020 11:05:44 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52380.91569 (Exim 4.92) (envelope-from ) id 1koshF-0001pC-84; Mon, 14 Dec 2020 18:35:45 +0000 Received: by outflank-mailman (output) from mailman id 52380.91569; Mon, 14 Dec 2020 18:35:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshE-0001ox-U4; Mon, 14 Dec 2020 18:35:44 +0000 Received: by outflank-mailman (input) for mailman id 52380; Mon, 14 Dec 2020 16:36:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqA-0006vN-IE for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:36:50 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0b64aa07-f16c-437c-8ee1-cbd63850eb72; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaW2U004851; Mon, 14 Dec 2020 17:36:32 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaWEe015623; Mon, 14 Dec 2020 17:36:32 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id AA212AAC65; Mon, 14 Dec 2020 17:36:32 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0b64aa07-f16c-437c-8ee1-cbd63850eb72 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 01/24] Fix lock directory path for NetBSD Date: Mon, 14 Dec 2020 17:36:00 +0100 Message-Id: <20201214163623.2127-2-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:32 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- m4/paths.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/paths.m4 b/m4/paths.m4 index 89d3bb8312..1c107b1a61 100644 --- a/m4/paths.m4 +++ b/m4/paths.m4 @@ -142,7 +142,7 @@ AC_SUBST(XEN_SCRIPT_DIR) =20 case "$host_os" in *freebsd*) XEN_LOCK_DIR=3D$localstatedir/lib ;; -*netbsd*) XEN_LOCK_DIR=3D$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=3D$rundir_path ;; *) XEN_LOCK_DIR=3D$localstatedir/lock ;; esac AC_SUBST(XEN_LOCK_DIR) --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607972590; cv=none; d=zohomail.com; s=zohoarc; b=Vr1/Pz4c5/Y23mJjphxJdYblx8JqHXD1DZQXdey26MLyFjocJlx+jhlWp03oPl0K+JY4tIiq2viDr/RkPO10pAoZn4BbkV87OKlR14coIIImg5sJPZCPNhkHFY1DORhAUSAgit1VA/J5tAQ5bFqreEApzguSlj2BNmPLMjYBMu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607972590; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K6YmrwlKgQXE2BXr64flhDYIilkpMauNfg6PvqJ6c5U=; b=Ukp3J0dQd0xtiYujZbbCjHyD4q/hyJcFfkhIG5TV5MWJZYjgmkquO3Z0fU7uGebDjLVnFIrPu1STxch1HpItP5OrpZtCVfQN0gEnFxHw/z1lScp95vewmESDf5dWYleDDnzQdiqZuGHF5taFyceis0i70wqGLDU7GnrJhprS1rQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607972590281889.7349842310336; Mon, 14 Dec 2020 11:03:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52388.91618 (Exim 4.92) (envelope-from ) id 1koshH-0001tF-DQ; Mon, 14 Dec 2020 18:35:47 +0000 Received: by outflank-mailman (output) from mailman id 52388.91618; Mon, 14 Dec 2020 18:35:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshG-0001sh-Rh; Mon, 14 Dec 2020 18:35:46 +0000 Received: by outflank-mailman (input) for mailman id 52388; Mon, 14 Dec 2020 16:37:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqU-0006vN-JD for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:10 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id de156a27-9ec4-4675-91d3-84c974aff5bf; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaWYu006863; Mon, 14 Dec 2020 17:36:32 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaWeD021269; Mon, 14 Dec 2020 17:36:32 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id B9906AAC67; Mon, 14 Dec 2020 17:36:32 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: de156a27-9ec4-4675-91d3-84c974aff5bf From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 02/24] NetBSD doens't need xenbackendd with xl toolstack Date: Mon, 14 Dec 2020 17:36:01 +0100 Message-Id: <20201214163623.2127-3-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index ed71474421..757a560be0 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -18,7 +18,6 @@ SUBDIRS-$(CONFIG_X86) +=3D firmware SUBDIRS-y +=3D console SUBDIRS-y +=3D xenmon SUBDIRS-y +=3D xentop -SUBDIRS-$(CONFIG_NetBSD) +=3D xenbackendd SUBDIRS-y +=3D libfsimage SUBDIRS-$(CONFIG_Linux) +=3D vchan =20 --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970970; cv=none; d=zohomail.com; s=zohoarc; b=StYzIBs11fYNwJMn4ONA47y2fJNWjHWS/AtRRacGyFClWiZ0kt3GOy9rnjKshcpD4eIkl7VNd8FBLtd6pz5jx8EBglY+DTH9uF31ZAn1i4fo5sjmqqztVbMU3uYc+lHm2JUCIGGF7YzG2PovTP80A5o6lmSkILrkkmEzhK6gtAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970970; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yUbVsyR7a/oG5GyAQ7W7JBMZ0y76GxsJLXxhzs8KIts=; b=FgjgSR+c5eE84mnr3JP8lN768XhXJKH5T3xbTneZw/c1vUJIHxRysMC5cKf2pxBuYWm06JHpJiKiqodkgY27HMHI2bcvS53ssWAkr3McJx1yc4aa9T1Czbr0K2d2LtdKBf9NxJqLa4vOoPIKtv+ob8e3EBli1w0bOmdN3jkSXxo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970970481926.4027762774234; Mon, 14 Dec 2020 10:36:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52376.91547 (Exim 4.92) (envelope-from ) id 1koshE-0001ni-Aw; Mon, 14 Dec 2020 18:35:44 +0000 Received: by outflank-mailman (output) from mailman id 52376.91547; Mon, 14 Dec 2020 18:35:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshE-0001nX-59; Mon, 14 Dec 2020 18:35:44 +0000 Received: by outflank-mailman (input) for mailman id 52376; Mon, 14 Dec 2020 16:36:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqq0-0006vN-Hq for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:36:40 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id af584279-f0a1-4295-b802-776de9f7ff87; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaWHF022880; Mon, 14 Dec 2020 17:36:32 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaWlB002558; Mon, 14 Dec 2020 17:36:32 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id CBC52AAC67; Mon, 14 Dec 2020 17:36:32 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: af584279-f0a1-4295-b802-776de9f7ff87 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 03/24] Fix lock directory path for NetBSD Date: Mon, 14 Dec 2020 17:36:02 +0100 Message-Id: <20201214163623.2127-4-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure b/tools/configure index 8a708e9baa..131112c41e 100755 --- a/tools/configure +++ b/tools/configure @@ -4030,7 +4030,7 @@ XEN_SCRIPT_DIR=3D$XEN_CONFIG_DIR/scripts =20 case "$host_os" in *freebsd*) XEN_LOCK_DIR=3D$localstatedir/lib ;; -*netbsd*) XEN_LOCK_DIR=3D$localstatedir/lib ;; +*netbsd*) XEN_LOCK_DIR=3D$localstatedir/run ;; *) XEN_LOCK_DIR=3D$localstatedir/lock ;; esac =20 --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970972; cv=none; d=zohomail.com; s=zohoarc; b=GG9pJfrQD9uUuCwyKvYLRVVCzxa2D2f/Q31kZjVmGPajDZTBzBGypdLkJfqx2QliqB3cf6rrDvtLL0SMCW8JK7B7lh/+K4VxcEm+ENHW5pIIrkOQ4FuXc4P6rhXb5e65zH82Gd0q9hVd3hW8kAYI7DuEtr04FZpYnokC0vGGcaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970972; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EpIbOADB1oXR0zbsBnQtXrarx8W+BpOBP3I4ih7XFT4=; b=HH2Pi0X/zTm+FjyB4HZb2oyrE/6sal+bHtozgpXyYhq1bRhc9SGrqA+5gBy7PZeDo3/brsuCD4+AW38WLwLDI49H2/KyuTsTbYySjCRXOU9ayYOxyqvYSYXAXjG9K3Ei5vQPNNTICntZz/FTmdqGCBVDIA4M7hL8mwofG9+jhOY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970972054321.6939463712747; Mon, 14 Dec 2020 10:36:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52386.91604 (Exim 4.92) (envelope-from ) id 1koshG-0001rz-NQ; Mon, 14 Dec 2020 18:35:46 +0000 Received: by outflank-mailman (output) from mailman id 52386.91604; Mon, 14 Dec 2020 18:35:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshG-0001rW-Cw; Mon, 14 Dec 2020 18:35:46 +0000 Received: by outflank-mailman (input) for mailman id 52386; Mon, 14 Dec 2020 16:37:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqP-0006vN-If for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:05 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 67e0c9a6-fb09-457e-b95d-83f6c8056612; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXKv022303; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXZt022112; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id E245AAAC68; Mon, 14 Dec 2020 17:36:32 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 67e0c9a6-fb09-457e-b95d-83f6c8056612 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 04/24] Make xg_main.c build on NetBSD Date: Mon, 14 Dec 2020 17:36:03 +0100 Message-Id: <20201214163623.2127-5-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/debugger/gdbsx/xg/xg_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg= _main.c index a4e8653168..fa2741ccf8 100644 --- a/tools/debugger/gdbsx/xg/xg_main.c +++ b/tools/debugger/gdbsx/xg/xg_main.c @@ -49,7 +49,11 @@ #include "xg_public.h" #include #include +#ifdef __NetBSD__ +#include +#else #include +#endif #include #include =20 @@ -126,12 +130,19 @@ xg_init() int flags, saved_errno; =20 XGTRC("E\n"); +#ifdef __NetBSD__ + if ((_dom0_fd=3Dopen("/kern/xen/privcmd", O_RDWR)) =3D=3D -1) { + perror("Failed to open /kern/xen/privcmd\n"); + return -1; + } +#else if ((_dom0_fd=3Dopen("/dev/xen/privcmd", O_RDWR)) =3D=3D -1) { if ((_dom0_fd=3Dopen("/proc/xen/privcmd", O_RDWR)) =3D=3D -1) { perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd\n= "); return -1; } } +#endif /* Although we return the file handle as the 'xc handle' the API * does not specify / guarentee that this integer is in fact * a file handle. Thus we must take responsiblity to ensure --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970970; cv=none; d=zohomail.com; s=zohoarc; b=JjZMPq+G9Hf/eQPvnumLeOfDvynH2gkeyml2z9BBZC/dN2kIJ3k+rX4hLcUPOZQ4r2p0diqato6E39zeipGUs5VM9XtFBlCzMMEqctqNXKccAtkLqnmvySlqenzwN/frLqvWApUW6O/dTv8m4Bn6HAQmuYweb3xLk2xV7us069o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970970; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VzB0e/GR5srn/jh7P/jo8peTucI7tXR8v/kY4/DF71I=; b=gBNgnni34yW4w2drSKrOP3uWpo9YSRONdGB9pQheefpUFHuI4n9XZgTxz5hicvsc5xObgIRoZp4UPVifBMm/GxdHT8I1Fa5m88TXnz98lKx0TPuh8snEw6yQMfr6dJCtsp/QB6kYZKQ4Y7Kb9n+yB0RGiBJoeyTcuZVCA6c+cTk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970970678522.5209401390548; Mon, 14 Dec 2020 10:36:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52392.91638 (Exim 4.92) (envelope-from ) id 1koshI-0001xQ-Mb; Mon, 14 Dec 2020 18:35:48 +0000 Received: by outflank-mailman (output) from mailman id 52392.91638; Mon, 14 Dec 2020 18:35:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshI-0001wh-Ak; Mon, 14 Dec 2020 18:35:48 +0000 Received: by outflank-mailman (input) for mailman id 52392; Mon, 14 Dec 2020 16:37:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqe-0006vN-JC for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:20 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3ee0e64c-6f61-4b85-982b-7d787e7a9922; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXek012603; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXpP018804; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 0C78EAAC66; Mon, 14 Dec 2020 17:36:32 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3ee0e64c-6f61-4b85-982b-7d787e7a9922 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 05/24] Introduce locking functions for block device setup on NetBSD Date: Mon, 14 Dec 2020 17:36:04 +0100 Message-Id: <20201214163623.2127-6-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Spam-Score: 3.083 (***) BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,MEDICAL,SPF_HELO_SOFTFAIL,SPF_NONE X-Spam-Status: Yes, hits=3.083 required=3 X-Spam-Report: Content analysis details: (3.1 points, 3.0 required) pts rule name description --- --------- ----------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.7 SPF_HELO_SOFTFAIL SPF: HELO does not match SPF record (softfail) 4.0 MEDICAL Medical or commercial database X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/hotplug/NetBSD/Makefile | 1 + tools/hotplug/NetBSD/block | 5 ++- tools/hotplug/NetBSD/locking.sh | 72 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 tools/hotplug/NetBSD/locking.sh diff --git a/tools/hotplug/NetBSD/Makefile b/tools/hotplug/NetBSD/Makefile index 6926885ab8..114b223207 100644 --- a/tools/hotplug/NetBSD/Makefile +++ b/tools/hotplug/NetBSD/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk =20 # Xen script dir and scripts to go there. XEN_SCRIPTS =3D +XEN_SCRIPTS +=3D locking.sh XEN_SCRIPTS +=3D block XEN_SCRIPTS +=3D vif-bridge XEN_SCRIPTS +=3D vif-ip diff --git a/tools/hotplug/NetBSD/block b/tools/hotplug/NetBSD/block index 32c20b6c89..23c8e38ebf 100644 --- a/tools/hotplug/NetBSD/block +++ b/tools/hotplug/NetBSD/block @@ -6,6 +6,7 @@ =20 DIR=3D$(dirname "$0") . "${DIR}/hotplugpath.sh" +. "${DIR}/locking.sh" =20 PATH=3D${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -62,6 +63,7 @@ case $xstatus in available_disks=3D"$available_disks $disk" eval $disk=3Dfree done + claim_lock block # Mark the used vnd(4) devices as ``used''. for disk in `sysctl hw.disknames`; do case $disk in @@ -77,6 +79,7 @@ case $xstatus in break=09 fi done + release_lock block if [ x$device =3D x ] ; then error "no available vnd device" fi @@ -86,7 +89,7 @@ case $xstatus in device=3D$xparams ;; esac - physical_device=3D$(stat -f '%r' "$device") + physical_device=3D$(stat -L -f '%r' "$device") xenstore-write $xpath/physical-device $physical_device xenstore-write $xpath/hotplug-status connected exit 0 diff --git a/tools/hotplug/NetBSD/locking.sh b/tools/hotplug/NetBSD/locking= .sh new file mode 100644 index 0000000000..88257f62b7 --- /dev/null +++ b/tools/hotplug/NetBSD/locking.sh @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Copyright (c) 2016, Christoph Badura. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEV= ER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +LOCK_BASEDIR=3D"$XEN_LOCK_DIR/xen-hotplug" + +_lockfd=3D9 +_have_lock=3D0 # lock not taken yet. + +SHLOCK=3D"shlock ${_shlock_debug-}" + +_lock_set_vars() { + _lockfile=3D"$LOCK_BASEDIR/$1.lock" + _lockfifo=3D"$LOCK_BASEDIR/$1.fifo" +} + +_lock_init() { + mkdir -p "$LOCK_BASEDIR" 2>/dev/null || true + mkfifo $_lockfifo 2>/dev/null || true +} + +# +# use a named pipe as condition variable +# opening for read-only blocks when there's no writer. +# opening for read-write never blocks but unblocks any waiting readers. +#=20 +_lock_wait_cv() { + eval "exec $_lockfd< $_lockfifo ; exec $_lockfd<&-" +} +_lock_signal_cv() { + eval "exec $_lockfd<> $_lockfifo ; exec $_lockfd<&-" +} + +claim_lock() { + _lock_set_vars $1 + _lock_init + until $SHLOCK -f $_lockfile -p $$; do + _lock_wait_cv + done + _have_lock=3D1 + # be sure to release the lock when the shell exits + trap "release_lock $1" 0 1 2 15 +} + +release_lock() { + _lock_set_vars $1 + [ "$_have_lock" !=3D 0 -a -f $_lockfile ] && rm $_lockfile + _have_lock=3D0 + _lock_signal_cv; +} --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970992; cv=none; d=zohomail.com; s=zohoarc; b=E00EWLv9wuHFl5XVjB+MXqk22R2jutUlmSghOBodKIRO98T/gRk+KWOnYzHYrgs2X3Uv+KxWSP4m9oiFS504Uhs296nchFKAiRDiS1Y6jW5TnmUAoZxsG5KEnsQ2H4TsMNf5Okf4VjvfrUHH3zUH0MUh/VrAnry387wWIvr8wGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970992; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7Q5BtPgh6BbiszA7oylOaiGjbjQEFcTxrIg2lz4ZgLU=; b=mRE6gJ2RVtKy64ZUj4I+9N8DSRXXxSG/VxvnPYdaZR9LdbveKlbZiXor+Yxb1MHQFuBcrN5xkhaDKHY13J6iijK/71pEI4slGuvOlC1hAaDUrg/vMgcCe4I2PgMjkqVc0CzCi+36+53w3hOhyydXdOUwmaMr7drqf4izOKsUpJQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 160797099224318.358201579768206; Mon, 14 Dec 2020 10:36:32 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52419.91798 (Exim 4.92) (envelope-from ) id 1koshl-0003F6-KP; Mon, 14 Dec 2020 18:36:17 +0000 Received: by outflank-mailman (output) from mailman id 52419.91798; Mon, 14 Dec 2020 18:36:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshk-0003Di-75; Mon, 14 Dec 2020 18:36:16 +0000 Received: by outflank-mailman (input) for mailman id 52419; Mon, 14 Dec 2020 16:39:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqt-0006vN-JV for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:35 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 43a2499d-851f-42d2-b0b1-c68e681c84f0; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXng010884; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXBX017131; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 1CC31AAC68; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 43a2499d-851f-42d2-b0b1-c68e681c84f0 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 06/24] Handle the case where vifname is not present in xenstore. Date: Mon, 14 Dec 2020 17:36:05 +0100 Message-Id: <20201214163623.2127-7-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/hotplug/NetBSD/vif-bridge | 5 ++++- tools/hotplug/NetBSD/vif-ip | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/hotplug/NetBSD/vif-bridge b/tools/hotplug/NetBSD/vif-bri= dge index b58e922601..cd428b5936 100644 --- a/tools/hotplug/NetBSD/vif-bridge +++ b/tools/hotplug/NetBSD/vif-bridge @@ -23,7 +23,10 @@ case $xstatus in xbridge=3D$(xenstore-read "$xpath/bridge") xfid=3D$(xenstore-read "$xpath/frontend-id") xhandle=3D$(xenstore-read "$xpath/handle") - iface=3D$(xenstore-read "$xpath/vifname") + iface=3D$(xenstore-read "$xpath/vifname") || true + if [ x${iface} =3D "x" ] ; then + iface=3Dxvif$xfid.$xhandle + fi ifconfig $iface up brconfig $xbridge add $iface xenstore-write $xpath/hotplug-status connected diff --git a/tools/hotplug/NetBSD/vif-ip b/tools/hotplug/NetBSD/vif-ip index 83cbfe20e2..944f50f881 100644 --- a/tools/hotplug/NetBSD/vif-ip +++ b/tools/hotplug/NetBSD/vif-ip @@ -24,6 +24,10 @@ case $xstatus in xfid=3D$(xenstore-read "$xpath/frontend-id") xhandle=3D$(xenstore-read "$xpath/handle") iface=3D$(xenstore-read "$xpath/vifname") + iface=3D$(xenstore-read "$xpath/vifname") || true + if [ x${iface} =3D "x" ] ; then + iface=3Dxvif$xfid.$xhandle + fi ifconfig $iface $xip up xenstore-write $xpath/hotplug-status connected exit 0 --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970970; cv=none; d=zohomail.com; s=zohoarc; b=Ryx2ZQAGv6EPlDQGsKjdkn5q/HcLHeQVNtKdnJfLXvdBKOcUbZT4ZTafOsjnSc4ShCOp+Y/F8ep4ALNy+yt+eulRLVeepK3zh/1OVP6SCI5uAh+baQK6MBvd9cNV/nx61+RIeClWQFXaExlYLkhi8wUQQkz/WnSF0KMhaVXNZAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970970; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tZP3iPTeJefVeHUlpdj6dvhEy7xlIb+9plk8fkTngpw=; b=mA2YfnJtbUC+0dZEkPihGmIgZ9OMGO4PFZp0Dz8Zpdv5XOcMdSy4ApIAC7cugMjuWTxBcERlRW/QKBsmuoJr5BplTpLVznmGClkmO+af6T7wgUZ8CsuavlCMyqHCEpBerqpAH2YQJ0ZLCSJ5PcTb6MCXKMwt3cFqp/kbx3zzLlU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970970630173.08923193598673; Mon, 14 Dec 2020 10:36:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52396.91678 (Exim 4.92) (envelope-from ) id 1koshM-00025H-0U; Mon, 14 Dec 2020 18:35:52 +0000 Received: by outflank-mailman (output) from mailman id 52396.91678; Mon, 14 Dec 2020 18:35:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshL-00024m-51; Mon, 14 Dec 2020 18:35:51 +0000 Received: by outflank-mailman (input) for mailman id 52396; Mon, 14 Dec 2020 16:39:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrS-0006vN-LG for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:10 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3300b86f-0b1d-4ac4-8ba9-60faeafc2272; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXKp004605; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaWlD002558; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 24E1CAAC65; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3300b86f-0b1d-4ac4-8ba9-60faeafc2272 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 07/24] Remove NetBSD's system headers. We'll use the system-provided ones, which are up to date. Date: Mon, 14 Dec 2020 17:36:06 +0100 Message-Id: <20201214163623.2127-8-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/include/Makefile | 2 +- tools/include/xen-sys/NetBSD/evtchn.h | 86 -------------------- tools/include/xen-sys/NetBSD/privcmd.h | 106 ------------------------- 3 files changed, 1 insertion(+), 193 deletions(-) delete mode 100644 tools/include/xen-sys/NetBSD/evtchn.h delete mode 100644 tools/include/xen-sys/NetBSD/privcmd.h diff --git a/tools/include/Makefile b/tools/include/Makefile index 4d4ec5f974..5e90179e66 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -68,7 +68,7 @@ install: all $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(includedir)/xen/foreign $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(includedir)/xen/hvm $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io - $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys + $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys || true $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(includedir)/xen/xsm =20 .PHONY: uninstall diff --git a/tools/include/xen-sys/NetBSD/evtchn.h b/tools/include/xen-sys/= NetBSD/evtchn.h deleted file mode 100644 index 2d8a1f9164..0000000000 --- a/tools/include/xen-sys/NetBSD/evtchn.h +++ /dev/null @@ -1,86 +0,0 @@ -/* $NetBSD: evtchn.h,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ */ -/*************************************************************************= ***** - * evtchn.h - *=20 - * Interface to /dev/xen/evtchn. - *=20 - * Copyright (c) 2003-2005, K A Fraser - *=20 - * This file may be distributed separately from the Linux kernel, or - * incorporated into other software packages, subject to the following lic= ense: - *=20 - * Permission is hereby granted, free of charge, to any person obtaining a= copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modi= fy, - * merge, publish, distribute, sublicense, and/or sell copies of the Softw= are, - * and to permit persons to whom the Software is furnished to do so, subje= ct to - * the following conditions: - *=20 - * The above copyright notice and this permission notice shall be included= in - * all copies or substantial portions of the Software. - *=20 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL= THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEA= LINGS - * IN THE SOFTWARE. - */ - -#ifndef __NetBSD_EVTCHN_H__ -#define __NetBSD_EVTCHN_H__ - -/* - * Bind a fresh port to VIRQ @virq. - */ -#define IOCTL_EVTCHN_BIND_VIRQ \ - _IOWR('E', 4, struct ioctl_evtchn_bind_virq) -struct ioctl_evtchn_bind_virq { - unsigned int virq; - unsigned int port; -}; - -/* - * Bind a fresh port to remote <@remote_domain, @remote_port>. - */ -#define IOCTL_EVTCHN_BIND_INTERDOMAIN \ - _IOWR('E', 5, struct ioctl_evtchn_bind_interdomain) -struct ioctl_evtchn_bind_interdomain { - unsigned int remote_domain, remote_port; - unsigned int port; -}; - -/* - * Allocate a fresh port for binding to @remote_domain. - */ -#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \ - _IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port) -struct ioctl_evtchn_bind_unbound_port { - unsigned int remote_domain; - unsigned int port; -}; - -/* - * Unbind previously allocated @port. - */ -#define IOCTL_EVTCHN_UNBIND \ - _IOW('E', 7, struct ioctl_evtchn_unbind) -struct ioctl_evtchn_unbind { - unsigned int port; -}; - -/* - * Send event to previously allocated @port. - */ -#define IOCTL_EVTCHN_NOTIFY \ - _IOW('E', 8, struct ioctl_evtchn_notify) -struct ioctl_evtchn_notify { - unsigned int port; -}; - -/* Clear and reinitialise the event buffer. Clear error condition. */ -#define IOCTL_EVTCHN_RESET \ - _IO('E', 9) - -#endif /* __NetBSD_EVTCHN_H__ */ diff --git a/tools/include/xen-sys/NetBSD/privcmd.h b/tools/include/xen-sys= /NetBSD/privcmd.h deleted file mode 100644 index 555bad973e..0000000000 --- a/tools/include/xen-sys/NetBSD/privcmd.h +++ /dev/null @@ -1,106 +0,0 @@ -/* NetBSD: xenio.h,v 1.3 2005/05/24 12:07:12 yamt Exp $ */ - -/*************************************************************************= ***** - * privcmd.h - *=20 - * Copyright (c) 2003-2004, K A Fraser - *=20 - * This file may be distributed separately from the Linux kernel, or - * incorporated into other software packages, subject to the following lic= ense: - *=20 - * Permission is hereby granted, free of charge, to any person obtaining a= copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modi= fy, - * merge, publish, distribute, sublicense, and/or sell copies of the Softw= are, - * and to permit persons to whom the Software is furnished to do so, subje= ct to - * the following conditions: - *=20 - * The above copyright notice and this permission notice shall be included= in - * all copies or substantial portions of the Software. - *=20 - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL= THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEA= LINGS - * IN THE SOFTWARE. - */ - -#ifndef __NetBSD_PRIVCMD_H__ -#define __NetBSD_PRIVCMD_H__ - -/* Interface to /dev/xen/privcmd */ - -typedef struct privcmd_hypercall -{ - unsigned long op; - unsigned long arg[5]; - long retval; -} privcmd_hypercall_t; - -typedef struct privcmd_mmap_entry { - unsigned long va; - unsigned long mfn; - unsigned long npages; -} privcmd_mmap_entry_t;=20 - -typedef struct privcmd_mmap { - int num; - domid_t dom; /* target domain */ - privcmd_mmap_entry_t *entry; -} privcmd_mmap_t;=20 - -typedef struct privcmd_mmapbatch { - int num; /* number of pages to populate */ - domid_t dom; /* target domain */ - unsigned long addr; /* virtual address */ - unsigned long *arr; /* array of mfns - top nibble set on err */ -} privcmd_mmapbatch_t;=20 - -typedef struct privcmd_blkmsg -{ - unsigned long op; - void *buf; - int buf_size; -} privcmd_blkmsg_t; - -/* - * @cmd: IOCTL_PRIVCMD_HYPERCALL - * @arg: &privcmd_hypercall_t - * Return: Value returned from execution of the specified hypercall. - */ -#define IOCTL_PRIVCMD_HYPERCALL \ - _IOWR('P', 0, privcmd_hypercall_t) - -#if defined(_KERNEL) -/* compat */ -#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD \ - _IO('P', 1) -#endif /* defined(_KERNEL) */ - =20 -#define IOCTL_PRIVCMD_MMAP \ - _IOW('P', 2, privcmd_mmap_t) -#define IOCTL_PRIVCMD_MMAPBATCH \ - _IOW('P', 3, privcmd_mmapbatch_t) -#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \ - _IOR('P', 4, unsigned long) - -/* - * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN - * @arg: n/a - * Return: Port associated with domain-controller end of control event cha= nnel - * for the initial domain. - */ -#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \ - _IOR('P', 5, int) - -/* Interface to /dev/xenevt */ -/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition.= */ -#define EVTCHN_RESET _IO('E', 1) -/* EVTCHN_BIND: Bind to the specified event-channel port. */ -#define EVTCHN_BIND _IOW('E', 2, unsigned long) -/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */ -#define EVTCHN_UNBIND _IOW('E', 3, unsigned long) - -#endif /* __NetBSD_PRIVCMD_H__ */ --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970970; cv=none; d=zohomail.com; s=zohoarc; b=LZI1L/vyNZTKlz91hbOV7MmGjfpZRCxVbvZBhn7CmxS/0nC6Avu2H6+xlWH9LukeMB6ujAwnw5MsDp0+Zqy4m8Gj9KlkMsx1TL2jQpK6vFHnjZiJfkiQzEvOHFomJN7gCywit3+pgXvQguF2Mm0E/h3lRHMkdX2dL+nWktaz9hI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970970; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j78G4fyhlSIVWaOUJ35vLWqHw54ucFNGn0Ao8q1TQwk=; b=I2OMfBBXO+gZ6jLb4CSnvQmEfg9GAw+uYJADzavCz3Otxdj6EaivUSwJLAfNE1/ZRNUuGf3SIBEfaVRMYmcpD0HZ3SdDAqQ7XtIXq/t/U5HiozDCCoiNC7GlR5PgaumNyo8IXWitvXI7zT/fWcXM3nLEKFZoCeCu3R9UMt0ZGGA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970970342239.2555563015619; Mon, 14 Dec 2020 10:36:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52390.91627 (Exim 4.92) (envelope-from ) id 1koshH-0001v6-Vc; Mon, 14 Dec 2020 18:35:47 +0000 Received: by outflank-mailman (output) from mailman id 52390.91627; Mon, 14 Dec 2020 18:35:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshH-0001uT-HJ; Mon, 14 Dec 2020 18:35:47 +0000 Received: by outflank-mailman (input) for mailman id 52390; Mon, 14 Dec 2020 16:37:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqZ-0006vN-JH for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:15 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 529ef58c-2875-4c18-8456-429b71c1dbf1; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaX4U008860; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaX6J007339; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 34CCCAAC68; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 529ef58c-2875-4c18-8456-429b71c1dbf1 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 08/24] Make libs/call build on NetBSD Date: Mon, 14 Dec 2020 17:36:07 +0100 Message-Id: <20201214163623.2127-9-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/call/netbsd.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/libs/call/netbsd.c b/tools/libs/call/netbsd.c index a5502da377..1a771e9928 100644 --- a/tools/libs/call/netbsd.c +++ b/tools/libs/call/netbsd.c @@ -19,12 +19,14 @@ * Split from xc_netbsd.c */ =20 -#include "xc_private.h" =20 #include #include #include +#include #include +#include +#include "private.h" =20 int osdep_xencall_open(xencall_handle *xcall) { @@ -69,12 +71,13 @@ int osdep_xencall_close(xencall_handle *xcall) return close(fd); } =20 -void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, size_t npages) +void *osdep_alloc_pages(xencall_handle *xcall, size_t npages) { - size_t size =3D npages * XC_PAGE_SIZE; + size_t size =3D npages * PAGE_SIZE; void *p; + int ret; =20 - ret =3D posix_memalign(&p, XC_PAGE_SIZE, size); + ret =3D posix_memalign(&p, PAGE_SIZE, size); if ( ret !=3D 0 || !p ) return NULL; =20 @@ -86,14 +89,13 @@ void *osdep_alloc_hypercall_buffer(xencall_handle *xcal= l, size_t npages) return p; } =20 -void osdep_free_hypercall_buffer(xencall_handle *xcall, void *ptr, - size_t npages) +void osdep_free_pages(xencall_handle *xcall, void *ptr, size_t npages) { - (void) munlock(ptr, npages * XC_PAGE_SIZE); + (void) munlock(ptr, npages * PAGE_SIZE); free(ptr); } =20 -int do_xen_hypercall(xencall_handle *xcall, privcmd_hypercall_t *hypercall) +int osdep_hypercall(xencall_handle *xcall, privcmd_hypercall_t *hypercall) { int fd =3D xcall->fd; int error =3D ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall); --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970971; cv=none; d=zohomail.com; s=zohoarc; b=IwU5uragi0lyyVLbRDYO/MGWeUn1w3HttSYA9m82TT+wHBWmG2VvkS6RTdqxyvAixA8uwS2eQvTSF0lSs+Kv3wwy+EOfA0iGZ3BKpEW3pLf5o8Zpyt4Yg62SeLYmBI0fhCDiRH+Ty0YFwqKsJWjsTCH8STFRwACxEQzs3xEklmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970971; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9RNoo9oJ08oV5bwtxHVYr+pDTCHL4kRC0J/FsXZAOsA=; b=FaTwjsb6Ol8htutKSXnz8pi51sktlkhLAQs/zKZTCIx3OSFtyf4PphKNNiJDq8HrtpvUSO2Lf5N+iRLZTzBJsRv/Xx2Ab6UyvqK1b2AKbjmcTA0kYBCzirG3qfgQkYoBFSKmZSub4Arn/AdZFQD7A1m/SxX7442tkSdXKQHoZak= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970971194957.2403187395078; Mon, 14 Dec 2020 10:36:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52374.91542 (Exim 4.92) (envelope-from ) id 1koshE-0001nG-0E; Mon, 14 Dec 2020 18:35:44 +0000 Received: by outflank-mailman (output) from mailman id 52374.91542; Mon, 14 Dec 2020 18:35:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshD-0001n9-SK; Mon, 14 Dec 2020 18:35:43 +0000 Received: by outflank-mailman (input) for mailman id 52374; Mon, 14 Dec 2020 16:36:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqpv-0006vN-Ng for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:36:35 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2def1db3-153e-4a2f-8db9-8c5861d6e445; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXr1007897; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXTs001450; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 43F21AAC69; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2def1db3-153e-4a2f-8db9-8c5861d6e445 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 09/24] Use xen/xenio.h on NetBSD Date: Mon, 14 Dec 2020 17:36:08 +0100 Message-Id: <20201214163623.2127-10-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/call/private.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/libs/call/private.h b/tools/libs/call/private.h index 21f992b37e..96922e03d5 100644 --- a/tools/libs/call/private.h +++ b/tools/libs/call/private.h @@ -7,13 +7,19 @@ #include =20 #include +#ifdef __NetBSD__ +#include +#else #include +#endif =20 #ifndef PAGE_SHIFT /* Mini-os, Yukk */ #define PAGE_SHIFT 12 #endif -#ifndef __MINIOS__ /* Yukk */ +#ifndef PAGE_SIZE #define PAGE_SIZE (1UL << PAGE_SHIFT) +#endif +#ifndef PAGE_MASK #define PAGE_MASK (~(PAGE_SIZE-1)) #endif =20 --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970971; cv=none; d=zohomail.com; s=zohoarc; b=a8LqHr76puiXDOkNXjbKVfFvr/4A6b3/bidS95Cb2H+EokwlFyUeZ8P2u1lV9wxwNX5w0z/Vxnc8aKgOSGIm11GNk9ofImg1q2ds85urQPYVjb6Ib7Fu70Tw8wd1RgQhlnlHco9pnd8IuRjHexHq0webm9xDUzAe+mG3TMiNeSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970971; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=giI2S+3sbWAGizEKZtHJCj8szGZ77s6iaLDYJM6v+Lc=; b=eEmA27mQDPqWCVVcpBx3P6qV1z0bpXZ+DBno6oqHeP6fNGLGRneffH89xA1N0fRzcZqfpIndHOp/SHI2r3XTgVcZYdKqK/PXc0eQhf0lGKF+L/kvh1jL/mGQ9wTFTu97tvMQqqh9EridbUsxLZvLApQ/jjR5eyVTqCJRy0X2pFc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970971588459.20158426838657; Mon, 14 Dec 2020 10:36:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52384.91594 (Exim 4.92) (envelope-from ) id 1koshG-0001r1-Aj; Mon, 14 Dec 2020 18:35:46 +0000 Received: by outflank-mailman (output) from mailman id 52384.91594; Mon, 14 Dec 2020 18:35:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshF-0001qp-Ub; Mon, 14 Dec 2020 18:35:45 +0000 Received: by outflank-mailman (input) for mailman id 52384; Mon, 14 Dec 2020 16:37:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqK-0006vN-Ii for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:00 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 850d1873-3bc1-4c17-8819-5aba59513026; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXNY025686; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXTu001450; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 59050AAC67; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 850d1873-3bc1-4c17-8819-5aba59513026 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 10/24] Make libs/evtchn build on NetBSD Date: Mon, 14 Dec 2020 17:36:09 +0100 Message-Id: <20201214163623.2127-11-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" Reviewed-by: Roger Pau Monn=C3=A9 --- tools/libs/evtchn/netbsd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/evtchn/netbsd.c b/tools/libs/evtchn/netbsd.c index 8b8545d2f9..6d4ce28011 100644 --- a/tools/libs/evtchn/netbsd.c +++ b/tools/libs/evtchn/netbsd.c @@ -25,10 +25,10 @@ =20 #include =20 -#include - #include "private.h" =20 +#include + #define EVTCHN_DEV_NAME "/dev/xenevt" =20 int osdep_evtchn_open(xenevtchn_handle *xce) @@ -131,7 +131,7 @@ xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_h= andle *xce) int fd =3D xce->fd; evtchn_port_t port; =20 - if ( read_exact(fd, (char *)&port, sizeof(port)) =3D=3D -1 ) + if ( read(fd, (char *)&port, sizeof(port)) =3D=3D -1 ) return -1; =20 return port; @@ -140,7 +140,7 @@ xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_h= andle *xce) int xenevtchn_unmask(xenevtchn_handle *xce, evtchn_port_t port) { int fd =3D xce->fd; - return write_exact(fd, (char *)&port, sizeof(port)); + return write(fd, (char *)&port, sizeof(port)); } =20 /* --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970982; cv=none; d=zohomail.com; s=zohoarc; b=kCVp9toXbOjNzt/7A+enGUBKm9o+jp/BnSHZ8cywTpzTnIhMW8vDbE5UjtZxvxbb9NQREGwJnxSRZHA6v4OJArAn881o7zk5h5lVGdvLkDrhKIMQynwsdGlC2Y4Jo9nidTPJ27YymBQEBGNbt/C5mghATskkJNmr2A78URKxGBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970982; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TFiJZFxAEJdW3y1cMgLN8//sLGR3RatY06Y80Yh07a4=; b=FKgRH77tXCQUwk1kgjQQmay77wcvKB2zhJNNu40D+hxs84cTt2QJCWniH61Q0UglgTvX3aDlFnEiNicQYRIPtfcyt0SkqOkPOW9In2NIoRILrtciEGqU1HYOgE//k0AbZoJztbIwdlP0b7+33Ps6kZMFmTnHavooKmF6sCBnOZ8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970982243681.5621508569523; Mon, 14 Dec 2020 10:36:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52399.91708 (Exim 4.92) (envelope-from ) id 1koshR-0002I7-AX; Mon, 14 Dec 2020 18:35:57 +0000 Received: by outflank-mailman (output) from mailman id 52399.91708; Mon, 14 Dec 2020 18:35:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshO-0002G2-RK; Mon, 14 Dec 2020 18:35:54 +0000 Received: by outflank-mailman (input) for mailman id 52399; Mon, 14 Dec 2020 16:39:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqy-0006vN-Jn for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:40 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 36f209d1-9377-407d-8c57-ce478a8fd182; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXAO005133; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXTw001450; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 6A40CAAC65; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 36f209d1-9377-407d-8c57-ce478a8fd182 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 11/24] Implement foreignmemory on NetBSD Date: Mon, 14 Dec 2020 17:36:10 +0100 Message-Id: <20201214163623.2127-12-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/foreignmemory/Makefile | 2 +- tools/libs/foreignmemory/netbsd.c | 76 ++++++++++++++++++++++++++---- tools/libs/foreignmemory/private.h | 10 +++- 3 files changed, 75 insertions(+), 13 deletions(-) diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/M= akefile index 13850f7988..f191cdbed0 100644 --- a/tools/libs/foreignmemory/Makefile +++ b/tools/libs/foreignmemory/Makefile @@ -8,7 +8,7 @@ SRCS-y +=3D core.c SRCS-$(CONFIG_Linux) +=3D linux.c SRCS-$(CONFIG_FreeBSD) +=3D freebsd.c SRCS-$(CONFIG_SunOS) +=3D compat.c solaris.c -SRCS-$(CONFIG_NetBSD) +=3D compat.c netbsd.c +SRCS-$(CONFIG_NetBSD) +=3D netbsd.c SRCS-$(CONFIG_MiniOS) +=3D minios.c =20 include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/foreignmemory/netbsd.c b/tools/libs/foreignmemory/n= etbsd.c index 54a418ebd6..6d740ec2a3 100644 --- a/tools/libs/foreignmemory/netbsd.c +++ b/tools/libs/foreignmemory/netbsd.c @@ -19,7 +19,9 @@ =20 #include #include +#include #include +#include =20 #include "private.h" =20 @@ -66,15 +68,17 @@ int osdep_xenforeignmemory_close(xenforeignmemory_handl= e *fmem) return close(fd); } =20 -void *osdep_map_foreign_batch(xenforeignmem_handle *fmem, uint32_t dom, - void *addr, int prot, int flags, - xen_pfn_t *arr, int num) +void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem, + uint32_t dom, void *addr, + int prot, int flags, size_t num, + const xen_pfn_t arr[/*num*/], int err[/*num*/]) + { int fd =3D fmem->fd; - privcmd_mmapbatch_t ioctlx; - addr =3D mmap(addr, num*XC_PAGE_SIZE, prot, flags | MAP_ANON | MAP_SHA= RED, -1, 0); + privcmd_mmapbatch_v2_t ioctlx; + addr =3D mmap(addr, num*PAGE_SIZE, prot, flags | MAP_ANON | MAP_SHARED= , -1, 0); if ( addr =3D=3D MAP_FAILED ) { - PERROR("osdep_map_foreign_batch: mmap failed"); + PERROR("osdep_xenforeignmemory_map: mmap failed"); return NULL; } =20 @@ -82,11 +86,12 @@ void *osdep_map_foreign_batch(xenforeignmem_handle *fme= m, uint32_t dom, ioctlx.dom=3Ddom; ioctlx.addr=3D(unsigned long)addr; ioctlx.arr=3Darr; - if ( ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 ) + ioctlx.err=3Derr; + if ( ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH_V2, &ioctlx) < 0 ) { int saved_errno =3D errno; - PERROR("osdep_map_foreign_batch: ioctl failed"); - (void)munmap(addr, num*XC_PAGE_SIZE); + PERROR("osdep_xenforeignmemory_map: ioctl failed"); + (void)munmap(addr, num*PAGE_SIZE); errno =3D saved_errno; return NULL; } @@ -97,7 +102,58 @@ void *osdep_map_foreign_batch(xenforeignmem_handle *fme= m, uint32_t dom, int osdep_xenforeignmemory_unmap(xenforeignmemory_handle *fmem, void *addr, size_t num) { - return munmap(addr, num*XC_PAGE_SIZE); + return munmap(addr, num*PAGE_SIZE); +} + +int osdep_xenforeignmemory_restrict(xenforeignmemory_handle *fmem, + domid_t domid) +{ + return 0; +} + +int osdep_xenforeignmemory_unmap_resource( + xenforeignmemory_handle *fmem, xenforeignmemory_resource_handle *fres) +{ + return fres ? munmap(fres->addr, fres->nr_frames << PAGE_SHIFT) : 0; +} + +int osdep_xenforeignmemory_map_resource( + xenforeignmemory_handle *fmem, xenforeignmemory_resource_handle *fres) +{ + privcmd_mmap_resource_t mr =3D { + .dom =3D fres->domid, + .type =3D fres->type, + .id =3D fres->id, + .idx =3D fres->frame, + .num =3D fres->nr_frames, + }; + int rc; + + fres->addr =3D mmap(fres->addr, fres->nr_frames << PAGE_SHIFT, + fres->prot, fres->flags | MAP_ANON | MAP_SHARED, -1,= 0); + if ( fres->addr =3D=3D MAP_FAILED ) + return -1; + + mr.addr =3D (uintptr_t)fres->addr; + + rc =3D ioctl(fmem->fd, IOCTL_PRIVCMD_MMAP_RESOURCE, &mr); + if ( rc ) + { + int saved_errno; + + if ( errno !=3D fmem->unimpl_errno && errno !=3D EOPNOTSUPP ) + PERROR("ioctl failed"); + else + errno =3D EOPNOTSUPP; + + saved_errno =3D errno; + (void)osdep_xenforeignmemory_unmap_resource(fmem, fres); + errno =3D saved_errno; + + return -1; + } + + return 0; } =20 /* diff --git a/tools/libs/foreignmemory/private.h b/tools/libs/foreignmemory/= private.h index 8f1bf081ed..abeceb8720 100644 --- a/tools/libs/foreignmemory/private.h +++ b/tools/libs/foreignmemory/private.h @@ -8,7 +8,13 @@ #include =20 #include + +#ifdef __NetBSD__ +#include +#include +#else #include +#endif =20 #ifndef PAGE_SHIFT /* Mini-os, Yukk */ #define PAGE_SHIFT 12 @@ -38,7 +44,7 @@ int osdep_xenforeignmemory_unmap(xenforeignmemory_handle = *fmem, =20 #if defined(__NetBSD__) || defined(__sun__) /* Strictly compat for those two only only */ -void *compat_mapforeign_batch(xenforeignmem_handle *fmem, uint32_t dom, +void *osdep_map_foreign_batch(xenforeignmemory_handle *fmem, uint32_t dom, void *addr, int prot, int flags, xen_pfn_t *arr, int num); #endif @@ -54,7 +60,7 @@ struct xenforeignmemory_resource_handle { int flags; }; =20 -#ifndef __linux__ +#if !defined(__linux__) && !defined(__NetBSD__) static inline int osdep_xenforeignmemory_restrict(xenforeignmemory_handle = *fmem, domid_t domid) { --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970972; cv=none; d=zohomail.com; s=zohoarc; b=CXONPqN8WJj1GDT3auf2c08Yniy0anpBz1YkKpa6TMxyg0oL0SU5w8ASglWPTEB6RfFbwMEfsjTcCMSH82ZfJurb+5aR+6P7TSN0BkN2Z3Pi+6Ld8TL1yEeEbmCMV/h4cQ7YQ+0S0pezII+S3cMyFFudSxkwNOb48WXAT6TquoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970972; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ll5QT3VLwgWC0T4eaFiizdMn0qsxXA+b+UkLRr0rwIo=; b=b5cLFlEQVYGhXmvvj45jTa9by3lu+e3gHgILwmI7qggimgeqtp8z/An67M/9Z61LMRz6+Gx4edKCBYxHcxGNxUMa5wSPHXvbuMkffjmNRcpOdwc0n1HtxjOTMuhFfZk9fN1TnLDTJgDvZuLsMPgJa7/+yP1imJ4LhrjrH6ASjfM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970972979118.52584247509253; Mon, 14 Dec 2020 10:36:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52397.91683 (Exim 4.92) (envelope-from ) id 1koshM-00027P-D5; Mon, 14 Dec 2020 18:35:52 +0000 Received: by outflank-mailman (output) from mailman id 52397.91683; Mon, 14 Dec 2020 18:35:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshL-00026r-Tk; Mon, 14 Dec 2020 18:35:51 +0000 Received: by outflank-mailman (input) for mailman id 52397; Mon, 14 Dec 2020 16:39:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrr-0006vN-MO for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:35 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c384c0fc-48f1-4fa8-8421-2f70ab499674; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXYK008956; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXQ1024496; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 7F396AAC66; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c384c0fc-48f1-4fa8-8421-2f70ab499674 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 12/24] Implement gnttab on NetBSD Date: Mon, 14 Dec 2020 17:36:11 +0100 Message-Id: <20201214163623.2127-13-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/gnttab/Makefile | 2 +- tools/libs/gnttab/netbsd.c | 267 +++++++++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 tools/libs/gnttab/netbsd.c diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile index d86c49d243..ae390ce60f 100644 --- a/tools/libs/gnttab/Makefile +++ b/tools/libs/gnttab/Makefile @@ -10,7 +10,7 @@ SRCS-GNTSHR +=3D gntshr_core.c SRCS-$(CONFIG_Linux) +=3D $(SRCS-GNTTAB) $(SRCS-GNTSHR) linux.c SRCS-$(CONFIG_MiniOS) +=3D $(SRCS-GNTTAB) gntshr_unimp.c minios.c SRCS-$(CONFIG_FreeBSD) +=3D $(SRCS-GNTTAB) $(SRCS-GNTSHR) freebsd.c +SRCS-$(CONFIG_NetBSD) +=3D $(SRCS-GNTTAB) $(SRCS-GNTSHR) netbsd.c SRCS-$(CONFIG_SunOS) +=3D gnttab_unimp.c gntshr_unimp.c -SRCS-$(CONFIG_NetBSD) +=3D gnttab_unimp.c gntshr_unimp.c =20 include $(XEN_ROOT)/tools/libs/libs.mk diff --git a/tools/libs/gnttab/netbsd.c b/tools/libs/gnttab/netbsd.c new file mode 100644 index 0000000000..2df7058cd7 --- /dev/null +++ b/tools/libs/gnttab/netbsd.c @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2007-2008, D G Murray + * Copyright (c) 2016-2017, Akshay Jaggi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; If not, see . + * + * Split out from linux.c + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "private.h" + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) + +#define DEVXEN "/kern/xen/privcmd" + +int osdep_gnttab_open(xengnttab_handle *xgt) +{ + int fd =3D open(DEVXEN, O_RDWR|O_CLOEXEC); + + if ( fd =3D=3D -1 ) + return -1; + xgt->fd =3D fd; + + return 0; +} + +int osdep_gnttab_close(xengnttab_handle *xgt) +{ + if ( xgt->fd =3D=3D -1 ) + return 0; + + return close(xgt->fd); +} + +int osdep_gnttab_set_max_grants(xengnttab_handle *xgt, uint32_t count) +{ + return 0; +} + +void *osdep_gnttab_grant_map(xengnttab_handle *xgt, + uint32_t count, int flags, int prot, + uint32_t *domids, uint32_t *refs, + uint32_t notify_offset, + evtchn_port_t notify_port) +{ + uint32_t i; + int fd =3D xgt->fd; + struct ioctl_gntdev_mmap_grant_ref map; + void *addr =3D NULL; + int domids_stride; + unsigned int refs_size =3D count * sizeof(struct ioctl_gntdev_grant_re= f); + int rv; + + domids_stride =3D (flags & XENGNTTAB_GRANT_MAP_SINGLE_DOMAIN) ? 0 : 1; + map.refs =3D malloc(refs_size); + + for ( i =3D 0; i < count; i++ ) + { + map.refs[i].domid =3D domids[i * domids_stride]; + map.refs[i].ref =3D refs[i]; + } + + map.count =3D count; + addr =3D mmap(NULL, count * PAGE_SIZE, + prot, flags | MAP_ANON | MAP_SHARED, -1, 0); + + if (map.va =3D=3D MAP_FAILED) { + GTERROR(xgt->logger, "osdep_gnttab_grant_map: mmap failed"); + munmap((void *)map.va, count * PAGE_SIZE); + addr =3D MAP_FAILED; + } + map.va =3D addr; + + map.notify.offset =3D 0; + map.notify.action =3D 0; + if ( notify_offset < PAGE_SIZE * count ) + { + map.notify.offset =3D notify_offset; + map.notify.action |=3D UNMAP_NOTIFY_CLEAR_BYTE; + } + if ( notify_port !=3D -1 ) + { + map.notify.event_channel_port =3D notify_port; + map.notify.action |=3D UNMAP_NOTIFY_SEND_EVENT; + } + + rv =3D ioctl(fd, IOCTL_GNTDEV_MMAP_GRANT_REF, &map); + if ( rv ) + { + GTERROR(xgt->logger, + "ioctl IOCTL_GNTDEV_MMAP_GRANT_REF failed: %d", rv); + munmap(addr, count * PAGE_SIZE); + addr =3D MAP_FAILED; + } + free(map.refs); + return addr; +} + +int osdep_gnttab_unmap(xengnttab_handle *xgt, + void *start_address, + uint32_t count) +{ + int rc; + if ( start_address =3D=3D NULL ) + { + errno =3D EINVAL; + return -1; + } + + /* Next, unmap the memory. */ + rc =3D munmap(start_address, count * PAGE_SIZE); + + return rc; +} + +int osdep_gnttab_grant_copy(xengnttab_handle *xgt, + uint32_t count, + xengnttab_grant_copy_segment_t *segs) +{ + errno =3D ENOSYS; + return -1; +} + +int osdep_gntshr_open(xengntshr_handle *xgs) +{ + + int fd =3D open(DEVXEN, O_RDWR); + + if ( fd =3D=3D -1 ) + return -1; + xgs->fd =3D fd; + + return 0; +} + +int osdep_gntshr_close(xengntshr_handle *xgs) +{ + if ( xgs->fd =3D=3D -1 ) + return 0; + + return close(xgs->fd); +} + +void *osdep_gntshr_share_pages(xengntshr_handle *xgs, + uint32_t domid, int count, + uint32_t *refs, int writable, + uint32_t notify_offset, + evtchn_port_t notify_port) +{ + int err; + int fd =3D xgs->fd; + void *area =3D NULL; + struct ioctl_gntdev_alloc_grant_ref alloc; + + alloc.gref_ids =3D malloc(count * sizeof(uint32_t)); + if ( alloc.gref_ids =3D=3D NULL ) + return NULL; + alloc.domid =3D domid; + alloc.flags =3D writable ? GNTDEV_ALLOC_FLAG_WRITABLE : 0; + alloc.count =3D count; + area =3D mmap(NULL, count * PAGE_SIZE, + PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); + + if (area =3D=3D MAP_FAILED) { + GTERROR(xgs->logger, "osdep_gnttab_grant_map: mmap failed"); + area =3D MAP_FAILED; + goto out; + } + alloc.va =3D area; + + alloc.notify.offset =3D 0; + alloc.notify.action =3D 0; + if ( notify_offset < PAGE_SIZE * count ) + { + alloc.notify.offset =3D notify_offset; + alloc.notify.action |=3D UNMAP_NOTIFY_CLEAR_BYTE; + } + if ( notify_port !=3D -1 ) + { + alloc.notify.event_channel_port =3D notify_port; + alloc.notify.action |=3D UNMAP_NOTIFY_SEND_EVENT; + } + err =3D ioctl(fd, IOCTL_GNTDEV_ALLOC_GRANT_REF, &alloc); + if ( err ) + { + GSERROR(xgs->logger, "IOCTL_GNTDEV_ALLOC_GRANT_REF failed"); + munmap(area, count * PAGE_SIZE); + area =3D MAP_FAILED; + goto out; + } + memcpy(refs, alloc.gref_ids, count * sizeof(uint32_t)); + + out: + free(alloc.gref_ids); + return area; +} + +int osdep_gntshr_unshare(xengntshr_handle *xgs, + void *start_address, uint32_t count) +{ + return munmap(start_address, count * PAGE_SIZE); +} + +/* + * The functions below are Linux-isms that will likely never be implemented + * on FreeBSD unless FreeBSD also implements something akin to Linux dmabu= f. + */ +int osdep_gnttab_dmabuf_exp_from_refs(xengnttab_handle *xgt, uint32_t domi= d, + uint32_t flags, uint32_t count, + const uint32_t *refs, + uint32_t *dmabuf_fd) +{ + abort(); +} + +int osdep_gnttab_dmabuf_exp_wait_released(xengnttab_handle *xgt, + uint32_t fd, uint32_t wait_to_ms) +{ + abort(); +} + +int osdep_gnttab_dmabuf_imp_to_refs(xengnttab_handle *xgt, uint32_t domid, + uint32_t fd, uint32_t count, uint32_t = *refs) +{ + abort(); +} + +int osdep_gnttab_dmabuf_imp_release(xengnttab_handle *xgt, uint32_t fd) +{ + abort(); +} + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970971; cv=none; d=zohomail.com; s=zohoarc; b=RZCyUF4zjT2GNMbHwlEI3jHEB9Ar/GdY2r3tag/fbdK+22HTovYql0avZAeChWpMAzXYBNogAxbktlxz/UGDMB/uE503+x4+QDeiTOtXBAI304fCOGVLE/mkZL7VifGCy5C8cvfys10d/6aarNUK9igkeGmOE6mfMlu/3aGfdds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970971; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=c/5SwyRXcvRnPE+NgGhHV4GMTGwBujEzWLu1uthqVSc=; b=GDMg9j1b8Gvt73Knv8txWVUa1A95+KcNNK1jqK/vJH6Vg9QsVEpk3pLsd4vmo4H/iSEzxbzoODFN/1eNpMG2Rp8dtsdFFVyIxgvBFxxvLvq9AkUOvueHB0PDWlWDqffISSB624/i6kQSQTu3yIsM2d5RdOTtUIX4PxCK+PBYmpI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970971030629.343616454178; Mon, 14 Dec 2020 10:36:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52378.91555 (Exim 4.92) (envelope-from ) id 1koshE-0001oQ-Ny; Mon, 14 Dec 2020 18:35:44 +0000 Received: by outflank-mailman (output) from mailman id 52378.91555; Mon, 14 Dec 2020 18:35:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshE-0001o8-Fc; Mon, 14 Dec 2020 18:35:44 +0000 Received: by outflank-mailman (input) for mailman id 52378; Mon, 14 Dec 2020 16:36:45 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqq5-0006vN-JV for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:36:45 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1bf79bc0-6229-4603-89c1-3e683c759290; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXcQ012841; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXMp002012; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 8B14CAAC67; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 1bf79bc0-6229-4603-89c1-3e683c759290 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 13/24] Don't assume tv_sec is a unsigned long (for NetBSD) Date: Mon, 14 Dec 2020 17:36:12 +0100 Message-Id: <20201214163623.2127-14-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" Reviewed-by: Roger Pau Monn=C3=A9 --- tools/libs/light/libxl_create.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_creat= e.c index 321a13e519..44691010bc 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -496,7 +496,7 @@ int libxl__domain_build(libxl__gc *gc, vments[2] =3D "image/ostype"; vments[3] =3D "hvm"; vments[4] =3D "start_time"; - vments[5] =3D GCSPRINTF("%lu.%02d", start_time.tv_sec,(int)start_t= ime.tv_usec/10000); + vments[5] =3D GCSPRINTF("%jd.%02d", start_time.tv_sec,(int)start_t= ime.tv_usec/10000); =20 localents =3D libxl__calloc(gc, 13, sizeof(char *)); i =3D 0; @@ -535,7 +535,7 @@ int libxl__domain_build(libxl__gc *gc, vments[i++] =3D "image/kernel"; vments[i++] =3D (char *) state->pv_kernel.path; vments[i++] =3D "start_time"; - vments[i++] =3D GCSPRINTF("%lu.%02d", start_time.tv_sec,(int)start= _time.tv_usec/10000); + vments[i++] =3D GCSPRINTF("%jd.%02d", (intmax_t)start_time.tv_sec,= (int)start_time.tv_usec/10000); if (state->pv_ramdisk.path) { vments[i++] =3D "image/ramdisk"; vments[i++] =3D (char *) state->pv_ramdisk.path; @@ -1502,7 +1502,7 @@ static void domcreate_stream_done(libxl__egc *egc, vments[2] =3D "image/ostype"; vments[3] =3D "hvm"; vments[4] =3D "start_time"; - vments[5] =3D GCSPRINTF("%lu.%02d", start_time.tv_sec,(int)start_t= ime.tv_usec/10000); + vments[5] =3D GCSPRINTF("%jd.%02d", (intmax_t)start_time.tv_sec,(i= nt)start_time.tv_usec/10000); break; case LIBXL_DOMAIN_TYPE_PV: vments =3D libxl__calloc(gc, 11, sizeof(char *)); @@ -1512,7 +1512,7 @@ static void domcreate_stream_done(libxl__egc *egc, vments[i++] =3D "image/kernel"; vments[i++] =3D (char *) state->pv_kernel.path; vments[i++] =3D "start_time"; - vments[i++] =3D GCSPRINTF("%lu.%02d", start_time.tv_sec,(int)start= _time.tv_usec/10000); + vments[i++] =3D GCSPRINTF("%jd.%02d", (intmax_t)start_time.tv_sec,= (int)start_time.tv_usec/10000); if (state->pv_ramdisk.path) { vments[i++] =3D "image/ramdisk"; vments[i++] =3D (char *) state->pv_ramdisk.path; --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970982; cv=none; d=zohomail.com; s=zohoarc; b=LzDKxkF0e1iLuzXFokHHKKownMSQv/fFK065knn95RjdT8chGtmN3oUFZTJ9u82oTONSoXBWE6CUwdDbxTtsn/WJQrnA7uAd6kO7g86OstY1YsBfoDla3Mhxc1qyBClIwFFcrgGGemZkFiBcFfKXHSRQQVmX7ThoGdzeRsOkTxk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970982; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Xds4B6R2hgyVKHmyzN7VlQ/+TquIKwSg4kkzjkAc8QY=; b=je09jhZTyFRzfFxKlwmOcHY8nHle01F0cBBlE7pjhVlDIxayxzrsuyMlMolQlDkCQsrC/bT2iwJvenoXRN29S+JHGpx6jIzu44YLYRjEGFkWAS1yDMB7ZU8fJjvWyovZHMcoolDKCxvo+c3T8A1UbApefk4g81jvVAp0J0hI1Iw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970982659789.3713517992481; Mon, 14 Dec 2020 10:36:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52402.91747 (Exim 4.92) (envelope-from ) id 1koshb-0002oV-Lg; Mon, 14 Dec 2020 18:36:07 +0000 Received: by outflank-mailman (output) from mailman id 52402.91747; Mon, 14 Dec 2020 18:36:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshZ-0002lg-Jq; Mon, 14 Dec 2020 18:36:05 +0000 Received: by outflank-mailman (input) for mailman id 52402; Mon, 14 Dec 2020 16:39:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrh-0006vN-Lq for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:25 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5f338a86-e757-4555-9dbd-e383e782b2e1; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXW1000190; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaWlF002558; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 9F8C5AAC67; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5f338a86-e757-4555-9dbd-e383e782b2e1 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 14/24] Pass bridge name to qemu and set XEN_DOMAIN_ID Date: Mon, 14 Dec 2020 17:36:13 +0100 Message-Id: <20201214163623.2127-15-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" Pass bridge name to qemu When starting qemu, set an environnement variable XEN_DOMAIN_ID, to be used by qemu helper scripts --- tools/libs/light/libxl_dm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index 3da83259c0..5948ace60d 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -761,6 +761,10 @@ static int libxl__build_device_model_args_old(libxl__g= c *gc, int nr_set_cpus =3D 0; char *s; =20 + static char buf[12]; + snprintf(buf, sizeof(buf), "%d", domid); + flexarray_append_pair(dm_envs, "XEN_DOMAIN_ID", buf); + if (b_info->kernel) { LOGD(ERROR, domid, "HVM direct kernel boot is not supported by= " "qemu-xen-traditional"); @@ -1547,8 +1551,10 @@ static int libxl__build_device_model_args_new(libxl_= _gc *gc, flexarray_append(dm_args, "-netdev"); flexarray_append(dm_args, GCSPRINTF("type=3Dtap,id=3Dnet%d,ifname= =3D%s," + "br=3D%s," "script=3D%s,downscript=3D%s", nics[i].devid, ifname, + nics[i].bridge, libxl_tapif_script(gc), libxl_tapif_script(gc))); =20 @@ -1825,6 +1831,10 @@ static int libxl__build_device_model_args_new(libxl_= _gc *gc, flexarray_append(dm_args, GCSPRINTF("%"PRId64, ram_size)); =20 if (b_info->type =3D=3D LIBXL_DOMAIN_TYPE_HVM) { + static char buf[12]; + snprintf(buf, sizeof(buf), "%d", guest_domid); + flexarray_append_pair(dm_envs, "XEN_DOMAIN_ID", buf); + if (b_info->u.hvm.hdtype =3D=3D LIBXL_HDTYPE_AHCI) flexarray_append_pair(dm_args, "-device", "ahci,id=3Dahci0"); for (i =3D 0; i < num_disks; i++) { --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970971; cv=none; d=zohomail.com; s=zohoarc; b=ftYAPCzY1iZL96t0Up1oF18q4gQtR/vcK3L2Sf1pbYsDVSOJw/uxaq5/XsS3B5I1QLB6DDVoZn8co14eo1rEfPsjTcKNyOH1Hb5PD09kFnq8bPQWN21hUxbHuiXtFhGrIPeJhMz0BmcqHLwDo2eBntYWqAatf6hj+dHLttPafkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970971; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nvY8NkUBjJCo7eWRHyKD5SZnDEAVjyI2z0FnLF5Udfc=; b=WdBIRRnRhwc7J5AHqo0T0gO/phraYvvFxrf4yLM00YD+EGjOYxPWd1rt40adKiwirayAeqe9vteBjaSD8wo6NLAAMvcH+rhSKsnHa6mQ1z4DQ+cGfN9Ry1Ggfm5Qx5wGlaCdft1rvTDDNBTG64+RiOquB8tr2sBY6hXIH4scl0g= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970971565845.2910613807254; Mon, 14 Dec 2020 10:36:11 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52395.91668 (Exim 4.92) (envelope-from ) id 1koshL-00022k-05; Mon, 14 Dec 2020 18:35:51 +0000 Received: by outflank-mailman (output) from mailman id 52395.91668; Mon, 14 Dec 2020 18:35:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshK-00021l-5H; Mon, 14 Dec 2020 18:35:50 +0000 Received: by outflank-mailman (input) for mailman id 52395; Mon, 14 Dec 2020 16:39:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqj-0006vN-JB for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:25 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3cc2c6c1-de36-4084-bf41-baca4af23928; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXZL001596; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaX6L007339; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id ADC85AAC68; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3cc2c6c1-de36-4084-bf41-baca4af23928 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 15/24] Make libs/light build on NetBSD Date: Mon, 14 Dec 2020 17:36:14 +0100 Message-Id: <20201214163623.2127-16-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/light/libxl_dm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c index 5948ace60d..c93bdf2cc9 100644 --- a/tools/libs/light/libxl_dm.c +++ b/tools/libs/light/libxl_dm.c @@ -3659,6 +3659,14 @@ static int kill_device_model_uid_child(libxl__destro= y_devicemodel_state *ddms, =20 LOGD(DEBUG, domid, "DM reaper: calling setresuid(%d, %d, 0)", reaper_uid, dm_kill_uid); +#ifdef __NetBSD__ + r =3D setuid(dm_kill_uid); + if (r) { + LOGED(ERROR, domid, "setuid to %d", dm_kill_uid); + rc =3D rc ?: ERROR_FAIL; + goto out; + } +#else /* __NetBSD__ */ r =3D setresuid(reaper_uid, dm_kill_uid, 0); if (r) { LOGED(ERROR, domid, "setresuid to (%d, %d, 0)", @@ -3666,6 +3674,7 @@ static int kill_device_model_uid_child(libxl__destroy= _devicemodel_state *ddms, rc =3D rc ?: ERROR_FAIL; goto out; } +#endif /* __NetBSD__ */ =20 /* * And kill everyone but me. --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970988; cv=none; d=zohomail.com; s=zohoarc; b=CkXvQuDnEKOi5zrTNqxSHJaZ8F1vD8yBx4GP5Dz04fnVOJpFjNna2/mGJg5nDZ/L3MVkkFOT5UQ7wU1Y9BQMhWMCm1K6cR7Utd9ChOuCFuG/zducIezAzIfrJitHsYaXTU1ZAzHYDyr487T44nYAdntneqWJbGsnPG4SZSS4nLw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970988; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r/n8CNuQxfJmq+iBNvw4LthSJnOgCqRWqeA5XdBAu48=; b=N3vhKI6zxyhAX+QI5u3ZDpH3eQKVr/74GjVgvXUBjKbe9HfXNDnxv/7HgjlzEdfnC8YRvMKdWGuJZmKnwhBov9gLbXsykwyYLxRrg9QyINrUioHweimGqCuab5zP3gDb2VaHfDXJgQNvuFz0riq0t2aXwqlFDdxKcfNnoqWy1rQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970988447195.61072902256728; Mon, 14 Dec 2020 10:36:28 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52415.91773 (Exim 4.92) (envelope-from ) id 1koshg-00031u-VX; Mon, 14 Dec 2020 18:36:12 +0000 Received: by outflank-mailman (output) from mailman id 52415.91773; Mon, 14 Dec 2020 18:36:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshe-0002zv-VH; Mon, 14 Dec 2020 18:36:10 +0000 Received: by outflank-mailman (input) for mailman id 52415; Mon, 14 Dec 2020 16:39:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqr3-0006vN-K2 for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:45 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5a4bbe2a-34ba-49bf-b439-89a8eb3a5f4a; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXws020700; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXU0001450; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id BE55BAAC66; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5a4bbe2a-34ba-49bf-b439-89a8eb3a5f4a From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 16/24] Switch NetBSD to QEMU_XEN (!traditional) Date: Mon, 14 Dec 2020 17:36:15 +0100 Message-Id: <20201214163623.2127-17-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/light/libxl_netbsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_netbsd.c b/tools/libs/light/libxl_netbs= d.c index e66a393d7f..31334f932c 100644 --- a/tools/libs/light/libxl_netbsd.c +++ b/tools/libs/light/libxl_netbsd.c @@ -110,7 +110,7 @@ out: =20 libxl_device_model_version libxl__default_device_model(libxl__gc *gc) { - return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; + return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; } =20 int libxl__pci_numdevs(libxl__gc *gc) --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970980; cv=none; d=zohomail.com; s=zohoarc; b=LFPzOalAd6GXlqOvwguvABkTFn6V+pUdmPjHKWhJHwEd5TUStjSF3lz4y/esAUisCP/bd2uO6wTkzVBFUzNkkCngnGBP9ei8VEYcV9fbD0rT3lzO6BeWHqBhXNa1KwIjky4mYTiYIjZqMJqL65d4c4Jhj00pGigVrxDJmkddpAs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970980; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0sdqFgcvjse/36vrNRpZhoMxZGba9EQjZEdXq9Tqtn0=; b=PUhAqm+IJPaH/6NW90Wi1TVYXmW2AsU+YfGWdFekX/JK0NjBoTDPGEjR+G6/383NgS4Gjs+GBmBrxkwLtdfM0GYMxVYVmcGobYpISWNAmSbAQ/uvy5QF3usgJHSHOEfCEOhD8l61xJh35Y2H01PjUyhJwzvPonJ538wp/Pz6E3c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970980824588.4365858138208; Mon, 14 Dec 2020 10:36:20 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52400.91724 (Exim 4.92) (envelope-from ) id 1koshV-0002V6-Ux; Mon, 14 Dec 2020 18:36:02 +0000 Received: by outflank-mailman (output) from mailman id 52400.91724; Mon, 14 Dec 2020 18:36:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshS-0002Qo-Ab; Mon, 14 Dec 2020 18:35:58 +0000 Received: by outflank-mailman (input) for mailman id 52400; Mon, 14 Dec 2020 16:39:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqqo-0006vN-JO for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:30 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 518c5fc0-b439-4fb1-9fa8-41c5df3b2e58; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXl0021417; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaX6N007339; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id D0DE8AAC66; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 518c5fc0-b439-4fb1-9fa8-41c5df3b2e58 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 17/24] Make libs/light build on NetBSD Date: Mon, 14 Dec 2020 17:36:16 +0100 Message-Id: <20201214163623.2127-18-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:33 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/light/libxl_uuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/light/libxl_uuid.c b/tools/libs/light/libxl_uuid.c index dadb79bad8..a8ee5f253e 100644 --- a/tools/libs/light/libxl_uuid.c +++ b/tools/libs/light/libxl_uuid.c @@ -82,7 +82,7 @@ void libxl_uuid_generate(libxl_uuid *uuid) uuid_enc_be(uuid->uuid, &nat_uuid); } =20 -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) int libxl_uuid_from_string(libxl_uuid *uuid, const char *in) { uint32_t status; @@ -120,7 +120,7 @@ void libxl_uuid_clear(libxl_uuid *uuid) memset(&uuid->uuid, 0, sizeof(uuid->uuid)); } =20 -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) int libxl_uuid_compare(const libxl_uuid *uuid1, const libxl_uuid *uuid2) { uuid_t nat_uuid1, nat_uuid2; --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970991; cv=none; d=zohomail.com; s=zohoarc; b=OzcNOvs7K7vR6RQzT7swxBF4cWmVH8V5SZfE/WYFa2TnrVmMtI5GJAcXsNGC+GIBm3hB2zlC9ckzEIyn8jakFgGXzUa9Yv9r7nTinBiElbuiflCqegwjLUj1MvZ0iaapzgO0YPpK4ybPMZTFkN6OJU8atT9h8PnWkYSBUVmtq7g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970991; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8DBBpjmOAhq8An7HkllICjvAHJzdbCx3V+qEGCbBiPY=; b=N828gsWdyJG+iyfa+a3jtGipnbfjTfRR8dh1dz47t2QoPaoS3J1HV9pBj/k8UvCdH7FYu6anno5MnnOZvQolxuvzgG/toHswAG0aojxZrnRGw7Qcfnj3+mszgru6N7rMxY0IS+5Zj+/EDHABAOhhcwJDHXUCvSlFuOOD33HwILs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970991265609.0151760259804; Mon, 14 Dec 2020 10:36:31 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52418.91786 (Exim 4.92) (envelope-from ) id 1koshj-0003A9-LI; Mon, 14 Dec 2020 18:36:15 +0000 Received: by outflank-mailman (output) from mailman id 52418.91786; Mon, 14 Dec 2020 18:36:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshi-000381-15; Mon, 14 Dec 2020 18:36:14 +0000 Received: by outflank-mailman (input) for mailman id 52418; Mon, 14 Dec 2020 16:39:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrI-0006vN-Kd for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:00 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 66502db2-5ab0-4a6e-a577-5b48f32b7801; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaXBI008620; Mon, 14 Dec 2020 17:36:33 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaXb6020782; Mon, 14 Dec 2020 17:36:33 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id E6B77AAC66; Mon, 14 Dec 2020 17:36:33 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 66502db2-5ab0-4a6e-a577-5b48f32b7801 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 18/24] xeneventchn_stubs.c doens't need xen/sys/evtchn.h (NetBSD fix) Date: Mon, 14 Dec 2020 17:36:17 +0100 Message-Id: <20201214163623.2127-19-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" Reviewed-by: Roger Pau Monn=C3=A9 --- tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/ocaml/libs/eventchn/xeneventchn_stubs.c b/tools/ocaml/li= bs/eventchn/xeneventchn_stubs.c index ba40078d09..f889a7a2e4 100644 --- a/tools/ocaml/libs/eventchn/xeneventchn_stubs.c +++ b/tools/ocaml/libs/eventchn/xeneventchn_stubs.c @@ -22,7 +22,6 @@ #include #include #include -#include #include =20 #define CAML_NAME_SPACE --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970979; cv=none; d=zohomail.com; s=zohoarc; b=bgRqa6z7atB3Kc+RV7+axA246MR6t+TM1Q25rXnr974V85XQkTo7mXfat8aoi15sdSEXd62Ae+kOjartBEnKsr4TMRJ4dafzQBorxNhXHf0PAcUlodihIG4JkIOW8Mya2sIkhpWILgEmNRBJqEJNtXgGkM8972L0/IcsjWJ9e/c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970979; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zMPvAgumzSEhtJoBc2Zwp7igPEscRbWVWYB2WLn560M=; b=g6YtAY3gFVohKD6DY+qg7Jx6bQl+JfVMux8nd/maZOsLHn1x3icU4YuIgBXt736CebNN7qnIk+VuoueXwz1SKyfw4SDGW112m1wIHOVyT8BDiqSf/wOVOZ12wVZk/ExHVqEDRG9qk+lqrVGq20l7OkDtGRtpt0j0oNPQK430HqY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970979992964.6518767528805; Mon, 14 Dec 2020 10:36:19 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52401.91735 (Exim 4.92) (envelope-from ) id 1koshY-0002fc-Q7; Mon, 14 Dec 2020 18:36:04 +0000 Received: by outflank-mailman (output) from mailman id 52401.91735; Mon, 14 Dec 2020 18:36:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshW-0002by-C9; Mon, 14 Dec 2020 18:36:02 +0000 Received: by outflank-mailman (input) for mailman id 52401; Mon, 14 Dec 2020 16:39:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrN-0006vN-Kv for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:05 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2c42ed7b-9363-41a8-b7e8-ed1062ae1223; Mon, 14 Dec 2020 16:36:34 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaYbe026385; Mon, 14 Dec 2020 17:36:34 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaYbT014229; Mon, 14 Dec 2020 17:36:34 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 0101BAAC66; Mon, 14 Dec 2020 17:36:34 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2c42ed7b-9363-41a8-b7e8-ed1062ae1223 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 19/24] errno may not be a gobal R/W variable, use a local variable instead (fix build on NetBSD) Date: Mon, 14 Dec 2020 17:36:18 +0100 Message-Id: <20201214163623.2127-20-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/xenpaging/xenpaging.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 33098046c2..39c8c83b4b 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -180,10 +180,11 @@ static int xenpaging_get_tot_pages(struct xenpaging *= paging) static void *init_page(void) { void *buffer; + int rc; =20 /* Allocated page memory */ - errno =3D posix_memalign(&buffer, XC_PAGE_SIZE, XC_PAGE_SIZE); - if ( errno !=3D 0 ) + rc =3D posix_memalign(&buffer, XC_PAGE_SIZE, XC_PAGE_SIZE); + if ( rc !=3D 0 ) return NULL; =20 /* Lock buffer in memory so it can't be paged out */ --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607972574; cv=none; d=zohomail.com; s=zohoarc; b=aE08flXseumtiZQl9jhpKej0X5nG+Lw7ikA63+i75QU3szYf70RFS+ZEaL7l+aVWRWim2cTBO4VlppK/dL8VBbqAJfxYGWG20pSaECo3KwXnLgs/J2xnbOB91LEa7O2jjiXae6Rlim5RfX8loEGIG58KggKpNX/7vVw0gMHat7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607972574; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WjsvtEnpUDWY6WU2Q/b0gzR4DnmOY05YGpXAYB+XObs=; b=Tbn/3NWvLTa7cTVFJvnSX5xPc2TUC7LsEQ6xmrUW/Zse2DLNBB4e31VYpkhtmoebSZidKjmJ5PV6lmea7LudMsyHaeZr3p3K7UuU2ux6ipIp6l86/9nfIQYHUsju+Vzeclg6Zjs3i6S5T6sx3/+kar713oQKjwyicdmDHEg6y7g= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607972574025918.8565184560201; Mon, 14 Dec 2020 11:02:54 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52394.91658 (Exim 4.92) (envelope-from ) id 1koshJ-0001zy-U4; Mon, 14 Dec 2020 18:35:49 +0000 Received: by outflank-mailman (output) from mailman id 52394.91658; Mon, 14 Dec 2020 18:35:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshJ-0001yw-8y; Mon, 14 Dec 2020 18:35:49 +0000 Received: by outflank-mailman (input) for mailman id 52394; Mon, 14 Dec 2020 16:39:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrD-0006vN-KY for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:55 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id cb74707c-f3c6-477f-b60f-5f9713a046bb; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaY9l012882; Mon, 14 Dec 2020 17:36:34 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaYu8020075; Mon, 14 Dec 2020 17:36:34 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 11BAFAAC66; Mon, 14 Dec 2020 17:36:34 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: cb74707c-f3c6-477f-b60f-5f9713a046bb From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 20/24] If FILENAME_MAX is defined, use it instead of arbitrary value (fix format-truncation errors with GCC >= 7) Date: Mon, 14 Dec 2020 17:36:19 +0100 Message-Id: <20201214163623.2127-21-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/xenpmd/xenpmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c index 12b82cf43e..cfd22e64e3 100644 --- a/tools/xenpmd/xenpmd.c +++ b/tools/xenpmd/xenpmd.c @@ -101,7 +101,11 @@ FILE *get_next_battery_file(DIR *battery_dir, { FILE *file =3D 0; struct dirent *dir_entries; +#ifdef FILENAME_MAX + char file_name[FILENAME_MAX]; +#else char file_name[284]; +#endif int ret; =20 do=20 --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970996; cv=none; d=zohomail.com; s=zohoarc; b=QL6oAn7Y5LGD36bvqKy7gxJAEbOhpe9x4k6IwTiwMkDuPCTYkGhBobocq5tgms85JH8FBnm4H5t8Xtkn0hTitkToPRCuCgE9PSK30jHaQIBceGLRrzw2m46WPwWqZe/0AAPr5eouhPQrTnJZjaVqAq0rD/2AfT4TCCPoxoM7438= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970996; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RPUORDzZ6nLy1WhD+9eU2G1Cr9HqbJJ8djFoV3QULjs=; b=YIksFK3UASJEzNUw2XzOTtv8RIzrATVI2+/M6QtBFwVbR/VIbq0QeV8MUgM9txGlYsDcDKsDey+1uTo7CQBIhFgbW52JwYYtGMXStQXlBpAgDcGBinQ3dm2tjIaS0NUYWjMRVeGk66ck/IVqoIwO+mM5dZFlWhkukkdWRgyzgvs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970995944710.6869189995239; Mon, 14 Dec 2020 10:36:35 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52420.91809 (Exim 4.92) (envelope-from ) id 1koshn-0003Ke-N4; Mon, 14 Dec 2020 18:36:19 +0000 Received: by outflank-mailman (output) from mailman id 52420.91809; Mon, 14 Dec 2020 18:36:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshm-0003Ie-04; Mon, 14 Dec 2020 18:36:18 +0000 Received: by outflank-mailman (input) for mailman id 52420; Mon, 14 Dec 2020 16:39:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrc-0006vN-Lp for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:20 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8bcad583-616e-4839-92f7-87b1ad9ad5fa; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaYZu023577; Mon, 14 Dec 2020 17:36:34 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaYxu022690; Mon, 14 Dec 2020 17:36:34 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 22A26AAC66; Mon, 14 Dec 2020 17:36:34 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 8bcad583-616e-4839-92f7-87b1ad9ad5fa From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 21/24] Fix unused functions/variables error Date: Mon, 14 Dec 2020 17:36:20 +0100 Message-Id: <20201214163623.2127-22-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/stat/xenstat_netbsd.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/libs/stat/xenstat_netbsd.c b/tools/libs/stat/xenstat_net= bsd.c index 6e9d6aee10..64eda9e1ae 100644 --- a/tools/libs/stat/xenstat_netbsd.c +++ b/tools/libs/stat/xenstat_netbsd.c @@ -55,11 +55,6 @@ get_priv_data(xenstat_handle *handle) } =20 /* Expected format of /proc/net/dev */ -static const char PROCNETDEV_HEADER[] =3D - "Inter-| Receive |" - " Transmit\n" - " face |bytes packets errs drop fifo frame compressed multicast|" - "bytes packets errs drop fifo colls carrier compressed\n"; =20 /* Collect information about networks */ int xenstat_collect_networks(xenstat_node * node) @@ -76,12 +71,6 @@ void xenstat_uninit_networks(xenstat_handle * handle) fclose(priv->procnetdev); } =20 -static int read_attributes_vbd(const char *vbd_directory, const char *what= , char *ret, int cap) -{ - /* XXX implement */ - return 0; -} - /* Collect information about VBDs */ int xenstat_collect_vbds(xenstat_node * node) { --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970972; cv=none; d=zohomail.com; s=zohoarc; b=i+RveJajGYsaeH6KY4veDJtQdu/KGClPJOd8wC5FlnNYK8O4JwbhbZGpAnbDtDpGEQ474TB6lYiJEAqhi9WPMjJI1eK36LwnlHY8+RbdfDRqINkjyAH7uf8rQDDyDG9H4hTMv/LeZjeL7GMHAooK2ki8EIwTQxk+MmKrOMGNoog= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970972; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p2XMbyxHSmDObGFETuzSKGswgD92i5Xdg+sIQhYVTic=; b=UX+PqrqwqQJy1eGPjw9WfXEWZAo2vQbALK/eLCZIf4eqzTnZEtFCnskrD1mod9YEDYjdslYsM3DPBXc2NL/A6gxs5RI9ZnBi3taai7mdfO26rmXJrzoxOUdovyGkglzmVKZC/OPk2Nx4wB8Qi3KayN5o0xQ6ZkLjE8dL0Fltk+c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970972648686.3738002242626; Mon, 14 Dec 2020 10:36:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52398.91696 (Exim 4.92) (envelope-from ) id 1koshO-0002CM-68; Mon, 14 Dec 2020 18:35:54 +0000 Received: by outflank-mailman (output) from mailman id 52398.91696; Mon, 14 Dec 2020 18:35:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshM-00029u-Rf; Mon, 14 Dec 2020 18:35:52 +0000 Received: by outflank-mailman (input) for mailman id 52398; Mon, 14 Dec 2020 16:39:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqr8-0006vN-KF for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:37:50 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a833fa82-3c8c-441c-9cab-68892c90c994; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaYlm002086; Mon, 14 Dec 2020 17:36:34 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaY9S010884; Mon, 14 Dec 2020 17:36:34 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 354D6AAC66; Mon, 14 Dec 2020 17:36:34 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a833fa82-3c8c-441c-9cab-68892c90c994 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 22/24] If PTHREAD_STACK_MIN is not defined, use DEFAULT_THREAD_STACKSIZE Date: Mon, 14 Dec 2020 17:36:21 +0100 Message-Id: <20201214163623.2127-23-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" Reviewed-by: Roger Pau Monn=C3=A9 --- tools/libs/store/xs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 4ac73ec317..8e646b98d6 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -811,9 +811,13 @@ bool xs_watch(struct xs_handle *h, const char *path, c= onst char *token) =20 #ifdef USE_PTHREAD #define DEFAULT_THREAD_STACKSIZE (16 * 1024) +#ifndef PTHREAD_STACK_MIN +#define READ_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE +#else #define READ_THREAD_STACKSIZE \ ((DEFAULT_THREAD_STACKSIZE < PTHREAD_STACK_MIN) ? \ PTHREAD_STACK_MIN : DEFAULT_THREAD_STACKSIZE) +#endif =20 /* We dynamically create a reader thread on demand. */ mutex_lock(&h->request_mutex); --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970997; cv=none; d=zohomail.com; s=zohoarc; b=VcmV+gbxv5qGnrNDs3ncn4kcY2xPTvytynAfS2pxAH6bgGFuGG+8yd71C+edCrgDseXVxY67HUH0YXsPS5MAszB6PFhlOQ+kZ96MYjrEeOCXnYJKpLfA10pakZMQXNhrq5NMFyT4sQJJaJdSakjOWTpYeML+W8JBFfHsBfkZ9Nw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970997; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=i98rMjRwbFTlszLDkOn+9d8Y/OtW6lO5RaSbVEeQuXs=; b=BeLcWuj35f8r5jzgQdI6KTWkHQelGsWWhxO9qFpWjIQVgVWP9pVFnxJHAJNZI6FUrj5nviyi0hSFYBosThKkK+U4O+vfvpOnAhF0X+NvDYqZvjW87EE2t0bEyp/lIMEEuBLelpI8gT/dWaPST7jlAkxDywnU09jOCbMijoPQa6k= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1607970997163479.5595470589127; Mon, 14 Dec 2020 10:36:37 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52421.91821 (Exim 4.92) (envelope-from ) id 1koshq-0003RX-3D; Mon, 14 Dec 2020 18:36:22 +0000 Received: by outflank-mailman (output) from mailman id 52421.91821; Mon, 14 Dec 2020 18:36:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kosho-0003QQ-Fp; Mon, 14 Dec 2020 18:36:20 +0000 Received: by outflank-mailman (input) for mailman id 52421; Mon, 14 Dec 2020 16:39:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrX-0006vN-LY for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:15 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fcbac439-46ba-41f8-8fb9-3b1a9d40e0c3; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaYjL018346; Mon, 14 Dec 2020 17:36:34 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaYxR010544; Mon, 14 Dec 2020 17:36:34 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 44A4CAAC66; Mon, 14 Dec 2020 17:36:34 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fcbac439-46ba-41f8-8fb9-3b1a9d40e0c3 From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 23/24] Use xen/xenio.h on NetBSD Date: Mon, 14 Dec 2020 17:36:22 +0100 Message-Id: <20201214163623.2127-24-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/ctrl/xc_private.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/libs/ctrl/xc_private.h b/tools/libs/ctrl/xc_private.h index f0b5f83ac8..68e388f488 100644 --- a/tools/libs/ctrl/xc_private.h +++ b/tools/libs/ctrl/xc_private.h @@ -39,7 +39,11 @@ #include #include =20 +#ifdef __NetBSD__ +#include +#else #include +#endif =20 #include =20 --=20 2.28.0 From nobody Fri May 3 09:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1607970986; cv=none; d=zohomail.com; s=zohoarc; b=fOhbu+kVuA8KbDP74eF7+erQpcrQlCKJYRTTFza9jy/2fu0nIajBNIZR/oQu7KUcn6Pi9f5hcHi7HSFXO2KSQUvymZSGBXnRKr5oxj8o9+3ecnkTcjhHKDkYeeyKUriCOHDIyVt4QsQOH61/iTQykwDYs5Aptp+UreDFstEDgLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607970986; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1djFhbFU4mZEAMhqhY2hReHWQCdQqfpRlvyrs7X5Bmc=; b=atD+bj8ln+NnVo6bnhxkmQ35bRWLxmz4HtWdxjeXwefj2TXCFglRYWoRV3Lh3fut7ZvPlRaHHxbhgyMgkXG04N0NHHiocW8oMpwfdrRV+kC1DHMSiZQxnulvPWvSxR2dVg0TUXkc4H/4kOcJjruQX29sM8jj/2ND7BeCwZAuWTo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 160797098673665.08398294072242; Mon, 14 Dec 2020 10:36:26 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.52403.91760 (Exim 4.92) (envelope-from ) id 1koshe-0002vN-2f; Mon, 14 Dec 2020 18:36:10 +0000 Received: by outflank-mailman (output) from mailman id 52403.91760; Mon, 14 Dec 2020 18:36:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koshc-0002tE-8S; Mon, 14 Dec 2020 18:36:08 +0000 Received: by outflank-mailman (input) for mailman id 52403; Mon, 14 Dec 2020 16:39:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1koqrm-0006vN-Lw for xen-devel@lists.xenproject.org; Mon, 14 Dec 2020 16:38:30 +0000 Received: from isis.lip6.fr (unknown [2001:660:3302:283c::2]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id aa988afb-11e3-4515-8642-5030b4b9fb4a; Mon, 14 Dec 2020 16:36:35 +0000 (UTC) Received: from asim.lip6.fr (asim.lip6.fr [132.227.86.2]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 0BEGaYF2021664; Mon, 14 Dec 2020 17:36:34 +0100 (CET) Received: from borneo.soc.lip6.fr (borneo [132.227.103.47]) by asim.lip6.fr (8.15.2/8.14.4) with ESMTP id 0BEGaY2G005438; Mon, 14 Dec 2020 17:36:34 +0100 (MET) Received: by borneo.soc.lip6.fr (Postfix, from userid 373) id 555F5AAC66; Mon, 14 Dec 2020 17:36:34 +0100 (MET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: aa988afb-11e3-4515-8642-5030b4b9fb4a From: Manuel Bouyer To: xen-devel@lists.xenproject.org Cc: Manuel Bouyer Subject: [PATCH 24/24] Fix error: array subscript has type 'char' [-Werror=char-subscripts] Date: Mon, 14 Dec 2020 17:36:23 +0100 Message-Id: <20201214163623.2127-25-bouyer@netbsd.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201214163623.2127-1-bouyer@netbsd.org> References: <20201214163623.2127-1-bouyer@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Mon, 14 Dec 2020 17:36:34 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 Content-Type: text/plain; charset="utf-8" --- tools/libs/light/libxl_qmp.c | 2 +- tools/xentrace/xentrace.c | 2 +- xen/tools/symbols.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/light/libxl_qmp.c b/tools/libs/light/libxl_qmp.c index c394000ea9..9b638e6f54 100644 --- a/tools/libs/light/libxl_qmp.c +++ b/tools/libs/light/libxl_qmp.c @@ -1249,7 +1249,7 @@ static int qmp_error_class_to_libxl_error_code(libxl_= _gc *gc, se++; continue; } - if (tolower(*s) !=3D tolower(*se)) + if (tolower((unsigned char)*s) !=3D tolower((unsigned char)*se= )) break; s++, se++; } diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index 4b50b8a53e..a8903ebf46 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -957,7 +957,7 @@ static int parse_cpumask_range(const char *mask_str, xc= _cpumap_t map) { unsigned int a, b; int nmaskbits; - char c; + unsigned char c; int in_range; const char *s; =20 diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index 9f9e2c9900..0b12452616 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -173,11 +173,11 @@ static int read_symbol(FILE *in, struct sym_entry *s) /* include the type field in the symbol name, so that it gets * compressed together */ s->len =3D strlen(str) + 1; - if (islower(stype) && filename) + if (islower((unsigned char)stype) && filename) s->len +=3D strlen(filename) + 1; s->sym =3D malloc(s->len + 1); sym =3D SYMBOL_NAME(s); - if (islower(stype) && filename) { + if (islower((unsigned char)stype) && filename) { sym =3D stpcpy(sym, filename); *sym++ =3D '#'; } --=20 2.28.0