[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 2/3] Revert "Arrange to upgrade microcode on x86 test hosts."



We are going to do this differently, by installing the packages from
Debian.  We couldn't do that in 2015 because not every version of Xen
supported scanning the dom0 initrd for microcode, but now all
supported versions do.  So we will do that, in a moment.

This reverts commit 6cedb8c7d76a0ab3820ed0a48a3aebcb18fa0813.

CC: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/Debian.pm           | 44 ------------------------
 mg-cpu-microcode-update     | 83 ---------------------------------------------
 production-config           |  5 ---
 production-config-cambridge |  4 ---
 ts-xen-install              |  7 ----
 5 files changed, 143 deletions(-)
 delete mode 100755 mg-cpu-microcode-update

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index c22aaadf..6e9d2072 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -753,48 +753,6 @@ chroot /target chown -R \$u.\$u \$h/.ssh
 END
 }
 
-sub preseed_microcode($$)
-{
-    my ($ho,$sfx) = @_;
-    my $prop = "MicrocodeUpdate".ucfirst($ho->{Arch});
-    return unless $c{$prop};
-    logm("ucode=$prop $c{$prop}");
-    my $ucode = get_filecontents("$c{Images}/$c{$prop}");
-    my $cpio_url = create_webfile($ho, "microcode-cpio",
-       sub {
-           my $f = "$c{Images}/$c{$prop}";
-           copy($f, $_[0]) or die "Copy $f failed: $!";
-    });
-
-    # The ability to prepend from an initramfs-hook was not added
-    # until Jessie, therefore for Wheezy we use a custom compression
-    # method which sneaks the necessary cpio onto the front.
-    my $gzip_url = create_webfile($ho, "microcode-gzip",<<END);
-#!/bin/bash
-if [ -f /boot/microcode.cpio ]; then
-    cat /boot/microcode.cpio
-fi
-exec gzip
-END
-
-    preseed_hook_installscript($ho, $sfx,
-       '/usr/lib/base-installer.d/','osstest-microcode', <<END);
-#!/bin/sh
-set -ex
-
-mkdir -p /target/boot
-$preseed_wget -O /target/boot/microcode.cpio $cpio_url
-
-mkdir -p /target/usr/sbin
-$preseed_wget -O /target/usr/sbin/osstest-initramfs-gzip $gzip_url
-chmod +x /target/usr/sbin/osstest-initramfs-gzip
-
-mkdir -p /target/etc/initramfs-tools/conf.d/
-echo COMPRESS=/usr/sbin/osstest-initramfs-gzip >> \\
-       /target/etc/initramfs-tools/conf.d/osstest-initramfs-gzip.conf
-END
-}
-
 sub debian_overlays ($$) {
     my ($ho, $func) = @_;
     # calls $func->($local_dir, $tarball_leafname);
@@ -1503,8 +1461,6 @@ d-i partman-auto/expert_recipe string                     
                \\
 
 END
 
-    preseed_microcode($ho,$sfx);
-
     if (get_host_property($ho, "firmware") eq "uefi") {
        die unless $ho->{Suite} =~ m/jessie|stretch/;
        # Prevent grub-install from making a new Debian boot entry, so
diff --git a/mg-cpu-microcode-update b/mg-cpu-microcode-update
deleted file mode 100755
index 1032025f..00000000
--- a/mg-cpu-microcode-update
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-
-set -e -o posix
-
-. ./cri-getconfig
-. ./mgi-common
-
-# iucode_tool is in /usr/sbin, see #788459.
-export PATH="/usr/local/sbin:$PATH:/sbin:/usr/sbin"
-
-images=`getconfig Images`
-gitproxy=`getconfig GitCacheProxy`
-date=`date +%Y-%m-%d`
-
-cpiodir=cpio.x86
-ucodepath=kernel/x86/microcode
-
-intelbin=GenuineIntel.bin
-amdbin=AuthenticAMD.bin
-
-ucodecpio=$images/microcode.x86.$date.cpio
-
-linuxfw=git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
-
-rm -rf $ucodecpio.tmp
-mkdir $ucodecpio.tmp
-cd $ucodecpio.tmp
-
-mkdir -p $cpiodir/$ucodepath/
-
-# Intel
-#
-# From http://feeds.downloadcenter.intel.com/rss/?p=483&lang=eng look for
-# Linux* Processor Microcode Data File which will take you to e.g.
-# 
https://downloadcenter.intel.com/downloads/eula/24661/Linux-Processor-Microcode-Data-File?httpDown=http%3A%2F%2Fdownloadmirror.intel.com%2F24661%2Feng%2Fmicrocode-20150121.tgz'
 which redirects to the following:
-INTEL_TGZ='http://downloadmirror.intel.com/24661/eng/microcode-20150121.tgz'
-
-# The microcode-YYYYMMDD.tgz contains a microcode.dat which we must
-# then convert to the appropriate binary format using iucode_tool
-# (available in Debian).
-
-mkdir intel-ucode
-
-echo >&2 "Fetching Intel ucode"
-fetch $INTEL_TGZ > intel-ucode/microcode.tgz
-
-tar -C intel-ucode -xaf intel-ucode/microcode.tgz microcode.dat
-
-echo >&2 "Converting Intel ucode"
-iucode_tool -t d -q \
-    --write-to=$cpiodir/$ucodepath/$intelbin \
-    intel-ucode/microcode.dat
-
-# AMD
-#
-# http://xenbits.xen.org/docs/unstable/misc/amd-ucode-container.txt
-#
-# From linux-firmware.git:
-AMD_BINS='
-  amd-ucode/microcode_amd.bin
-  amd-ucode/microcode_amd_fam15h.bin
-  amd-ucode/microcode_amd_fam16h.bin
-'
-
-echo >&2 "Cloning $gitproxy$linuxfw"
-git clone --quiet --depth=1 $gitproxy$linuxfw linux-firmware
-
-# Concatenate into $ucodepath/$amdbin within the
-# cpio.
-echo >&2 "Conveting AMD ucode"
-( cd linux-firmware && cat $AMD_BINS ) > $cpiodir/$ucodepath/$amdbin
-
-# Ensure the cpio is reproducible, we don't care about timestamps
-# inside the archive.
-find $cpiodir -exec touch -d @0 {} \;
-
-echo >&2 "Building cpio archive"
-( cd $cpiodir && find . | cpio -o -H newc --quiet > $ucodecpio )
-
-echo "New x86 microcode: $ucodecpio"
-
-cd $images # Get out of $ucodecpio.tmp
-rm -rf $ucodecpio.tmp
diff --git a/production-config b/production-config
index bd200182..41f68409 100644
--- a/production-config
+++ b/production-config
@@ -99,11 +99,6 @@ DebianImageVersion_wheezy 7.2.0
 DebianImageVersion_jessie 8.2.0
 DebianImageVersion_stretch 9.4.0
 
-# These should normally be the same.
-# Update with ./mg-cpu-microcode-update
-MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio
-MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio
-
 # Update with ./mg-netgrub-loader-update
 TftpGrubVersion XXXX-XX-XX
 
diff --git a/production-config-cambridge b/production-config-cambridge
index a50b19b3..16cf9bfe 100644
--- a/production-config-cambridge
+++ b/production-config-cambridge
@@ -87,10 +87,6 @@ DebianImageVersion_jessie 8.2.0
 
 DebianExtraPackages_jessie chiark-scripts_6.0.3~citrix1_all.deb
 
-# These should normally be the same.
-MicrocodeUpdateAmd64 microcode.x86.2015-06-12.cpio
-MicrocodeUpdateI386 microcode.x86.2015-06-12.cpio
-
 XenUsePath /usr/groups/xencore/systems/bin/xenuse
 XenUseUser osstest
 
diff --git a/ts-xen-install b/ts-xen-install
index d8e9d7e6..9113f318 100755
--- a/ts-xen-install
+++ b/ts-xen-install
@@ -209,13 +209,6 @@ sub setupboot () {
         my $mem = $r{'dom0_mem'} // 512;
         $xenhopt .= " dom0_mem=${mem}M,max:${mem}M";
     }
-
-    # If /boot/microcode.cpio is present then ts-host-install has
-    # arranged that it will be prepended to the initrd already, all we
-    # need to do is look for it.
-    $xenhopt .= " ucode=scan"
-       if target_file_exists($ho, "/boot/microcode.cpio");
-
     my $append= $r{xen_boot_append};
     $xenhopt .= " $append" if defined $append;
     $append = get_host_property($ho, 'xen-commandline-append', undef);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.