XT xen patch-queue port to 4.3.x


To Do not in existing patches 

  • Relative symlinks created in XC-E Makefile patches need to be mitigated

To Verify Upstream 

  • bp-recover-from-faults-on-xrstor
  • bp-properly-check-guest-input-to-xsetbv
  • xc-elf64-header

To Verify if Still Needed 

  • xc-relax-pv-l1e-cache-check
  • xc-iommu-flush-on-unmap
  • xc-evtchn-no-pending-when-s3
    • tomaszw: I'm pretty sure it's still needed, the evtchn pending code looks to have same problem as it did - the only thing that changes is that this function does not have return value anyway, but what we care here for is that the pending flag needs to not be set because it guards access to vcpu_mark_events_pending() which will not be reexectued if its already set

To Port 

To Discuss 

  • xc-unpin-cacheattr
    • tomaszw: not sure if this is used at all in XT, doubt it, need check
  • xc-disable-x2apic
    • XCE used to do this as well, and we no longer need to with new Xen
    • tomaszw: we only were disabling it in XT since s3 code was broken in x2apic mode, I think its fixed for some time so we do not need it
  • xc-vtpm
    • Changes the tools makefile to apply patches; consider moving vtpm out of tree
  • xc-memory-mapping-batch
    • Robert's version of this functionality is already in XCE, and partly through upstreaming (already upstream?)
    • Requires integration work in XT
  • hvmloader-pxerom-optimize
    • Shouldn't be done this way anymore with QEMU 1.2+ and Seabios
    • Omit ROM BAR initialization for e1000 in QEMU when network boot isn't enabled
    • tomaszw: not really necessary at all anymore IMO after seabios was changed recently to be more strict WRT selected boot devices
  • gpt-gpu-reset
    • Ross says this should be done differently going forward
  • acpi-acpica
    • No idea what this is for - is it because the XT build distribution doesn't include a sufficiently modern iasl?
    • tomaszw: appears to be unneeded

Complete 

  • xc-get-time
  • xc-hvm-info
  • xc-xenconsoled-syslog
  • xc-ept-respect-cacheattr-pin
  • xc-interrupt-debug-info
  • xc-shadow-op-blow-tables
  • xc-vcpu-get-time
    • Looks like upstream has an alternate way to do this now... Investigate removal.
  • xc-tboot-shutdown-disable-irqs
  • xc-txt-shutdown-acpi-access-width
  • xc-parse-video-from-mbi
    • Breaks XC-E boot
  • xc-cpuid
    • Light integration work required on XCE
  • xc-isa-irq-guest-binding
  • xc-shared-info
  • xc-set-servicevm
    • Needs review after port
    • Port complicated by upstream. Access checks now done with XSM hooks
  • xc-aperture-map
    • Converted gfn_to_mfn to get_page_from_gfn() and page_to_mfn(). Needs validation
  • xc-xen-translate
    • Added XSM support. Need to validate permissions
    • gmfn_to_mfn converted to mfn_x. Needs validation
      • tomaszw: was bugging due to locking p2m entries forever, converted it to use unlocked version of the func
  • gpt-iommu-mapping
    • Removed iommu_flush_iotlb - Functionality provided upstream by new iommu_iotlb_flush
    • Converted gfn_to_mfn to get_page_from_gfn() and page_to_mfn().
  • vgabios-spinlock-and-shadow
  • acpi-applesmc
  • xc-ioreq-multiple
    • Altered to work with unmodified device models using the original API. Needs testing
    • tomaszw: tested and made some fixes, seems to work
  • xc-v4v*
    • We can switch to Ross' version that was submitted upstream, but the interfaces are different and would require guest driver changes.
    • tomaszw: I ported the old version for now since can't do any meaningful testing w/o v4v as network/ui vms depend on it. Happy to switch to Ross's version later
  • xc-foreign-batch-cacheattr
    • tomaszw: ported xc-foreign-batch-cacheattr as it's currently needed - don't think its redudant with xc_domain_pin_memory_cacheattr at least as that call operates on hvms only, which is not how the xc-foreign-batch-cacheattr is used in XT atm

Possibly Excluded From Common Xen 

Changes to hvmloader/ACPI and the VGA BIOS in XT and XCE are incompatible. Thus it is proposed that hvmloader and the VGA BIOS live outside the common platform until the display architecture is pulled in. We will also need to decide if we intend to reconcile the differences between how XT and XCE handle S-states and the backlight (XT backlight passthrough already dropped from Common Linux - see Ross).

  • acpi-* (acpi-waet already upstream)
  • hvmloader-mtrr-changes
  • hvmloader-overwrite-bios-copyrights (Equivalent patch in XCE already - adapt XT to that method?)
  • hvmloader-slic (Equivalent patch in XCE - QEMU portion of XCE version is accepted upstream)
    • tomaszw: since in XT qemu is running in stubdom, basing this on qemu is problematic, hvmloader seems a cleaner solution (or multiple qemus?)
  • vgabios-edid-support (Equivalent patch in XCE already - adapt XT to that method?)
  • vgabios-restrict-32b-modes (Equivalent patch in XCE already)
  • vgabios-vbe-extension
  • vgabios-vbe-xenvesa
  • vgabios-mod3-table
  • gpt-nvidia
  • gpt-superblanker
  • gpt-vgabios-native
  • gpt-filter-igd-io
    • tomaszw: it looks like version of this is already upstream which uses mem mapping instead of copying (in drivers/passthrough/vtd/quirks.c) - needs verification
  • gpt-igd-hp-resume-workaround
  • gpt-cantiga-b3-errata
    • this looks to be already upstream
  • tomaszw: not surewhy would we want to exclude all gpt patches these from common xen? They should have no side effects w/o presence of gpu passthrough anyway.

Confirmed Already Included from XCE 

  • xc-serial-card
    • Boot command line options changed - Requires integration work
  • hvmloader-smbios (Cherry-picked from XT)

Confirmed Already Included Upstream 

  • bp-intel-opregion
  • acpi-nvs-opregion
  • hvmloader-intel-opregion
  • bp-seabios-support
  • bp-xenstore-path-is-subpath
  • xenstore-add-xs-path-is-subpath
  • xenstore-fix-unwatch
  • bp-legacy-bridges-int-remap-validation
  • bp-fix-sysenter-vulnerability
  • bp-fix-irq-access-permission
  • bp-defer-evtchn-pointer-store
  • bp-*-preemptible
  • bp-dont-permit-svt-no-verify
  • bp-fix-rcu-domain-locking
  • bp-fix-information-leak-on-amd-cpus
  • xc-keep-bus-mastering-after-iommu-fault