File 538d8735-cpu_map-Define-md-clear-CPUID-bit.patch of Package libvirt.11695

commit 7bde733e906a9eb513448fd58201a333a1793811
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Fri Apr 5 15:11:20 2019 +0200

    cpu_map: Define md-clear CPUID bit
    
    CVE-2018-12126, CVE-2018-12127, CVE-2018-12130
    
    The bit is set when microcode provides the mechanism to invoke a flush
    of various exploitable CPU buffers by invoking the VERW instruction.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
    (cherry picked from commit 538d873571d7a682852dc1d70e5f4478f4d64e85)
    
    Conflicts:
            src/cpu_map/x86_features.xml
                - no CPU map split downstream
    
            tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-guest.xml
            tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-host.xml
                - test data missing downstream
    
            tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml
            tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml
                - intel-pt feature is missing downstream
    
    Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Index: libvirt-1.2.5/src/cpu/cpu_map.xml
===================================================================
--- libvirt-1.2.5.orig/src/cpu/cpu_map.xml
+++ libvirt-1.2.5/src/cpu/cpu_map.xml
@@ -327,6 +327,9 @@
       <cpuid function='0x00000007' ebx='0x00100000'/>
     </feature>
 
+    <feature name='md-clear'> <!-- md_clear -->
+      <cpuid function='0x07' edx='0x00000400'/>
+    </feature>
     <feature name='spec-ctrl'>
       <cpuid function='0x07' edx='0x04000000'/>
     </feature>