render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone
Glauber Costa b8bea8
#!/bin/sh
Glauber Costa b8bea8
Paolo Bonzini 2803fc
case $(uname -m) in
Paolo Bonzini 2803fc
    ppc64)
Paolo Bonzini 2803fc
        grep OPAL  /proc/cpuinfo >/dev/null 2>&1 && opal=1
Paolo Bonzini 2803fc
Paolo Bonzini 2803fc
        if [ "$opal" ]; then
Paolo Bonzini 31c633
            modprobe -b kvm >/dev/null 2>&1 && kvm=1
Paolo Bonzini 2803fc
        fi
Paolo Bonzini 2803fc
        ;;
Paolo Bonzini 31c633
    s390x)
Paolo Bonzini 31c633
        modprobe -b kvm >/dev/null 2>&1 && kvm=1
Paolo Bonzini 31c633
        ;;
Paolo Bonzini 2803fc
esac
Paolo Bonzini 2803fc
Paolo Bonzini 2803fc
if [ "$kvm" ]; then
Paolo Bonzini 2803fc
    # no reason why vhost should not work with TCG, but currently it does not
Paolo Bonzini 2803fc
    modprobe -b vhost-net >/dev/null 2>&1
Paolo Bonzini 34104a
else
Paolo Bonzini 2803fc
    exit 0
Paolo Bonzini 34104a
fi