qemu: Move common checks outside qemuBuildShmemDevLegacyStr
qemu: Move common checks outside qemuBuildShmemDevLegacyStr

Some checks will need to be performed for newer device types as well, so
let's not duplicate them.

Signed-off-by: Martin Kletzander <e82f23e74d43760279ebcc505dac4ae70d5627d0@redhat.com>

andreabolognani/libvirt,nertpinx/libvirt,eskultety/libvirt,zippy2/libvirt,datto/libvirt,nertpinx/libvirt,datto/libvirt,fabianfreyer/libvirt,zippy2/libvirt,fabianfreyer/libvirt,taget/libvirt,jfehlig/libvirt,andreabolognani/libvirt,VenkatDatta/libvirt,libvirt/libvirt,jardasgit/libvirt,nertpinx/libvirt,libvirt/libvirt,datto/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,crobinso/libvirt,jardasgit/libvirt,crobinso/libvirt,eskultety/libvirt,fabianfreyer/libvirt,datto/libvirt,eskultety/libvirt,VenkatDatta/libvirt,crobinso/libvirt,olafhering/libvirt,zippy2/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,crobinso/libvirt,datto/libvirt,libvirt/libvirt,taget/libvirt,taget/libvirt,olafhering/libvirt,eskultety/libvirt,jardasgit/libvirt,jfehlig/libvirt,jardasgit/libvirt,jfehlig/libvirt,olafhering/libvirt,VenkatDatta/libvirt,taget/libvirt,jfehlig/libvirt,taget/libvirt,fabianfreyer/libvirt,olafhering/libvirt,eskultety/libvirt,nertpinx/libvirt,andreabolognani/libvirt,zippy2/libvirt,libvirt/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,jardasgit/libvirt