From patchwork Tue Nov 10 17:51:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 11894965 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 387C315E6 for ; Tue, 10 Nov 2020 18:02:11 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0835220781 for ; Tue, 10 Nov 2020 18:02:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="EVSCFrio" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0835220781 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.23665.50643 (Exim 4.92) (envelope-from ) id 1kcXx8-0005sY-Fm; Tue, 10 Nov 2020 18:01:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 23665.50643; Tue, 10 Nov 2020 18:01:10 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kcXx8-0005sI-9G; Tue, 10 Nov 2020 18:01:10 +0000 Received: by outflank-mailman (input) for mailman id 23665; Tue, 10 Nov 2020 18:01: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 1kcXx7-00059I-Hx for xen-devel@lists.xenproject.org; Tue, 10 Nov 2020 18:01:09 +0000 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 98f21cd0-723e-4b31-82e5-fc74da31e0ed; Tue, 10 Nov 2020 18:00:44 +0000 (UTC) Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kcXwh-0006rB-P1; Tue, 10 Nov 2020 18:00:43 +0000 Received: from host109-146-187-185.range109-146.btcentralplus.com ([109.146.187.185] helo=u2f063a87eabd5f.home) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcXoI-0007RC-Gp; Tue, 10 Nov 2020 17:52:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kcXx7-00059I-Hx for xen-devel@lists.xenproject.org; Tue, 10 Nov 2020 18:01:09 +0000 X-Inumbo-ID: 98f21cd0-723e-4b31-82e5-fc74da31e0ed Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 98f21cd0-723e-4b31-82e5-fc74da31e0ed; Tue, 10 Nov 2020 18:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=QafHuUbOEu8fc/Otpqr5mCK9z+T4MUpc57SIzfCCCl0=; b=EVSCFrioLg9TBeLVH7XPvnV3eU 97GDeyezdb60SiFHiscWZcaA8dLy5krSbH19LGTbsAZEn1wUokUy8U9TdWOnH9diEjAxOQLV8S46x ypQtDU2pGN0SEmWZDYWOW6zUNT9E4uxy0T37nknwQvNySw6s9Yq858nFvwgzRERe2GKA=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kcXwh-0006rB-P1; Tue, 10 Nov 2020 18:00:43 +0000 Received: from host109-146-187-185.range109-146.btcentralplus.com ([109.146.187.185] helo=u2f063a87eabd5f.home) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcXoI-0007RC-Gp; Tue, 10 Nov 2020 17:52:02 +0000 From: Paul Durrant To: xen-devel@lists.xenproject.org Cc: Paul Durrant , Ian Jackson , Wei Liu Subject: [PATCH v2 13/24] libxl: add/recover 'rdm_policy' to/from PCI backend in xenstore Date: Tue, 10 Nov 2020 17:51:36 +0000 Message-Id: <20201110175147.7067-14-paul@xen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201110175147.7067-1-paul@xen.org> References: <20201110175147.7067-1-paul@xen.org> MIME-Version: 1.0 From: Paul Durrant Other parameters, such as 'msitranslate' and 'permissive' are dealt with but 'rdm_policy' appears to be have been completely missed. Signed-off-by: Paul Durrant --- Cc: Ian Jackson Cc: Wei Liu --- tools/libs/light/libxl_pci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/libs/light/libxl_pci.c b/tools/libs/light/libxl_pci.c index 278ebd9f561b..06fdc50ce10c 100644 --- a/tools/libs/light/libxl_pci.c +++ b/tools/libs/light/libxl_pci.c @@ -61,9 +61,9 @@ static void libxl_create_pci_backend_device(libxl__gc *gc, flexarray_append_pair(back, GCSPRINTF("vdevfn-%d", num), GCSPRINTF("%x", pci->vdevfn)); flexarray_append(back, GCSPRINTF("opts-%d", num)); flexarray_append(back, - GCSPRINTF("msitranslate=%d,power_mgmt=%d,permissive=%d", - pci->msitranslate, pci->power_mgmt, - pci->permissive)); + GCSPRINTF("msitranslate=%d,power_mgmt=%d,permissive=%d,rdm_policy=%s", + pci->msitranslate, pci->power_mgmt, + pci->permissive, libxl_rdm_reserve_policy_to_string(pci->rdm_policy))); flexarray_append_pair(back, GCSPRINTF("state-%d", num), GCSPRINTF("%d", XenbusStateInitialising)); } @@ -2313,6 +2313,9 @@ static int libxl__device_pci_from_xs_be(libxl__gc *gc, } else if (!strcmp(p, "permissive")) { p = strtok_r(NULL, ",=", &saveptr); pci->permissive = atoi(p); + } else if (!strcmp(p, "rdm_policy")) { + p = strtok_r(NULL, ",=", &saveptr); + libxl_rdm_reserve_policy_from_string(p, &pci->rdm_policy); } } while ((p = strtok_r(NULL, ",=", &saveptr)) != NULL); }