def get_kvm_arch():
 flags = {'kvm_amd': 'svm', 'kvm_intel': 'vmx'}
 vendor_name = utils.get_cpu_vendor_name()
 if (not vendor_name):
  raise error.TestError('CPU Must be AMD, Intel or Power7')
 arch_type = ('kvm_%s' % vendor_name)
 cpu_flag = flags.get(arch_type, None)
 if ((cpu_flag is None) and (vendor_name in ('power7',))):
  return arch_type
 if (not utils.cpu_has_flags(cpu_flag)):
  raise error.TestError(('%s CPU architecture must have %s flag active and must be KVM ready' % (arch_type, cpu_flag)))
 return arch_type

def get_kvm_arch ( ) : flags = { 'kvm_amd' : 'svm' , 'kvm_intel' : 'vmx' } vendor_name = utils . get_cpu_vendor_name ( ) if ( not vendor_name ) : raise error . TestError ( 'CPU Must be AMD, Intel or Power7' ) arch_type = ( 'kvm_%s' % vendor_name ) cpu_flag = flags . get ( arch_type , None ) if ( ( cpu_flag is None ) and ( vendor_name in ( 'power7' , ) ) ) : return arch_type if ( not utils . cpu_has_flags ( cpu_flag ) ) : raise error . TestError ( ( '%s CPU architecture must have %s flag active and must be KVM ready' % ( arch_type , cpu_flag ) ) ) return arch_type
get the kvm kernel module to be loaded based on the cpu architecture :raises: :class:error .