I am not sure it is some sudden 'bonhomie'; at best a tentative 'thaw'. I believe Pakistan's own star has risen considerably since the lows of 2013 (and before). There are unmistakable gains in economy, security, and even international relations. CPEC came as another major boost. The defeat of Imran Khan's agitation in 2014 gave a big boost to Pakistan's stability and political credentials.
And it is several years since the Mumbai massacre--so enough water has flowed under the bridges of Ravi (and Ganges)...
Maybe there is some 'track two' diplomacy, trying to pick up where Musharraf-Manmohan left off about a decade ago.
In short, had Pakistan not turned a corner there wouldn't be this visit. Still a most welcome thaw.