A leaked report stated that she was indeed Intersex and had internal testes which is what gives her the elevated testosterone.
This was never officially confirmed because of Human Rights issues, etc. and quite correctly that information should never be released without the individuals consent.
The only feasible way that the IAAF can control this issue is by introducing a testosterone cut off level that is physically unobtainable by female athletes and banning athletes that exceed that level from taking part in female only events.
If Semenya is adamant that she is XX, then she could easily release the test results and stop all this confusion. The fact that she doesn’t, indicates to many, that she is perhaps Intersex and doesn’t therefore want to make that public knowledge for the obvious reasons.