How to handle an extremely mentally ill child coming to visit

My son is coming to visit. He's 28 and I had him when I was 15. I lost custody of him when I was 17 and was more or less forced into signing my rights away. I understand where I went wrong as a parent and I was really young. He's pretty mentally ill.

Last year he was diagnosed with histrionic personality disorder. I've been trying to research his disorder more to learn about it but basically he does a lot of things for attention. He's extremely over dramatic for attention. He's extremely sexual for attention. He brings up sex at the weirdest moments and talks about his sex life way too much. He talks about having sex with girls. Having sex with guys. Flirts with random people. It just makes people uncomfortable and I guess that's part of HPD. It most likely stems from neglect from his childhood but I just don't know how to deal with it. Especially since he's coming to visit and other family will be there. He just craves attention and I don't know how to deal with him half the time.