[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 0/2] xen: fix HVM kexec kernel panic


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx
  • From: Dongli Zhang <dongli.zhang@xxxxxxxxxx>
  • Date: Wed, 2 Mar 2022 08:40:30 -0800
  • 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
  • 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=JFdbPhdDPlCnQK0SS45U+jf4D54W/mP1h4d1i5XCiso=; b=FOv5okjTRxrqLshJ5XLt3eMonAp6rQs7lXXXjyBlRbVdoWGIXhIAm/lHMHZCHq00dyOMKU75a4YE3yimksVxDsOacyFhDh+1wjzgtYeRuC8SyIcQhb7hRzpUrXbeju55pNe9cjxExVq97cQLRRwmLg9RABCy53aLUFz7DD10lc+BAWyId6Qb9ew6IdszR+tikU86JdR4Rw+6cIVFCknYg0XOZm3MAo9DW3l8kv31IdNbyTOOeR6+/sJSuH+Q7r5i6fQm4wubn1fhLnVVvNz7fnC4v+MinSZTshxlW+JWIdfx0A5gEsVUt5Ha/eSQQg7/YafhIi9Z/yb04v0xGJvwCQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fsyudh48df6LQOGMRHAjNgml41B7eUX8m51hWVCv9q3K9L931Kh3QSyGwEZavglJe//2DbTZGUedc9KEqPJT0TOe9jnXv+2YDHD82vjHmlMzbA5N/9SqPOZE/upVaXGoJz4EVfRYbJWL29A8buJn5vLjx8u0G7wu7mb874GQgWsYkI6jf+lci6zdoNL76e2+4b+I43P5GbuTloNS3qygXDtdJ79/ag6o7yr8tcBpx6zBHs8EEuy5F6eEw6UT6C1NU+VEerTRB/qX5HtKU/p+mdytQW1q1x2Or3p2mOzT/lYM0a/T4uH+AB738qpe8PM6d/YVJ76mODU4IBbO2uOU7Q==
  • Cc: linux-kernel@xxxxxxxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, joe.jin@xxxxxxxxxx
  • Delivery-date: Wed, 02 Mar 2022 16:42:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This is the v4 of the patch to fix xen kexec kernel panic issue when the
kexec is triggered on VCPU >= 32.

PANIC: early exception 0x0e IP 10:ffffffffa96679b6 error 0 cr2 0x20
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 
5.17.0-rc4xen-00054-gf71077a4d84b-dirty #1
... ...
[    0.000000] RIP: 0010:pvclock_clocksource_read+0x6/0xb0
... ...
[    0.000000] RSP: 0000:ffffffffaae03e10 EFLAGS: 00010082 ORIG_RAX: 
0000000000000000
[    0.000000] RAX: 0000000000000000 RBX: 0000000000010000 RCX: 0000000000000002
[    0.000000] RDX: 0000000000000003 RSI: ffffffffaac37515 RDI: 0000000000000020
[    0.000000] RBP: 0000000000011000 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffffaae03df8 R11: ffffffffaae03c68 R12: 0000000040000004
[    0.000000] R13: ffffffffaae03e50 R14: 0000000000000000 R15: 0000000000000000
[    0.000000] FS:  0000000000000000(0000) GS:ffffffffab588000(0000) 
knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000020 CR3: 00000000ea410000 CR4: 00000000000406a0
[    0.000000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    0.000000] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    0.000000] Call Trace:
[    0.000000]  <TASK>
[    0.000000]  ? xen_clocksource_read+0x24/0x40
[    0.000000]  ? xen_init_time_common+0x5/0x49
[    0.000000]  ? xen_hvm_init_time_ops+0x23/0x45
[    0.000000]  ? xen_hvm_guest_init+0x221/0x25c
[    0.000000]  ? 0xffffffffa9600000
[    0.000000]  ? setup_arch+0x440/0xbd6
[    0.000000]  ? start_kernel+0x6c/0x695
[    0.000000]  ? secondary_startup_64_no_verify+0xd5/0xdb
[    0.000000]  </TASK>


Changed since v1:
  - Add commit message to explain why xen_hvm_init_time_ops() is delayed
    for any vcpus. (Suggested by Boris Ostrovsky)
  - Add a comment in xen_hvm_smp_prepare_boot_cpu() referencing the related
    code in xen_hvm_guest_init(). (suggested by Juergen Gross)
Changed since v2:
  - Delay for all VCPUs. (Suggested by Boris Ostrovsky)
  - Add commit message that why PVM is not supported by this patch
  - Test if kexec/kdump works with mainline xen (HVM and PVM)
Changed since v3:
  - Re-use v2 but move the login into xen_hvm_init_time_ops() (Suggested
    by Boris Ostrovsky) 


I have tested with HVM VM on both old xen and mainline xen.

About the mainline xen, the 'soft_reset' works after I reset d->creation_reset
as suggested by Jan Beulich.

https://lore.kernel.org/all/d3814109-f4ba-9edb-1575-ab94faaeba08@xxxxxxxx/


Thank you very much!

Dongli Zhang





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.