Skip to contentSkip to conversation

kvm fpu warning on 4.14.89

DISCUSSION cagnulein 3 participants 24 messages Mar 1, 2019 – Apr 10, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

cagnulein

author
#1 lore raw

I’m testing the 4.14.89 ipipe (i was usually using 4.9.146) and i’ve got a deterministic warning every time i start qemu. Is it already known?

Thanks

R.

Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING: CPU: 0 PID: 1154

at ./arch/x86/include/asm/fpu/internal.h:617 __kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules linked in:

hid_generic usbhid hid xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc i2c_designware_platform i2c_designware_core nls_ascii nls_cp437 vfat fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf pcspkr i915 prime_numbers lpc_ich drm_kms_helper drm idma64 fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect intel_lpss sysimgblt mfd_core mei shpchp sg evdev video ip_tables x_tables autofs4

Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16 mbcache jbd2

fscrypto btrfs zstd_decompress zstd_compress xxhash raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sd_mod mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci libahci ptp crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata usbcore scsi_mod

Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID: 1154 Comm:

qemu-system-x86 Not tainted 4.14.89 #1

Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe domain: Linux
Mar  1 01:14:05 debiankvm kernel: [   96.078988] task: ffff94aff6f49c80

task.stack: ffffb5be80a58000

Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:

0010:__kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP: 0018:ffffb5be80a5bcf8

EFLAGS: 00010246

Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX: 00000000ffffff00 RBX:

ffff94aff6e88000 RCX: ffff94aff6f49c80

Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX: 00000000ffffffff RSI:

0000000000000246 RDI: ffff94aff6f4a800

Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP: ffffb5be80a5bdd0 R08:

ffffffffc0c1c060 R09: ffff94aff6f8f000

Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10: 0000000000004bc0 R11:

ffff94afe4680008 R12: ffffffffc0ca0f80

Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13: 0000000000000000 R14:

ffff94aff6e88000 R15: ffff94aff83c9bc0

Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:

00007f388aba8700(0000) GS:ffff94affb200000(0000) knlGS:0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010 DS: 0000 ES:

0000 CR0: 0000000080050033

Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2: 000001b737101034 CR3:

0000000178424000 CR4: 00000000003426f0

Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
Mar  1 01:14:05 debiankvm kernel: [   96.079029]

kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079032]

kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?

kvm_arch_vcpu_load+0x4d/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ? vmx_vcpu_load+0x5/0x3e0

[kvm_intel]

Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?

kvm_arch_vcpu_load+0x68/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?

kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079050]

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079053]  do_vfs_ioctl+0xa2/0x620
Mar  1 01:14:05 debiankvm kernel: [   96.079056]  SyS_ioctl+0x74/0x80
Mar  1 01:14:05 debiankvm kernel: [   96.079059]  do_syscall_64+0x86/0x140
Mar  1 01:14:05 debiankvm kernel: [   96.079062]

entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP: 0033:0x7f389962edd7
Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP: 002b:00007f388aba7828

EFLAGS: 00000246 ORIG_RAX: 0000000000000010

Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX: ffffffffffffffda RBX:

0000000000000000 RCX: 00007f389962edd7

Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX: 0000000000000000 RSI:

000000000000ae80 RDI: 000000000000001b

Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP: 00007f388aba7920 R08:

0000558c6bf3a900 R09: 00000000000000ff

Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10: 00007f388aba7840 R11:

0000000000000246 R12: 0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13: 00007ffec978276f R14:

0000000000000000 R15: 00007f389e9b9040

Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c 24 eb 0a 0f 1f

00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2 48 0f c7 1f eb ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00 66 90 66 2e 0f 1f 84 00 00 00 00 00

Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end trace

97cffb6b036eaaeb ]---

#2 lore raw
Quoted 3 lines · cagnulein via Xenomai

I’m testing the 4.14.89 ipipe (i was usually using 4.9.146) and i’ve got a deterministic warning every time i start qemu. Is it already known?

Thanks for reporting. I suppose this wasn't tested in a while.

Just to be sure: You are starting QEMU/KVM *on* a Xenomai kernel, and *not* Xenomai as KVM guest, right?

Could you also give latest https://gitlab.denx.de/Xenomai/ipipe-x86/ a try, if something happened to have changed?

I will try to reproduce ASAP.

Jan

Quoted 130 lines

Thanks

R.

Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING: CPU: 0 PID: 1154

at ./arch/x86/include/asm/fpu/internal.h:617 __kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules linked in:

hid_generic usbhid hid xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc i2c_designware_platform i2c_designware_core nls_ascii nls_cp437 vfat fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf pcspkr i915 prime_numbers lpc_ich drm_kms_helper drm idma64 fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect intel_lpss sysimgblt mfd_core mei shpchp sg evdev video ip_tables x_tables autofs4

Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16 mbcache jbd2

fscrypto btrfs zstd_decompress zstd_compress xxhash raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sd_mod mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci libahci ptp crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata usbcore scsi_mod

Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID: 1154 Comm:

qemu-system-x86 Not tainted 4.14.89 #1

Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe domain: Linux
Mar  1 01:14:05 debiankvm kernel: [   96.078988] task: ffff94aff6f49c80

task.stack: ffffb5be80a58000

Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:

0010:__kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP: 0018:ffffb5be80a5bcf8

EFLAGS: 00010246

Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX: 00000000ffffff00 RBX:

ffff94aff6e88000 RCX: ffff94aff6f49c80

Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX: 00000000ffffffff RSI:

0000000000000246 RDI: ffff94aff6f4a800

Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP: ffffb5be80a5bdd0 R08:

ffffffffc0c1c060 R09: ffff94aff6f8f000

Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10: 0000000000004bc0 R11:

ffff94afe4680008 R12: ffffffffc0ca0f80

Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13: 0000000000000000 R14:

ffff94aff6e88000 R15: ffff94aff83c9bc0

Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:

00007f388aba8700(0000) GS:ffff94affb200000(0000) knlGS:0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010 DS: 0000 ES:

0000 CR0: 0000000080050033

Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2: 000001b737101034 CR3:

0000000178424000 CR4: 00000000003426f0

Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
Mar  1 01:14:05 debiankvm kernel: [   96.079029]

kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079032]

kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?

kvm_arch_vcpu_load+0x4d/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ? vmx_vcpu_load+0x5/0x3e0

[kvm_intel]

Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?

kvm_arch_vcpu_load+0x68/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?

kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079050]

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079053]  do_vfs_ioctl+0xa2/0x620
Mar  1 01:14:05 debiankvm kernel: [   96.079056]  SyS_ioctl+0x74/0x80
Mar  1 01:14:05 debiankvm kernel: [   96.079059]  do_syscall_64+0x86/0x140
Mar  1 01:14:05 debiankvm kernel: [   96.079062]

entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP: 0033:0x7f389962edd7
Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP: 002b:00007f388aba7828

EFLAGS: 00000246 ORIG_RAX: 0000000000000010

Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX: ffffffffffffffda RBX:

0000000000000000 RCX: 00007f389962edd7

Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX: 0000000000000000 RSI:

000000000000ae80 RDI: 000000000000001b

Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP: 00007f388aba7920 R08:

0000558c6bf3a900 R09: 00000000000000ff

Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10: 00007f388aba7840 R11:

0000000000000246 R12: 0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13: 00007ffec978276f R14:

0000000000000000 R15: 00007f389e9b9040

Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c 24 eb 0a 0f 1f

00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2 48 0f c7 1f eb ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00 66 90 66 2e 0f 1f 84 00 00 00 00 00

Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end trace

97cffb6b036eaaeb ]---

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#3 lore raw

Yes qemu on a xenomai kernel (host device). My guest is a windows 10 2019.

I'm already compiling the last git. I will let you know. Thanks

Il ven 1 mar 2019, 11:24 Jan Kiszka <[email protected]> ha scritto:

Quoted 174 lines · cagnulein via Xenomai
Quoted 1 line

I’m testing the 4.14.89 ipipe (i was usually using 4.9.146) and i’ve got

a

Quoted 2 lines

deterministic warning every time i start qemu. Is it already known?

Thanks for reporting. I suppose this wasn't tested in a while.

Just to be sure: You are starting QEMU/KVM *on* a Xenomai kernel, and *not*
Xenomai as KVM guest, right?

Could you also give latest https://gitlab.denx.de/Xenomai/ipipe-x86/ a try, if
something happened to have changed?

I will try to reproduce ASAP.

Jan

Quoted 7 lines

Thanks

R.

Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING: CPU: 0 PID:

1154

Quoted 12 lines

at ./arch/x86/include/asm/fpu/internal.h:617 __kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules linked in:

hid_generic usbhid hid xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc i2c_designware_platform i2c_designware_core nls_ascii nls_cp437 vfat fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf pcspkr i915 prime_numbers lpc_ich drm_kms_helper drm

idma64

Quoted 15 lines

fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect intel_lpss sysimgblt mfd_core mei shpchp sg evdev video ip_tables x_tables autofs4

Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16 mbcache jbd2

fscrypto btrfs zstd_decompress zstd_compress xxhash raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sd_mod mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci libahci ptp crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata usbcore scsi_mod

Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID: 1154 Comm:

qemu-system-x86 Not tainted 4.14.89 #1

Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe domain: Linux
Quoted 7 lines
Mar  1 01:14:05 debiankvm kernel: [   96.078988] task: ffff94aff6f49c80

task.stack: ffffb5be80a58000

Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:

0010:__kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP:

0018:ffffb5be80a5bcf8

Quoted 3 lines

EFLAGS: 00010246

Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX: 00000000ffffff00

RBX:

Quoted 3 lines

ffff94aff6e88000 RCX: ffff94aff6f49c80

Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX: 00000000ffffffff

RSI:

Quoted 3 lines

0000000000000246 RDI: ffff94aff6f4a800

Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP: ffffb5be80a5bdd0

R08:

Quoted 3 lines

ffffffffc0c1c060 R09: ffff94aff6f8f000

Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10: 0000000000004bc0

R11:

Quoted 3 lines

ffff94afe4680008 R12: ffffffffc0ca0f80

Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13: 0000000000000000

R14:

Quoted 9 lines

ffff94aff6e88000 R15: ffff94aff83c9bc0

Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:

00007f388aba8700(0000) GS:ffff94affb200000(0000) knlGS:0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010 DS: 0000 ES:

0000 CR0: 0000000080050033

Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2: 000001b737101034

CR3:

Quoted 7 lines

0000000178424000 CR4: 00000000003426f0

Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
Mar  1 01:14:05 debiankvm kernel: [   96.079029]

kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]

Quoted 7 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079032]

kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?

kvm_arch_vcpu_load+0x4d/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ?

vmx_vcpu_load+0x5/0x3e0

Quoted 11 lines

[kvm_intel]

Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?

kvm_arch_vcpu_load+0x68/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?

kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]

Quoted 8 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079050]

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079053]  do_vfs_ioctl+0xa2/0x620
Mar  1 01:14:05 debiankvm kernel: [   96.079056]  SyS_ioctl+0x74/0x80
Mar  1 01:14:05 debiankvm kernel: [   96.079059]

do_syscall_64+0x86/0x140

Quoted 7 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079062]

entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP: 0033:0x7f389962edd7
Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP:

002b:00007f388aba7828

Quoted 3 lines

EFLAGS: 00000246 ORIG_RAX: 0000000000000010

Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX: ffffffffffffffda

RBX:

Quoted 3 lines

0000000000000000 RCX: 00007f389962edd7

Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX: 0000000000000000

RSI:

Quoted 3 lines

000000000000ae80 RDI: 000000000000001b

Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP: 00007f388aba7920

R08:

Quoted 3 lines

0000558c6bf3a900 R09: 00000000000000ff

Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10: 00007f388aba7840

R11:

Quoted 3 lines

0000000000000246 R12: 0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13: 00007ffec978276f

R14:

Quoted 3 lines

0000000000000000 R15: 00007f389e9b9040

Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c 24 eb 0a 0f

1f

Quoted 1 line

00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2 48 0f c7 1f

eb

Quoted 6 lines

ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00 66 90 66 2e 0f 1f 84 00 00 00 00 00

Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end trace

97cffb6b036eaaeb ]---

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

author
#4 lore raw

Hi, with the last git the warning disappear, thanks.
Now I would like to submit a new issue : with the last git and with the 4.14.89 also, if I run latency-test without the kvm guest on, everything works fine.
If I run latency-test with the kvm guest on the system hangs! The entire system not only the guest.
This doesn't happen with the 4.9.146.
Any hints to debug it?
Thanks in advance

Il ven 1 mar 2019, 11:30 cagnulein <[email protected]> ha scritto:

Quoted 188 lines

Yes qemu on a xenomai kernel (host device). My guest is a windows 10 2019.

I'm already compiling the last git. I will let you know. Thanks

Il ven 1 mar 2019, 11:24 Jan Kiszka <[email protected]> ha scritto:

Quoted 180 lines · cagnulein via Xenomai
Quoted 1 line

I’m testing the 4.14.89 ipipe (i was usually using 4.9.146) and i’ve

got a

Quoted 2 lines

deterministic warning every time i start qemu. Is it already known?

Thanks for reporting. I suppose this wasn't tested in a while.

Just to be sure: You are starting QEMU/KVM *on* a Xenomai kernel, and *not*
Xenomai as KVM guest, right?

Could you also give latest https://gitlab.denx.de/Xenomai/ipipe-x86/ a try, if
something happened to have changed?

I will try to reproduce ASAP.

Jan

Quoted 7 lines

Thanks

R.

Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING: CPU: 0 PID:

1154

Quoted 9 lines

at ./arch/x86/include/asm/fpu/internal.h:617 __kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules linked in:

hid_generic usbhid hid xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul

ghash_clmulni_intel

Quoted 1 line

pcbc i2c_designware_platform i2c_designware_core nls_ascii nls_cp437

vfat

Quoted 2 lines

fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf pcspkr i915 prime_numbers lpc_ich drm_kms_helper drm

idma64

Quoted 4 lines

fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect intel_lpss sysimgblt mfd_core mei shpchp sg evdev video ip_tables x_tables autofs4

Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16 mbcache

jbd2

Quoted 11 lines

fscrypto btrfs zstd_decompress zstd_compress xxhash raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sd_mod mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci libahci ptp crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata usbcore scsi_mod

Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID: 1154 Comm:

qemu-system-x86 Not tainted 4.14.89 #1

Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe domain: Linux
Quoted 7 lines
Mar  1 01:14:05 debiankvm kernel: [   96.078988] task: ffff94aff6f49c80

task.stack: ffffb5be80a58000

Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:

0010:__kernel_fpu_end+0x8b/0xa0

Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP:

0018:ffffb5be80a5bcf8

Quoted 3 lines

EFLAGS: 00010246

Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX: 00000000ffffff00

RBX:

Quoted 3 lines

ffff94aff6e88000 RCX: ffff94aff6f49c80

Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX: 00000000ffffffff

RSI:

Quoted 3 lines

0000000000000246 RDI: ffff94aff6f4a800

Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP: ffffb5be80a5bdd0

R08:

Quoted 3 lines

ffffffffc0c1c060 R09: ffff94aff6f8f000

Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10: 0000000000004bc0

R11:

Quoted 3 lines

ffff94afe4680008 R12: ffffffffc0ca0f80

Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13: 0000000000000000

R14:

Quoted 9 lines

ffff94aff6e88000 R15: ffff94aff83c9bc0

Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:

00007f388aba8700(0000) GS:ffff94affb200000(0000) knlGS:0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010 DS: 0000 ES:

0000 CR0: 0000000080050033

Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2: 000001b737101034

CR3:

Quoted 7 lines

0000000178424000 CR4: 00000000003426f0

Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
Mar  1 01:14:05 debiankvm kernel: [   96.079029]

kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]

Quoted 7 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079032]

kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?

kvm_arch_vcpu_load+0x4d/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ?

vmx_vcpu_load+0x5/0x3e0

Quoted 8 lines

[kvm_intel]

Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?

kvm_arch_vcpu_load+0x68/0x250 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Quoted 7 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?

kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079050]

kvm_vcpu_ioctl+0x315/0x5f0 [kvm]

Mar  1 01:14:05 debiankvm kernel: [   96.079053]

do_vfs_ioctl+0xa2/0x620

Quoted 4 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079056]  SyS_ioctl+0x74/0x80
Mar  1 01:14:05 debiankvm kernel: [   96.079059]

do_syscall_64+0x86/0x140

Quoted 5 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079062]

entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP:

0033:0x7f389962edd7

Quoted 2 lines
Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP:

002b:00007f388aba7828

Quoted 3 lines

EFLAGS: 00000246 ORIG_RAX: 0000000000000010

Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX: ffffffffffffffda

RBX:

Quoted 3 lines

0000000000000000 RCX: 00007f389962edd7

Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX: 0000000000000000

RSI:

Quoted 3 lines

000000000000ae80 RDI: 000000000000001b

Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP: 00007f388aba7920

R08:

Quoted 3 lines

0000558c6bf3a900 R09: 00000000000000ff

Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10: 00007f388aba7840

R11:

Quoted 3 lines

0000000000000246 R12: 0000000000000000

Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13: 00007ffec978276f

R14:

Quoted 3 lines

0000000000000000 R15: 00007f389e9b9040

Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c 24 eb 0a

0f 1f

Quoted 1 line

00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2 48 0f c7 1f

eb

Quoted 1 line

ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00 66 90 66

2e

Quoted 5 lines

0f 1f 84 00 00 00 00 00

Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end trace

97cffb6b036eaaeb ]---

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#5 lore raw
Quoted 5 lines · cagnulein

Hi, with the last git the warning disappear, thanks.
Now I would like to submit a new issue : with the last git and with the 4.14.89 also, if I run latency-test without the kvm guest on, everything works fine. If I run latency-test with the kvm guest on the system hangs! The entire system not only the guest.
This doesn't happen with the 4.9.146.
Any hints to debug it?

Hmm, this will be more complicated in fact. I need to try reproducing that in KVM (nested setup) because that allows insights to be obtained more easily.

Jan

Quoted 185 lines

Thanks in advance

Il ven 1 mar 2019, 11:30 cagnulein <[email protected] <mailto:[email protected]>> ha scritto:

    Yes qemu on a xenomai kernel (host device). My guest is a windows 10 2019.

    I'm already compiling the last git. I will let you know.
    Thanks

    Il ven 1 mar 2019, 11:24 Jan Kiszka <[email protected]
    <mailto:[email protected]>> ha scritto:

        On 01.03.19 10:35, cagnulein via Xenomai wrote:
         > I’m testing the 4.14.89 ipipe (i was usually using 4.9.146) and i’ve
        got a
         > deterministic warning every time i start qemu. Is it already known?
         >

        Thanks for reporting. I suppose this wasn't tested in a while.

        Just to be sure: You are starting QEMU/KVM *on* a Xenomai kernel, and *not*
        Xenomai as KVM guest, right?

        Could you also give latest https://gitlab.denx.de/Xenomai/ipipe-x86/ a
        try, if
        something happened to have changed?

        I will try to reproduce ASAP.

        Jan

         > Thanks
         >
         > R.
         >
         >
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING: CPU: 0 PID:
        1154
         > at ./arch/x86/include/asm/fpu/internal.h:617 __kernel_fpu_end+0x8b/0xa0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules linked in:
         > hid_generic usbhid hid xt_CHECKSUM iptable_mangle ipt_MASQUERADE
         > nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4
         > nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4
         > xt_tcpudp tun ebtable_filter ebtables ip6table_filter ip6_tables
         > iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal coretemp
         > kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel
         > pcbc i2c_designware_platform i2c_designware_core nls_ascii nls_cp437 vfat
         > fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate
         > intel_rapl_perf pcspkr i915 prime_numbers lpc_ich drm_kms_helper drm
        idma64
         > fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect intel_lpss
         > sysimgblt mfd_core mei shpchp sg evdev video ip_tables x_tables autofs4
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16 mbcache jbd2
         > fscrypto btrfs zstd_decompress zstd_compress xxhash raid10 raid456
         > async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq
         > libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod sd_mod
         > mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci libahci ptp
         > crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata usbcore scsi_mod
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID: 1154 Comm:
         > qemu-system-x86 Not tainted 4.14.89 #1
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe domain: Linux
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078988] task: ffff94aff6f49c80
         > task.stack: ffffb5be80a58000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:
         > 0010:__kernel_fpu_end+0x8b/0xa0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP:
        0018:ffffb5be80a5bcf8
         > EFLAGS: 00010246
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX:
        00000000ffffff00 RBX:
         > ffff94aff6e88000 RCX: ffff94aff6f49c80
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX:
        00000000ffffffff RSI:
         > 0000000000000246 RDI: ffff94aff6f4a800
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP:
        ffffb5be80a5bdd0 R08:
         > ffffffffc0c1c060 R09: ffff94aff6f8f000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10:
        0000000000004bc0 R11:
         > ffff94afe4680008 R12: ffffffffc0ca0f80
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13:
        0000000000000000 R14:
         > ffff94aff6e88000 R15: ffff94aff83c9bc0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:
         > 00007f388aba8700(0000) GS:ffff94affb200000(0000) knlGS:0000000000000000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010 DS: 0000 ES:
         > 0000 CR0: 0000000080050033
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2:
        000001b737101034 CR3:
         > 0000000178424000 CR4: 00000000003426f0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079029]
         > kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079032]
         > kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?
         > kvm_arch_vcpu_load+0x4d/0x250 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ?
        vmx_vcpu_load+0x5/0x3e0
         > [kvm_intel]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?
         > kvm_arch_vcpu_load+0x68/0x250 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?
         > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?
         > kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079050]
         > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079053]  do_vfs_ioctl+0xa2/0x620
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079056]  SyS_ioctl+0x74/0x80
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079059] 
        do_syscall_64+0x86/0x140
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079062]
         > entry_SYSCALL_64_after_hwframe+0x3d/0xa2
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP: 0033:0x7f389962edd7
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP:
        002b:00007f388aba7828
         > EFLAGS: 00000246 ORIG_RAX: 0000000000000010
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX:
        ffffffffffffffda RBX:
         > 0000000000000000 RCX: 00007f389962edd7
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX:
        0000000000000000 RSI:
         > 000000000000ae80 RDI: 000000000000001b
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP:
        00007f388aba7920 R08:
         > 0000558c6bf3a900 R09: 00000000000000ff
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10:
        00007f388aba7840 R11:
         > 0000000000000246 R12: 0000000000000000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13:
        00007ffec978276f R14:
         > 0000000000000000 R15: 00007f389e9b9040
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c 24 eb 0a
        0f 1f
         > 00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2 48 0f c7
        1f eb
         > ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00 66 90 66 2e
         > 0f 1f 84 00 00 00 00 00
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end trace
         > 97cffb6b036eaaeb ]---
         >

        -- 
        Siemens AG, Corporate Technology, CT RDA IOT SES-DE
        Corporate Competence Center Embedded Linux
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#6 lore raw

Hi Jan, did you get any chance to look at my issue? Thanks

Il ven 1 mar 2019, 15:58 Jan Kiszka <[email protected]> ha scritto:

Quoted 246 lines · cagnulein
Quoted 2 lines

Hi, with the last git the warning disappear, thanks.
Now I would like to submit a new issue : with the last git and with the

4.14.89

Quoted 1 line

also, if I run latency-test without the kvm guest on, everything works

fine.

Quoted 1 line

If I run latency-test with the kvm guest on the system hangs! The entire

system

Quoted 3 lines

not only the guest.
This doesn't happen with the 4.9.146.
Any hints to debug it?

Hmm, this will be more complicated in fact. I need to try reproducing that in
KVM (nested setup) because that allows insights to be obtained more easily.

Jan

Quoted 6 lines

Thanks in advance

Il ven 1 mar 2019, 11:30 cagnulein <[email protected] <mailto:[email protected]>> ha scritto:

Yes qemu on a xenomai kernel (host device). My guest is a windows 10

2019.

Quoted 9 lines
    I'm already compiling the last git. I will let you know.
    Thanks

    Il ven 1 mar 2019, 11:24 Jan Kiszka <[email protected]
    <mailto:[email protected]>> ha scritto:

        On 01.03.19 10:35, cagnulein via Xenomai wrote:
         > I’m testing the 4.14.89 ipipe (i was usually using 4.9.146)

and i’ve

Quoted 2 lines

got a
> deterministic warning every time i start qemu. Is it already

known?

Quoted 5 lines

>

Thanks for reporting. I suppose this wasn't tested in a while.

Just to be sure: You are starting QEMU/KVM *on* a Xenomai

kernel, and *not*

Quoted 3 lines

Xenomai as KVM guest, right?

Could you also give latest

https://gitlab.denx.de/Xenomai/ipipe-x86/ a

Quoted 7 lines
        try, if
        something happened to have changed?

        I will try to reproduce ASAP.

        Jan
Quoted 7 lines
         > Thanks
         >
         > R.
         >
         >
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING:
CPU: 0 PID:
Quoted 2 lines
        1154
         > at ./arch/x86/include/asm/fpu/internal.h:617

__kernel_fpu_end+0x8b/0xa0

Quoted 2 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules

linked in:

Quoted 1 line

> hid_generic usbhid hid xt_CHECKSUM iptable_mangle

ipt_MASQUERADE

Quoted 1 line

> nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat

nf_conntrack_ipv4

Quoted 1 line

> nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT

nf_reject_ipv4

Quoted 1 line

> xt_tcpudp tun ebtable_filter ebtables ip6table_filter

ip6_tables

Quoted 1 line

> iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal

coretemp

Quoted 1 line

> kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul

ghash_clmulni_intel

Quoted 1 line

> pcbc i2c_designware_platform i2c_designware_core nls_ascii

nls_cp437 vfat

Quoted 1 line

> fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd

intel_cstate

Quoted 1 line

> intel_rapl_perf pcspkr i915 prime_numbers lpc_ich

drm_kms_helper drm

Quoted 2 lines

idma64
> fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect

intel_lpss

Quoted 1 line

> sysimgblt mfd_core mei shpchp sg evdev video ip_tables

x_tables autofs4

Quoted 2 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16

mbcache jbd2

Quoted 1 line

> fscrypto btrfs zstd_decompress zstd_compress xxhash raid10

raid456

Quoted 1 line

> async_raid6_recov async_memcpy async_pq async_xor async_tx

xor raid6_pq

Quoted 1 line

> libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod

sd_mod

Quoted 1 line

> mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci

libahci ptp

Quoted 1 line

> crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata

usbcore scsi_mod

Quoted 2 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID:

1154 Comm:

Quoted 3 lines
         > qemu-system-x86 Not tainted 4.14.89 #1
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe

domain: Linux

Quoted 2 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078988] task:

ffff94aff6f49c80

Quoted 23 lines
         > task.stack: ffffb5be80a58000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:
         > 0010:__kernel_fpu_end+0x8b/0xa0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP:
        0018:ffffb5be80a5bcf8
         > EFLAGS: 00010246
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX:
        00000000ffffff00 RBX:
         > ffff94aff6e88000 RCX: ffff94aff6f49c80
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX:
        00000000ffffffff RSI:
         > 0000000000000246 RDI: ffff94aff6f4a800
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP:
        ffffb5be80a5bdd0 R08:
         > ffffffffc0c1c060 R09: ffff94aff6f8f000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10:
        0000000000004bc0 R11:
Quoted 8 lines
         > ffff94afe4680008 R12: ffffffffc0ca0f80
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13:
        0000000000000000 R14:
         > ffff94aff6e88000 R15: ffff94aff83c9bc0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:
         > 00007f388aba8700(0000) GS:ffff94affb200000(0000)

knlGS:0000000000000000

Quoted 2 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010

DS: 0000 ES:

Quoted 26 lines
         > 0000 CR0: 0000000080050033
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2:
        000001b737101034 CR3:
         > 0000000178424000 CR4: 00000000003426f0
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079029]
         > kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079032]
         > kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?
         > kvm_arch_vcpu_load+0x4d/0x250 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ?
        vmx_vcpu_load+0x5/0x3e0
         > [kvm_intel]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?
         > kvm_arch_vcpu_load+0x68/0x250 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?
         > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
Quoted 8 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?
         > kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079050]
         > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079053]

do_vfs_ioctl+0xa2/0x620

Quoted 2 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079056]

SyS_ioctl+0x74/0x80

Quoted 8 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079059]
        do_syscall_64+0x86/0x140
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079062]
         > entry_SYSCALL_64_after_hwframe+0x3d/0xa2
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP:

0033:0x7f389962edd7

Quoted 18 lines
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP:
        002b:00007f388aba7828
         > EFLAGS: 00000246 ORIG_RAX: 0000000000000010
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX:
        ffffffffffffffda RBX:
         > 0000000000000000 RCX: 00007f389962edd7
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX:
        0000000000000000 RSI:
         > 000000000000ae80 RDI: 000000000000001b
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP:
        00007f388aba7920 R08:
         > 0000558c6bf3a900 R09: 00000000000000ff
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10:
Quoted 8 lines
        00007f388aba7840 R11:
         > 0000000000000246 R12: 0000000000000000
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13:
        00007ffec978276f R14:
         > 0000000000000000 R15: 00007f389e9b9040
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c

24 eb 0a

Quoted 2 lines
        0f 1f
         > 00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2

48 0f c7

Quoted 2 lines
        1f eb
         > ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00

66 90 66 2e

Quoted 3 lines
         > 0f 1f 84 00 00 00 00 00
         >
         > Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end

trace

Quoted 7 lines
         > 97cffb6b036eaaeb ]---
         >

        --
        Siemens AG, Corporate Technology, CT RDA IOT SES-DE
        Corporate Competence Center Embedded Linux

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#7 lore raw
Quoted 1 line · cagnulein

Hi Jan, did you get any chance to look at my issue?

Not yet, sorry. I hope I can do some Xenomai stuff tomorrow, including at least a reproduction of this issue.

Jan

Quoted 246 lines

Thanks

Il ven 1 mar 2019, 15:58 Jan Kiszka <[email protected] <mailto:[email protected]>> ha scritto:

    On 01.03.19 15:21, cagnulein wrote:
     > Hi, with the last git the warning disappear, thanks.
     > Now I would like to submit a new issue : with the last git and with the
    4.14.89
     > also, if I run latency-test without the kvm guest on, everything works fine.
     > If I run latency-test with the kvm guest on the system hangs! The entire
    system
     > not only the guest.
     > This doesn't happen with the 4.9.146.
     > Any hints to debug it?

    Hmm, this will be more complicated in fact. I need to try reproducing that in
    KVM (nested setup) because that allows insights to be obtained more easily.

    Jan

     > Thanks in advance
     >
     > Il ven 1 mar 2019, 11:30 cagnulein <[email protected]
    <mailto:[email protected]>
     > <mailto:[email protected] <mailto:[email protected]>>> ha scritto:
     >
     >     Yes qemu on a xenomai kernel (host device). My guest is a windows 10
    2019.
     >
     >     I'm already compiling the last git. I will let you know.
     >     Thanks
     >
     >     Il ven 1 mar 2019, 11:24 Jan Kiszka <[email protected]
    <mailto:[email protected]>
     >     <mailto:[email protected] <mailto:[email protected]>>> ha
    scritto:
     >
     >         On 01.03.19 10:35, cagnulein via Xenomai wrote:
     >          > I’m testing the 4.14.89 ipipe (i was usually using 4.9.146)
    and i’ve
     >         got a
     >          > deterministic warning every time i start qemu. Is it already
    known?
     >          >
     >
     >         Thanks for reporting. I suppose this wasn't tested in a while.
     >
     >         Just to be sure: You are starting QEMU/KVM *on* a Xenomai kernel,
    and *not*
     >         Xenomai as KVM guest, right?
     >
     >         Could you also give latest
    https://gitlab.denx.de/Xenomai/ipipe-x86/ a
     >         try, if
     >         something happened to have changed?
     >
     >         I will try to reproduce ASAP.
     >
     >         Jan
     >
     >          > Thanks
     >          >
     >          > R.
     >          >
     >          >
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078798] WARNING: CPU:
    0 PID:
     >         1154
     >          > at ./arch/x86/include/asm/fpu/internal.h:617
    __kernel_fpu_end+0x8b/0xa0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078802] Modules
    linked in:
     >          > hid_generic usbhid hid xt_CHECKSUM iptable_mangle ipt_MASQUERADE
     >          > nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat
    nf_conntrack_ipv4
     >          > nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4
     >          > xt_tcpudp tun ebtable_filter ebtables ip6table_filter ip6_tables
     >          > iptable_filter bridge stp llc intel_rapl x86_pkg_temp_thermal
    coretemp
     >          > kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul
    ghash_clmulni_intel
     >          > pcbc i2c_designware_platform i2c_designware_core nls_ascii
    nls_cp437 vfat
     >          > fat aesni_intel aes_x86_64 crypto_simd glue_helper cryptd
    intel_cstate
     >          > intel_rapl_perf pcspkr i915 prime_numbers lpc_ich
    drm_kms_helper drm
     >         idma64
     >          > fb_sys_fops mei_me syscopyarea intel_lpss_pci sysfillrect
    intel_lpss
     >          > sysimgblt mfd_core mei shpchp sg evdev video ip_tables
    x_tables autofs4
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078913]  ext4 crc16
    mbcache jbd2
     >          > fscrypto btrfs zstd_decompress zstd_compress xxhash raid10 raid456
     >          > async_raid6_recov async_memcpy async_pq async_xor async_tx xor
    raid6_pq
     >          > libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod
    sd_mod
     >          > mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci xhci_pci
    libahci ptp
     >          > crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata
    usbcore scsi_mod
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078982] CPU: 0 PID:
    1154 Comm:
     >          > qemu-system-x86 Not tainted 4.14.89 #1
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe
    domain: Linux
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078988] task:
    ffff94aff6f49c80
     >          > task.stack: ffffb5be80a58000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:
     >          > 0010:__kernel_fpu_end+0x8b/0xa0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP:
     >         0018:ffffb5be80a5bcf8
     >          > EFLAGS: 00010246
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX:
     >         00000000ffffff00 RBX:
     >          > ffff94aff6e88000 RCX: ffff94aff6f49c80
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX:
     >         00000000ffffffff RSI:
     >          > 0000000000000246 RDI: ffff94aff6f4a800
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP:
     >         ffffb5be80a5bdd0 R08:
     >          > ffffffffc0c1c060 R09: ffff94aff6f8f000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10:
     >         0000000000004bc0 R11:
     >          > ffff94afe4680008 R12: ffffffffc0ca0f80
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13:
     >         0000000000000000 R14:
     >          > ffff94aff6e88000 R15: ffff94aff83c9bc0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:
     >          > 00007f388aba8700(0000) GS:ffff94affb200000(0000)
    knlGS:0000000000000000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:  0010 DS:
    0000 ES:
     >          > 0000 CR0: 0000000080050033
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2:
     >         000001b737101034 CR3:
     >          > 0000000178424000 CR4: 00000000003426f0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call Trace:
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079029]
     >          > kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079032]
     >          > kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?
     >          > kvm_arch_vcpu_load+0x4d/0x250 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ?
     >         vmx_vcpu_load+0x5/0x3e0
     >          > [kvm_intel]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?
     >          > kvm_arch_vcpu_load+0x68/0x250 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?
     >          > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?
     >          > kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079050]
     >          > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079053] 
    do_vfs_ioctl+0xa2/0x620
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079056] 
    SyS_ioctl+0x74/0x80
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079059]
     >         do_syscall_64+0x86/0x140
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079062]
     >          > entry_SYSCALL_64_after_hwframe+0x3d/0xa2
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP:
    0033:0x7f389962edd7
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP:
     >         002b:00007f388aba7828
     >          > EFLAGS: 00000246 ORIG_RAX: 0000000000000010
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX:
     >         ffffffffffffffda RBX:
     >          > 0000000000000000 RCX: 00007f389962edd7
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX:
     >         0000000000000000 RSI:
     >          > 000000000000ae80 RDI: 000000000000001b
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP:
     >         00007f388aba7920 R08:
     >          > 0000558c6bf3a900 R09: 00000000000000ff
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10:
     >         00007f388aba7840 R11:
     >          > 0000000000000246 R12: 0000000000000000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13:
     >         00007ffec978276f R14:
     >          > 0000000000000000 R15: 00007f389e9b9040
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code: 89 3c
    24 eb 0a
     >         0f 1f
     >          > 00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff 89 c2 48
    0f c7
     >         1f eb
     >          > ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac 37 04 00
    66 90 66 2e
     >          > 0f 1f 84 00 00 00 00 00
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[ end trace
     >          > 97cffb6b036eaaeb ]---
     >          >
     >
     >         --
     >         Siemens AG, Corporate Technology, CT RDA IOT SES-DE
     >         Corporate Competence Center Embedded Linux
     >

    -- 
    Siemens AG, Corporate Technology, CT RDA IOT SES-DE
    Corporate Competence Center Embedded Linux
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#8 lore raw

I've got a similar issue even with the 4.9.146 with a kvm guest on and latency on too. It's quite deterministic. Any idea?

[ 2071.952650] ------------[ cut here ]------------
[ 2071.952657] WARNING: CPU: 0 PID: 0 at

./arch/x86/include/asm/fpu/internal.h:674 __kernel_fpu_end+0x116/0x120

[ 2071.952659] Modules linked in: tun bridge stp llc

i2c_designware_platform i2c_designware_core nls_ascii nls_cp437 vfat fat intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel joydev rt_igb aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd rtnet intel_rapl_perf pcspkr evdev i915 video mei_me idma64 shpchp mei intel_lpss_pci intel_lpss mfd_core netconsole configfs ip_tables x_tables autofs4 ext4 crc16 jbd2 fscrypto mbcache btrfs xor hid_generic usbhid hid raid6_pq qxl bochs_drm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm mmc_block crc32c_intel igb i2c_algo_bit i2c_i801 i2c_smbus dca ptp sdhci_pci pps_core sdhci mmc_core xhci_pci xhci_hcd usbcore

[ 2071.952787] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.146 #10
[ 2071.952788] I-pipe domain: Xenomai
[ 2071.952790]  0000000000000000 ffffffff99142263 0000000000000000

0000000000000000

[ 2071.952797]  ffffffff995bce48 ffffffff98e65a1b 0000000000000046

ffff8f73b9e10a40

[ 2071.952804]  0000000000000086 0000000010000000 0000000000000001

ffffb607007d0840

[ 2071.952811] Call Trace:
[ 2071.952813]  [<ffffffff99142263>] ? dump_stack+0xb5/0xd2
[ 2071.952815]  [<ffffffff98e65a1b>] ? __warn+0xcb/0xf0
[ 2071.952816]  [<ffffffff98e228c6>] ? __kernel_fpu_end+0x116/0x120
[ 2071.952818]  [<ffffffffc092fd68>] ?

__vmx_load_host_state.part.92+0xe8/0x1a0 [kvm_intel]

[ 2071.952820]  [<ffffffffc07c83dd>] ?

kvm_put_guest_fpu.part.175+0x4d/0x100 [kvm]

[ 2071.952821]  [<ffffffffc07ce8a5>] ? kvm_arch_vcpu_put+0x95/0xa0 [kvm]
[ 2071.952823]  [<ffffffffc07ce8da>] ?

__ipipe_handle_vm_preemption+0x2a/0x50 [kvm]

[ 2071.952825]  [<ffffffff98f77219>] ? ___xnsched_run.part.71+0x3d9/0x510
[ 2071.952827]  [<ffffffff98faba66>] ? timerfd_handler+0x36/0x50
[ 2071.952828]  [<ffffffff98f80dc5>] ? xntimerq_insert+0x5/0xa0
[ 2071.952830]  [<ffffffff98f6fe89>] ? xnintr_core_clock_handler+0x389/0x390
[ 2071.952832]  [<ffffffff98f80a45>] ? xntimer_heading_p+0x5/0x60
[ 2071.952833]  [<ffffffff98f1bbf8>] ? dispatch_irq_head+0x88/0x110
[ 2071.952835]  [<ffffffff98e39e24>] ? __ipipe_handle_irq+0x64/0x1a0
[ 2071.952837]  [<ffffffff993e99a9>] ? apic_timer_interrupt+0x89/0xb0
[ 2071.952838]  [<ffffffff98e39b99>] ? __ipipe_halt_root+0x29/0x40
[ 2071.952840]  [<ffffffff993e6ed1>] ? default_idle+0x21/0x100
[ 2071.952842]  [<ffffffff993e72cd>] ? default_idle_call+0x2d/0x32
[ 2071.952843]  [<ffffffff98ea9208>] ? cpu_startup_entry+0x108/0x1c0
[ 2071.952845]  [<ffffffff999a8f5f>] ? start_kernel+0x472/0x492
[ 2071.952847] ---[ end trace 68e4b63403285e43 ]---
[ 2071.967775] ------------[ cut here ]------------
[ 2071.967780] WARNING: CPU: 1 PID: 727 at

./arch/x86/include/asm/fpu/internal.h:668 __kernel_fpu_begin+0x12a/0x150

[ 2071.967782] Modules linked in: tun bridge stp llc

i2c_designware_platform i2c_designware_core nls_ascii nls_cp437 vfat fat intel_rapl x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel joydev rt_igb aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd rtnet intel_rapl_perf pcspkr evdev i915 video mei_me idma64 shpchp mei intel_lpss_pci intel_lpss mfd_core netconsole configfs ip_tables x_tables autofs4 ext4 crc16 jbd2 fscrypto mbcache btrfs xor hid_generic usbhid hid raid6_pq qxl bochs_drm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm mmc_block crc32c_intel igb i2c_algo_bit i2c_i801 i2c_smbus dca ptp sdhci_pci pps_core sdhci mmc_core xhci_pci xhci_hcd usbcore

[ 2071.967893] CPU: 1 PID: 727 Comm: qemu-system-x86 Tainted: G

W 4.9.146 #10

[ 2071.967895] I-pipe domain: Linux
[ 2071.967896]  0000000000000000 ffffffff99142263 0000000000000000

0000000000000000

[ 2071.967904]  ffffffff995bce48 ffffffff98e65a1b ffff8f73b9e08000

0000000000000046

[ 2071.967910]  0000000000000000 0000000000000000 ffff8f73b9e10000

ffff8f73b673c048

[ 2071.967917] Call Trace:
[ 2071.967919]  [<ffffffff99142263>] ? dump_stack+0xb5/0xd2
[ 2071.967921]  [<ffffffff98e65a1b>] ? __warn+0xcb/0xf0
[ 2071.967923]  [<ffffffff98e2208a>] ? __kernel_fpu_begin+0x12a/0x150
[ 2071.967924]  [<ffffffffc07c9058>] ?

kvm_load_guest_fpu.part.174+0x18/0x100 [kvm]

[ 2071.967926]  [<ffffffffc07d5a56>] ?

kvm_arch_vcpu_ioctl_run+0x1506/0x1a20 [kvm]

[ 2071.967928]  [<ffffffffc07ce5e1>] ? kvm_arch_vcpu_load+0x61/0x290 [kvm]
[ 2071.967929]  [<ffffffffc07b9885>] ? kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
[ 2071.967931]  [<ffffffff98e919d0>] ? wake_up_q+0x70/0x70
[ 2071.967933]  [<ffffffff9902d2d2>] ? do_vfs_ioctl+0xa2/0x620
[ 2071.967934]  [<ffffffff9902d8c4>] ? SyS_ioctl+0x74/0x80
[ 2071.967936]  [<ffffffff98e02c62>] ? do_syscall_64+0x82/0xf0
[ 2071.967938]  [<ffffffff993e7abe>] ?

entry_SYSCALL_64_after_swapgs+0x58/0xc6

[ 2071.967939] ---[ end trace 68e4b63403285e44 ]---

Il lun 11 mar 2019, 20:39 Jan Kiszka <[email protected]> ha scritto:

Quoted 294 lines · cagnulein
Quoted 1 line

Hi Jan, did you get any chance to look at my issue?

Not yet, sorry. I hope I can do some Xenomai stuff tomorrow, including at least
a reproduction of this issue.

Jan

Quoted 8 lines

Thanks

Il ven 1 mar 2019, 15:58 Jan Kiszka <[email protected] <mailto:[email protected]>> ha scritto:

On 01.03.19 15:21, cagnulein wrote:
> Hi, with the last git the warning disappear, thanks. > Now I would like to submit a new issue : with the last git and

with the

Quoted 2 lines

4.14.89
> also, if I run latency-test without the kvm guest on, everything

works fine.

Quoted 1 line

> If I run latency-test with the kvm guest on the system hangs! The

entire

Quoted 6 lines

system
> not only the guest.
> This doesn't happen with the 4.9.146.
> Any hints to debug it?

Hmm, this will be more complicated in fact. I need to try

reproducing that in

Quoted 1 line

KVM (nested setup) because that allows insights to be obtained more

easily.

Quoted 8 lines

Jan

> Thanks in advance
>
> Il ven 1 mar 2019, 11:30 cagnulein <[email protected]
<mailto:[email protected]>
> <mailto:[email protected] <mailto:[email protected]>>> ha

scritto:

Quoted 2 lines

>
> Yes qemu on a xenomai kernel (host device). My guest is a

windows 10

Quoted 8 lines

2019.
>
> I'm already compiling the last git. I will let you know.
> Thanks
>
> Il ven 1 mar 2019, 11:24 Jan Kiszka <[email protected]
<mailto:[email protected]>
> <mailto:[email protected] <mailto:[email protected]>>>

ha

Quoted 4 lines
    scritto:
     >
     >         On 01.03.19 10:35, cagnulein via Xenomai wrote:
     >          > I’m testing the 4.14.89 ipipe (i was usually using

4.9.146)

Quoted 3 lines

and i’ve
> got a
> > deterministic warning every time i start qemu. Is it

already

Quoted 4 lines

known?
> >
>
> Thanks for reporting. I suppose this wasn't tested in a

while.

Quoted 2 lines

>
> Just to be sure: You are starting QEMU/KVM *on* a Xenomai

kernel,

Quoted 11 lines

and *not*
> Xenomai as KVM guest, right?
>
> Could you also give latest
https://gitlab.denx.de/Xenomai/ipipe-x86/ a
> try, if
> something happened to have changed?
>
> I will try to reproduce ASAP.
>
> Jan

Quoted 8 lines

>
> > Thanks
> >
> > R.
> >
> >
> >
> > Mar 1 01:14:05 debiankvm kernel: [ 96.078798]

WARNING: CPU:

Quoted 6 lines
    0 PID:
     >         1154
     >          > at ./arch/x86/include/asm/fpu/internal.h:617
    __kernel_fpu_end+0x8b/0xa0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078802]

Modules

Quoted 2 lines

linked in:
> > hid_generic usbhid hid xt_CHECKSUM iptable_mangle

ipt_MASQUERADE

Quoted 3 lines

> > nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat
nf_conntrack_ipv4
> > nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT

nf_reject_ipv4

Quoted 1 line

> > xt_tcpudp tun ebtable_filter ebtables ip6table_filter

ip6_tables

Quoted 1 line

> > iptable_filter bridge stp llc intel_rapl

x86_pkg_temp_thermal

Quoted 4 lines

coretemp
> > kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul
ghash_clmulni_intel
> > pcbc i2c_designware_platform i2c_designware_core

nls_ascii

Quoted 2 lines

nls_cp437 vfat
> > fat aesni_intel aes_x86_64 crypto_simd glue_helper

cryptd

Quoted 5 lines

intel_cstate
> > intel_rapl_perf pcspkr i915 prime_numbers lpc_ich
drm_kms_helper drm
> idma64
> > fb_sys_fops mei_me syscopyarea intel_lpss_pci

sysfillrect

Quoted 5 lines

intel_lpss
> > sysimgblt mfd_core mei shpchp sg evdev video ip_tables
x_tables autofs4
> >
> > Mar 1 01:14:05 debiankvm kernel: [ 96.078913] ext4

crc16

Quoted 2 lines

mbcache jbd2
> > fscrypto btrfs zstd_decompress zstd_compress xxhash

raid10 raid456

Quoted 1 line

> > async_raid6_recov async_memcpy async_pq async_xor

async_tx xor

Quoted 2 lines

raid6_pq
> > libcrc32c crc32c_generic raid1 raid0 multipath linear

md_mod

Quoted 2 lines

sd_mod
> > mmc_block igb i2c_algo_bit dca ahci sdhci_pci sdhci

xhci_pci

Quoted 5 lines

libahci ptp
> > crc32c_intel i2c_i801 xhci_hcd mmc_core pps_core libata
usbcore scsi_mod
> >
> > Mar 1 01:14:05 debiankvm kernel: [ 96.078982] CPU:

0 PID:

Quoted 34 lines
    1154 Comm:
     >          > qemu-system-x86 Not tainted 4.14.89 #1
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078985] I-pipe
    domain: Linux
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078988] task:
    ffff94aff6f49c80
     >          > task.stack: ffffb5be80a58000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078991] RIP:
     >          > 0010:__kernel_fpu_end+0x8b/0xa0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078994] RSP:
     >         0018:ffffb5be80a5bcf8
     >          > EFLAGS: 00010246
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.078999] RAX:
     >         00000000ffffff00 RBX:
     >          > ffff94aff6e88000 RCX: ffff94aff6f49c80
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079002] RDX:
     >         00000000ffffffff RSI:
     >          > 0000000000000246 RDI: ffff94aff6f4a800
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079005] RBP:
     >         ffffb5be80a5bdd0 R08:
     >          > ffffffffc0c1c060 R09: ffff94aff6f8f000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079010] R10:
     >         0000000000004bc0 R11:
     >          > ffff94afe4680008 R12: ffffffffc0ca0f80
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079013] R13:
Quoted 8 lines
     >         0000000000000000 R14:
     >          > ffff94aff6e88000 R15: ffff94aff83c9bc0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079017] FS:
     >          > 00007f388aba8700(0000) GS:ffff94affb200000(0000)
    knlGS:0000000000000000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079020] CS:

0010 DS:

Quoted 8 lines
    0000 ES:
     >          > 0000 CR0: 0000000080050033
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079023] CR2:
     >         000001b737101034 CR3:
     >          > 0000000178424000 CR4: 00000000003426f0
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079026] Call

Trace:

Quoted 58 lines
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079029]
     >          > kvm_put_guest_fpu.part.165+0x43/0xc0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079032]
     >          > kvm_arch_vcpu_ioctl_run+0x6bd/0x18a0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079035]  ?
     >          > kvm_arch_vcpu_load+0x4d/0x250 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079038]  ?
     >         vmx_vcpu_load+0x5/0x3e0
     >          > [kvm_intel]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079041]  ?
     >          > kvm_arch_vcpu_load+0x68/0x250 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079044]  ?
     >          > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079047]  ?
     >          > kvm_arch_vcpu_ioctl_run+0x5/0x18a0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079050]
     >          > kvm_vcpu_ioctl+0x315/0x5f0 [kvm]
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079053]
    do_vfs_ioctl+0xa2/0x620
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079056]
    SyS_ioctl+0x74/0x80
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079059]
     >         do_syscall_64+0x86/0x140
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079062]
     >          > entry_SYSCALL_64_after_hwframe+0x3d/0xa2
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079065] RIP:
    0033:0x7f389962edd7
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079068] RSP:
     >         002b:00007f388aba7828
     >          > EFLAGS: 00000246 ORIG_RAX: 0000000000000010
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079073] RAX:
     >         ffffffffffffffda RBX:
     >          > 0000000000000000 RCX: 00007f389962edd7
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079076] RDX:
     >         0000000000000000 RSI:
     >          > 000000000000ae80 RDI: 000000000000001b
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079079] RBP:
     >         00007f388aba7920 R08:
     >          > 0000558c6bf3a900 R09: 00000000000000ff
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079082] R10:
Quoted 8 lines
     >         00007f388aba7840 R11:
     >          > 0000000000000246 R12: 0000000000000000
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079085] R13:
     >         00007ffec978276f R14:
     >          > 0000000000000000 R15: 00007f389e9b9040
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079088] Code:

89 3c

Quoted 3 lines
    24 eb 0a
     >         0f 1f
     >          > 00 db e2 0f 77 db 04 24 0f 1f 44 00 00 b8 ff ff ff ff

89 c2 48

Quoted 3 lines
    0f c7
     >         1f eb
     >          > ad 48 0f ae 89 80 0b 00 00 eb a3 <0f> 0b eb aa e8 ac

37 04 00

Quoted 4 lines
    66 90 66 2e
     >          > 0f 1f 84 00 00 00 00 00
     >          >
     >          > Mar  1 01:14:05 debiankvm kernel: [   96.079184] ---[

end trace

Quoted 8 lines

> > 97cffb6b036eaaeb ]---
> >
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>

Quoted 4 lines

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#9 lore raw
Quoted 2 lines · cagnulein

I've got a similar issue even with the 4.9.146 with a kvm guest on and latency on too. It's quite deterministic. Any idea?

I didn't trigger your trace yet, but I can know study this splash:

[  140.794470] I-pipe: Detected illicit call from head domain 'Xenomai'
[  140.794470]         into a regular Linux service
[  140.797855] CPU: 0 PID: 1021 Comm: qemu-system-x86 Not tainted 4.14.103+ #43
[  140.799644] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
[  140.799648] I-pipe domain: Xenomai
[  140.799650] Call Trace:
[  140.799654]  <IRQ>
[  140.799670]  ipipe_root_only+0xfe/0x130
[  140.799678]  ipipe_stall_root+0xe/0x60
[  140.799685]  lock_acquire+0x62/0x1a0
[  140.799692]  ? __switch_to_asm+0x40/0x70
[  140.799703]  kvm_arch_vcpu_put+0xb0/0x1a0
[  140.799707]  ? kvm_arch_vcpu_put+0x6e/0x1a0
[  140.799717]  __ipipe_handle_vm_preemption+0x2a/0x50
[  140.799723]  ___xnsched_run.part.76+0x371/0x590
[  140.799733]  xnintr_core_clock_handler+0x3f5/0x420
[  140.799745]  dispatch_irq_head+0x9a/0x150
[  140.799757]  __ipipe_handle_irq+0x7e/0x210
[  140.799768]  apic_timer_interrupt+0x7f/0xb0

[...]

Will let you know when I have details.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#10 lore raw
Quoted 29 lines · Jan Kiszka
Quoted 3 lines · cagnulein

I've got a similar issue even with the 4.9.146 with a kvm guest on and latency on too. It's quite deterministic. Any idea?

I didn't trigger your trace yet, but I can know study this splash:

[  140.794470] I-pipe: Detected illicit call from head domain 'Xenomai' [  140.794470]         into a regular Linux service
[  140.797855] CPU: 0 PID: 1021 Comm: qemu-system-x86 Not tainted 4.14.103+ #43 [  140.799644] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
[  140.799648] I-pipe domain: Xenomai
[  140.799650] Call Trace:
[  140.799654]  <IRQ>
[  140.799670]  ipipe_root_only+0xfe/0x130
[  140.799678]  ipipe_stall_root+0xe/0x60
[  140.799685]  lock_acquire+0x62/0x1a0
[  140.799692]  ? __switch_to_asm+0x40/0x70
[  140.799703]  kvm_arch_vcpu_put+0xb0/0x1a0
[  140.799707]  ? kvm_arch_vcpu_put+0x6e/0x1a0
[  140.799717]  __ipipe_handle_vm_preemption+0x2a/0x50
[  140.799723]  ___xnsched_run.part.76+0x371/0x590
[  140.799733]  xnintr_core_clock_handler+0x3f5/0x420
[  140.799745]  dispatch_irq_head+0x9a/0x150
[  140.799757]  __ipipe_handle_irq+0x7e/0x210
[  140.799768]  apic_timer_interrupt+0x7f/0xb0
[...]

Quoted 4 lines

Will let you know when I have details.

Jan

I've got 4.14 working again with kvm using these changes:

arch/x86/kvm/x86.c +15 -0
index 31469b638286..f49247be061b 100644
@@ -3023,6 +3023,15 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 		vcpu->arch.preempted_in_kernel = !kvm_x86_ops->get_cpl(vcpu);
 
 	flags = hard_cond_local_irq_save();
+
+	/*
+	 * Do not update steal time accounting while running over the head
+	 * domain as this may introduce high latencies and will also issue
+	 * context violation reports.
+	 */
+	if (!ipipe_root_p)
+		goto skip_steal_time_update;
+
 	/*
 	 * Disable page faults because we're in atomic context here.
 	 * kvm_write_guest_offset_cached() would call might_fault()
@@ -3040,6 +3049,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 	kvm_steal_time_set_preempted(vcpu);
 	srcu_read_unlock(&vcpu->kvm->srcu, idx);
 	pagefault_enable();
+skip_steal_time_update:
 	kvm_x86_ops->vcpu_put(vcpu);
 	vcpu->arch.last_host_tsc = rdtsc();
 	/*
@@ -3064,7 +3074,9 @@ void __ipipe_handle_vm_preemption(struct ipipe_vm_notifier *nfy)
 	struct kvm_vcpu *vcpu;
 
 	vcpu = container_of(nfy, struct kvm_vcpu, ipipe_notifier);
+	preempt_disable();
 	kvm_arch_vcpu_put(vcpu);
+	preempt_enable_no_resched();
 	kvm_restore_shared_msrs(smsr);
 	__ipipe_exit_vm();
 }
@@ -7169,6 +7181,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 	    || need_resched() || signal_pending(current)) {
 		vcpu->mode = OUTSIDE_GUEST_MODE;
 		smp_wmb();
+		__ipipe_exit_vm();
+		hard_cond_local_irq_enable();
 		local_irq_enable();
 		preempt_enable();
 		vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
@@ -7237,6 +7251,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 
 	guest_exit_irqoff();
 
+	hard_cond_local_irq_enable();
 	local_irq_enable();
 	preempt_enable();
 

Could you give that a try as well? Besides stability reports, I would specifically be interested in latency numbers, if they are excessive.

I've also fixed kvm on 4.4 which had less issues but also didn't work out of the box. That branch will be updated later. Moreover, I need to check SVM again, at least offline.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#11 lore raw

Hi Jan, thanks for your patch.
I've just tried but I have the same issue: I start a kvm guest (windows 10 iot 2019) and it works, but when I start a latency test the whole system hangs completely.

Could i give you more info in some way?
R.

Il gio 4 apr 2019, 21:05 Jan Kiszka <[email protected]> ha scritto:

Quoted 110 lines · Jan Kiszka
Quoted 2 lines · cagnulein
Quoted 1 line

I've got a similar issue even with the 4.9.146 with a kvm guest on and

latency

Quoted 8 lines
Quoted 2 lines

on too. It's quite deterministic. Any idea?

I didn't trigger your trace yet, but I can know study this splash:

[  140.794470] I-pipe: Detected illicit call from head domain 'Xenomai'
[  140.794470]         into a regular Linux service
[  140.797855] CPU: 0 PID: 1021 Comm: qemu-system-x86 Not tainted

4.14.103+ #43

Quoted 17 lines
[  140.799644] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
[  140.799648] I-pipe domain: Xenomai
[  140.799650] Call Trace:
[  140.799654]  <IRQ>
[  140.799670]  ipipe_root_only+0xfe/0x130
[  140.799678]  ipipe_stall_root+0xe/0x60
[  140.799685]  lock_acquire+0x62/0x1a0
[  140.799692]  ? __switch_to_asm+0x40/0x70
[  140.799703]  kvm_arch_vcpu_put+0xb0/0x1a0
[  140.799707]  ? kvm_arch_vcpu_put+0x6e/0x1a0
[  140.799717]  __ipipe_handle_vm_preemption+0x2a/0x50
[  140.799723]  ___xnsched_run.part.76+0x371/0x590
[  140.799733]  xnintr_core_clock_handler+0x3f5/0x420
[  140.799745]  dispatch_irq_head+0x9a/0x150
[  140.799757]  __ipipe_handle_irq+0x7e/0x210
[  140.799768]  apic_timer_interrupt+0x7f/0xb0
Quoted 6 lines

[...]

Will let you know when I have details.

Jan

I've got 4.14 working again with kvm using these changes:

arch/x86/kvm/x86.c +9 -0
index 31469b638286..f49247be061b 100644
@@ -3023,6 +3023,15 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
                vcpu->arch.preempted_in_kernel =
 !kvm_x86_ops->get_cpl(vcpu);
 
        flags = hard_cond_local_irq_save();
+
+       /*
+        * Do not update steal time accounting while running over the head
+        * domain as this may introduce high latencies and will also issue
+        * context violation reports.
+        */
+       if (!ipipe_root_p)
+               goto skip_steal_time_update;
+
        /*
         * Disable page faults because we're in atomic context here.

* kvm_write_guest_offset_cached() would call might_fault()

arch/x86/kvm/x86.c +3 -0
@@ -3040,6 +3049,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
        kvm_steal_time_set_preempted(vcpu);
        srcu_read_unlock(&vcpu->kvm->srcu, idx);
        pagefault_enable();
+skip_steal_time_update:
        kvm_x86_ops->vcpu_put(vcpu);
        vcpu->arch.last_host_tsc = rdtsc();
        /*
@@ -3064,7 +3074,9 @@ void __ipipe_handle_vm_preemption(struct
 ipipe_vm_notifier *nfy)
        struct kvm_vcpu *vcpu;
 
        vcpu = container_of(nfy, struct kvm_vcpu, ipipe_notifier);
+       preempt_disable();
        kvm_arch_vcpu_put(vcpu);
+       preempt_enable_no_resched();
        kvm_restore_shared_msrs(smsr);
        __ipipe_exit_vm();

}

arch/x86/kvm/x86.c +3 -0
@@ -7169,6 +7181,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
            || need_resched() || signal_pending(current)) {
                vcpu->mode = OUTSIDE_GUEST_MODE;
                smp_wmb();
+               __ipipe_exit_vm();
+               hard_cond_local_irq_enable();
                local_irq_enable();
                preempt_enable();
                vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
@@ -7237,6 +7251,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 
        guest_exit_irqoff();
 
+       hard_cond_local_irq_enable();
        local_irq_enable();
        preempt_enable();
 

Could you give that a try as well? Besides stability reports, I would specifically be interested in latency numbers, if they are excessive.

I've also fixed kvm on 4.4 which had less issues but also didn't work out of the box. That branch will be updated later. Moreover, I need to check SVM again, at least offline.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#12 lore raw
Quoted 6 lines · cagnulein

Hi Jan, thanks for your patch.
I've just tried but I have the same issue: I start a kvm guest (windows 10 iot 2019) and it works, but when I start a latency test the whole system hangs completely.

Could i give you more info in some way?

OK... First question: Are you sure the patch was applied to the kernel you tested? Just to double-check a common mistake.

Then, there are no debug messages on the uart at all when the system locks up? What is your kernel config?

Next, please try with ipipe-4.4.y and this change:

arch/x86/kvm/vmx.c +4 -0
index 2d480a64e172..0a1929dca183 100644
@@ -8453,6 +8453,10 @@ static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
 		unsigned long tmp;
 #endif
 
+#ifdef CONFIG_IPIPE
+		__clear_bit(IPIPE_STALL_FLAG,
+			    &ipipe_this_cpu_root_context()->status);
+#endif
 		vector =  exit_intr_info & INTR_INFO_VECTOR_MASK;
 		desc = (gate_desc *)vmx->host_idt_base + vector;
 		entry = gate_offset(*desc);
arch/x86/kvm/x86.c +1 -0
index f895d4e0eb3e..e6863bd226e6 100644
@@ -6639,6 +6639,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 	    || need_resched() || signal_pending(current)) {
 		vcpu->mode = OUTSIDE_GUEST_MODE;
 		smp_wmb();
+		__ipipe_exit_vm();
 		hard_cond_local_irq_enable();
 		local_irq_enable();
 		preempt_enable();

Just make sure to have CONFIG_DEBUG_STACKOVERFLOW disabled (I just discovered a compilation issue on that kernel version).

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#13 lore raw

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch log in this scenario?

Why should I test the 4.4.y? 4.9.146 works fine on the same system (with the same guest). Did I miss something?

R.

Il ven 5 apr 2019, 10:14 Jan Kiszka <[email protected]> ha scritto:

Quoted 47 lines · cagnulein
Quoted 2 lines

Hi Jan, thanks for your patch.
I've just tried but I have the same issue: I start a kvm guest (windows

10 iot

Quoted 1 line

2019) and it works, but when I start a latency test the whole system

hangs

Quoted 3 lines

completely.

Could i give you more info in some way?

OK... First question: Are you sure the patch was applied to the kernel you tested? Just to double-check a common mistake.

Then, there are no debug messages on the uart at all when the system locks up? What is your kernel config?

Next, please try with ipipe-4.4.y and this change:

arch/x86/kvm/vmx.c +4 -0
index 2d480a64e172..0a1929dca183 100644
@@ -8453,6 +8453,10 @@ static void vmx_handle_external_intr(struct
 kvm_vcpu *vcpu)
                unsigned long tmp;
 #endif
 
+#ifdef CONFIG_IPIPE
+               __clear_bit(IPIPE_STALL_FLAG,
+                           &ipipe_this_cpu_root_context()->status);
+#endif
                vector =  exit_intr_info & INTR_INFO_VECTOR_MASK;
                desc = (gate_desc *)vmx->host_idt_base + vector;
                entry = gate_offset(*desc);
arch/x86/kvm/x86.c +1 -0
index f895d4e0eb3e..e6863bd226e6 100644
@@ -6639,6 +6639,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
            || need_resched() || signal_pending(current)) {
                vcpu->mode = OUTSIDE_GUEST_MODE;
                smp_wmb();
+               __ipipe_exit_vm();
                hard_cond_local_irq_enable();
                local_irq_enable();
                preempt_enable();
Quoted 9 lines

Just make sure to have CONFIG_DEBUG_STACKOVERFLOW disabled (I just discovered a compilation issue on that kernel version).

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.4.14.89
Type: application/octet-stream
Size: 173380 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20190405/228690c4/attachment.obj>

#14 lore raw
Quoted 6 lines · cagnulein

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch log in this scenario?

UART is mandatory for debugging such crashes. Use a PCI extension card if your board has no UART connector anymore.

Well, you may try to lift Xenomai with KVM inside a KVM VM and catch the UART output of the first level VM. This is how I'm debugging.

Quoted 2 lines

Why should I test the 4.4.y? 4.9.146 works fine on the same system (with the same guest). Did I miss something?

Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is supported, 4.9 is discontinued by now. In any case, this indicates we have another difference caused by changed in 4.14 (and before).

I'll see if I can reproduce by booting Win10 in my nested setup.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#15 lore raw

I'll give it a shot, I will let you know on Monday. Thanks and good weekend
R.

Il ven 5 apr 2019, 11:42 Jan Kiszka <[email protected]> ha scritto:

Quoted 37 lines · cagnulein
Quoted 6 lines

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch log

in this

Quoted 1 line

scenario?

UART is mandatory for debugging such crashes. Use a PCI extension card if your
board has no UART connector anymore.

Well, you may try to lift Xenomai with KVM inside a KVM VM and catch the UART
output of the first level VM. This is how I'm debugging.

Quoted 2 lines

Why should I test the 4.4.y? 4.9.146 works fine on the same system (with

the

Quoted 1 line

same guest). Did I miss something?

Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is supported, 4.9 is
discontinued by now. In any case, this indicates we have another difference
caused by changed in 4.14 (and before).

I'll see if I can reproduce by booting Win10 in my nested setup.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#16 lore raw
In reply to Jan Kiszka
Quoted 16 lines · Jan Kiszka
Quoted 7 lines · cagnulein

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch log in this scenario?

UART is mandatory for debugging such crashes. Use a PCI extension card if your board has no UART connector anymore.

Well, you may try to lift Xenomai with KVM inside a KVM VM and catch the UART output of the first level VM. This is how I'm debugging.

Quoted 1 line
Quoted 9 lines
Quoted 2 lines

Why should I test the 4.4.y? 4.9.146 works fine on the same system (with the same guest). Did I miss something?

Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is supported, 4.9 is discontinued by now. In any case, this indicates we have another difference caused by changed in 4.14 (and before).

I'll see if I can reproduce by booting Win10 in my nested setup.

Already running the UEFI BIOS triggers something, at least on 4.4. Let's see...

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#17 lore raw
Quoted 20 lines · Jan Kiszka
Quoted 19 lines · Jan Kiszka
Quoted 7 lines · cagnulein

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch log in this scenario?

UART is mandatory for debugging such crashes. Use a PCI extension card if your board has no UART connector anymore.

Well, you may try to lift Xenomai with KVM inside a KVM VM and catch the UART output of the first level VM. This is how I'm debugging.

Quoted 3 lines

Why should I test the 4.4.y? 4.9.146 works fine on the same system (with the same guest). Did I miss something?

Quoted 9 lines
Quoted 6 lines

Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is supported, 4.9 is discontinued by now. In any case, this indicates we have another difference caused by changed in 4.14 (and before).

I'll see if I can reproduce by booting Win10 in my nested setup.

Already running the UEFI BIOS triggers something, at least on 4.4. Let's see...

As you will be able to see from the commits, there were a number of further issues:

https://gitlab.denx.de/Xenomai/ipipe-x86/commits/wip/kvm-4.14

With that, I'm able to start Win10 on the same core as the latency test. But only in my virtual setup (nested kvm) which may mean that real hw could expose further issue or latency problems. Please test.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#18 lore raw

Thank you, on Monday morning I will fire it up! :) R.

Il ven 5 apr 2019, 20:29 Jan Kiszka <[email protected]> ha scritto:

Quoted 55 lines · Jan Kiszka
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · cagnulein
Quoted 6 lines

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch

log in

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

this scenario?

UART is mandatory for debugging such crashes. Use a PCI extension card

if your

Quoted 3 lines
Quoted 3 lines

board has no UART connector anymore.

Well, you may try to lift Xenomai with KVM inside a KVM VM and catch

the UART

Quoted 4 lines
Quoted 4 lines

output of the first level VM. This is how I'm debugging.

Quoted 2 lines

Why should I test the 4.4.y? 4.9.146 works fine on the same system

(with the

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

same guest). Did I miss something?

Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is supported,

4.9 is

Quoted 1 line
Quoted 1 line

discontinued by now. In any case, this indicates we have another

difference

Quoted 6 lines
Quoted 4 lines

caused by changed in 4.14 (and before).

I'll see if I can reproduce by booting Win10 in my nested setup.

Already running the UEFI BIOS triggers something, at least on 4.4. Let's

see...

Quoted 1 line

As you will be able to see from the commits, there were a number of further issues:

https://gitlab.denx.de/Xenomai/ipipe-x86/commits/wip/kvm-4.14

With that, I'm able to start Win10 on the same core as the latency test. But
only in my virtual setup (nested kvm) which may mean that real hw could expose
further issue or latency problems. Please test.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

author
#19 lore raw

Wow! It works flawless! Latency is just a little higher than 4.9.146 (72 VS
67) but it's acceptable for me.
Now I started a 3 days test. I will let you know.
Thanks!
Roberto

Il ven 5 apr 2019, 20:31 cagnulein <[email protected]> ha scritto:

Quoted 61 lines

Thank you, on Monday morning I will fire it up! :) R.

Il ven 5 apr 2019, 20:29 Jan Kiszka <[email protected]> ha scritto:

Quoted 55 lines · Jan Kiszka
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · cagnulein
Quoted 6 lines

Hi, yes I double checked the patch and it's applied correctly. Here you can find my config.

CONFIG_DEBUG_STACKOVERFLOW is disabled.

I can't get the uart on this system, is there any other way to catch

log in

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

this scenario?

UART is mandatory for debugging such crashes. Use a PCI extension card

if your

Quoted 3 lines
Quoted 3 lines

board has no UART connector anymore.

Well, you may try to lift Xenomai with KVM inside a KVM VM and catch

the UART

Quoted 4 lines
Quoted 4 lines

output of the first level VM. This is how I'm debugging.

Quoted 2 lines

Why should I test the 4.4.y? 4.9.146 works fine on the same system

(with the

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

same guest). Did I miss something?

Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is

supported, 4.9 is

Quoted 1 line
Quoted 1 line

discontinued by now. In any case, this indicates we have another

difference

Quoted 6 lines
Quoted 4 lines

caused by changed in 4.14 (and before).

I'll see if I can reproduce by booting Win10 in my nested setup.

Already running the UEFI BIOS triggers something, at least on 4.4.

Let's see...

Quoted 1 line

As you will be able to see from the commits, there were a number of further issues:

https://gitlab.denx.de/Xenomai/ipipe-x86/commits/wip/kvm-4.14

With that, I'm able to start Win10 on the same core as the latency test. But
only in my virtual setup (nested kvm) which may mean that real hw could expose
further issue or latency problems. Please test.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#20 lore raw
Quoted 2 lines · cagnulein

Wow! It works flawless! Latency is just a little higher than 4.9.146 (72 VS 67) but it's acceptable for me. Now I started a 3 days test. I will let you know.

That's good news!

Let's see if the latency difference is still relevant after measuring longer...

Jan

Quoted 66 lines

Thanks!
Roberto

Il ven 5 apr 2019, 20:31 cagnulein <[email protected] <mailto:[email protected]>> ha scritto:

Thank you, on Monday morning I will fire it up! :) R.

Il ven 5 apr 2019, 20:29 Jan Kiszka <[email protected] <mailto:[email protected]>> ha scritto:

On 05.04.19 15:27, Jan Kiszka wrote:
> On 05.04.19 11:42, Jan Kiszka wrote:
>> On 05.04.19 10:44, cagnulein wrote:
>>> Hi, yes I double checked the patch and it's applied correctly. >>> Here you can find my config.
>>>
>>> CONFIG_DEBUG_STACKOVERFLOW is disabled.
>>>
>>> I can't get the uart on this system, is there any other way to
catch log in
>>> this scenario?
>>
>> UART is mandatory for debugging such crashes. Use a PCI extension
card if your
>> board has no UART connector anymore.
>>
>> Well, you may try to lift Xenomai with KVM inside a KVM VM and catch
the UART
>> output of the first level VM. This is how I'm debugging. >>
>>>
>>> Why should I test the 4.4.y? 4.9.146 works fine on the same system
(with the
>>> same guest). Did I miss something?
>>
>> Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is
supported, 4.9 is
>> discontinued by now. In any case, this indicates we have another
difference
>> caused by changed in 4.14 (and before).
>>
>> I'll see if I can reproduce by booting Win10 in my nested setup. >>
>
> Already running the UEFI BIOS triggers something, at least on 4.4.
Let's see...
>

As you will be able to see from the commits, there were a number of further issues:

https://gitlab.denx.de/Xenomai/ipipe-x86/commits/wip/kvm-4.14

With that, I'm able to start Win10 on the same core as the latency test. But
only in my virtual setup (nested kvm) which may mean that real hw could expose
further issue or latency problems. Please test.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#21 lore raw

After 3 days of test (latency + windows 10 with cpu-z and stress test) I reached rare peaks of 130 us.
For me it's OK but I think there is a small "regression" against the 4.9 Do you need any other test?
R.

Il lun 8 apr 2019, 12:13 Jan Kiszka <[email protected]> ha scritto:

Quoted 96 lines · cagnulein
Quoted 1 line

Wow! It works flawless! Latency is just a little higher than 4.9.146 (72

VS 67)

Quoted 2 lines

but it's acceptable for me.
Now I started a 3 days test. I will let you know.

That's good news!

Let's see if the latency difference is still relevant after measuring longer...

Jan

Quoted 6 lines

Thanks!
Roberto

Il ven 5 apr 2019, 20:31 cagnulein <[email protected] <mailto:[email protected]>> ha scritto:

Quoted 10 lines
    Thank you, on Monday morning I will fire it up! :)
    R.

    Il ven 5 apr 2019, 20:29 Jan Kiszka <[email protected]
    <mailto:[email protected]>> ha scritto:

        On 05.04.19 15:27, Jan Kiszka wrote:
         > On 05.04.19 11:42, Jan Kiszka wrote:
         >> On 05.04.19 10:44, cagnulein wrote:
         >>> Hi, yes I double checked the patch and it's applied

correctly.

Quoted 5 lines

>>> Here you can find my config.
>>>
>>> CONFIG_DEBUG_STACKOVERFLOW is disabled.
>>>
>>> I can't get the uart on this system, is there any other way

to

Quoted 4 lines

catch log in
>>> this scenario?
>>
>> UART is mandatory for debugging such crashes. Use a PCI

extension

Quoted 4 lines

card if your
>> board has no UART connector anymore.
>>
>> Well, you may try to lift Xenomai with KVM inside a KVM VM

and catch

Quoted 5 lines

the UART
>> output of the first level VM. This is how I'm debugging. >>
>>>
>>> Why should I test the 4.4.y? 4.9.146 works fine on the same

system

Quoted 6 lines

(with the
>>> same guest). Did I miss something?
>>
>> Well, 4.9 would be as broken as 4.4 currently is. But 4.4 is
supported, 4.9 is
>> discontinued by now. In any case, this indicates we have

another

Quoted 4 lines

difference
>> caused by changed in 4.14 (and before).
>>
>> I'll see if I can reproduce by booting Win10 in my nested

setup.

Quoted 3 lines
         >>
         >
         > Already running the UEFI BIOS triggers something, at least on

4.4.

Quoted 4 lines
        Let's see...
         >

        As you will be able to see from the commits, there were a number

of

Quoted 5 lines

further issues:

https://gitlab.denx.de/Xenomai/ipipe-x86/commits/wip/kvm-4.14

With that, I'm able to start Win10 on the same core as the

latency test.

Quoted 2 lines

But
only in my virtual setup (nested kvm) which may mean that real

hw could

Quoted 9 lines

expose
further issue or latency problems. Please test.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

#22 lore raw
Quoted 4 lines · cagnulein via Xenomai

After 3 days of test (latency + windows 10 with cpu-z and stress test) I reached rare peaks of 130 us.
For me it's OK but I think there is a small "regression" against the 4.9 Do you need any other test?

What is the CPU / SoC here? Are we talking about some Atom or rather some Xeon?

If you want us to understand that peak, and if it was just less likely on 4.9, we would need an ipipe trace from that event. The latency test can trigger a freeze. We likely needs around 1000 back_trace_points for that.

BTW, as mixing virtualization workload with RT won't make both faster and may have bad side effects, also on both, isolating them on separate cores should be preferred whenever possible.

Jan

author
#23 lore raw

It's a dual core 8th Gen Intel atom.
In the future I will use a quad core atom and probably I will isolate a core.
I will investigate on ipipe traces. I will let you know, but for me it's OK anyway.

Il mer 10 apr 2019, 21:36 Jan Kiszka <[email protected]> ha scritto:

Quoted 23 lines · cagnulein via Xenomai
Quoted 4 lines

After 3 days of test (latency + windows 10 with cpu-z and stress test) I reached rare peaks of 130 us.
For me it's OK but I think there is a small "regression" against the 4.9 Do you need any other test?

What is the CPU / SoC here? Are we talking about some Atom or rather some Xeon?

If you want us to understand that peak, and if it was just less likely on 4.9,
we would need an ipipe trace from that event. The latency test can trigger a
freeze. We likely needs around 1000 back_trace_points for that.

BTW, as mixing virtualization workload with RT won't make both faster and may
have bad side effects, also on both, isolating them on separate cores should be
preferred whenever possible.

Jan

#24 lore raw
In reply to Jan Kiszka
Quoted 76 lines · Jan Kiszka
Quoted 29 lines · Jan Kiszka
Quoted 3 lines · cagnulein

I've got a similar issue even with the 4.9.146 with a kvm guest on and latency on too. It's quite deterministic. Any idea?

I didn't trigger your trace yet, but I can know study this splash:

[  140.794470] I-pipe: Detected illicit call from head domain 'Xenomai' [  140.794470]         into a regular Linux service
[  140.797855] CPU: 0 PID: 1021 Comm: qemu-system-x86 Not tainted 4.14.103+ #43 [  140.799644] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
[  140.799648] I-pipe domain: Xenomai
[  140.799650] Call Trace:
[  140.799654]  <IRQ>
[  140.799670]  ipipe_root_only+0xfe/0x130
[  140.799678]  ipipe_stall_root+0xe/0x60
[  140.799685]  lock_acquire+0x62/0x1a0
[  140.799692]  ? __switch_to_asm+0x40/0x70
[  140.799703]  kvm_arch_vcpu_put+0xb0/0x1a0
[  140.799707]  ? kvm_arch_vcpu_put+0x6e/0x1a0
[  140.799717]  __ipipe_handle_vm_preemption+0x2a/0x50
[  140.799723]  ___xnsched_run.part.76+0x371/0x590
[  140.799733]  xnintr_core_clock_handler+0x3f5/0x420
[  140.799745]  dispatch_irq_head+0x9a/0x150
[  140.799757]  __ipipe_handle_irq+0x7e/0x210
[  140.799768]  apic_timer_interrupt+0x7f/0xb0
[...]

Quoted 4 lines

Will let you know when I have details.

Jan

I've got 4.14 working again with kvm using these changes:

arch/x86/kvm/x86.c +12 -0
index 31469b638286..f49247be061b 100644
@@ -3023,6 +3023,15 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 		vcpu->arch.preempted_in_kernel = !kvm_x86_ops->get_cpl(vcpu);
 
 	flags = hard_cond_local_irq_save();
+
+	/*
+	 * Do not update steal time accounting while running over the head
+	 * domain as this may introduce high latencies and will also issue
+	 * context violation reports.
+	 */
+	if (!ipipe_root_p)
+		goto skip_steal_time_update;
+
 	/*
 	 * Disable page faults because we're in atomic context here.
 	 * kvm_write_guest_offset_cached() would call might_fault()
@@ -3040,6 +3049,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 	kvm_steal_time_set_preempted(vcpu);
 	srcu_read_unlock(&vcpu->kvm->srcu, idx);
 	pagefault_enable();
+skip_steal_time_update:
 	kvm_x86_ops->vcpu_put(vcpu);
 	vcpu->arch.last_host_tsc = rdtsc();
 	/*
@@ -3064,7 +3074,9 @@ void __ipipe_handle_vm_preemption(struct ipipe_vm_notifier *nfy)
 	struct kvm_vcpu *vcpu;
 
 	vcpu = container_of(nfy, struct kvm_vcpu, ipipe_notifier);
+	preempt_disable();
 	kvm_arch_vcpu_put(vcpu);
+	preempt_enable_no_resched();
 	kvm_restore_shared_msrs(smsr);
 	__ipipe_exit_vm();
 }

arch/x86/kvm/x86.c static int vcpu_enter_guest(struct kvm_vcpu *vcpu) · line 7184

Quoted 4 lines
arch/x86/kvm/x86.c +1 -0
@@ -7169,6 +7181,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 	    || need_resched() || signal_pending(current)) {
 		vcpu->mode = OUTSIDE_GUEST_MODE;
 		smp_wmb();
+		__ipipe_exit_vm();

OK, this line was already wrong and needs to go away. But I'm still testing the rest more thoroughly.

Quoted 13 lines
arch/x86/kvm/x86.c +2 -0
+		hard_cond_local_irq_enable();
 		local_irq_enable();
 		preempt_enable();
 		vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
@@ -7237,6 +7251,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 
 	guest_exit_irqoff();
 
+	hard_cond_local_irq_enable();
 	local_irq_enable();
 	preempt_enable();
 
Quoted 9 lines

Could you give that a try as well? Besides stability reports, I would specifically be interested in latency numbers, if they are excessive.

I've also fixed kvm on 4.4 which had less issues but also didn't work out of the box. That branch will be updated later. Moreover, I need to check SVM again, at least offline.

Jan

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux