Mg K-shell x-ray emission induced by various ions