Uploaded image for project: 'XenServer Org'
  1. XenServer Org
  2. XSO-132

Enabling AMD IOMM generate a VM starting issue

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • Creedence alpha, beta, RC
    • None
    • None

    Description

      Good morning Sirs,
      I use XenServer in my Lab to test different sw solutions based on Windows or Linux OS.

      I have previous installed the XenServer 6.5 Beta 2 on the above hw, without any problems or issues. All the tests made on the Beta2 work fine, and XenServer is really fast and stable virtualization environment !!!

      Now I have installed today the latest XenServer Beta available (3) and I found the following issue:

      • If I leave enabled the IOMM option in the motherboard BIOS, with a new and clean XenServer 6.4.96-88386c installation, any new or already exixting VMs, Linux or Windows do not starts, if they are configured with more than one vCPU (two or more).
        Starting a VM, the XenCenter display the green led for that machine, the console display only a white empty rectangle, and the vCPU in the performance tab remain to 100% (I waited up to 15 minutes). Nothing more happen, no OS setup start, no error or issue displayed on XenCenter and the vm seems to be frozen, until to a force shutdown.
        Instead, in case of a single vCPU VM, it can start after the initial creation (from a default template, ex: Windows 2012 R2), but after the first phase of Windows installation, at the first reboot asked by the Windows OS, the VM do not restart, displaying an error message like "The OS is unaivable".
      • If I disable the IOMM option in the motherboard BIOS, all work fine: All the VMs starts with one or more vCPUs, the VM OS setup work fine and the OS run normally with XenServer Tools installed.

      I tried to enable the IOMM and disable others CPU settings in the motherboard BIOS (like C6 switch or the AMD Cool and Quiet), but the really effective solution to solve the above problem is to disable IOMM.

      This issue never arise on XenServer Beta2, that I ever used with IOMM switch enabled.
      I also tried to generate the Status report and I have submitted in TAAS Portal, but the analysis end with no issues found.

      In attach you can find two "Status-report", one with IOMM swith enabled (with issue), and another with the IOMM switch disabled (without issue).

      Thank you very much for your support

      Best Regards,

      Roberto Luongo

      Analysis of the problem:
      Latest logging from the problem case with a modified Xen shows:

      [2014-09-30 13:52:45] (d1) [  151.703497] pci dev 01:2 bar 20 size 000000020: 00000c201
      [2014-09-30 13:52:45] (d1) [  151.703907] pci dev 01:1 bar 20 size 000000010: 00000c221
      [2014-09-30 13:52:45] (d1) [  151.704210] Trampoline: 29 bytes at 0x103010
      [2014-09-30 13:52:45] (d1) [  151.704230]   copying to: 0x1000
      [2014-09-30 13:52:45] (d1) [  151.704241] Source hex:
      [2014-09-30 13:52:45] (d1) [  151.704283]  8c c8 8e d8 0f 01 16 17 00 31 c0 40 0f 01 f0 66
      [2014-09-30 13:52:45] (d1) [  151.704320]  ea 2e 30 10 00 08 00 17 00 48 30 10 00 cc
      [2014-09-30 13:52:45] (d1) [  151.704330] Dest hex:
      [2014-09-30 13:52:45] (d1) [  151.704371]  8c c8 8e d8 0f 01 16 17 00 31 c0 40 0f 01 f0 66
      [2014-09-30 13:52:45] (d1) [  151.704408]  ea 2e 30 10 00 08 00 17 00 48 30 10 00 c2
      [2014-09-30 13:52:45] (d1) [  151.704435] Multiprocessor initialisation:
      [2014-09-30 13:52:45] (d1) [  151.704447] Booting cpu 0
      [2014-09-30 13:52:45] (d1) [  151.704522]  - CPU0 ... 48-bit phys ... fixed MTRRs ... var MTRRs [2/8] ... done.
      [2014-09-30 13:52:45] (d1) [  151.704535] Booting cpu 1
      [2014-09-30 13:52:45] (d1) [  151.704562] Sending INIT-SIPI-SIPI to cpu 1
      [2014-09-30 13:52:45] (XEN) [  151.704700] MMIO emulation failed: d1v1 Real @ 0100:0000000c -> 
      

      0100:0000000c is the lmsw instruction from the AP boot trampoline, which does unconditionally need emulating in software for AMD systems. (This does use the MMIO emulation codepath despite not expecting any MMIO as a result. This is changed to be more sane in xen-unstable)

      The lack of any instruction bytes to the right-hand-side of -> suggests that the emulation failure is caused by an inability to fetch the 3 bytes of the lmsw instruction. As the vcpu is currently in RM16, there is no possibility of pagetables causing the fetch issue.

      From the extra debugging present for -dbg1-d.log, when attempting to emulate lmsw (part of the instruction fetch) hvm_fetch_from_guest_virt_nofault() fails with HVMCOPY_bad_gfn_to_mfn which implies that the NPT pagetables are bad for vcpu1.

      There are very few changes to Xen between beta2 and beta3, and certainly no changes which look like they could plausibly cause this issue

      Attachments

        1. CALPHA-132-dbg.tar.gz
          3.34 MB
        2. CALPHA-132-dbg-v2.tar.gz
          3.74 MB
        3. hypervisor.log
          140 kB
        4. hypervisor.log.1.gz
          4.40 MB
        5. hypervisor-before-kill-domain-U.log
          197 kB
        6. hypervisor-dbg1-d.log
          89 kB
        7. hypervisor-xen-4.4.0-xs-dbg2-d.log
          58 kB
        8. hypervisor-xen-4.4.1-xs-dbg3-d.log
          105 kB
        9. hypervisor-xen-4.4.1-xs-dbg4-d.log
          153 kB
        10. hypervisor-xen-4.4.1-xs-dbg5-d.log
          201 kB
        11. hypervisor-xen-4.4.1-xs-dbg6-d.log
          252 kB
        12. status-report-2014-09-25-12-25-42-(w-IOMM).zip
          1.17 MB
        13. status-report-2014-09-25-12-48-03(No-IOMM).zip
          1.67 MB
        14. status-report-2014-09-25-17-02-38-Beta2-w-IOMM.zip
          1.20 MB
        15. status-report-2014-09-26-08-30-59-Beta2-Debug-w-IOMMU.zip
          5.04 MB
        16. status-report-2014-09-26-08-50-22-Beta3-Debug-w-IOMMU.zip
          1.01 MB
        17. status-report-2014-09-30-13-08-08-RPMv2-wIOMMU.zip
          894 kB
        18. status-report-2014-09-30-13-36-52-RPMsV2-noIOMMU.zip
          1.01 MB
        19. status-report-2014-09-30-13-55-43-RPMs-wIOMMU-Debug.zip
          870 kB
        20. status-report-2014-09-30-17-14-33-RPMs-noIOMMU-Debug.zip
          1.20 MB
        21. xen-hypervisor-4.4.0-1.8.97.414.28774.x86_64.rpm
          1.72 MB
        22. xen-hypervisor-4.4.1-1.8.97.440.28788.x86_64.rpm
          1.72 MB
        23. xen-hypervisor-4.4.1-1.8.97.440.28788.x86_64.rpm
          1.72 MB
        24. xen-hypervisor-4.4.1-1.8.97.441.28785.x86_64.rpm
          1.72 MB
        25. xen-hypervisor-4.4.1-1.8.97.441.28788.x86_64.rpm
          1.72 MB
        26. xen-hypervisor-4.4.1-1.8.97.441.28788.x86_64.rpm
          1.72 MB
        27. xen-hypervisor-4.4.1-1.8.97.441.28789.x86_64.rpm
          1.72 MB

        Activity

          People

            Unassigned Unassigned
            rluongo Roberto Luongo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: