From nobody Sat Nov 30 03:35:52 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=pass; 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=pass (i=1dmarc=pass fromdomain=citrix.com); dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=2; a=rsa-sha256; t=1618322558; cv=pass; d=zohomail.com; s=zohoarc; b=UrhFmVSqkZd3avI2UVRzJdLp1+OesoQRrWQCxgqGoS3LnMkip4wvmY8qd/ufVngtrMZJKyfUKSQIIQ60pq09S9nb1cjq5N6W9nmt13SDLA8QrolyACpVkyR2wV02JRX+dUWgFyeJz9odUmU8ZI4ayofS4AAOWbDqPg7aIdv/uyo= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618322558; h=Content-Type: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=ZiXg4RaaWYgPdIkmGYs/6vFIpLjmbLaKb/fElO2iGok=; b=UWf5xCTxtcXQcem8EU3+46aT1l2Lgb7oChX9qQ67D7CdaWDiaBEtMW2C5JsPhYM9fKMnMZDB0XKlXjBbHy9B6WY7M/yB7oTCSwN4TEwI0KZtccK5cwT2dWAiQ3rWWddJmvvX9Wr/HpqK8Z7797k+ru4ygpG7ABHIPPvqLvDKE1M= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; 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=pass (i=1dmarc=pass fromdomain=citrix.com); dmarc=pass header.from= (p=reject 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 1618322558216686.0994052508407; Tue, 13 Apr 2021 07:02:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.109767.209505 (Exim 4.92) (envelope-from ) id 1lWJcG-0004ri-Du; Tue, 13 Apr 2021 14:02:08 +0000 Received: by outflank-mailman (output) from mailman id 109767.209505; Tue, 13 Apr 2021 14:02:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lWJcG-0004rb-AU; Tue, 13 Apr 2021 14:02:08 +0000 Received: by outflank-mailman (input) for mailman id 109767; Tue, 13 Apr 2021 14:02:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lWJcF-0004rK-EV for xen-devel@lists.xenproject.org; Tue, 13 Apr 2021 14:02:07 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9f706b10-97a6-4ef3-8c94-0b990a922eb5; Tue, 13 Apr 2021 14:02:06 +0000 (UTC) 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: 9f706b10-97a6-4ef3-8c94-0b990a922eb5 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1618322526; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=0Z9bLa3Of6ehyx4kNWG7tTOMC4d6bLSrky0iA51bLt8=; b=f0NYHJDaTPgqlL+rhF/a9FlM2drqBdIm/sGmSPrFtO6E1ilpsodbmLtT ye6VEG0lE1FaOvx5P59Maq5gXaLWN7JAV6cMkGH4GIc+u1Vzw+6Pajh8W 5vTXx83fQrej7Bw4TqAL50Og7ikptGR7smpiXxbgp0h8AeYxDIH+v5o8v g=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: rTCzCnezs2/a1q15+916qSQliMPcyYRgcH8b6mORBVMV5k3PtPQCK7FD1P5Cg79kxPL1cCkElL 8snMS1sOugxYScpDYmQKx6C48cunOz1+YqXkS6wb0DFNohKZWy/YR80s2h+6w3N+GjGmUyW4oX M/Ba4JP1hN9yjJxAn+3SGG80kYOaG5FQnmMGjJrXr53NExKI/RCgiLntRAt8KXM6jsOwTJdf6e UgLGagThj0RusoDEY2NeithEi9tKuFzojJwOa+QvxbFUQCsJcgD1V929iJiF6tmYnrm7Z5XoQT 8So= X-SBRS: 5.2 X-MesageID: 42955851 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:V7Qx1q2LlN6n4cJdP6gNdQqjBTd3eYIsi2QD101hICF9Wvez0+ izgfUW0gL1gj4NWHcm3euNIrWEXGm0z/FIyKErF/OHUBP9sGWlaLtj44zr3iH6F0TFmtJ1/Z xLN5JzANiYNzVHpO7n/Qi1FMshytGb8KauwdzT1WtpUBsCUcBdxi1SYzzrdnFebg9AGJY/Cd 6g/cJBvTWtYjA6ac68C3kDUYH41qH2vbjhZgMLAANi1RmWgVqTmcPHOjW7/jNbaTNAxr8+7X PI+jaW2oyPu+y2oyWssVP7wI9RnLLau7l+LeyKzvMYMzD9zjuvDb4RIIGqmBAQjKWR5E0xkN /Kyi1QT/hbz3/KZGm6rV/M9mDboU8TwkTvw1OZnnfvyPaRLFlRa7sj9PBkWyDU5EY6sNZ33L gj5RPii7NtAQ7dhyO43tDUVnhR5zuJiEA/mu0ehWE3a/p4VJZtq+UkjSZoOaZFNif75Ic7Kf JpHcHR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iph I/x92TheeYe27Z3w/X1AELb55mwiKCQcmoBhiLFvMN29umOU6Uiq/v2fWNtl7MOHKGQnVdo5 ZEe0wWZtlCjTdnrLRf6FnMdoXH5mQ/k1Vf5jl7kEXKwYbO2haDIX17 X-IronPort-AV: E=Sophos;i="5.82,219,1613451600"; d="scan'208";a="42955851" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fVSHbZ+AuFB66qVIV+dDETUr3T2iIvOQJ3KwteRPqFS0TD87Zi+cHRGTYG5MsGrDVSvUrhV2f0LbqV2KIOsaOR3x+ANVVgmoYItXYTlC16vsHOsn9V1egj7cal+2jvHAcqjmLqNkV7FbvAWpGhBXc8d2nWbk7yaesGsxtPVweNR+oeM5zvL2keRnqdqZMwvaE+3nBWlDN7okpLv0Q39Y6Z+GrTVXAAcEYbG4RnH9NrUn/US0hfjJ/ZlOTQdrIYa0tFzkW430gJdTu9Oi74C9NNKLetW1d7KkWc4sWt/KeGu7BZtMN67cVfWMqddWXcQmkZ1Z8mzbx9LWfUEIWi//Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZiXg4RaaWYgPdIkmGYs/6vFIpLjmbLaKb/fElO2iGok=; b=d8Dq5X21ymlAiJOcAeJ1XUnp6jbeGwAD4PGccB8i0tEmo5NwOshm+21jJqcWYZVK366Chk9rxHWEZ9GmF0ypYqCjHOXWD6w5GS0BrFu3g0M1mQ6Z9X7F+X26M5RSKHgOoZDbMJnc8F+G3SrHXx9NDdiYEQy0vh1AyaS0CVKB9mVVGw9oZTQJUchH62x6lbqdqLejIm2NZTD9wDab2Ev1uy84URzGa0cir+XTyO99v+ZbftTLgqJcTeOI4ntGbDdXhdUrSaCJ57Ov0Zuts/irxFKn9w8wzs8K0KLyFjBfVX6laAEXDkZXdrHcjbjplL/4bwGFt1p4ifJahgr6uVqFzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZiXg4RaaWYgPdIkmGYs/6vFIpLjmbLaKb/fElO2iGok=; b=eJ5xqxkLinkGPcsVXnwbLFJTrgzUeQ+MTtJ37UJGmIIDreHUBVkg6sYlD2yL18g8DJpT4v+oBj8tuysUTG/agGmFbR001zqax6aJpgfj7FYPOOKyxdmTkBoOXjlGjdRvwqraHnUScSD3DGkQgIV3H6STsfKgA+wgeh52jDuj420= From: Roger Pau Monne To: CC: Andrew Cooper , Roger Pau Monne , Ian Jackson , Wei Liu , Anthony PERARD , Jan Beulich Subject: [PATCH v2 01/21] libxl: don't ignore the return value from xc_cpuid_apply_policy Date: Tue, 13 Apr 2021 16:01:19 +0200 Message-ID: <20210413140140.73690-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210413140140.73690-1-roger.pau@citrix.com> References: <20210413140140.73690-1-roger.pau@citrix.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MR2P264CA0134.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::26) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb95fbd9-47ee-414c-36cd-08d8fe84b65d X-MS-TrafficTypeDiagnostic: DM4PR03MB6096: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xu+ohUAqjLQ049XEbtMgfk8/5ndfnbzurHyGlWfu+0zqa8qT31L8xvJIwKU+CTopQMLL2PooOIVpCiA7u+Qw7B6NM4XcwFPMI3jbcOJGIvFnBDq0GJ9PacqV9wu35SLaB2LRRSQOByUmOr21hb2jrX0oK6u6v5IMhjHUgXfA9OsxJwXhP2cpQJBsWvRt4/6hN/NooclFIDN9hjjFkGYuce/Ksm7HLBUQSmO8ZCo9+czDdaQBEDYDsJ3O//6zPlCXTzzIPW5rt4IjdZej0WS1t6D2T7Zx47ZVM89q0dm5paBNqfwDNA691/z5T7ouvn1vpwhvFgwLnCYQke9Bw8l3rslvKLtNg9h3yFnRWSxla4IRtyuHEe3uBCLNjJpK0DSwZ80KLS6obBFQtHgWasdoUidUuWy0P1OPwTxj8QvSEXWT34Cqth6UvKI8zrN+arvPnN6r1mhBkCYcIBJJjFqjfJJ27v+gYDyQdFs0SW6LD9kGjD9EJmvQR+PTrsSn6OoHVbaTgEcLimGciAUGZNJ6UK32LybhR7Ras+dt4Dt3/wooGIv0tK2Dl/nfenlPlhzdSSBJ6Kw5iKGtV8Wm99Skbm9k7GaA+evCQHcDp++Y9kc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(376002)(136003)(39850400004)(396003)(346002)(26005)(6916009)(86362001)(36756003)(83380400001)(186003)(8676002)(6666004)(16526019)(66476007)(66556008)(54906003)(2616005)(6496006)(5660300002)(956004)(38100700002)(478600001)(1076003)(4326008)(2906002)(8936002)(6486002)(316002)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?N0F0UXJwa1dqbUNWL0oxckJWYlhCT2hiazVud1FCdG8ra0trY2xDQkh2NG1C?= =?utf-8?B?eEl4Z1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Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2021 14:02:02.2690 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Fi8tEj8wb3b41sumVcZ8BAFMe6WNwVKOX8Coevm0IIMsbxWTspotNiCZP50Gh3DgEUFfLKdNd6qWJiuK7rHk0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR03MB6096 X-OriginatorOrg: citrix.com X-ZohoMail-DKIM: pass (identity @citrix.com) Also change libxl__cpuid_legacy to propagate the error from xc_cpuid_apply_policy into callers. Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Jan Beulich --- Changes since 1: - Return ERROR_FAIL on error. --- tools/libs/light/libxl_cpuid.c | 15 +++++++++++---- tools/libs/light/libxl_create.c | 5 +++-- tools/libs/light/libxl_dom.c | 2 +- tools/libs/light/libxl_internal.h | 4 ++-- tools/libs/light/libxl_nocpuid.c | 5 +++-- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/tools/libs/light/libxl_cpuid.c b/tools/libs/light/libxl_cpuid.c index 289c59c7420..539fc4869e6 100644 --- a/tools/libs/light/libxl_cpuid.c +++ b/tools/libs/light/libxl_cpuid.c @@ -419,11 +419,13 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_= list *cpuid, return 0; } =20 -void libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, bool restore, - libxl_domain_build_info *info) +int libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, bool restore, + libxl_domain_build_info *info) { + GC_INIT(ctx); bool pae =3D true; bool itsc; + int rc; =20 /* * Gross hack. Using libxl_defbool_val() here causes libvirt to crash= in @@ -462,8 +464,13 @@ void libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domi= d, bool restore, itsc =3D (libxl_defbool_val(info->disable_migrate) || info->tsc_mode =3D=3D LIBXL_TSC_MODE_ALWAYS_EMULATE); =20 - xc_cpuid_apply_policy(ctx->xch, domid, restore, NULL, 0, - pae, itsc, nested_virt, info->cpuid); + rc =3D xc_cpuid_apply_policy(ctx->xch, domid, restore, NULL, 0, + pae, itsc, nested_virt, info->cpuid); + if (rc) + LOGE(ERROR, "Failed to apply CPUID policy"); + + GC_FREE; + return rc ? ERROR_FAIL : 0; } =20 static const char *input_names[2] =3D { "leaf", "subleaf" }; diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_creat= e.c index 0c64268f66d..2faa96d9c68 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -1443,6 +1443,7 @@ int libxl__srm_callout_callback_static_data_done(unsi= gned int missing, =20 libxl_domain_config *d_config =3D dcs->guest_config; libxl_domain_build_info *info =3D &d_config->b_info; + int rc =3D 0; =20 /* * CPUID/MSR information is not present in pre Xen-4.14 streams. @@ -1452,9 +1453,9 @@ int libxl__srm_callout_callback_static_data_done(unsi= gned int missing, * stream doesn't contain any CPUID data. */ if (missing & XGR_SDD_MISSING_CPUID) - libxl__cpuid_legacy(ctx, dcs->guest_domid, true, info); + rc =3D libxl__cpuid_legacy(ctx, dcs->guest_domid, true, info); =20 - return 0; + return rc; } =20 void libxl__srm_callout_callback_restore_results(xen_pfn_t store_mfn, diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c index 842a51c86cb..e9f58ee4b2b 100644 --- a/tools/libs/light/libxl_dom.c +++ b/tools/libs/light/libxl_dom.c @@ -384,7 +384,7 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, * being migrated-in/restored have CPUID handled during the * static_data_done() callback. */ if (!state->restore) - libxl__cpuid_legacy(ctx, domid, false, info); + rc =3D libxl__cpuid_legacy(ctx, domid, false, info); =20 return rc; } diff --git a/tools/libs/light/libxl_internal.h b/tools/libs/light/libxl_int= ernal.h index c6a4a187f5b..44a2f3c8fe3 100644 --- a/tools/libs/light/libxl_internal.h +++ b/tools/libs/light/libxl_internal.h @@ -2052,8 +2052,8 @@ typedef yajl_gen_status (*libxl__gen_json_callback)(y= ajl_gen hand, void *); _hidden char *libxl__object_to_json(libxl_ctx *ctx, const char *type, libxl__gen_json_callback gen, void *p); =20 -_hidden void libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, bool reto= re, - libxl_domain_build_info *info); +_hidden int libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, bool retor= e, + libxl_domain_build_info *info); =20 /* Calls poll() again - useful to check whether a signaled condition * is still true. Cannot fail. Returns currently-true revents. */ diff --git a/tools/libs/light/libxl_nocpuid.c b/tools/libs/light/libxl_nocp= uid.c index f47336565b9..0630959e760 100644 --- a/tools/libs/light/libxl_nocpuid.c +++ b/tools/libs/light/libxl_nocpuid.c @@ -34,9 +34,10 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_lis= t *cpuid, return 0; } =20 -void libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, bool restore, - libxl_domain_build_info *info) +int libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domid, bool restore, + libxl_domain_build_info *info) { + return 0; } =20 yajl_gen_status libxl_cpuid_policy_list_gen_json(yajl_gen hand, --=20 2.30.1