Bug 105311 - AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:14.0 address=0x000000fdf9103300 flags=0x0600]
Summary: AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:14.0 address=0x000000f...
Status: NEW
Alias: None
Product: Virtualization
Classification: Unclassified
Component: kvm (show other bugs)
Hardware: x86-64 Linux
: P1 blocking
Assignee: virtualization_kvm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-01 15:53 UTC by G. Richard Bellamy
Modified: 2016-09-24 19:40 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.2.1-1-ARCH x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
/proc/cpuinfo (27.29 KB, text/plain)
2015-10-01 15:53 UTC, G. Richard Bellamy
Details
/proc/iomem (3.39 KB, text/plain)
2015-10-01 15:54 UTC, G. Richard Bellamy
Details
/proc/ioports (1.97 KB, text/plain)
2015-10-01 15:54 UTC, G. Richard Bellamy
Details
lspci -vvv (67.21 KB, text/plain)
2015-10-01 15:55 UTC, G. Richard Bellamy
Details
/proc/modules (8.62 KB, text/plain)
2015-10-01 15:55 UTC, G. Richard Bellamy
Details

Description G. Richard Bellamy 2015-10-01 15:53:35 UTC
Created attachment 189141 [details]
/proc/cpuinfo

What happens: Kernel logs message to journal, kvm VMs no longer work.
What should happen: Kernel boots and kvm VMs start.

------------------------------------------------
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux iommu=pt iommu=1 transparent_hugepage=never"
------------------------------------------------
I would attach my journal, except it is literally full of MB of lines just repeating what is in the summary:

2015-10-01 08:38:40
root@eanna i ~ # journalctl --disk-usage
Archived and active journals take up 3.9G on disk.

ver_linux:
------------------------------------------------
Linux eanna 4.2.1-1-ARCH #1 SMP PREEMPT Tue Sep 22 06:57:07 CEST 2015 x86_64 GNU/Linux
 
Gnu C                  5.2.0
Gnu make               4.1
binutils               2.25.1
util-linux             2.27
mount                  debug
module-init-tools      21
e2fsprogs              1.42.12
jfsutils               1.1.15
reiserfsprogs          3.6.24
xfsprogs               4.2.0
pcmciautils            018
PPP                    2.4.7
Linux C Library        Dynamic linker (ldd)   2.22
Linux C++ Library      6.0.21
Net-tools              2.10-alpha
Kbd                    2.0.3
Sh-utils               8.24
wireless-tools         30
Modules Loaded         nls_utf8 udf crc_itu_t ses enclosure uas usb_storage vhost_net vhost macvtap macvlan 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 bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter fuse arc4 sch_fq_codel rt2800usb rt2x00usb rt2800lib rt2x00lib mac80211 fan thermal nfs fscache uvcvideo videobuf2_vmalloc snd_usb_audio videobuf2_memops videobuf2_core v4l2_common cfg80211 snd_usbmidi_lib videodev input_leds led_class evdev joydev media crc_ccitt mousedev amdkfd mac_hid rfkill kvm_amd amd_iommu_v2 snd_hda_codec_hdmi kvm radeon crct10dif_pclmul crc32_pclmul snd_virtuoso snd_hda_intel ghash_clmulni_intel snd_oxygen_lib cp210x snd_mpu401_uart aesni_intel usbserial snd_hda_codec ttm snd_rawmidi aes_x86_64 lrw drm_kms_helper gf128mul snd_hda_core igb glue_helper ablk_helper cryptd snd_hwdep snd_seq_device snd_pcm snd_timer drm amd64_edac_mod snd ptp soundcore pps_core dca i2c_algo_bit edac_core serio_raw pcspkr psmouse k10temp edac_mce_amd sp5100_tco fam15h_power i2c_piix4 shpchp tpm_tis tpm button acpi_cpufreq processor nfsd auth_rpcgss oid_registry nfs_acl lockd grace sunrpc ipmi_si ipmi_devintf ipmi_msghandler ip_tables x_tables btrfs xor raid6_pq sr_mod cdrom hid_generic usbhid hid sd_mod atkbd libps2 crc32c_intel xhci_pci xhci_hcd ahci ohci_pci libahci ohci_hcd ehci_pci mpt2sas ehci_hcd raid_class libata scsi_transport_sas usbcore usb_common scsi_mod i8042 serio
Comment 1 G. Richard Bellamy 2015-10-01 15:54:26 UTC
Created attachment 189151 [details]
/proc/iomem
Comment 2 G. Richard Bellamy 2015-10-01 15:54:44 UTC
Created attachment 189161 [details]
/proc/ioports
Comment 3 G. Richard Bellamy 2015-10-01 15:55:04 UTC
Created attachment 189171 [details]
lspci -vvv
Comment 4 G. Richard Bellamy 2015-10-01 15:55:20 UTC
Created attachment 189181 [details]
/proc/modules
Comment 5 G. Richard Bellamy 2015-10-03 17:39:58 UTC
Still happening in 4.2.2-1-ARCH
Comment 6 G. Richard Bellamy 2015-10-03 17:42:24 UTC
Did a rough count of the number of messages spamming the journal: 660/sec
Comment 7 G. Richard Bellamy 2015-10-03 17:48:54 UTC
Does not occur in 4.1.9-1-lts from Arch.
Comment 8 Alex Williamson 2015-10-03 22:51:19 UTC
Unless you're trying to do PCI device assignment, KVM doesn't have any dependency or interaction with the IOMMU.  General IOMMU issues would probably be better served reporting them to the IOMMU mailing list: https://lists.linuxfoundation.org/mailman/listinfo/iommu

If you are attempting to do PCI device assignment, please provide details including VM configuration (XML or qemu launch scripts) and dmesg prior to the AMD-Vi spew.
Comment 9 G. Richard Bellamy 2015-10-03 23:39:10 UTC
Forgive my ignorance, but does your guidance also apply when using virtio drivers or numad?
Comment 10 Alex Williamson 2015-10-03 23:55:09 UTC
Neither virtio nor numad do anything with the IOMMU (AMD-Vi) either.
Comment 11 G. Richard Bellamy 2015-10-04 00:20:47 UTC
Thanks @alex.williamson - http://lists.linuxfoundation.org/pipermail/iommu/2015-October/014523.html
Comment 12 Chesn 2015-10-04 07:24:17 UTC

FWIW, setting

iommu=soft

got rid of the journal spam in my case (found here)

full disclosure: i don't care about virtualisation (i only ever messed around with it to check out gnome boxes) and i've disabled kvm and kvm_amd (even blacklisted the modules in a file /etc/modprobe.d/blacklist_kvm.conf), even disabled virtualisation in BIOS while debugging this issue (none of which worked)…

good luck with fixing this, guys!

regards,
M.
Comment 14 Vedran Miletić 2016-09-24 19:40:17 UTC
There was a patch posted at [1] which was merged as

commit cbf3ccd09d683abf1cacd36e3640872ee912d99b
Author: Joerg Roedel <jroedel@suse.de>
Date:   Tue Oct 20 14:59:36 2015 +0200

    iommu/amd: Don't clear DTE flags when modifying it
    
    During device assignment/deassignment the flags in the DTE
    get lost, which might cause spurious faults, for example
    when the device tries to access the system management range.
    Fix this by not clearing the flags with the rest of the DTE.
    
    Reported-by: G. Richard Bellamy <rbellamy@pteradigm.com>
    Tested-by: G. Richard Bellamy <rbellamy@pteradigm.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Joerg Roedel <jroedel@suse.de>


Can anyone mark this resolved?

[1] https://lists.linuxfoundation.org/pipermail/iommu/2015-October/014682.html

Note You need to log in before you can comment on or make changes to this bug.