Rama, Shulchan Aruch, Orach Chaim 333:1:
Every rabbinic prohibition they permitted for the sake of a mitzvah is also permitted for the sake of guests. They are not called guests unless they are staying with him in his house or he invited someone staying with others. But if he just invites a friend to eat with him they are not called guests and this is not a se'udas mitzvah (mitzvah meal) but a se'udas reshus (regular meal).In other words, inviting your friend down the block over for a meal is not called Hakhnasas Orechim.