Skip to contentSkip to conversation

183794: regressions - FAIL

linux-linus test osstest service owner 4 participants 8 messages Nov 20, 2023 – Nov 23, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:

 test-arm64-arm64-examine      8 reboot                   fail REGR. vs. 183766
 test-arm64-arm64-xl-thunderx  8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-xl-credit2   8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-xl           8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-xl-xsm       8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-xl-credit1   8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-libvirt-raw  8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-libvirt-xsm  8 xen-boot                 fail REGR. vs. 183766
 test-arm64-arm64-xl-vhd       8 xen-boot                 fail REGR. vs. 183766

Tests which are failing intermittently (not blocking):
test-amd64-amd64-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail pass in 183793
test-armhf-armhf-libvirt-qcow2 20 leak-check/check fail pass in 183793

Tests which did not succeed, but are not blocking:

 test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stop            fail like 183766
 test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stop            fail like 183766
 test-amd64-amd64-xl-qemuu-ws16-amd64 19 guest-stop            fail like 183766
 test-armhf-armhf-libvirt-raw 15 saverestore-support-check    fail  like 183766
 test-armhf-armhf-libvirt     16 saverestore-support-check    fail  like 183766
 test-amd64-amd64-xl-qemut-ws16-amd64 19 guest-stop            fail like 183766
 test-armhf-armhf-libvirt-qcow2 15 saverestore-support-check   fail like 183766
 test-amd64-amd64-qemuu-nested-amd 20 debian-hvm-install/l1/l2 fail like 183766
 test-amd64-amd64-libvirt     15 migrate-support-check        fail   never pass
 test-amd64-amd64-libvirt-xsm 15 migrate-support-check        fail   never pass
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 13 migrate-support-check fail never pass
 test-armhf-armhf-xl          15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl          16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-multivcpu 15 migrate-support-check        fail  never pass
 test-armhf-armhf-xl-multivcpu 16 saverestore-support-check    fail  never pass
 test-armhf-armhf-xl-credit2  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit2  16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-arndale  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-arndale  16 saverestore-support-check    fail   never pass
 test-amd64-amd64-libvirt-qcow2 14 migrate-support-check        fail never pass
 test-amd64-amd64-libvirt-raw 14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-vhd      14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-vhd      15 saverestore-support-check    fail   never pass
 test-armhf-armhf-libvirt-raw 14 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit1  15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-credit1  16 saverestore-support-check    fail   never pass
 test-armhf-armhf-xl-rtds     15 migrate-support-check        fail   never pass
 test-armhf-armhf-xl-rtds     16 saverestore-support-check    fail   never pass
 test-armhf-armhf-libvirt     15 migrate-support-check        fail   never pass

test-armhf-armhf-libvirt-qcow2 14 migrate-support-check fail never pass

version targeted for testing:
linux 037266a5f7239ead1530266f7d7af153d2a867fa
baseline version:
linux c42d9eeef8e5ba9292eda36fd8e3c11f35ee065c

Last test of basis   183766  2023-11-15 17:14:16 Z    4 days
Failing since        183773  2023-11-16 13:12:48 Z    3 days    9 attempts
Testing same since   183792  2023-11-19 02:56:10 Z    0 days    3 attempts

------------------------------------------------------------
People who touched revisions under test:
"Michael S. Tsirkin" <[email protected]>
Aleksandr Loktionov <[email protected]>
Alex Deucher <[email protected]>
Alex Hung <[email protected]>
Alex Pakhunov <[email protected]>
Alexei Starovoitov <[email protected]>
Alistair Francis <[email protected]>
Amir Goldstein <[email protected]>
Anastasia Belova <[email protected]>
Anders Roxell <[email protected]>
Andi Shyti <[email protected]>
Andrew Morton <[email protected]>
Andrii Nakryiko <[email protected]>
Anthony Iliopoulos <[email protected]>
Arkadiusz Kubalewski <[email protected]>
Arnd Bergmann <[email protected]>
Arpana Arland <[email protected]> (A Contingent worker at Intel) Asad Kamal <[email protected]>
Baruch Siach <[email protected]>
Björn Töpel <[email protected]>
Breno Leitao <[email protected]>
Brenton Simpson <[email protected]>
Chandan Babu R <[email protected]>
Chandradeep Dey <[email protected]>
Chen Yu <[email protected]>
Christian König <[email protected]>
Christoph Hellwig <[email protected]>
Christoph Hellwig <[email protected]>
Chuck Lever <[email protected]>
ChunHao Lin <[email protected]>
Clément Léger <[email protected]>
Dan Carpenter <[email protected]>
Dan Nowlin <[email protected]>
Daniel J Blueman <[email protected]>
Daniel Vetter <[email protected]>
Daniel Wheeler <[email protected]>
Danilo Krummrich <[email protected]>
Dave Airlie <[email protected]>
Dave Chinner <[email protected]>
David S. Miller <[email protected]>
David Woodhouse <[email protected]>
Duncan Ma <[email protected]>
Dust Li <[email protected]>
Eduard Zingerman <[email protected]>
Ekaterina Esina <[email protected]>
Erez Shitrit <[email protected]>
Eric Dumazet <[email protected]>
Eugenio Pérez <[email protected]>
Eymen Yigit <[email protected]>
Fangzhi Zuo <[email protected]>
Gal Pressman <[email protected]>
Gavin Li <[email protected]>
Geliang Tang <[email protected]>
Gustavo A. R. Silva <[email protected]>
Hamza Mahfooz <[email protected]>
Hans de Goede <[email protected]>
Helge Deller <[email protected]>
Hou Tao <[email protected]>
Hyeongtak Ji <[email protected]>
Itamar Gozlan <[email protected]>
Jacek Lawrynowicz <[email protected]>
Jakub Kicinski <[email protected]>
Jakub Sitnicki <[email protected]>
Jan Bottorff <[email protected]>
Jan Kiszka <[email protected]>
Jarkko Nikula <[email protected]>
Jason Andryuk <[email protected]>
Jason Wang <[email protected]>
Jay Vosburgh <[email protected]>
Jeff Layton <[email protected]
Jeff Layton <[email protected]>
Jens Axboe <[email protected]>
Jian Shen <[email protected]>
Jianbo Liu <[email protected]>
Jiapeng Chong <[email protected]>
Jijie Shao <[email protected]>
Johannes Weiner <[email protected]>
Johnathan Mantey <[email protected]>
José Pekkarinen <[email protected]>
Jozsef Kadlecsik <[email protected]>
Juergen Gross <[email protected]>
Kai Vehmanen <[email protected]>
Kailang Yang <[email protected]>
Kees Cook <[email protected]>
Kent Overstreet <[email protected]>
Kent Overstreet <[email protected]>
Le Ma <[email protected]>
Leah Rumancik <[email protected]>
Len Brown <[email protected]>
Lewis Huang <[email protected]>
Lijo Lazar <[email protected]>
Linkui Xiao <[email protected]>
Linus Torvalds <[email protected]>
Linus Walleij <[email protected]>
Long Li <[email protected]>
Lorenzo Bianconi <[email protected]>
Maarten Lankhorst <[email protected]>
Maciej Fijalkowski <[email protected]>
Maher Sanalla <[email protected]>
Mahmoud Adam <[email protected]>
Marek Behún <[email protected]>
Mario Limonciello <[email protected]>
Mario Limonciello <[email protected]> # PHX & Navi33 Martin K. Petersen <[email protected]>
matoro <[email protected]>
Matthew Wilcox (Oracle) <[email protected]>
Matthieu Baerts <[email protected]>
Matus Malych <[email protected]>
MD Danish Anwar <[email protected]>
Michael S. Tsirkin <[email protected]>
Mike Christie <[email protected]>
Mike Snitzer <[email protected]>
Mikulas Patocka <[email protected]>
Ming Lei <[email protected]>
Muhammad Ahmed <[email protected]>
Muhammad Usama Anjum <[email protected]>
Naomi Chu <[email protected]>
Neil Armstrong <[email protected]>
Nicholas Kazlauskas <[email protected]>
Nicholas Susanto <[email protected]>
Niklas Söderlund <[email protected]>
Nilesh Javali <[email protected]>
Omar Sandoval <[email protected]>
Pablo Neira Ayuso <[email protected]>
Paolo Abeni <[email protected]>
Paul Greenwalt <[email protected]>
Paul Hsieh <[email protected]>
Paul Moore <[email protected]>
Peter Korsgaard <[email protected]>
Peter Wang <[email protected]>
Quinn Tran <[email protected]>
Rahul Rameshbabu <[email protected]>
Randy Dunlap <[email protected]>
Ravi Gunasekaran <[email protected]>
Richard Cochran <[email protected]>
Richard Fitzgerald <[email protected]>
Robert Marko <[email protected]>
Roger Pau Monne <[email protected]>
Roger Pau Monné <[email protected]>
Roman Gushchin <[email protected]>
Russell King (Oracle) <[email protected]>
Ryan Roberts <[email protected]>
Saeed Mahameed <[email protected]>
Sam James <[email protected]>
Samuel Holland <[email protected]>
SeongJae Park <[email protected]>
Serge Semin <[email protected]>
Shakeel Butt <[email protected]>
Shannon Nelson <[email protected]>
Shigeru Yoshida <[email protected]>
Shiwu Zhang <[email protected]>
Shyam Prasad N <[email protected]>
Simon Trimmer <[email protected]>
Srinivas Pandruvada <[email protected]> Srinivasan Shanmugam <[email protected]>
Stanislav Fomichev <[email protected]>
Stanislaw Gruszka <[email protected]>
Stefan Binding <[email protected]>
Stefan Roesch <[email protected]>
Stefano Garzarella <[email protected]>
Stefano Stabellini <[email protected]>
Steve French <[email protected]>
Sumeet Pawnikar <[email protected]>
Sunitha Mekala <[email protected]> (A Contingent worker at Intel) Sven Auhagen <[email protected]>
Takashi Iwai <[email protected]>
Tianci Yin <[email protected]>
Tony Nguyen <[email protected]>
Victor Lu <[email protected]>
Vincent Wong <[email protected]>
Vlad Buslov <[email protected]>
Willem de Bruijn <[email protected]>
Wolfram Sang <[email protected]>
Xin Long <[email protected]>
Yang Li <[email protected]>
Yang Wang <[email protected]>
Yi Zhang <[email protected]>
Yonghong Song <[email protected]>
Yonglong Liu <[email protected]>
YuanShang <[email protected]>
Yuran Pereira <[email protected]>
Zhang Rui <[email protected]>
Ziwei Xiao <[email protected]>

jobs:

 build-amd64-xsm                                              pass    
 build-arm64-xsm                                              pass    
 build-i386-xsm                                               pass    
 build-amd64                                                  pass    
 build-arm64                                                  pass    
 build-armhf                                                  pass    
 build-i386                                                   pass    
 build-amd64-libvirt                                          pass    
 build-arm64-libvirt                                          pass    
 build-armhf-libvirt                                          pass    
 build-i386-libvirt                                           pass    
 build-amd64-pvops                                            pass    
 build-arm64-pvops                                            pass    
 build-armhf-pvops                                            pass    
 build-i386-pvops                                             pass    
 test-amd64-amd64-xl                                          pass    
 test-amd64-coresched-amd64-xl                                pass    
 test-arm64-arm64-xl                                          fail    
 test-armhf-armhf-xl                                          pass    
 test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm           pass    
 test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm        pass    
 test-amd64-amd64-xl-qemut-debianhvm-i386-xsm                 fail    
 test-amd64-amd64-xl-qemuu-debianhvm-i386-xsm                 pass    
 test-amd64-amd64-libvirt-xsm                                 pass    
 test-arm64-arm64-libvirt-xsm                                 fail    
 test-amd64-amd64-xl-xsm                                      pass    
 test-arm64-arm64-xl-xsm                                      fail    
 test-amd64-amd64-qemuu-nested-amd                            fail    
 test-amd64-amd64-xl-pvhv2-amd                                pass    
 test-amd64-amd64-dom0pvh-xl-amd                              pass    
 test-amd64-amd64-xl-qemut-debianhvm-amd64                    pass    
 test-amd64-amd64-xl-qemuu-debianhvm-amd64                    pass    
 test-amd64-amd64-freebsd11-amd64                             pass    
 test-amd64-amd64-freebsd12-amd64                             pass    
 test-amd64-amd64-xl-qemuu-ovmf-amd64                         pass    
 test-amd64-amd64-xl-qemut-win7-amd64                         fail    
 test-amd64-amd64-xl-qemuu-win7-amd64                         fail    
 test-amd64-amd64-xl-qemut-ws16-amd64                         fail    
 test-amd64-amd64-xl-qemuu-ws16-amd64                         fail    
 test-armhf-armhf-xl-arndale                                  pass    
 test-amd64-amd64-examine-bios                                pass    
 test-amd64-amd64-xl-credit1                                  pass    
 test-arm64-arm64-xl-credit1                                  fail    
 test-armhf-armhf-xl-credit1                                  pass    
 test-amd64-amd64-xl-credit2                                  pass    
 test-arm64-arm64-xl-credit2                                  fail    
 test-armhf-armhf-xl-credit2                                  pass    
 test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict        pass    
 test-amd64-amd64-examine                                     pass    
 test-arm64-arm64-examine                                     fail    
 test-armhf-armhf-examine                                     pass    
 test-amd64-amd64-qemuu-nested-intel                          pass    
 test-amd64-amd64-xl-pvhv2-intel                              pass    
 test-amd64-amd64-dom0pvh-xl-intel                            pass    
 test-amd64-amd64-libvirt                                     pass    
 test-armhf-armhf-libvirt                                     pass    
 test-amd64-amd64-xl-multivcpu                                pass    
 test-armhf-armhf-xl-multivcpu                                pass    
 test-amd64-amd64-pair                                        pass    
 test-amd64-amd64-libvirt-pair                                pass    
 test-amd64-amd64-xl-pvshim                                   pass    
 test-amd64-amd64-pygrub                                      pass    
 test-amd64-amd64-libvirt-qcow2                               pass    
 test-armhf-armhf-libvirt-qcow2                               fail    
 test-amd64-amd64-libvirt-raw                                 pass    
 test-arm64-arm64-libvirt-raw                                 fail    
 test-armhf-armhf-libvirt-raw                                 pass    
 test-amd64-amd64-xl-rtds                                     pass    
 test-armhf-armhf-xl-rtds                                     pass    
 test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow             pass    
 test-amd64-amd64-xl-shadow                                   pass    
 test-arm64-arm64-xl-thunderx                                 fail    
 test-amd64-amd64-examine-uefi                                pass    
 test-amd64-amd64-xl-vhd                                      pass    
 test-arm64-arm64-xl-vhd                                      fail    
 test-armhf-armhf-xl-vhd                                      pass    

------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images

Logs, config files, etc. are available at
http://logs.test-lab.xenproject.org/osstest/logs

Explanation of these reports, and of osstest in general, is at
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master

Test harness code can be found at
http://xenbits.xen.org/gitweb?p=osstest.git;a=summary

Not pushing.

(No revision log; it would be 7591 lines long.)

#1 lore raw
Quoted 8 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-arm64-arm64-examine 8 reboot fail REGR. vs. 183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu), ································ &info);
········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

Juergen

#2 lore raw
Quoted 20 lines · Juergen Gross
Quoted 9 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-arm64-arm64-examine 8 reboot fail REGR. vs.
183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at
arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG:

00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

Quoted 7 lines

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu), ································ &info);
········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

The original email somehow escaped my email filters and managed to skip my inbox. Hence, this is the first time I am seeing this commit. Today I ran out of time but I'll look at it tomorrow.

#3 lore raw
Quoted 21 lines · Stefano Stabellini
Quoted 20 lines · Juergen Gross
Quoted 9 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-arm64-arm64-examine 8 reboot fail REGR. vs.
183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at
arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG:

00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

Quoted 7 lines
Quoted 7 lines

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu), ································ &info);
········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

The good news and bad news is that I cannot repro this neither with nor without CONFIG_UNMAP_KERNEL_AT_EL0. I looked at commit 20f3b8eafe0ba but I cannot see anything wrong with it. Looking at the register dump, from:

x0 : fffffffffffffffa

I am guessing the error was -ENXIO which is returned from map_guest_area in Xen.

Could it be that the struct is crossing a page boundary? Or that it is not 64-bit aligned? Do we need to do something like the following?

arch/arm/xen/enlighten.c +1 -1
index 9afdc4c4a5dc..5326070c5dc0 100644
@@ -484,7 +485,7 @@ static int __init xen_guest_init(void)
 	 * for secondary CPUs as they are brought up.
 	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
 	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(struct vcpu_info, PAGE_SIZE);
 	if (xen_vcpu_info == NULL)
 		return -ENOMEM;
 
#4 lore raw
Quoted 47 lines · Stefano Stabellini
Quoted 21 lines · Stefano Stabellini
Quoted 20 lines · Juergen Gross
Quoted 9 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-arm64-arm64-examine 8 reboot fail REGR. vs.
183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at
arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG:

00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

Quoted 7 lines
Quoted 7 lines

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu), ································ &info);
········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

The good news and bad news is that I cannot repro this neither with nor without CONFIG_UNMAP_KERNEL_AT_EL0. I looked at commit 20f3b8eafe0ba but I cannot see anything wrong with it. Looking at the register dump, from:

x0 : fffffffffffffffa

I am guessing the error was -ENXIO which is returned from map_guest_area in Xen.

Could it be that the struct is crossing a page boundary? Or that it is not 64-bit aligned? Do we need to do something like the following?

arch/arm/xen/enlighten.c +0 -0
index 9afdc4c4a5dc..5326070c5dc0 100644

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 491

Quoted 8 lines
arch/arm/xen/enlighten.c +1 -1
@@ -484,7 +485,7 @@ static int __init xen_guest_init(void)
  	 * for secondary CPUs as they are brought up.
  	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
  	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(struct vcpu_info, PAGE_SIZE);
  	if (xen_vcpu_info == NULL)
  		return -ENOMEM;
 

May I suggest to use a smaller alignment? What about:

1 << fls(sizeof(struct vcpu_info) - 1)

Juergen

#5 lore raw
Quoted 61 lines · Juergen Gross
Quoted 49 lines · Stefano Stabellini
Quoted 22 lines · Stefano Stabellini
Quoted 21 lines · Juergen Gross
Quoted 10 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-arm64-arm64-examine 8 reboot fail REGR.
vs.
183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at
arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG:

00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

Quoted 8 lines
Quoted 8 lines

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu),
································ &info); ········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

The good news and bad news is that I cannot repro this neither with nor without CONFIG_UNMAP_KERNEL_AT_EL0. I looked at commit 20f3b8eafe0ba but I cannot see anything wrong with it. Looking at the register dump, from:

x0 : fffffffffffffffa

I am guessing the error was -ENXIO which is returned from map_guest_area in Xen.

Could it be that the struct is crossing a page boundary? Or that it is not 64-bit aligned? Do we need to do something like the following?

arch/arm/xen/enlighten.c +0 -0
index 9afdc4c4a5dc..5326070c5dc0 100644

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 491

Quoted 8 lines
arch/arm/xen/enlighten.c +1 -1
@@ -484,7 +485,7 @@ static int __init xen_guest_init(void)
  	 * for secondary CPUs as they are brought up.
  	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
  	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(struct vcpu_info, PAGE_SIZE);
  	if (xen_vcpu_info == NULL)
  		return -ENOMEM;
 

May I suggest to use a smaller alignment? What about:

Quoted 1 line

1 << fls(sizeof(struct vcpu_info) - 1)

See below

---
[PATCH] arm/xen: fix xen_vcpu_info allocation alignment

xen_vcpu_info is a percpu area than needs to be mapped by Xen. Currently, it could cross a page boundary resulting in Xen being unable to map it:

[    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
[    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP

Fix the issue by using __alloc_percpu and requesting alignment for the memory allocation.

arch/arm/xen/enlighten.c +2 -1
index 9afdc4c4a5dc..09eb74a07dfc 100644
@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)
 	 * for secondary CPUs as they are brought up.
 	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
 	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+			                       1 << fls(sizeof(struct vcpu_info) - 1));
 	if (xen_vcpu_info == NULL)
 		return -ENOMEM;
 
Reviewed-by
#6 lore raw
Quoted 86 lines · Stefano Stabellini
Quoted 61 lines · Juergen Gross
Quoted 49 lines · Stefano Stabellini
Quoted 22 lines · Stefano Stabellini
Quoted 21 lines · Juergen Gross
Quoted 10 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
test-arm64-arm64-examine 8 reboot fail REGR.
vs.
183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at
arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG:

00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

Quoted 8 lines
Quoted 8 lines

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu),
································ &info); ········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

The good news and bad news is that I cannot repro this neither with nor without CONFIG_UNMAP_KERNEL_AT_EL0. I looked at commit 20f3b8eafe0ba but I cannot see anything wrong with it. Looking at the register dump, from:

x0 : fffffffffffffffa

I am guessing the error was -ENXIO which is returned from map_guest_area in Xen.

Could it be that the struct is crossing a page boundary? Or that it is not 64-bit aligned? Do we need to do something like the following?

arch/arm/xen/enlighten.c +0 -0
index 9afdc4c4a5dc..5326070c5dc0 100644

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 491

Quoted 8 lines
arch/arm/xen/enlighten.c +1 -1
@@ -484,7 +485,7 @@ static int __init xen_guest_init(void)
   	 * for secondary CPUs as they are brought up.
   	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
   	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(struct vcpu_info, PAGE_SIZE);
   	if (xen_vcpu_info == NULL)
   		return -ENOMEM;
 

May I suggest to use a smaller alignment? What about:

Quoted 1 line

1 << fls(sizeof(struct vcpu_info) - 1)

See below

---
[PATCH] arm/xen: fix xen_vcpu_info allocation alignment

xen_vcpu_info is a percpu area than needs to be mapped by Xen. Currently, it could cross a page boundary resulting in Xen being unable to map it:

[    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
[    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP

Fix the issue by using __alloc_percpu and requesting alignment for the memory allocation.

arch/arm/xen/enlighten.c +0 -0
index 9afdc4c4a5dc..09eb74a07dfc 100644

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 488

Quoted 6 lines
arch/arm/xen/enlighten.c +2 -1
@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)
  	 * for secondary CPUs as they are brought up.
  	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
  	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+			                       1 << fls(sizeof(struct vcpu_info) - 1));

Nit: one tab less, please (can be fixed while committing).

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 491

Quoted 3 lines
arch/arm/xen/enlighten.c +0 -0
  	if (xen_vcpu_info == NULL)
  		return -ENOMEM;
 

Juergen

#7 lore raw

Hi Juergen,

Quoted 62 lines · Juergen Gross
Quoted 61 lines · Stefano Stabellini
Quoted 60 lines · Juergen Gross
Quoted 49 lines · Stefano Stabellini
Quoted 22 lines · Stefano Stabellini
Quoted 21 lines · Juergen Gross
Quoted 10 lines · osstest service owner

flight 183794 linux-linus real [real]
http://logs.test-lab.xenproject.org/osstest/logs/183794/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
    test-arm64-arm64-examine      8 reboot                   fail REGR. vs.
183766

I'm seeing the following in the serial log:

Nov 20 00:25:41.586712 [    0.567318] kernel BUG at
arch/arm64/xen/../../arm/xen/enlighten.c:164!
Nov 20 00:25:41.598711 [    0.574002] Internal error: Oops - BUG:

00000000f2000800 [#1] PREEMPT SMP

The related source code lines in the kernel are:

Quoted 8 lines
Quoted 8 lines

········err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu),
································ &info); ········BUG_ON(err);

I suspect commit 20f3b8eafe0ba to be the culprit.

Stefano, could you please have a look?

The good news and bad news is that I cannot repro this neither with nor without CONFIG_UNMAP_KERNEL_AT_EL0. I looked at commit 20f3b8eafe0ba but I cannot see anything wrong with it. Looking at the register dump, from:

x0 : fffffffffffffffa

I am guessing the error was -ENXIO which is returned from map_guest_area in Xen.

Could it be that the struct is crossing a page boundary? Or that it is not 64-bit aligned? Do we need to do something like the following?

arch/arm/xen/enlighten.c +0 -0
index 9afdc4c4a5dc..5326070c5dc0 100644

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 490

Quoted 7 lines
arch/arm/xen/enlighten.c +1 -1
@@ -484,7 +485,7 @@ static int __init xen_guest_init(void)
         * for secondary CPUs as they are brought up.
         * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
         */
-    xen_vcpu_info = alloc_percpu(struct vcpu_info);
+    xen_vcpu_info = __alloc_percpu(struct vcpu_info, PAGE_SIZE);
        if (xen_vcpu_info == NULL)
            return -ENOMEM;

May I suggest to use a smaller alignment? What about:

Quoted 6 lines
Quoted 6 lines
Quoted 1 line

1 << fls(sizeof(struct vcpu_info) - 1)

See below

---
[PATCH] arm/xen: fix xen_vcpu_info allocation alignment

Stefano, are you going to submit the patch formally?

Quoted 5 lines
Quoted 5 lines

xen_vcpu_info is a percpu area than needs to be mapped by Xen. Currently, it could cross a page boundary resulting in Xen being unable to map it:

Quoted 7 lines
Quoted 7 lines

[    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164! [    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP

Fix the issue by using __alloc_percpu and requesting alignment for the memory allocation.

I am guessing we want to backport it. So should this contain a tag to indicate the intention?

Quoted 16 lines

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 488

Quoted 13 lines
arch/arm/xen/enlighten.c +2 -2
index 9afdc4c4a5dc..09eb74a07dfc 100644
@@ -484,7 +484,8 @@ static int __init xen_guest_init(void)
        * for secondary CPUs as they are brought up.
        * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
        */
-    xen_vcpu_info = alloc_percpu(struct vcpu_info);
+    xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+                                   1 << fls(sizeof(struct vcpu_info) 
- 1));

Nit: one tab less, please (can be fixed while committing).

Quoted 4 lines

arch/arm/xen/enlighten.c static int __init xen_guest_init(void) · line 490

Quoted 2 lines
arch/arm/xen/enlighten.c +0 -0
       if (xen_vcpu_info == NULL)
           return -ENOMEM;

Juergen, looking at the x86 code, you seem to use DEFINE_PER_CPU(). So what guarantees that this is not going to cross a page?

Cheers,

Signature · 1 line
Julien Grall