Thanks Alex, I appreciate your help. On Tue, Feb 7, 2017 at 12:09 PM, Alex Williamson <alex.william...@redhat.com> wrote: > On Tue, 7 Feb 2017 11:46:57 -0500 > Jintack Lim <jint...@cs.columbia.edu> wrote: > >> Adding CC and some more information. > > $ ./scripts/get_maintainer.pl -f ./hw/i386/intel_iommu.c > get_maintainer.pl: No maintainers found, printing recent contributors. > get_maintainer.pl: Do not blindly cc: them on patches! Use common sense.
Oh, I got it. Thanks! > > "Michael S. Tsirkin" <m...@redhat.com> (commit_signer:54/35=100%) > Peter Xu <pet...@redhat.com> (commit_signer:28/35=80%) > Paolo Bonzini <pbonz...@redhat.com> (commit_signer:6/35=17%) > Jason Wang <jasow...@redhat.com> (commit_signer:5/35=14%) > "Radim Krčmář" <rkrc...@redhat.com> (commit_signer:5/35=14%) > qemu-de...@nongnu.org (open list:All patches CC here) > >> On Tue, Feb 7, 2017 at 5:07 AM, Jintack Lim <jint...@cs.columbia.edu> wrote: >> > Hi, >> > >> > I'm getting DMAR errors during VM booting when I enable the iommu >> > emulation for the VM. I was not able to complete booting since the VM >> > gets really slow and just keep printing the error message (sym0: >> > unexpected disconnect) at a speed of one character per second. >> > >> > I have enabled the iommu emulation, but didn't assign any device to the VM. >> > >> > This is the kernel log from the VM >> >> I'm using 4.6.0-rc5+ kernel for the host and the VM. >> >> Here's the full kernel log from the VM. >> https://paste.ubuntu.com/23948597/ >> >> > >> > [ 6.087794] sym0: SCSI BUS has been reset. >> > [ 6.087960] DMAR: DRHD: handling fault status reg 2 >> > [ 6.088001] DMAR: DMAR:[DMA Read] Request device [04:03.0] fault >> > addr fe281000 >> > [ 6.088001] DMAR:[fault reason 06] PTE Read access is not set >> > [ 6.090513] scsi host1: sym-2.2.3 >> > [ 6.090567] sym0: unexpected disconnect >> > [ 8.814929] sym0: unexpected disconnect >> > [ 11.670251] sym0: unexpected disconnect >> > >> > I enabled iommu in the host (intel_iommu=on). I also enabled iommu in >> > the guest AND gave this option to the qemu (-device intel-iommu). I'm >> > using qemu 2.8.0 and libvirt 3.0.0. >> > I used <qemu:commandline> in libvirt xml to enable iommu emulation. >> > Here's the full libvirt xml. >> > http://paste.ubuntu.com/23946803/ >> > >> > I did lspci -vvv and 04:03:0 is scsi device. Unfortunately, I lost >> > that information, and can't boot the VM now. I'll add this information >> > later if necessary. >> >> This is information about 04:03:0 >> I got this from the another identical VM but not with the iommu emulation. >> >> root@guest0:~# lspci -vvs 04:03.0 >> 04:03.0 SCSI storage controller: LSI Logic / Symbios Logic 53c895a >> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- >> Stepping- SERR+ FastB2B- DisINTx- >> Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- >> <TAbort- <MAbort- >SERR- <PERR- INTx- >> Latency: 255, Cache Line Size: 64 bytes >> Interrupt: pin A routed to IRQ 23 >> Region 0: I/O ports at c000 [size=256] >> Region 1: Memory at fe284000 (32-bit, non-prefetchable) [size=1K] >> Region 2: Memory at fe280000 (32-bit, non-prefetchable) [size=8K] >> Kernel driver in use: sym53c8xx >> >> > >> > Any thoughts why this happens and how to fix? > > Try a different disk controller in the VM? Running virtual VT-d can't > automatically fix guest drivers that don't handle devices behind an > IOMMU correctly. I don't know if that's the case, but I imagine 53c895a > has probably never been tested w/ VT-d emulation. Ok, I'll try another disk controller. If someone can suggest other disk controller which is working well with the iommu emulation, then it would be great. I guess I got the controller by using this option in virsh-install (--disk=/temp-space/guest50.img,size=10,bus=scsi), but not 100% sure. > Note that when you > do get to the point off assigning a device to the VM, you're going to > need to build your own QEMU with patches from the mailing list, or > maybe wait a few days and they might make it to the git tree. Thanks, I'm afraid I understand this. I was able to assign a network device to the VM without the iommu emulation. If I want to assign a network device to the VM with the iommu emulation, then I need to apply patches from the mailing list? Thanks, Jintack > > Alex >