Don't want to have Sex..

So me and my boyfriend have been together for two years and all of a sudden I have lately not been in the mood for anything with or to do with sex. I'm not sure why it's just I don't want to and it makes me feel like a bad girlfriend because of it. every time we have sex I just don't feel like it does anything for me as much as it does for him and anytime I try to explain this to him it's like I'm saying he's bad at sex which makes him upset. I'm just not sure what to do...