mirror of
				https://github.com/vdsm/virtual-dsm.git
				synced 2025-11-04 08:54:51 +08:00 
			
		
		
		
	fix: Check for SSE4.2 support
This commit is contained in:
		
							parent
							
								
									469ee67942
								
							
						
					
					
						commit
						fe2d072056
					
				@ -4,21 +4,29 @@ set -Eeuo pipefail
 | 
				
			|||||||
KVM_ERR=""
 | 
					KVM_ERR=""
 | 
				
			||||||
KVM_OPTS=""
 | 
					KVM_OPTS=""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
 | 
					if [ "$ARCH" == "amd64" ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
 | 
				
			||||||
    if ! grep -q -e vmx -e svm /proc/cpuinfo; then
 | 
					    if ! grep -q -e vmx -e svm /proc/cpuinfo; then
 | 
				
			||||||
      KVM_ERR="(vmx/svm disabled)"
 | 
					      KVM_ERR="(vmx/svm disabled)"
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
else
 | 
					  else
 | 
				
			||||||
    [ -e /dev/kvm ] && KVM_ERR="(no write access)" || KVM_ERR="(device file missing)"
 | 
					    [ -e /dev/kvm ] && KVM_ERR="(no write access)" || KVM_ERR="(device file missing)"
 | 
				
			||||||
fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -n "$KVM_ERR" ]; then
 | 
					  if [ -n "$KVM_ERR" ]; then
 | 
				
			||||||
  if [ "$ARCH" == "amd64" ]; then
 | 
					 | 
				
			||||||
    error "KVM acceleration not detected $KVM_ERR, see the FAQ about this."
 | 
					    error "KVM acceleration not detected $KVM_ERR, see the FAQ about this."
 | 
				
			||||||
    [[ "$DEBUG" != [Yy1]* ]] && exit 88
 | 
					    [[ "$DEBUG" != [Yy1]* ]] && exit 88
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    if [ "$CPU_MODEL" == "host" ]; then
 | 
				
			||||||
 | 
					      if ! grep -qE '^flags.* (sse4_2)' /proc/cpuinfo; then
 | 
				
			||||||
 | 
					        error "Your CPU does not have the SSE4.2 instruction set, which is required by DSM."
 | 
				
			||||||
 | 
					        [[ "$DEBUG" != [Yy1]* ]] && exit 89
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
else
 | 
					    fi
 | 
				
			||||||
  KVM_OPTS=",accel=kvm -enable-kvm -cpu host"
 | 
					    KVM_OPTS=",accel=kvm -enable-kvm -cpu $CPU_MODEL"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEF_OPTS="-nographic -nodefaults -boot strict=on -display none"
 | 
					DEF_OPTS="-nographic -nodefaults -boot strict=on -display none"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user