106504: regressions - FAIL
flight 106504 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/106504/
Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
test-xtf-amd64-amd64-5 34 xtf/test-hvm32pae-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-5 38 xtf/test-hvm32pse-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-4 34 xtf/test-hvm32pae-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-4 38 xtf/test-hvm32pse-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-5 46 xtf/test-hvm64-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-4 46 xtf/test-hvm64-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-1 34 xtf/test-hvm32pae-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-1 38 xtf/test-hvm32pse-swint-emulation fail REGR. vs. 106482 test-xtf-amd64-amd64-1 46 xtf/test-hvm64-swint-emulation fail REGR. vs. 106482 test-amd64-i386-xl-qemut-debianhvm-amd64-xsm 15 guest-localmigrate/x10 fail REGR. vs. 106482 test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm 16 guest-stop fail REGR. vs. 106482
Regressions which are regarded as allowable (not blocking):
test-amd64-amd64-xl-qemut-win7-amd64 16 guest-stop fail like 106482 test-amd64-i386-xl-qemuu-win7-amd64 16 guest-stop fail like 106482 test-amd64-i386-xl-qemut-win7-amd64 16 guest-stop fail like 106482 test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-stop fail like 106482 test-armhf-armhf-libvirt 13 saverestore-support-check fail like 106482 test-armhf-armhf-libvirt-xsm 13 saverestore-support-check fail like 106482 test-armhf-armhf-libvirt-raw 12 saverestore-support-check fail like 106482 test-amd64-amd64-xl-rtds 9 debian-install fail like 106482
Tests which did not succeed, but are not blocking:
test-arm64-arm64-libvirt-xsm 1 build-check(1) blocked n/a test-arm64-arm64-xl 1 build-check(1) blocked n/a build-arm64-libvirt 1 build-check(1) blocked n/a test-arm64-arm64-libvirt-qcow2 1 build-check(1) blocked n/a test-arm64-arm64-libvirt 1 build-check(1) blocked n/a test-arm64-arm64-xl-credit2 1 build-check(1) blocked n/a test-arm64-arm64-xl-rtds 1 build-check(1) blocked n/a test-arm64-arm64-xl-multivcpu 1 build-check(1) blocked n/a test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-xl-pvh-amd 11 guest-start fail never pass test-amd64-amd64-xl-pvh-intel 11 guest-start fail never pass test-amd64-i386-libvirt 12 migrate-support-check fail never pass test-amd64-i386-libvirt-xsm 12 migrate-support-check fail never pass test-amd64-amd64-libvirt 12 migrate-support-check fail never pass test-amd64-amd64-libvirt-xsm 12 migrate-support-check fail never pass build-arm64 5 xen-build fail never pass build-arm64-xsm 5 xen-build fail never pass test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm 10 migrate-support-check fail never pass test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 10 migrate-support-check fail never pass build-arm64-pvops 5 kernel-build fail never pass test-amd64-amd64-libvirt-vhd 11 migrate-support-check fail never pass test-amd64-amd64-qemuu-nested-amd 16 debian-hvm-install/l1/l2 fail never pass test-armhf-armhf-xl 12 migrate-support-check fail never pass test-armhf-armhf-xl 13 saverestore-support-check fail never pass test-armhf-armhf-xl-cubietruck 12 migrate-support-check fail never pass test-armhf-armhf-xl-cubietruck 13 saverestore-support-check fail never pass test-armhf-armhf-xl-multivcpu 12 migrate-support-check fail never pass test-armhf-armhf-xl-multivcpu 13 saverestore-support-check fail never pass test-armhf-armhf-xl-credit2 12 migrate-support-check fail never pass test-armhf-armhf-xl-credit2 13 saverestore-support-check fail never pass test-armhf-armhf-xl-xsm 12 migrate-support-check fail never pass test-armhf-armhf-xl-xsm 13 saverestore-support-check fail never pass test-armhf-armhf-libvirt 12 migrate-support-check fail never pass test-armhf-armhf-libvirt-xsm 12 migrate-support-check fail never pass test-armhf-armhf-xl-arndale 12 migrate-support-check fail never pass test-armhf-armhf-xl-arndale 13 saverestore-support-check fail never pass test-armhf-armhf-xl-rtds 12 migrate-support-check fail never pass test-armhf-armhf-xl-rtds 13 saverestore-support-check fail never pass test-armhf-armhf-libvirt-raw 11 migrate-support-check fail never pass test-armhf-armhf-xl-vhd 11 migrate-support-check fail never pass test-armhf-armhf-xl-vhd 12 saverestore-support-check fail never pass
version targeted for testing:
xen 06857f3436b987fb4942288d8f750c0a1854976c
baseline version:
xen 6d55c0c316357a412526b9dccd45d3c3abb75227
Last test of basis 106482 2017-03-06 01:57:48 Z 1 days Testing same since 106504 2017-03-06 19:44:53 Z 0 days 1 attempts
------------------------------------------------------------
People who touched revisions under test:
Jan Beulich <[email protected]>
Razvan Cojocaru <[email protected]>
Tamas K Lengyel <[email protected]>
jobs:
build-amd64-xsm pass build-arm64-xsm fail build-armhf-xsm pass build-i386-xsm pass build-amd64-xtf pass build-amd64 pass build-arm64 fail build-armhf pass build-i386 pass build-amd64-libvirt pass build-arm64-libvirt blocked build-armhf-libvirt pass build-i386-libvirt pass build-amd64-oldkern pass build-i386-oldkern pass build-amd64-prev pass build-i386-prev pass build-amd64-pvops pass build-arm64-pvops fail build-armhf-pvops pass build-i386-pvops pass build-amd64-rumprun pass build-i386-rumprun pass test-xtf-amd64-amd64-1 pass test-xtf-amd64-amd64-2 pass test-xtf-amd64-amd64-3 pass test-xtf-amd64-amd64-4 pass test-xtf-amd64-amd64-5 pass test-amd64-amd64-xl pass test-arm64-arm64-xl blocked test-armhf-armhf-xl pass test-amd64-i386-xl pass test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm pass test-amd64-i386-xl-qemut-debianhvm-amd64-xsm fail test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm pass test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm pass test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm fail test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm pass test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm pass test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm pass test-amd64-amd64-libvirt-xsm pass test-arm64-arm64-libvirt-xsm blocked test-armhf-armhf-libvirt-xsm pass test-amd64-i386-libvirt-xsm pass test-amd64-amd64-xl-xsm pass test-arm64-arm64-xl-xsm blocked test-armhf-armhf-xl-xsm pass test-amd64-i386-xl-xsm pass test-amd64-amd64-qemuu-nested-amd fail test-amd64-amd64-xl-pvh-amd fail test-amd64-i386-qemut-rhel6hvm-amd pass test-amd64-i386-qemuu-rhel6hvm-amd pass test-amd64-amd64-xl-qemut-debianhvm-amd64 pass test-amd64-i386-xl-qemut-debianhvm-amd64 pass test-amd64-amd64-xl-qemuu-debianhvm-amd64 pass test-amd64-i386-xl-qemuu-debianhvm-amd64 pass test-amd64-i386-freebsd10-amd64 pass test-amd64-amd64-xl-qemuu-ovmf-amd64 pass test-amd64-i386-xl-qemuu-ovmf-amd64 pass test-amd64-amd64-rumprun-amd64 pass test-amd64-amd64-xl-qemut-win7-amd64 fail test-amd64-i386-xl-qemut-win7-amd64 fail test-amd64-amd64-xl-qemuu-win7-amd64 fail test-amd64-i386-xl-qemuu-win7-amd64 fail test-armhf-armhf-xl-arndale pass test-amd64-amd64-xl-credit2 pass test-arm64-arm64-xl-credit2 blocked test-armhf-armhf-xl-credit2 pass test-armhf-armhf-xl-cubietruck pass test-amd64-i386-freebsd10-i386 pass test-amd64-i386-rumprun-i386 pass test-amd64-amd64-qemuu-nested-intel pass test-amd64-amd64-xl-pvh-intel fail test-amd64-i386-qemut-rhel6hvm-intel pass test-amd64-i386-qemuu-rhel6hvm-intel pass test-amd64-amd64-libvirt pass test-arm64-arm64-libvirt blocked test-armhf-armhf-libvirt pass test-amd64-i386-libvirt pass test-amd64-amd64-migrupgrade pass test-amd64-i386-migrupgrade pass test-amd64-amd64-xl-multivcpu pass test-arm64-arm64-xl-multivcpu blocked test-armhf-armhf-xl-multivcpu pass test-amd64-amd64-pair pass test-amd64-i386-pair pass test-amd64-amd64-libvirt-pair pass test-amd64-i386-libvirt-pair pass test-amd64-amd64-amd64-pvgrub pass test-amd64-amd64-i386-pvgrub pass test-amd64-amd64-pygrub pass test-arm64-arm64-libvirt-qcow2 blocked test-amd64-amd64-xl-qcow2 pass test-armhf-armhf-libvirt-raw pass test-amd64-i386-xl-raw pass test-amd64-amd64-xl-rtds fail test-arm64-arm64-xl-rtds blocked test-armhf-armhf-xl-rtds pass test-amd64-i386-xl-qemut-winxpsp3-vcpus1 pass test-amd64-i386-xl-qemuu-winxpsp3-vcpus1 pass test-amd64-amd64-libvirt-vhd pass test-armhf-armhf-xl-vhd pass test-amd64-amd64-xl-qemut-winxpsp3 pass test-amd64-i386-xl-qemut-winxpsp3 pass test-amd64-amd64-xl-qemuu-winxpsp3 pass test-amd64-i386-xl-qemuu-winxpsp3 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.
------------------------------------------------------------
commit 06857f3436b987fb4942288d8f750c0a1854976c
Author: Razvan Cojocaru <[email protected]> Date: Mon Mar 6 17:51:15 2017 +0100
x86/mem_access: fix vm_event emulation check with altp2m enabled
Currently, p2m_mem_access_emulate_check() uses p2m_get_mem_access() to check if the page restrictions have been lifted between the time of sending the vm_event out and the reception of the reply - in which case emulation is no longer required. Unfortunately, p2m_get_mem_access() uses p2m_get_hostp2m(d) which only checks the default EPT (view 0 in altp2m parlance). This patch fixes this by checking the active altp2m view instead, whenever applicable.
commit c86b899597dccff002313d1ce9bd32b0f4325c62
Author: Jan Beulich <[email protected]> Date: Mon Mar 6 17:49:45 2017 +0100
ditch redundant integer types
The very few uses can easily be replaced by more standard ones.
(qemu changes not included)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 06:52, <[email protected]> wrote:
flight 106504 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/106504/Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
[...]
test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm 16 guest-stop fail REGR. vs.
106482
Here we go:
(XEN) d15v0: intack: 02:48 pt: 38
(XEN) vIRR: 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000 (XEN) PIR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 (XEN) Assertion 'intack.vector >= pt_vector' failed at intr.c:360
(XEN) ----[ Xen-4.9-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 0
(XEN) RIP: e008:[<ffff82d0802039e8>] vmx_intr_assist+0x5fa/0x61a
(XEN) RFLAGS: 0000000000010292 CONTEXT: hypervisor (d15v0)
(XEN) rax: ffff82d0804754a8 rbx: ffff83007f375680 rcx: 0000000000000000 (XEN) rdx: ffff83007cd3ffff rsi: 000000000000000a rdi: ffff82d0803316d8 (XEN) rbp: ffff83007cd3ff08 rsp: ffff83007cd3fea8 r8: ffff830277db8000 (XEN) r9: 0000000000000001 r10: 0000000000000000 r11: 0000000000000001 (XEN) r12: 00000000ffffffff r13: ffff82d0802b5b02 r14: ffff82d0802b5b02 (XEN) r15: ffff83027d82e000 cr0: 0000000080050033 cr4: 00000000001526e0 (XEN) cr3: 0000000259135000 cr2: 000000000164f034
(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
(XEN) Xen code around <ffff82d0802039e8> (vmx_intr_assist+0x5fa/0x61a):
(XEN) fb ff ff e9 49 fc ff ff <0f> 0b 89 ce 48 89 df e8 2a 21 00 00 e9 49 fe ff (XEN) Xen stack trace from rsp=ffff83007cd3fea8:
(XEN) ffff82d08044ab00 00000038ffffffff ffff83007cd3ffff ffff83027d82e000 (XEN) ffff83007cd3fef8 ffff82d080133a3d ffff83007f375000 ffff83007f375000 (XEN) ffff83007f7fc000 ffff83026df78000 0000000000000000 ffff83027d82e000 (XEN) ffff83007cd3fdb0 ffff82d080213191 0000000000000004 00000000000000c2 (XEN) 0000000000000020 0000000000000002 ffff880029994000 ffffffff81ade0a0 (XEN) 0000000000000246 0000000000000000 ffff88002d000008 0000000000000004 (XEN) 000000000000006c 0000000000000000 00000000000003f8 00000000000003f8 (XEN) ffffffff81ade0a0 0000beef0000beef ffffffff81389ac4 000000bf0000beef (XEN) 0000000000000002 ffff88002f403e08 000000000000beef 000000000000beef (XEN) 000000000000beef 000000000000beef 000000000000beef 0000000000000000 (XEN) ffff83007f375000 0000000000000000 00000000001526e0
(XEN) Xen call trace:
(XEN) [<ffff82d0802039e8>] vmx_intr_assist+0x5fa/0x61a
(XEN) [<ffff82d080213191>] vmx_asm_vmexit_handler+0x41/0x120
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Assertion 'intack.vector >= pt_vector' failed at intr.c:360 (XEN) ****************************************
I didn't make an attempt at interpreting this yet, but I wonder if it is more than coincidence that - just like the first time the ASSERT() triggered - this is again a guest-stop of a qemuu-debianhvm.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 54 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 06:52, <[email protected]> wrote:
flight 106504 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/106504/Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
[...]
test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm 16 guest-stop fail REGR. vs.
106482Here we go:
(XEN) d15v0: intack: 02:48 pt: 38
(XEN) vIRR: 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000 (XEN) PIR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 (XEN) Assertion 'intack.vector >=pt_vector' failed at intr.c:360
(XEN) ----[ Xen-4.9-unstablex86_64debug=y Not tainted ]----
(XEN) CPU: 0
(XEN) RIP: e008:[<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) RFLAGS: 0000000000010292 CONTEXT: hypervisor (d15v0)(XEN) rax: ffff82d0804754a8 rbx: ffff83007f375680 rcx: 0000000000000000 (XEN) rdx: ffff83007cd3ffff rsi: 000000000000000a rdi: ffff82d0803316d8 (XEN) rbp: ffff83007cd3ff08 rsp: ffff83007cd3fea8 r8: ffff830277db8000 (XEN) r9: 0000000000000001 r10: 0000000000000000 r11: 0000000000000001 (XEN) r12: 00000000ffffffff r13: ffff82d0802b5b02 r14: ffff82d0802b5b02 (XEN) r15: ffff83027d82e000 cr0: 0000000080050033 cr4: 00000000001526e0 (XEN) cr3: 0000000259135000 cr2: 000000000164f034(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
(XEN) Xen code around <ffff82d0802039e8> (vmx_intr_assist+0x5fa/0x61a):
(XEN) fb ff ff e9 49 fc ff ff <0f> 0b 89 ce 48 89 df e8 2a 21 00 00 e9 49 fe ff (XEN) Xen stack trace from rsp=ffff83007cd3fea8:(XEN) ffff82d08044ab00 00000038ffffffff ffff83007cd3ffff ffff83027d82e000 (XEN) ffff83007cd3fef8 ffff82d080133a3d ffff83007f375000 ffff83007f375000 (XEN) ffff83007f7fc000 ffff83026df78000 0000000000000000 ffff83027d82e000 (XEN) ffff83007cd3fdb0 ffff82d080213191 0000000000000004 00000000000000c2 (XEN) 0000000000000020 0000000000000002 ffff880029994000 ffffffff81ade0a0 (XEN) 0000000000000246 0000000000000000 ffff88002d000008 0000000000000004 (XEN) 000000000000006c 0000000000000000 00000000000003f8 00000000000003f8 (XEN) ffffffff81ade0a0 0000beef0000beef ffffffff81389ac4 000000bf0000beef (XEN) 0000000000000002 ffff88002f403e08 000000000000beef 000000000000beef (XEN) 000000000000beef 000000000000beef 000000000000beef 0000000000000000 (XEN) ffff83007f375000 0000000000000000 00000000001526e0(XEN) Xen call trace:
(XEN) [<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) [<ffff82d080213191>]vmx_asm_vmexit_handler+0x41/0x120
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Assertion 'intack.vector >=pt_vector' failed at intr.c:360 (XEN) ****************************************
Quoted 4 lines
I didn't make an attempt at interpreting this yet, but I wonder if it is more than coincidence that - just like the first time the
ASSERT()triggered - this is again a guest-stop of a qemuu-debianhvm.
Exciting! I have been monitoring osstest for about one months through a python script. But I always crawl the flights one time a day.
From the output, the pt_vector is 0x38 and the intack.vector is 0x30. these two values are same with they were in the first time. And only one bit 0x30 is set in vIRR. PIR is NULL. So maybe
our suspicion that PIR is not synced to vIRR is wrong. The 0x38 bit is not present in vIRR is strange. Is it possible that we clear the 0x38 bit just after we return from pt_update_irq()? Or, just like I suspected that it is caused by pt_update_irq() sets 0x30 but wrongly returns 0x38. Do you think it worths a try to disable guest's LAPIC timer and force it use IRQ0 along with changing RTE very frequently?
If yes, I am glad to do it.
Thanks,
Chao
Quoted 2 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 69 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 05:24, <[email protected]> wrote:
Quoted 12 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 06:52, <[email protected]> wrote:
flight 106504 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/106504/Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
[...]
test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm 16 guest-stop fail REGR. vs.
106482Quoted 4 lines
Here we go:
(XEN) d15v0: intack: 02:48 pt: 38
(XEN) vIRR: 00000000 00000000 00000000 00000000 00000000 00000000 0001000000000000
Quoted 1 line
(XEN) PIR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
Quoted 12 lines
(XEN) Assertion 'intack.vector >=
pt_vector' failed at intr.c:360
(XEN) ----[ Xen-4.9-unstablex86_64debug=y Not tainted ]----
(XEN) CPU: 0
(XEN) RIP: e008:[<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) RFLAGS: 0000000000010292 CONTEXT: hypervisor (d15v0)(XEN) rax: ffff82d0804754a8 rbx: ffff83007f375680 rcx: 0000000000000000 (XEN) rdx: ffff83007cd3ffff rsi: 000000000000000a rdi: ffff82d0803316d8 (XEN) rbp: ffff83007cd3ff08 rsp: ffff83007cd3fea8 r8: ffff830277db8000 (XEN) r9: 0000000000000001 r10: 0000000000000000 r11: 0000000000000001 (XEN) r12: 00000000ffffffff r13: ffff82d0802b5b02 r14: ffff82d0802b5b02 (XEN) r15: ffff83027d82e000 cr0: 0000000080050033 cr4: 00000000001526e0 (XEN) cr3: 0000000259135000 cr2: 000000000164f034Quoted 3 lines
(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
(XEN) Xen code around <ffff82d0802039e8> (vmx_intr_assist+0x5fa/0x61a):
(XEN) fb ff ff e9 49 fc ff ff <0f> 0b 89 ce 48 89 df e8 2a 21 00 00 e9 49 feff
Quoted 22 lines
(XEN) Xen stack trace from rsp=ffff83007cd3fea8:
(XEN) ffff82d08044ab00 00000038ffffffff ffff83007cd3ffff ffff83027d82e000 (XEN) ffff83007cd3fef8 ffff82d080133a3d ffff83007f375000 ffff83007f375000 (XEN) ffff83007f7fc000 ffff83026df78000 0000000000000000 ffff83027d82e000 (XEN) ffff83007cd3fdb0 ffff82d080213191 0000000000000004 00000000000000c2 (XEN) 0000000000000020 0000000000000002 ffff880029994000 ffffffff81ade0a0 (XEN) 0000000000000246 0000000000000000 ffff88002d000008 0000000000000004 (XEN) 000000000000006c 0000000000000000 00000000000003f8 00000000000003f8 (XEN) ffffffff81ade0a0 0000beef0000beef ffffffff81389ac4 000000bf0000beef (XEN) 0000000000000002 ffff88002f403e08 000000000000beef 000000000000beef (XEN) 000000000000beef 000000000000beef 000000000000beef 0000000000000000 (XEN) ffff83007f375000 0000000000000000 00000000001526e0(XEN) Xen call trace:
(XEN) [<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) [<ffff82d080213191>]vmx_asm_vmexit_handler+0x41/0x120
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Assertion 'intack.vector >=pt_vector' failed at intr.c:360 (XEN) ****************************************Quoted 4 lines
I didn't make an attempt at interpreting this yet, but I wonder if it is more than coincidence that - just like the first time the
ASSERT()triggered - this is again a guest-stop of a qemuu-debianhvm.Cc xuquan.Exciting! I have been monitoring osstest for about one months through a python script. But I always crawl the flights one time a day.
Quoted 6 lines
From the output, the
pt_vectoris0x38and the intack.vector is0x30. these two values are same with they were in the first time. And only one bit0x30is set in vIRR. PIR is NULL. So maybe
our suspicion that PIR is not synced to vIRR is wrong. The0x38bit is not present in vIRR is strange. Is it possible that we clear the0x38bit just after we return frompt_update_irq()?
That would be done how?
Quoted 2 lines
Or, just like I suspected that
it is caused bypt_update_irq()sets0x30but wrongly returns0x38.
Same here, and as expressed earlier: I'm lacking a plausible theory on how this could be happening. In particular ...
Quoted 2 lines
Do you think it worths a try to disable guest's LAPIC timer and force it use IRQ0 along with changing RTE very frequently?
... if this is the LAPIC timer, then the RTE isn't being read afaics (pt_irq_vector() should be taking its very first return path in that case). Nor am I aware that any Linux version would move around one of its timer interrupts very frequently. But then again 0x30 or 0x38 wouldn't be use for the LAPIC timer anyway, but rather a vector in the fixed range (0xEF on 4.10). So I think part of the problem is to understand which timer's vector we're dealing with here.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 76 lines · Chao Gao
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 06:52, <[email protected]> wrote:
flight 106504 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/106504/Regressions :-(
Tests which did not succeed and are blocking, including tests which could not be run:
[...]
test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm 16 guest-stop failREGR. vs.
Quoted 8 lines
Quoted 1 line
106482
Here we go:
(XEN) d15v0: intack: 02:48 pt: 38
(XEN) vIRR: 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000
(XEN) PIR: 00000000 00000000 00000000 00000000 0000000000000000
Quoted 7 lines
00000000 00000000
(XEN) Assertion 'intack.vector >=pt_vector' failed at intr.c:360
(XEN) ----[ Xen-4.9-unstablex86_64debug=y Not tainted ]----
(XEN) CPU: 0
(XEN) RIP: e008:[<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) RFLAGS: 0000000000010292 CONTEXT: hypervisor (d15v0)
(XEN) rax:ffff82d0804754a8rbx:ffff83007f375680rcx:0000000000000000
Quoted 1 line
(XEN) rdx:
ffff83007cd3ffffrsi:000000000000000ardi:
ffff82d0803316d8Quoted 1 line
(XEN) rbp:
ffff83007cd3ff08rsp:ffff83007cd3fea8r8:
ffff830277db8000Quoted 1 line
(XEN) r9: 0000000000000001 r10: 0000000000000000 r11:
0000000000000001
Quoted 1 line
(XEN) r12:
00000000ffffffffr13:ffff82d0802b5b02r14:
ffff82d0802b5b02Quoted 1 line
(XEN) r15:
ffff83027d82e000cr0: 0000000080050033 cr4:
00000000001526e0Quoted 7 lines
(XEN) cr3: 0000000259135000 cr2:
000000000164f034
(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
(XEN) Xen code around <ffff82d0802039e8> (vmx_intr_assist+0x5fa/0x61a):
(XEN) fb ff ff e9 49 fc ff ff <0f> 0b 89 ce 48 89 df e8 2a 21 00 00 e9 49 fe ff
(XEN) Xen stack trace from rsp=ffff83007cd3fea8:
(XEN)ffff82d08044ab0000000038ffffffffffff83007cd3ffff
ffff83027d82e000Quoted 1 line
(XEN)
ffff83007cd3fef8ffff82d080133a3dffff83007f375000
ffff83007f375000Quoted 1 line
(XEN)
ffff83007f7fc000ffff83026df780000000000000000000
ffff83027d82e000Quoted 1 line
(XEN)
ffff83007cd3fdb0ffff82d0802131910000000000000004
00000000000000c2Quoted 1 line
(XEN) 0000000000000020 0000000000000002
ffff880029994000
ffffffff81ade0a0Quoted 1 line
(XEN) 0000000000000246 0000000000000000
ffff88002d0000080000000000000004
Quoted 1 line
(XEN)
000000000000006c000000000000000000000000000003f8
00000000000003f8Quoted 1 line
(XEN)
ffffffff81ade0a00000beef0000beefffffffff81389ac4
000000bf0000beefQuoted 1 line
(XEN) 0000000000000002
ffff88002f403e08000000000000beef
000000000000beefQuoted 1 line
(XEN)
000000000000beef000000000000beef000000000000beef0000000000000000
Quoted 11 lines
(XEN)
ffff83007f375000000000000000000000000000001526e0
(XEN) Xen call trace:
(XEN) [<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) [<ffff82d080213191>]vmx_asm_vmexit_handler+0x41/0x120
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Assertion 'intack.vector >=pt_vector' failed at intr.c:360 (XEN) ****************************************
Quoted 6 lines
Quoted 4 lines
I didn't make an attempt at interpreting this yet, but I wonder if it is more than coincidence that - just like the first time the
ASSERT()triggered - this is again a guest-stop of a qemuu-debianhvm.Cc xuquan.
Also Cc: Andrew, who is really a debug expert :)..
Quoted 4 lines
Exciting! I have been monitoring osstest for about one months through a python script. But I always crawl the flights one time a day.
Quoted 11 lines
From the output, the
pt_vectoris0x38and the intack.vector is0x30. these two values are same with they were in the first time.
And only one bit0x30is set in vIRR. PIR is NULL. So maybe our suspicion that PIR is not synced to vIRR is wrong. The0x38bit is not present in vIRR is strange. Is it possible that we clear the0x38bit just after we return frompt_update_irq()? Or, just like I suspected that it is caused bypt_update_irq()sets0x30but wrongly returns0x38.
Do you think it worths a try to disable guest's LAPIC timer and force it use IRQ0 along with changing RTE very frequently?
If yes, I am glad to do it.
I can't find a reasonable explanation for this regression.. However I found that self-ipi virtualization also sets 1 to 'VIRR[vector]'.. It might be a corner case with some special guest, such as mentioned above, debian..
Quan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 87 lines · Jan Beulich
Quoted 69 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 05:24, <[email protected]> wrote:
Quoted 12 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 07.03.17 at 06:52, <[email protected]> wrote:
flight 106504 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/106504/Regressions :-(
Tests which did not succeed and are blocking,
including tests which could not be run:
[...]
test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm 16 guest-stop fail REGR. vs.
106482Quoted 4 lines
Here we go:
(XEN) d15v0: intack: 02:48 pt: 38
(XEN) vIRR: 00000000 00000000 00000000 00000000 00000000 00000000 0001000000000000
Quoted 1 line
(XEN) PIR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
Quoted 12 lines
(XEN) Assertion 'intack.vector >=
pt_vector' failed at intr.c:360
(XEN) ----[ Xen-4.9-unstablex86_64debug=y Not tainted ]----
(XEN) CPU: 0
(XEN) RIP: e008:[<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) RFLAGS: 0000000000010292 CONTEXT: hypervisor (d15v0)(XEN) rax: ffff82d0804754a8 rbx: ffff83007f375680 rcx: 0000000000000000 (XEN) rdx: ffff83007cd3ffff rsi: 000000000000000a rdi: ffff82d0803316d8 (XEN) rbp: ffff83007cd3ff08 rsp: ffff83007cd3fea8 r8: ffff830277db8000 (XEN) r9: 0000000000000001 r10: 0000000000000000 r11: 0000000000000001 (XEN) r12: 00000000ffffffff r13: ffff82d0802b5b02 r14: ffff82d0802b5b02 (XEN) r15: ffff83027d82e000 cr0: 0000000080050033 cr4: 00000000001526e0 (XEN) cr3: 0000000259135000 cr2: 000000000164f034Quoted 3 lines
(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
(XEN) Xen code around <ffff82d0802039e8> (vmx_intr_assist+0x5fa/0x61a):
(XEN) fb ff ff e9 49 fc ff ff <0f> 0b 89 ce 48 89 df e8 2a 21 00 00 e9 49 feff
Quoted 22 lines
(XEN) Xen stack trace from rsp=ffff83007cd3fea8:
(XEN) ffff82d08044ab00 00000038ffffffff ffff83007cd3ffff ffff83027d82e000 (XEN) ffff83007cd3fef8 ffff82d080133a3d ffff83007f375000 ffff83007f375000 (XEN) ffff83007f7fc000 ffff83026df78000 0000000000000000 ffff83027d82e000 (XEN) ffff83007cd3fdb0 ffff82d080213191 0000000000000004 00000000000000c2 (XEN) 0000000000000020 0000000000000002 ffff880029994000 ffffffff81ade0a0 (XEN) 0000000000000246 0000000000000000 ffff88002d000008 0000000000000004 (XEN) 000000000000006c 0000000000000000 00000000000003f8 00000000000003f8 (XEN) ffffffff81ade0a0 0000beef0000beef ffffffff81389ac4 000000bf0000beef (XEN) 0000000000000002 ffff88002f403e08 000000000000beef 000000000000beef (XEN) 000000000000beef 000000000000beef 000000000000beef 0000000000000000 (XEN) ffff83007f375000 0000000000000000 00000000001526e0(XEN) Xen call trace:
(XEN) [<ffff82d0802039e8>]vmx_intr_assist+0x5fa/0x61a
(XEN) [<ffff82d080213191>]vmx_asm_vmexit_handler+0x41/0x120
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Assertion 'intack.vector >=pt_vector' failed at intr.c:360 (XEN) ****************************************Quoted 4 lines
I didn't make an attempt at interpreting this yet, but I wonder if it is more than coincidence that - just like the first time the
ASSERT()triggered - this is again a guest-stop of a qemuu-debianhvm.Cc xuquan.Exciting! I have been monitoring osstest for about one months through a python script. But I always crawl the flights one time a day.
Quoted 6 lines
From the output, the
pt_vectoris0x38and the intack.vector is0x30. these two values are same with they were in the first time. And only one bit0x30is set in vIRR. PIR is NULL. So maybe
our suspicion that PIR is not synced to vIRR is wrong. The0x38bit is not present in vIRR is strange. Is it possible that we clear the0x38bit just after we return frompt_update_irq()?That would be done how?
Quoted 2 lines
Or, just like I suspected that
it is caused bypt_update_irq()sets0x30but wrongly returns0x38.Same here, and as expressed earlier: I'm lacking a plausible theory on how this could be happening. In particular ...
Quoted 2 lines
Do you think it worths a try to disable guest's LAPIC timer and force it use IRQ0 along with changing RTE very frequently?
Quoted 9 lines
... if this is the LAPIC timer, then the RTE isn't being read afaics (
pt_irq_vector()should be taking its very first return path in that case). Nor am I aware that any Linux version would move around one of its timer interrupts very frequently. But then again0x30or0x38wouldn't be use for the LAPIC timer anyway, but rather a vector in the fixed range (0xEFon 4.10). So I think part of the problem is to understand which timer's vector we're dealing with here.
I have written a xtf test case (many codes are from hvmloader) to trigger this assertion. The test case is in attachments. Bottom is the output of this test. This test initializes PIT channel0 to generate periodic timer interrupt at 1000hz per second. The timer interrupt is delivered to vCPU0. And vCPU1 is used to change IOAPIC RTE 2 frequently.
The assertion can be triggered by guest. To fix assertion failure, I propose to remove this assertion for the reason below:
1. Operations in this test case are very intrusive and abnormal. It updates RTE frequently without disabling interrupt source. In this case, I think software can't assume hardware works correctly.
2. If we remove this assertion(means we admit pt_vector may be different from (or bigger than) the vector we set in vIRR in a rare case), the side effect is that we won't decrease the counter pt->ending_intr_nr in pt_intr_post() and one more timer interrupt in number is injected to guest.
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when pt_update_irq() returns. 3rd happens in pt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.
(d1) [ 1409.741660] --- Xen Test Framework ---
(d1) [ 1409.741869] Environment: HVM 32bit (No paging)
(d1) [ 1409.741964] Test periodic-timer
(d1) [ 1409.742077] activate cpu1
(XEN) [ 1423.581228] d1v0: intack: 02:48 pt: 38
(XEN) [ 1423.581234] vIRR: 00000000 00000000 00000000 00000000 00000000 00000000 00010000 00000000 (XEN) [ 1423.581246] PIR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 (XEN) [ 1423.581286] Assertion 'intack.vector >= pt_vector' failed at intr.c:360
(XEN) [ 1423.581294] ----[ Xen-4.9-unstable x86_64 debug=y Not tainted ]----
(XEN) [ 1423.581370] CPU: 58
(XEN) [ 1423.581375] RIP: e008:[<ffff82d0801fe405>] vmx_intr_assist+0x605/0x625
(XEN) [ 1423.581389] RFLAGS: 0000000000010296 CONTEXT: hypervisor (d1v0)
(XEN) [ 1423.581398] rax: ffff830837e0402c rbx: ffff83006a093680 rcx: 0000000000000000 (XEN) [ 1423.581404] rdx: ffff831075e17fff rsi: 000000000000000a rdi: ffff82d08032f6b8 (XEN) [ 1423.581410] rbp: ffff831075e17f08 rsp: ffff831075e17e98 r8: ffff83083e000000 (XEN) [ 1423.581416] r9: 0000000000000001 r10: 0000000000000000 r11: 0000000000000001 (XEN) [ 1423.581422] r12: 00000000ffffffff r13: ffff82d0802a4c31 r14: ffff82c000408200 (XEN) [ 1423.581427] r15: 0000000000004016 cr0: 000000008005003b cr4: 00000000003526e0 (XEN) [ 1423.581432] cr3: 000000081e2bf000 cr2: 0000000000000000
(XEN) [ 1423.581437] ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
(XEN) [ 1423.581446] Xen code around <ffff82d0801fe405> (vmx_intr_assist+0x605/0x625):
(XEN) [ 1423.581450] fb ff ff e9 5e fc ff ff <0f> 0b 89 ce 48 89 df e8 03 21 00 00 e9 62 fe ff (XEN) [ 1423.581470] Xen stack trace from rsp=ffff831075e17e98:
(XEN) [ 1423.581473] ffff831075e17f08 ffff82d08034c700 ffff82d000000030 ffffffffffffffff (XEN) [ 1423.581483] ffff831075e17fff 0000000000000000 ffff831075e17ef8 ffff82d0801340ff (XEN) [ 1423.581491] ffff83006a093000 ffff83006a093000 ffff83006a093000 ffff830837e04148 (XEN) [ 1423.581500] 0000014b740caab6 0000000001c9c380 ffff831075e17e28 ffff82d08020da51 (XEN) [ 1423.581509] 0000000000000000 0000000000000000 0000000000000000 0000000000000000 (XEN) [ 1423.581515] 0000000000000000 00000000fee00000 0000000000000000 0000000000000000 (XEN) [ 1423.581522] 0000000000000000 0000000000000000 0000000000000004 000000000010260d (XEN) [ 1423.581529] 0000000000000001 0000000000000000 0000000000000000 0000beef0000beef (XEN) [ 1423.581536] 0000000000102928 000000bf0000beef 0000000000000206 0000000000115fa0 (XEN) [ 1423.581544] 000000000000beef 000000000000beef 000000000000beef 000000000000beef (XEN) [ 1423.581551] 000000000000beef 000000000000003a ffff83006a093000 00000037b7a91900 (XEN) [ 1423.581559] 00000000003526e0
(XEN) [ 1423.581564] Xen call trace:
(XEN) [ 1423.581570] [<ffff82d0801fe405>] vmx_intr_assist+0x605/0x625
(XEN) [ 1423.581580] [<ffff82d08020da51>] vmx_asm_vmexit_handler+0x41/0x120
(XEN) [ 1423.581584]
(XEN) [ 1423.827761]
(XEN) [ 1423.829753] ****************************************
(XEN) [ 1423.835210] Panic on CPU 58:
(XEN) [ 1423.838591] Assertion 'intack.vector >= pt_vector' failed at intr.c:360 (XEN) [ 1423.845698] ****************************************
tests/periodic-timer/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +include $(ROOT)/build/common.mk + +NAME := periodic-timer +CATEGORY := special +TEST-ENVS := hvm32 + +TEST-EXTRA-CFG := extra.cfg.in + +obj-perenv += main.o entry.o + +include $(ROOT)/build/gen.mk
tests/periodic-timer/entry.S new file +15 -0
@@ -0,0 +1,15 @@ +#include <arch/idt.h> +#include <arch/page.h> +#include <arch/processor.h> +#include <arch/segment.h> +#include <xtf/asm_macros.h> +#include <arch/msr-index.h> + + .align 16 + .code32 + +ENTRY(handle_external_int) + SAVE_ALL + call pt_interrupt_handler + RESTORE_ALL + iret
tests/periodic-timer/extra.cfg.in new file +1 -0
@@ -0,0 +1 @@ +vcpus=2
tests/periodic-timer/main.c new file +283 -0
283 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 22.03.17 at 05:53, <[email protected]> wrote:
I have written a xtf test case (many codes are from hvmloader) to trigger this assertion. The test case is in attachments.
Thanks for doing this.
Quoted 4 lines
Bottom is the output
of this test. This test initializes PIT channel0 to generate periodic timer interrupt at 1000hz per second. The timer interrupt is delivered to vCPU0. And vCPU1 is used to change IOAPIC RTE 2 frequently.
Well, this is certainly helpful (due to some of the conclusions you draw below), but it is very likely not what has caused the assertion to trigger in osstest. So by removing the assertion (as you suggest below) we then will have a silent, non-understood misbehavior.
Quoted 2 lines
The assertion can be triggered by guest. To fix assertion failure, I propose to remove this assertion for the reason below:
Of course I agree that a guest triggerable assertion is bad, and hence needs a correction somewhere.
Quoted 3 lines
1. Operations in this test case are very intrusive and abnormal. It updates RTE frequently without disabling interrupt source. In this case, I think software can't assume hardware works correctly.
I guess hardware behavior simply is unspecified in such a case, so it's hard to judge whether it works "correctly".
Quoted 4 lines
2. If we remove this assertion(means we admit
pt_vectormay be different from (or bigger than) the vector we set in vIRR in a rare case), the side effect is that we won't decrease the counterpt->ending_intr_nrinpt_intr_post()and one more timer interrupt in number is injected to guest.
Which is clearly wrong, afaict, as that may drive the guest clock off (depending on how the guest OS does its accounting).
Quoted 4 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single event?
Quoted 5 lines
(d1) [ 1409.741660] --- Xen Test Framework --- (d1) [ 1409.741869] Environment: HVM 32bit (No paging) (d1) [ 1409.741964] Test periodic-timer
(d1) [ 1409.742077] activate cpu1
(XEN) [ 1423.581228] d1v0: intack: 02:48 pt: 38
I keep getting confused by my own mistake of getting the format string wrong here (the above should be intack: 2:30 pt: 38). I.e. I was about to complain that there's no use vector 48 in your test code, when I remembered that it's being wrongly printed in decimal.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 22.03.17 at 05:53, <[email protected]> wrote:
I have written a xtf test case (many codes are from hvmloader) to trigger this assertion. The test case is in attachments.
Thanks for doing this.
Quoted 4 lines
Bottom is the output
of this test. This test initializes PIT channel0 to generate periodic timer interrupt at 1000hz per second. The timer interrupt is delivered to vCPU0. And vCPU1 is used to change IOAPIC RTE 2 frequently.
Quoted 4 lines
Well, this is certainly helpful (due to some of the conclusions you draw below), but it is very likely not what has caused the assertion to trigger in osstest. So by removing the assertion (as you suggest below) we then will have a silent, non-understood misbehavior.
Agree.
Quoted 7 lines
Quoted 3 lines
The assertion can be triggered by guest. To fix assertion failure, I propose to remove this assertion for the reason below:
Of course I agree that a guest triggerable assertion is bad, and hence needs a correction somewhere.
Quoted 6 lines
Quoted 3 lines
1. Operations in this test case are very intrusive and abnormal. It updates RTE frequently without disabling interrupt source. In this case, I think software can't assume hardware works correctly.
I guess hardware behavior simply is unspecified in such a case, so it's hard to judge whether it works "correctly".
agree.
Quoted 8 lines
Quoted 5 lines
2. If we remove this assertion(means we admit
pt_vectormay be different from (or bigger than) the vector we set in vIRR in a rare case), the side effect is that we won't decrease the counterpt->ending_intr_nrinpt_intr_post()and one more timer interrupt in number is injected to guest.Which is clearly wrong, afaict, as that may drive the guest clock off (depending on how the guest OS does its accounting).
Yes.
Quoted 10 lines
Quoted 5 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
I think your solution is better.
Quoted 4 lines
Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single event?
Yes, I will come back once I get how they handle similar processes.
Quoted 7 lines
Quoted 6 lines
(d1) [ 1409.741660] --- Xen Test Framework --- (d1) [ 1409.741869] Environment: HVM 32bit (No paging) (d1) [ 1409.741964] Test periodic-timer
(d1) [ 1409.742077] activate cpu1
(XEN) [ 1423.581228] d1v0: intack: 02:48 pt: 38
Quoted 5 lines
I keep getting confused by my own mistake of getting the format string wrong here (the above should be intack: 2:30 pt: 38). I.e. I was about to complain that there's no use vector 48 in your test code, when I remembered that it's being wrongly printed in decimal.
Sorry for my fault.
Quoted 3 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 22.03.17 at 07:13, <[email protected]> wrote:
Quoted 7 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 22.03.17 at 05:53, <[email protected]> wrote:
(d1) [ 1409.741660] --- Xen Test Framework --- (d1) [ 1409.741869] Environment: HVM 32bit (No paging) (d1) [ 1409.741964] Test periodic-timer
(d1) [ 1409.742077] activate cpu1
(XEN) [ 1423.581228] d1v0: intack: 02:48 pt: 38
Quoted 7 lines
Quoted 5 lines
I keep getting confused by my own mistake of getting the format string wrong here (the above should be intack: 2:30 pt: 38). I.e. I was about to complain that there's no use vector 48 in your test code, when I remembered that it's being wrongly printed in decimal.
Sorry for my fault.
Hmm? It was pretty obviously me who screwed it up when editing the patch while committing.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines
From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:48 PMQuoted 4 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.
Quoted 8 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case.
Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single event?
There is a similar case. For level-triggered interrupt, there is a "remote IRR" bit in RTE which is set to 1 when LAPIC accepts the level interrupt sent by IOAPIC. It's then cleared by EOI broadcast from LAPIC later, based on matching interrupt vectors. If software happens to change the vector of the said RTE in-between, "remote IRR" bit will never be cleared (it expects an EOI with new vector now while actual EOI for previous injection contains old vector).
Of course in our case pt timer is edge-interrupt, which shouldn't trigger such multi-reads issue in real hardware. But anyway it's not a good behavior to change RTE vector w/o stopping the interrupt source first...
Thanks
Kevin
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 19 lines
Quoted 9 lines
Quoted 1 line · On 24.03.17 at 08:48, <[email protected]> wrote:
From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:48 PMQuoted 4 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Quoted 7 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case.
Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single
event?
Quoted 1 line
Quoted 8 lines
There is a similar case. For level-triggered interrupt, there is a "remote IRR"
bit in RTE which is set to 1 when LAPIC accepts the level interrupt sent by IOAPIC. It's then cleared by EOI broadcast from LAPIC later, based on matching interrupt vectors. If software happens to change the vector of the said RTE in-between, "remote IRR" bit will never be cleared (it expects an EOI with new vector now while actual EOI for previous injection contains old vector).
Hmm, I'd expect such a write to clear IRR at once, if somebody really wrote code this way. Or is the bit wrongly documented R/W?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 33 lines
From: Jan Beulich [mailto:[email protected]]
Sent: Friday, March 24, 2017 4:18 PMQuoted 21 lines
Quoted 10 lines
Quoted 1 line · On 24.03.17 at 08:48, <[email protected]> wrote:
From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:48 PMQuoted 5 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Quoted 8 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single
event?
Quoted 1 line
Quoted 8 lines
There is a similar case. For level-triggered interrupt, there is a "remote IRR"
bit in RTE which is set to 1 when LAPIC accepts the level interrupt sent by IOAPIC. It's then cleared by EOI broadcast from LAPIC later, based on matching interrupt vectors. If software happens to change the vector of the said RTE in-between, "remote IRR" bit will never be cleared (it expects an EOI with new vector now while actual EOI for previous injection contains old vector).
Quoted 3 lines
Hmm, I'd expect such a write to clear IRR at once, if somebody really wrote code this way. Or is the bit wrongly documented R/W?
It's read-only to software, but cleared only when accepting EOI.
Thanks
Kevin
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 36 lines
From: Tian, Kevin
Sent: Friday, March 24, 2017 4:26 PMQuoted 33 lines
From: Jan Beulich [mailto:[email protected]]
Sent: Friday, March 24, 2017 4:18 PMQuoted 29 lines
Quoted 10 lines
Quoted 1 line · On 24.03.17 at 08:48, <[email protected]> wrote:
From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:48 PMQuoted 5 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Quoted 8 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single
event?
Quoted 1 line
There is a similar case. For level-triggered interrupt, there is a "remote IRR"
bit in RTE which is set to 1 when LAPIC accepts the level interrupt sent by IOAPIC. It's then cleared by EOI broadcast from LAPIC later, based on matching interrupt vectors. If software happens to change the vector of the said RTE in-between, "remote IRR" bit will never be cleared (it expects an EOI with new vector now while actual EOI for previous injection contains old vector).
Quoted 6 lines
Quoted 3 lines
Hmm, I'd expect such a write to clear IRR at once, if somebody really wrote code this way. Or is the bit wrongly documented R/W?
It's read-only to software, but cleared only when accepting EOI.
btw it's also the reason why we set EOI exit bitmap for level-triggered interrupt in APICv, to allow proper emulation of above behavior. :-)
Thanks
Kevin
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 24 lines · Jan Beulich
Quoted 15 lines
Quoted 8 lines
Quoted 1 line · On 24.03.17 at 08:48, <[email protected]> wrote:
From: Jan Beulich [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:48 PMQuoted 4 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Quoted 7 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case.
Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single
Quoted 9 lines
event?
There is a similar case. For level-triggered interrupt, there is a "remote IRR"
bit in RTE which is set to 1 when LAPIC accepts the level interrupt sent by IOAPIC. It's then cleared by EOI broadcast from LAPIC later, based on matching interrupt vectors. If software happens to change the vector of the said RTE in-between, "remote IRR" bit will never be cleared (it expects an EOI with new vector now while actual EOI for previous injection contains old vector).
Quoted 2 lines
Hmm, I'd expect such a write to clear IRR at once, if somebody really wrote code this way. Or is the bit wrongly documented R/W?
The IRR is read only. This behaviour is the root cause of one of the earliest bugs I fixed in the hypervisor, c/s 12b6ea528f
(And on re-reading the commit message, I still haven't found time to full-fill "This fix is distinctly a temporary hack, waiting on a cleanup of the irq code.")
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 12 lines · Chao Gao
Quoted 10 lines · Jan Beulich
Quoted 5 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
Quoted 10 lines
I think your solution is better.
Quoted 4 lines
Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single event?
Yes, I will come back once I get how they handle similar processes.
Quoted 1 line
Chao,
Based on Jan's suggestion, a rcu lock may be helpful to you.. Specifically, you can refer to rcu_read_lock() in kvm code..
btw, I still can't get how this caused the assertion clearly.. could you describe it in short? :)
Quan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 20 lines · Xuquan (Quan Xu)
Quoted 19 lines · Chao Gao
Quoted 10 lines · Jan Beulich
Quoted 5 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
I think your solution is better.
Quoted 4 lines
Can you get in touch with your chipset folks to find out whether hardware has cases where multiple reads occur during the processing of a single event?
Quoted 7 lines
Quoted 3 lines
Yes, I will come back once I get how they handle similar processes.
Quoted 1 line
Chao,
Based on Jan's suggestion, a rcu lock may be helpful to you.. Specifically, you can refer torcu_read_lock()in kvm code..
Thanks for your advice. I will read this.
Quoted 2 lines
btw, I still can't get how this caused the assertion clearly.. could you describe it in short? :)
In short, it caused by reading IOAPIC RTE twice. The first time is for setting a bit in vIRR. The second one is to return the bit we set for setting EOI later. But the vector in RTE can be changed by guest during the time window. If the new vector is bigger than the old one (such as 0x38 > 0x30), the assertion may fail.
Quoted 4 lines
Quan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 42 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 22.03.17 at 05:53, <[email protected]> wrote:
I have written a xtf test case (many codes are from hvmloader) to trigger this assertion. The test case is in attachments.
Thanks for doing this.
Quoted 4 lines
Bottom is the output
of this test. This test initializes PIT channel0 to generate periodic timer interrupt at 1000hz per second. The timer interrupt is delivered to vCPU0. And vCPU1 is used to change IOAPIC RTE 2 frequently.Well, this is certainly helpful (due to some of the conclusions you draw below), but it is very likely not what has caused the assertion to trigger in osstest. So by removing the assertion (as you suggest below) we then will have a silent, non-understood misbehavior.
Quoted 2 lines
The assertion can be triggered by guest. To fix assertion failure, I propose to remove this assertion for the reason below:
Of course I agree that a guest triggerable assertion is bad, and hence needs a correction somewhere.
Quoted 3 lines
1. Operations in this test case are very intrusive and abnormal. It updates RTE frequently without disabling interrupt source. In this case, I think software can't assume hardware works correctly.
I guess hardware behavior simply is unspecified in such a case, so it's hard to judge whether it works "correctly".
Quoted 4 lines
2. If we remove this assertion(means we admit
pt_vectormay be different from (or bigger than) the vector we set in vIRR in a rare case), the side effect is that we won't decrease the counterpt->ending_intr_nrinpt_intr_post()and one more timer interrupt in number is injected to guest.Which is clearly wrong, afaict, as that may drive the guest clock off (depending on how the guest OS does its accounting).
Quoted 4 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.
Quoted 4 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
Hi, Jan.
I plan to do the following changes:
1. get the vector set in vIRR to avoid getting a wrong interrupt vector I think there are two appoaches. One is to extend hvm_isa_irq_assert() to return the vector set in vIRR. Several functions in call trees are also involved. The other is to make vIOAPIC support disabling write operations to RTE. In this case, a rwlock_t is introduced to protect RTE. pt_update_irq() will disable write operations at first, then get the vector and assert the vector, at last enable write operations. Which one do you think is better?
2. let pt_update_irq() pass the periodic timer
whose interrupt is to be injected to vmx_intr_assit() which in turn can pass it to pt_intr_post(). After this, pt_intr_post() needn't search the periodic timer that matches the interrupt has been injected. Through this, we can avoid reading the RTE there.
Do you think the above changes would be a clean solution or you have some different suggestion on how to fix it now.
Thanks
Chao
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 51 lines
Quoted 1 line
Quoted 1 line · On 05.04.17 at 01:57, <[email protected]> wrote:
Quoted 42 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 22.03.17 at 05:53, <[email protected]> wrote:
I have written a xtf test case (many codes are from hvmloader) to trigger this assertion. The test case is in attachments.
Thanks for doing this.
Quoted 4 lines
Bottom is the output
of this test. This test initializes PIT channel0 to generate periodic timer interrupt at 1000hz per second. The timer interrupt is delivered to vCPU0. And vCPU1 is used to change IOAPIC RTE 2 frequently.Well, this is certainly helpful (due to some of the conclusions you draw below), but it is very likely not what has caused the assertion to trigger in osstest. So by removing the assertion (as you suggest below) we then will have a silent, non-understood misbehavior.
Quoted 2 lines
The assertion can be triggered by guest. To fix assertion failure, I propose to remove this assertion for the reason below:
Of course I agree that a guest triggerable assertion is bad, and hence needs a correction somewhere.
Quoted 3 lines
1. Operations in this test case are very intrusive and abnormal. It updates RTE frequently without disabling interrupt source. In this case, I think software can't assume hardware works correctly.
I guess hardware behavior simply is unspecified in such a case, so it's hard to judge whether it works "correctly".
Quoted 4 lines
2. If we remove this assertion(means we admit
pt_vectormay be different from (or bigger than) the vector we set in vIRR in a rare case), the side effect is that we won't decrease the counterpt->ending_intr_nrinpt_intr_post()and one more timer interrupt in number is injected to guest.Which is clearly wrong, afaict, as that may drive the guest clock off (depending on how the guest OS does its accounting).
Quoted 4 lines
3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
pt_update_irq()returns. 3rd happens inpt_intr_post(). If guest changes the vector in RTE during the window, it will also incur losing or getting more periodic timer interrupt.Quoted 4 lines
Which raises the question whether latching the value read the first time would address the issue you demonstrate with the test case. Or alternatively deferring writes to take effect only once readers are done with their perhaps multiple accesses?
Hi, Jan.
Quoted 9 lines
I plan to do the following changes:
1. get the vector set in vIRR to avoid getting a wrong interrupt vector I think there are two appoaches. One is to extendhvm_isa_irq_assert()to return the vector set in vIRR. Several functions in call trees are also involved. The other is to make vIOAPIC support disabling write operations to RTE. In this case, arwlock_tis introduced to protect RTE.pt_update_irq()will disable write operations at first, then get the vector and assert the vector, at last enable write operations. Which one do you think is better?
That's hard to tell without seeing the changes each actually involves. On the surface I'd probably prefer the 2nd, provided the locking can be got into a shape where there's no meaningful risk of missing an unlock on some path.
Quoted 5 lines
2. let
pt_update_irq()pass the periodic timer
whose interrupt is to be injected tovmx_intr_assit()which in turn can pass it topt_intr_post(). After this,pt_intr_post()needn't search the periodic timer that matches the interrupt has been injected. Through this, we can avoid reading the RTE there.
If the RTE can't be changed behind your back, why would you need this?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 15 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 05.04.17 at 01:57, <[email protected]> wrote:
On Wed, Mar 22, 2017 at 06:47:33AM -0600, Jan Beulich wrote:
Hi, Jan.
Quoted 9 lines
I plan to do the following changes:
1. get the vector set in vIRR to avoid getting a wrong interrupt vector I think there are two appoaches. One is to extendhvm_isa_irq_assert()to return the vector set in vIRR. Several functions in call trees are also involved. The other is to make vIOAPIC support disabling write operations to RTE. In this case, arwlock_tis introduced to protect RTE.pt_update_irq()will disable write operations at first, then get the vector and assert the vector, at last enable write operations. Which one do you think is better?
Quoted 4 lines
That's hard to tell without seeing the changes each actually involves. On the surface I'd probably prefer the 2nd, provided the locking can be got into a shape where there's no meaningful risk of missing an unlock on some path.
Thanks your opinion. I will try to add the lock.
Quoted 9 lines
Quoted 6 lines
2. let
pt_update_irq()pass the periodic timer
whose interrupt is to be injected tovmx_intr_assit()which in turn can pass it topt_intr_post(). After this,pt_intr_post()needn't search the periodic timer that matches the interrupt has been injected. Through this, we can avoid reading the RTE there.If the RTE can't be changed behind your back, why would you need this?
Yes. With the first change described above, the second change is needless theoretically. But If the lock is acquired in vmx_intr_assist(), the lock is also acquired in major cases (using LAPIC timer) in which getting lock is useless. If the lock is acquired in pt_update_irq(), it would better be released there. Thus the lock can't protect pt_intr_post(). Also the second change would reduce the time spends in locked region. I am worried about adding a lock here (very critical path) may hurt the performance.
Also I admit making this change should be very careful. Changing less decreases the possibility of introducing errors.
Thanks
Chao
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 6 lines · Chao Gao
2. let
pt_update_irq()pass the periodic timer whose interrupt is to be injected tovmx_intr_assit()which in turn can pass it topt_intr_post(). After this,pt_intr_post()needn't search the periodic timer that matches the interrupt has been injected. Through this, we can avoid reading the RTE there.
the key point of pt_intr_post() is to decrease the count (pending_intr_nr) of pending periodic timer interrupt, otherwise Xen will deliver a periodic timer interrupt more.
Curious, even if you can pass the pt interrupt to pt_intr_post(), how could you leverage it?
Quan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel