Recently, domain adaptation (DA) based cross-domain fault diagnosis of rotating machinery has gained much attention, where a target domain with only unlabeled data can be diagnosed by transferring diagnosis knowledge from a labeled source domain. In industrial applications, the target domain may occur only limited types of faults contained in the source domain, or even novel faults unseen in the source domain. Moreover, since the target domain is unlabeled in reality, the prior label space relationship between two domains is hard to know. Therefore, not only domain shift, it is also essential to tackle the uncertainty of both the category shift and the unknown space in actual cross-domain scenarios, which can be abstracted as a universal domain adaptation (UniDA) problem. This paper proposes a cross-domain diagnosis framework for rotating machinery under UniDA to handle the uncertainty dilemma by converting it to certainty. Specifically, a feature spatial location principle general for different label space relationships is designed, where the known classes form a hypersphere and the central region of the hypersphere is left for the possible target domain unknown samples. Then, a novel distance-based unknown detection strategy is proposed, which is friendly to different “open” degrees of the unknown space. The diagnosis results of three case studies show the effectiveness of the proposed framework under all possible label space relationships, including close set DA, partial set DA, open set DA and open-partial set DA. Further discussions demonstrate the superiority of the proposed framework in known class recognition and possible unknown detection. The proposed diagnosis framework provides a new insight for solving the uncertainty dilemma laid in actual cross-domain diagnosis scenarios under UniDA setting, which is more potential to practical engineering applications compared with many DA-based diagnosis methods tailored for specific label space relationship.