Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4188198pxb; Sun, 24 Oct 2021 22:26:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCJ4hhpk8yM1wzYXjFSUfWW1axkWKMccuEwLDOsacZJa1XVwxU2LDs3AyJ5YPjbYdoTav4 X-Received: by 2002:a05:6402:35c4:: with SMTP id z4mr23294031edc.197.1635139611933; Sun, 24 Oct 2021 22:26:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1635139611; cv=pass; d=google.com; s=arc-20160816; b=lUUNG8aCcHVDmzddTJdFl2+f7fIYI4I9vQkv8pPkEW9rBwZNsjsgs4ZQwJZjWmaKdR QcTyWS1cE5+PCYbfoT2ZlNxB+sYP5EvdgX87u4bttzulknHzQuMVcDmvgZeqto+XT1wY CmWLoi1ZF019l1nfYkFQWWLiSTJ/xVWo1BAyY0PxEU7eFEkcrpVlWXdza5TiUhKBnGGi FNriCNKLrodcjGcqAZPu1zzSRuf/oH/cjv4bCydqG1MJMlmktO+LsMkEgn/IlbcQ4TBl iPR9f7djMB033pQ7XQKuwDh/3D58tsbddUpLOhxW3eEcFixW26brB5l3SWR5eE+3tCF3 DDBQ== 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 :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature:dkim-signature; bh=zRw+C1ltqjv8mAnE2AA7Jc4EUdGxJvW5/xO0T7uXZ2c=; b=UTdJd9+xGA+gILJYKfVTNf71DsgxukDxEp7aRD2g8aZ8Qp4Z/8eLFr6Ibl/yIx3nHI 1fyq4OJ9q8uKQCTaHy20PecvlxPIf+8WW2nhnp1u1oYm3WrLVVEoA4Ln3D5ZESyfYA0M sPjHx9eftky9xVm3PBVoC1nX/i552bCtsVtZxSIijQnCgpz4QYFKoS0N9azMYOt99VYN HdP9P1yTrKw4rs3Xxkk1lElguE66y4ASMmI6h+c1LBzZdAK2uvrnSVgsl2nZkaFJI83J 3ot1MqP3Bb6vR++PZhMc1xMIBDX7zi5Hd3Z3MriQQ/fbqEIQhbgHB1O8ObfLIwjlHhFp suRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=Swk8k+8g; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="jV/IsQXn"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si14250262ejn.5.2021.10.24.22.26.20; Sun, 24 Oct 2021 22:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=Swk8k+8g; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="jV/IsQXn"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhJYFXf (ORCPT + 99 others); Mon, 25 Oct 2021 01:23:35 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:28704 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbhJYFXe (ORCPT ); Mon, 25 Oct 2021 01:23:34 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19P3adJF012322; Mon, 25 Oct 2021 05:20:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=zRw+C1ltqjv8mAnE2AA7Jc4EUdGxJvW5/xO0T7uXZ2c=; b=Swk8k+8g5kmWmcY6ZEXb/AbOelzc8bVEVuyq3JVYVP13cJkYLrxb9fAgp0q9aPDlhBOJ 7UhPFWn94fLxbW73J3YgTAWPPpEEDBsnFvbHZwkNV1QpC5JgeNckBQ5Cqqbaj64zZpwr 8NMu8E3lF/t8tYhOZVZ0EAuk97Szhj+9mlL1wJjfptXsetTh+l08muETco2w56QMK6j1 SMGKfLA/f47tGL4C3weXsS8QRRQpOwpCLXCAI6wGCLc8jLTWyF2G5InInmqrJO7tuJ07 4VeLappE+VCY6W2rGBobekDpPvVo96OGH67YashA1s3TkmThvMVLLDWzB6Q57EmlFjfU Aw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3bw7r0979n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Oct 2021 05:20:43 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19P5FqmF023998; Mon, 25 Oct 2021 05:20:41 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2172.outbound.protection.outlook.com [104.47.58.172]) by userp3030.oracle.com with ESMTP id 3bv7gtv65u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Oct 2021 05:20:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FkLXV7leeT9UAFGgz4CSqc8e/oxSRsrel8Xb3+rKcABtckT67sHm2mXF27jnxm3/SBKqvFwvWFXSpMyoFVTj088zP284vOcBAabZbqdfg/H2pe4NRLb/lwMq+xwvlT1iD13T2aSC4CBsurF4/Yi7hOEE1y1S1Ftwy9eVTVZudPojcyMne3ypeBy+/0rmeC7Nc7+N4dM8/qqEuyB2RBkStd/+YLNxmFkPbxeATMbcoL+gYJYQbcMlkzE/5nwTSWdF750e35jsELo4i6GJxMdkmpEzAEpxIcU02BWOVfO8Xq0bF79PsgvrPubOZwzv50+UssL3hrW2qXZDb3MiX5fqxQ== 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=zRw+C1ltqjv8mAnE2AA7Jc4EUdGxJvW5/xO0T7uXZ2c=; b=fXcesXo0NxgQMTJsNAD08/YG9AjPi6CXUoRWUOdIM0oQOCHYwrwu7d5+l2sHUV8OEBsKsV8FCDmoSTo7LoNIAwDXBWFZHrssOTAzxO47pq3+h5QwnxLaaczhiBZ30I6DEWI+Au2MIoI88oLmy/Ptnhx5G3S5Uu0u3eE6bSvGOWZ6ypp94X/DCdbDEkYoERTEfypbjikjS9g1km155I4Cy7nsoIoPESbkThAL11CBX0nyabZFMo2ViYQlcFU1OeF2xCaPxXzoBqOZHPSiiyHyYbwJgm3gnVWoyiEJyRsgHUqp3mxwlRAPiy+u137XIftLt9YSdnljbmZIBi1jnebH5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zRw+C1ltqjv8mAnE2AA7Jc4EUdGxJvW5/xO0T7uXZ2c=; b=jV/IsQXnHeVxrt4KSN5oki42QGNJHZGK1+EixBP0dP6EtYAHUDFJ/8nnXGFCnzDgyRH7oNzaHDyC0x67c+NDUb25GhkQtGysdM/sxBmO0qU4QZnBLRz/MIWJ9DGTsEAOShEQSydJ91UeoQbjXvysZi+iwN88JUog3e3ltda9X+0= Authentication-Results: oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) by BY5PR10MB4354.namprd10.prod.outlook.com (2603:10b6:a03:20c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Mon, 25 Oct 2021 05:20:39 +0000 Received: from BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::2848:63dc:b87:8021]) by BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::2848:63dc:b87:8021%7]) with mapi id 15.20.4628.020; Mon, 25 Oct 2021 05:20:39 +0000 Subject: Re: [PATCH linux 1/2] xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32 To: Boris Ostrovsky , xen-devel@lists.xenproject.org Cc: linux-kernel@vger.kernel.org, x86@kernel.org, jgross@suse.com, sstabellini@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, andrew.cooper3@citrix.com, george.dunlap@citrix.com, iwj@xenproject.org, jbeulich@suse.com, julien@xen.org, wl@xen.org, joe.jin@oracle.com References: <20211012072428.2569-1-dongli.zhang@oracle.com> <20211012072428.2569-2-dongli.zhang@oracle.com> <4faf461f-49ca-5f2b-a7dc-e2b47b904527@oracle.com> From: Dongli Zhang Message-ID: Date: Sun, 24 Oct 2021 22:20:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 In-Reply-To: <4faf461f-49ca-5f2b-a7dc-e2b47b904527@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA0PR12CA0004.namprd12.prod.outlook.com (2603:10b6:806:6f::9) To BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) MIME-Version: 1.0 Received: from [IPv6:2606:b400:400:7446:8000::4e] (2606:b400:8301:1010::16aa) by SA0PR12CA0004.namprd12.prod.outlook.com (2603:10b6:806:6f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Mon, 25 Oct 2021 05:20:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69ec7a55-bff4-48c1-7bf2-08d997772ea5 X-MS-TrafficTypeDiagnostic: BY5PR10MB4354: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: abZRiZ2PzzkT5CHiyzB+ROlaVtflBZIedj3crPzL6tY3v/vWTOqpZ5X+vMA34Cn8mXXKjC2JJZM6xT+SwI/dxbVImL2pW0opqfjRMBHoQ7d7Q1emxTplMlzZN9JsLD779dJnUdg4O60k69vLwwZvzpQ91lHhGs+vv9akpJpBju29dPM5myM+hPrmjZMsvFMG9HqUn5DVP9A7JVJjYcq2X3x69McQ5rLIZtaqKMANadXuFKcI020oBfBsUJ9YmxOBzrM3YdxpiXmPbzH0KRQE3YQUpFoFU5RvNGJsAF31jYgRppMZ86YO1zcGEEgcRM9hunRDHf0QO1CFYSI5Trfi7qYTdXdNu8PDjgZ6xsWQKTVCoCEmm4Y7wK12+GgvBzX+IRH2L51vhcDWsPzmupd5aMedJlkvLt64sTKy8Mnjyb6bXC052hUo52Q2vEi8RSLUjK8FfUgliFkhaYK/XtA7c5Yrck3/cE9zByhy+Qvb53LfUyDNc4jQ/Ix+/Wr+L2IhXMMmivmnEsjTudCulaiXXMuJ7gQ+bHpARSZIuwmWzpUkKFE113b8bqBadyVxUyIbjSBmkPyOOMrK0DXPmFDlVpdmVUhUcIdLJCcbf0pFBdJck2omeP0ZDc1lZVTc1xCI3QZqQPN9oY/XUHvHckLEwFqZCc8K2+W5+Mg9XeZynCkTPGd6RPiI0JQmdSjI9A0w1bGCS9OTTHiA2dkfMSrrqj6jh3eHwKKI/tQcJ3BzqrE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB2663.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(8676002)(7416002)(508600001)(186003)(36756003)(44832011)(2616005)(107886003)(31686004)(6486002)(38100700002)(83380400001)(2906002)(66476007)(4326008)(5660300002)(86362001)(316002)(6666004)(31696002)(53546011)(66946007)(8936002)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dnNZaDQzV0J0Y0Mvc1Awc1JxVXl2YXgxWSs2RzVDQXVOdkVXaUgzQkNZaFNr?= =?utf-8?B?aWNLMWsrc2hMWHg5T2o1RFlIdlJkYU9tWUducUNITkdFMzZkdlNBQ1RVUDE1?= =?utf-8?B?R0E1VmwxRGxiS1RJYzVRb0NvQzdjb2R2MGc0QXpXV29NRWY2R1pJSTl4SExE?= =?utf-8?B?MDE4b2R1MnhIQ3BPS29ydXJuV1RUTUNUSXFuYXZScTdDM1dWOCtvY1Q2NlNl?= =?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Wlg5U2JMMDlIbEFiQjFhK2d4?= =?utf-8?B?TDZEeDU2ZGF4cUw3dURQa0ZXS0RybEcxUTZrczdvSDRrTnQ5aTRVZ1F6NnE0?= =?utf-8?B?bFZKVlFsQk8yVVNCVUVoc0JZRFBhNGx5U1l5YlY1VTJDdEVoVytyWkFLbStE?= =?utf-8?Q?lqEdKop19Mv4Qh6JdFf4OuwK5WvuftMu8cLELKOuG1Ho?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69ec7a55-bff4-48c1-7bf2-08d997772ea5 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2663.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2021 05:20:39.1843 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fSaXwrkX8hKQIT78nVwVzB+QS/NwOi3p8XBovCFR3Ryq0AxrTGc2d14KyrwFqfmXgSG05Ql04LsEtt7q7TQ+xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4354 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10147 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110250029 X-Proofpoint-ORIG-GUID: Jv6xc1rSMIM71tnBkZvx1F4rNsixY7bV X-Proofpoint-GUID: Jv6xc1rSMIM71tnBkZvx1F4rNsixY7bV Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, On 10/12/21 10:17 AM, Boris Ostrovsky wrote: > > On 10/12/21 3:24 AM, Dongli Zhang wrote: >> The sched_clock() can be used very early since upstream >> commit 857baa87b642 ("sched/clock: Enable sched clock early"). In addition, >> with upstream commit 38669ba205d1 ("x86/xen/time: Output xen sched_clock >> time from 0"), kdump kernel in Xen HVM guest may panic at very early stage >> when accessing &__this_cpu_read(xen_vcpu)->time as in below: > > > Please drop "upstream". It's always upstream here. > > >> + >> +    /* >> +     * Only MAX_VIRT_CPUS 'vcpu_info' are embedded inside 'shared_info' >> +     * and the VM would use them until xen_vcpu_setup() is used to >> +     * allocate/relocate them at arbitrary address. >> +     * >> +     * However, when Xen HVM guest panic on vcpu >= MAX_VIRT_CPUS, >> +     * per_cpu(xen_vcpu, cpu) is still NULL at this stage. To access >> +     * per_cpu(xen_vcpu, cpu) via xen_clocksource_read() would panic. >> +     * >> +     * Therefore we delay xen_hvm_init_time_ops() to >> +     * xen_hvm_smp_prepare_boot_cpu() when boot vcpu is >= MAX_VIRT_CPUS. >> +     */ >> +    if (xen_vcpu_nr(0) >= MAX_VIRT_CPUS) > > > What about always deferring this when panicing? Would that work? > > > Deciding whether to defer based on cpu number feels a bit awkward. > > > -boris > I did some tests and I do not think this works well. I prefer to delay the initialization only for VCPU >= 32. This is the syslog if we always delay xen_hvm_init_time_ops(), regardless whether VCPU >= 32. [ 0.032372] Booting paravirtualized kernel on Xen HVM [ 0.032376] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns [ 0.037683] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:64 nr_node_ids:2 [ 0.041876] percpu: Embedded 49 pages/cpu s162968 r8192 d29544 u262144 --> There is a clock backwards from 0.041876 to 0.000010. [ 0.000010] Built 2 zonelists, mobility grouping on. Total pages: 2015744 [ 0.000012] Policy zone: Normal [ 0.000014] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-rc6xen+ root=UUID=2a5975ab-a059-4697-9aee-7a53ddfeea21 ro text console=ttyS0,115200n8 console=tty1 crashkernel=512M-:192M This is because the initial pv_sched_clock is native_sched_clock(), and it switches to xen_sched_clock() in xen_hvm_init_time_ops(). Is it fine to always have a clock backward for non-kdump kernel? To avoid the clock backward, we may register a dummy clocksource which always returns 0, before xen_hvm_init_time_ops(). I do not think this is reasonable. Thank you very much! Dongli Zhang