They have had skirmishes in the past and they will have issues very soon as the Himalayan glaciers start to disappear since both nations rely on them for a large amount of their fresh water. I think they’re both highly aware of that.
But also, Modi is a Hindu nationalist and Xi is an ethnic Chinese nationalist. Rulers of ethnostates stick together!