9. (14 points) Let positive real numbers $x, y, z$ satisfy $xyz=1$. Try to find the maximum value of
$$
f(x, y, z)=(1-yz+z)(1-xz+x)(1-xy+y)
$$

and the values of $x, y, z$ at that time.
$$
\begin{array}{l}
\left\{\begin{array} { l } 
{ 1 - y z + z < 0 , } \\
{ 1 - x z + x < 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x+x z<1, \\
y+x y<1
\end{array}\right.\right. \\
\Rightarrow(x+x z)(y+x y)<1 \\
\Leftrightarrow x+x y+x^{2} y<0,
\end{array}
$$

Contradiction. Therefore, among $1-y z+z$, $1-x z+x$, and $1-x y+y$, at most one can be negative.
Assume all three expressions are positive. Then,
$$
\begin{array}{l}
(1-y z+z)(1-x z+x)(1-x y+y) \\
=(x-x y z+x z)(y-x y z+x y)(z-x y z+y z) \\
=(x-1+x z)(y-1+x y)(z-1+y z),
\end{array}
$$

Thus,
$$
\begin{array}{l} 
f^{2}(x, y, z) \\
= {[(1-y z+z)(1-x z+x)(1-x y+y)]^{2} } \\
= {[(1-y z+z)(1-x z+x)(1-x y+y)] . } \\
{[(x-1+x z)(y-1+x y)(z-1+y z)] } \\
= {\left[z^{2}-(1-y z)^{2}\right]\left[x^{2}-(1-x z)^{2}\right]\left[y^{2}-(1-x y)^{2}\right] } \\
\leqslant(x y z)^{2}=1 .
\end{array}
$$

When $x=y=z=1$, the equality holds.
Therefore, $f(x, y, z)_{\text {max }}=1$.