Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1259810rdg; Fri, 11 Aug 2023 15:40:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAP4h4/v/ze9HcGHEqv+0w6ZjhOg9wMma1rPnR9BO00IlsV/bdqAszLdYow5NEZ/FSj0eN X-Received: by 2002:a17:906:8479:b0:99b:8c6e:ec18 with SMTP id hx25-20020a170906847900b0099b8c6eec18mr2680501ejc.48.1691793641193; Fri, 11 Aug 2023 15:40:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691793641; cv=pass; d=google.com; s=arc-20160816; b=okqCVtkKEJfuXgXHWLnu2N0UdZXSIRIYPqwkxwxt6FWTBKK+HUIt3O8F0v5stiT4W9 /3eon6Ku5QYFxJtlyW5HICuTivW8bhswYCdNxEZA6wSbtsCQTyMjgfi7MBAMpWdVb9nB hkDPCihhcre7KkDoQPSzbgijU/+j0ff4+zfmvhuSRz1MCbnZH9hRxz0T7w7c1U6FgQDP Id+Mu27ILN/bhzQde6QsrJWm/6cWXswr4iczwvO6ad1FaU5nTRKl7er0gcwFCcynaTkR wzWk9ojkIm4VmDWaHBFn3k1JPE/LBzUV7+GtjFH3rk+CUyrxWt76QpWwcALg1nwAuQZb Pm6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=QsPw693bazfLstgLxzovzUeRw5VBcc83bC0u47pQYWo=; fh=kzE8cpZz938keVUrp8N55DT+lMQ0b/+O377vm6rjKYc=; b=wPxLLAUxInHbr02kYetSnFsGgN5YmW9VVQmsSY1lYb2N/vpmqIJEoQGJJTVWezMNth nI1O6ZVD2khoxw6aM26ZxdmhST9PtRFJef22PWL8BFepW8qnXGyTW7qkYN3dujdiVXh6 IUygGaK3M6H0UrgDqWnpmg+gLc5MpMvo4fiFojBuFZ19mIfv6Hl+y4TAg4rSha4SKR3B ye+sUxksRxTJZy4+182v8STvJYYzGLRhm++8chsIDSs/RLcMijToByPvcKiZP6nOgz57 tRpJj0bCQhQ5V8P2QuTnszsnRVrYH3MTJPhw/r/oPwRANNkkXZjDQ2E1mABu8IT3GKZs 2LZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=WtVDE6EV; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o27-20020a17090637db00b0099bd621989asi4214435ejc.405.2023.08.11.15.40.16; Fri, 11 Aug 2023 15:40:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=WtVDE6EV; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235652AbjHKWQZ (ORCPT + 99 others); Fri, 11 Aug 2023 18:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjHKWQX (ORCPT ); Fri, 11 Aug 2023 18:16:23 -0400 Received: from BN6PR00CU002.outbound.protection.outlook.com (mail-eastus2azon11021016.outbound.protection.outlook.com [52.101.57.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 357BDCE; Fri, 11 Aug 2023 15:16:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ScA8l6WewA5CNnKAaD665r2mPAVNmN746Ly6HjZK1tUhcRE2tUorjFSDvRCynVaRZXuVIcwka2PGMhG3rv+jUTbx6pWp/6DIXg3LrrxPRzz7iTxL1Ny06TAyqwb5TRJUow4y+E8fAT+1FQblntZ+iimBWuWPXQgdc/ipURvt7yLZMOHI1m84L1BLYdF0k2WHkegWZZicDpXZEVk7qML9vCrS5kZzL3QjrojXFJ1Lls+77uMmHbQgSV0PLcYYbJP8nzkjHzaKymYVP7Owra02Cl4XnSxQr9YN2yWZgI19AjN4DJ4Hvyr/5nokAo61YkdFNM5+A7vWbavyuUPaCV11aQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QsPw693bazfLstgLxzovzUeRw5VBcc83bC0u47pQYWo=; b=ZnadzohU4OCdwST9xFThRZJwUv7JIidjlQqWBszZ6QhE/IDscO+9yTdGFC2+VqBR7GyYinAtfx6r4G5AvPVvbahyyaN4Am0svQBD1QnzBNK74sHzp4vM7M39pFs+bA45Xd1ZRH1tBW/wj6qivytm9rpOXzfVEB3NknHPkPIZ+upl0p7n0mftqr26wxg0lQIcFmh/czza3NcujRCwbkBi0jpEAge4waqp3/EWMvYIZx9rr6s1NeLNCEXCJWydyvaqVE/UFGTHeQlNBYtTLiS951EKaiTA4Pm+XAuxikr5x4MrKXM6GhqoQ2kDx5pilr9y5Kc1Ja6YvI7pKUrxQ9Hovg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QsPw693bazfLstgLxzovzUeRw5VBcc83bC0u47pQYWo=; b=WtVDE6EVsbCxAdHPIGGQ8qty51pbDR/gdD7vSNM0eGHSgX4O8rK+fIx325/QRgx2GOqKNxQQG+HAnV9qO8NXGDDBqVwOcTYohVQtcCdNTrxORsy8ybzNgfuImhFQpkVN54fl/0puJwV/6z4HmyrGICC8l2HzLww9QcJuXzQ76t4= Received: from SA1PR21MB1335.namprd21.prod.outlook.com (2603:10b6:806:1f2::11) by SJ1PR21MB3699.namprd21.prod.outlook.com (2603:10b6:a03:451::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.7; Fri, 11 Aug 2023 22:16:19 +0000 Received: from SA1PR21MB1335.namprd21.prod.outlook.com ([fe80::d4d:7c16:fa93:9870]) by SA1PR21MB1335.namprd21.prod.outlook.com ([fe80::d4d:7c16:fa93:9870%5]) with mapi id 15.20.6699.009; Fri, 11 Aug 2023 22:16:19 +0000 From: Dexuan Cui To: Wei Liu CC: Tianyu Lan , KY Srinivasan , Haiyang Zhang , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "daniel.lezcano@linaro.org" , "arnd@arndb.de" , "Michael Kelley (LINUX)" , Tianyu Lan , "linux-arch@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , vkuznets Subject: RE: [PATCH V5 2/8] x86/hyperv: Set Virtual Trust Level in VMBus init message Thread-Topic: [PATCH V5 2/8] x86/hyperv: Set Virtual Trust Level in VMBus init message Thread-Index: AQHZy6RY7nYR/0UDx067fCeHwlC69q/kIcWggAF4xYCAAA9Y4A== Date: Fri, 11 Aug 2023 22:16:19 +0000 Message-ID: References: <20230810160412.820246-1-ltykernel@gmail.com> <20230810160412.820246-3-ltykernel@gmail.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=4853f936-7dd5-4a70-81e8-65b421b44f48;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-08-11T22:10:06Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA1PR21MB1335:EE_|SJ1PR21MB3699:EE_ x-ms-office365-filtering-correlation-id: 5e698408-ca22-4e41-97e9-08db9ab896d1 x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: B3L1ly1/TcHCm2EgpaPqKZibsOyiaSFNnhumGB3wDLi3eUhvhXsBcUzzGLMNstAtbGKmeQauXzxezwxiYMDJut+F6Z3ULu47Z2VCUraxF/5/bX7XzK105nFVg674NCanH8RRhosP2Bu4TOzwNCLj1QWldwrm9LLFU8w64W/d8lV4Hfy4LGi1aDfjcDVTQYNpV3tSm47MOpUAkv0TRKu0FUwZidES963booLJ2Utk8JbOHU3aeEdbJTOWaKkxK+1OwdcO1zxvqbGm11avCYfA7xddrbiFIYRwzoqu9ORNOf1U7s+WxOoaU64PvDyYNug5VhSW6A61waqFoIef81duUuV0uyGFMsW5OcnkogZhddGKS1chxUptK3pBbiGQWaK9cqSMEpKqFh+jOtT+VXKCqvCdO/BPK4h44dTXlIGXTD1CsmtaccPbTn4bMbWzFyqRkBH3wSymhZ1ZtSMhQrr9+C2E9NMAqKStpzLqYfxq8TK995A/UbVfYfdnKIaHU8vXfUcPYVyer8lndXuRJvJXeTON+s92j/AN+7BhmAzqQypViRZ6EiA0iBKYEOnD710HqJQa0oy7ZGQ83Wxh5Bgq1RDmBN+cwAJM1Xt9kkMA4nhGjxg9XlOirx+7aDAlQqJv/tT+ckoE/tpAAw2wQPQoqC4uf+CrG3mw14GzJy5rt/5JtZDqyf5dWjejZtEQicSjFV1o3Txy9gBfM7nyIreYKA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR21MB1335.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(136003)(366004)(346002)(376002)(396003)(1800799006)(451199021)(186006)(6506007)(26005)(7696005)(33656002)(10290500003)(12101799016)(9686003)(53546011)(55016003)(71200400001)(82950400001)(82960400001)(122000001)(8990500004)(52536014)(7416002)(5660300002)(8936002)(41300700001)(478600001)(4744005)(8676002)(38100700002)(2906002)(66556008)(66946007)(66446008)(76116006)(66476007)(64756008)(83380400001)(38070700005)(6916009)(54906003)(4326008)(86362001)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iIOzk4oNZTns1OCoI7yXo0fT/txcvrUmRJ55kdQdk5NO43iNs0uguOf3PqeF?= =?us-ascii?Q?3nrSd+QAN7tN4WmCgf3m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TnXlLZx/owTD?= =?us-ascii?Q?YSnBX2HIbSy+Gz9J4PRJRV3uouwuv/Ynjgda90fej6ZSHNQSDCHOUycHzrGJ?= =?us-ascii?Q?dd02O0eN4Vww9w3tT0/VSBB33B9Lgh3KFxULulUmvfwKrL7mubBWuw6Tg8As?= =?us-ascii?Q?UMBa1UN+wIBwXmnmjq+u/jhY4N2fz2lMHotfWbkAO8+A9W6yIC7aqNY1lGef?= =?us-ascii?Q?XWQbwiKM63LuNnki3e43Gno9XH+ZyO31AS5JYG/TYvSOpy+XtUgEUW6xEmFj?= =?us-ascii?Q?YTZgyeNIKXtY1gMRmPFEFt6Q/pLxLjF7k/QD0loBxDpvTdtEH2I77y1cVXgi?= =?us-ascii?Q?Qs8fj6qFZ8q88iwRLuFnWYm75CEKRolFDX3d4nK9YnCsO1rs26Lvj3USKsWJ?= =?us-ascii?Q?tAPqtOAHotpr6IIuXCE/RPw+ApAPrwc5RSJNJaIkvpyQRGqtQDgXvICH+Mk1?= =?us-ascii?Q?PPlxuBncFQVhCgOn1UOThilE0SIZQDoKgsR91kI7tr5XIgoqrHYHFBd2VvHQ?= =?us-ascii?Q?fdMhlQfNWa8M09HLbuknLonloQv029NAL7R5dc2OM42lEAAklQXnOEl2nPmy?= =?us-ascii?Q?h5VZrdOmjFaozFMZHiRd1HMaN/uogp18cbLKprHGQQbPuM0iDPdDF7xsi+rU?= =?us-ascii?Q?IjkBBjSwITw/zPYPeAIQsdF8rsiEMfyLJPQW0QIn?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR21MB1335.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e698408-ca22-4e41-97e9-08db9ab896d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2023 22:16:19.7525 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: d/IPxv6EqOvL1iWs5PUfHAgurPrshMeLNKCONsKe/8N1OI8JhaiDbtoCnGirD975UDtc/XOROnMb5xw8zYQEIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR21MB3699 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Wei Liu > Sent: Friday, August 11, 2023 2:15 PM > To: Dexuan Cui > > [...] > > > + local_irq_save(flags); > > > + input =3D *this_cpu_ptr(hyperv_pcpu_input_arg); > > > + output =3D (struct hv_get_vp_registers_output *)input; > > > + if (!input) { > > > + local_irq_restore(flags); > > > + goto done; > > > > Here the uninitialized 'ret' is returned. > > > > If we move the "done:" label one line earlier, we won't need the > > the above " local_irq_restore(flags);" > > Maybe we should add a WARN_ON_ONCE(1) before "goto done"? >=20 > Out of interest why will input be NULL here? >=20 > Thanks, > Wei. I don't think 'input' could be NULL here. IMO we can use it without checking against NULL.