WASHINGTON, Sept 2 - The U.S. Justice Department warned that states risk losing billions of dollars in welfare funding if they do not report all immigrants known to state agencies who are in the country illegally, according to a legal opinion released on Wednesday.