From nobody Thu May 2 00:39:46 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; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1592151493; cv=none; d=zohomail.com; s=zohoarc; b=P24bmN4UZA3w7dX88cYpSDvtTRhBhnR0iW4Uc2Ii2Vs3Y35I8TrxFaV3bEwo98cEgBs62tp/e7qaELcPAHG3a6acOMQT2cFtvizOuVo1UQRn+VZUrVBX4me5/RYmJ4T9YDXifsvnETtAEPQ33lIgboS5TqTZdNS20Bs5e5X60SU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592151493; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=C3mRdoRg64BYc4ys1yIyprFZdBXkem8fN8ugpNmuLtA=; b=KqdsRbEUTmcJATskI4XXzEptjZyuZ/Mrh8qz1tzlHa/vBF2KSxn+mvLKYLLwuEr7YQvbxsGSa8kp7IYGVQGRKi0xLSm6EVEsL8NurRB4uh/txPSXCWJAKzG4+fwXJR/kK7XlTK1FItQ9yaYUmVXx9z2f0qsBNRwaE9UdrVqwrNk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 159215149381160.19210727688278; Sun, 14 Jun 2020 09:18:13 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jkVKC-0004tY-NZ; Sun, 14 Jun 2020 16:17:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jkVKA-0004tT-Kj for xen-devel@lists.xenproject.org; Sun, 14 Jun 2020 16:17:34 +0000 Received: from mail-ej1-x642.google.com (unknown [2a00:1450:4864:20::642]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8d9f0812-ae5a-11ea-8496-bc764e2007e4; Sun, 14 Jun 2020 16:17:34 +0000 (UTC) Received: by mail-ej1-x642.google.com with SMTP id q19so14836778eja.7 for ; Sun, 14 Jun 2020 09:17:33 -0700 (PDT) Received: from localhost.localdomain (public-gprs354212.centertel.pl. [37.47.14.229]) by smtp.gmail.com with ESMTPSA id g25sm6752429edq.34.2020.06.14.09.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 09:17:32 -0700 (PDT) X-Inumbo-ID: 8d9f0812-ae5a-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C3mRdoRg64BYc4ys1yIyprFZdBXkem8fN8ugpNmuLtA=; b=OgmSgp0YvbM4MjXhwP44uDmQ9IJchTdgBfvwlcsY4z0Knp2mv3PlL6fcJcdpuNKafO 1itnNmVeSD44yfoyyoVvnyGiTCmMQZi+2fxf9j+tNpyj45zMHojjthi+HrdZvsqga9VT CcxaV92AnGeqoXnsZZYFcom6qGjnFkpQKaAViILeMdHtQ08KrVUfLlDrUr3HVqhTirpP JS1Z/8K5xNQ3Ey0afUOGavvpflzd3cKTr1aWTn4jw+uZVabvC10AuR6HjTED73OLi45V F/ddhM+o7fp3RAO1otiEaNDoN6PkPgOXW5NUvQ8QSI4HhKdPTr0Z13Y5nIDy4YUCpCkd ss+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C3mRdoRg64BYc4ys1yIyprFZdBXkem8fN8ugpNmuLtA=; b=SxU3gKfRhF+TXzG6hRxJOZ0mP5eOy76Geyb9jcJdZodOv6jGDK/JlRFKx3AT7wmtE9 mathdpxNh3FgVADYqs04GhUtvIeOaHWop6RWa7UDHmUy9p3JB+Np8jNKoMieG7Q5bSn5 GhO+0HD7+XxxDYmwmogrxa89HEqnaXibLklNqTJq/Hjy9tdZgWa3627p/CqmhFcvpCmx miPWHhZFJDsQHLK/ToAPlpJ5r0qEaIUJVfPYqDjK+yxVZHMR4m8LUqKdH728/ja47SdR A7aKLCciq6hhToBNVbkp5nuwFQaM6U2/bysbYs+KMggtcFldgXbl8R0eoV5J0DbMFSLA 0BGw== X-Gm-Message-State: AOAM530kcSaIGB6LjWfIOuVndE7KW7NgUI9wngiVkRn76MJOZdETVRQ1 SwVRckc71JTQO6MiRkSVm2QrG2lvyX/4tg== X-Google-Smtp-Source: ABdhPJzu809FPnL+SaqbdfLTTjXT3ClJxmAO7HnV+sg36krRUjBee4Bzk6FUlRj35IvMH7D64wzQhw== X-Received: by 2002:a17:906:1fcd:: with SMTP id e13mr21718301ejt.472.1592151452843; Sun, 14 Jun 2020 09:17:32 -0700 (PDT) From: Grzegorz Uriasz To: xen-devel@lists.xenproject.org Subject: [PATCH] libxl: tooling expects wrong errno Date: Sun, 14 Jun 2020 16:17:08 +0000 Message-Id: X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , jakub@bartmin.ski, Ian Jackson , marmarek@invisiblethingslab.com, Grzegorz Uriasz , j.nowak26@student.uw.edu.pl, Anthony PERARD , contact@puzio.waw.pl Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When iommu is not enabled for a given domain then pci passthrough hypercalls such as xc_test_assign_device return EOPNOTSUPP. The code responsible for this is in "iommu_do_domctl" inside xen/drivers/passthrough/iommu.c This patch fixes the error message reported by libxl when assigning pci devices to domains without iommu. Signed-off-by: Grzegorz Uriasz Tested-by: Grzegorz Uriasz Acked-by: Ian Jackson --- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 957ff5c8e9..bc5843b137 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -1561,7 +1561,7 @@ void libxl__device_pci_add(libxl__egc *egc, uint32_t = domid, LOGD(ERROR, domid, "PCI device %04x:%02x:%02x.%u %s?", pcidev->domain, pcidev->bus, pcidev->dev, pcidev->func, - errno =3D=3D ENOSYS ? "cannot be assigned - no IOMMU" + errno =3D=3D EOPNOTSUPP ? "cannot be assigned - no IOMMU" : "already assigned to a different guest"); goto out; } --=20 2.27.0