PTE's represent virtual pages. As you say, when a virtual page is present in main memory, the PTE's address field will hold the physical Page Frame Number (PFN).
Each physical page has a corresponding struct page. This has:
Following
flagsis:struct address_space *mapping;For pages that are in the page cache (a large portion of the pages on most systems),
mappingpoints to the information needed to access the file that backs up the page. If, however, the page is an anonymous page (user-space memory backed by swap), thenmappingwill point to ananon_vmastructure [...]-- Cramming more into struct page, LWN.net
Then, the page→index field is used to store the swp_entry_t structure for anonymous pages. (For pages in the page cache, this holds a file offset).
-- Rephrased from Understanding the Linux Virtual Memory Manager, Mel Gorman, 2004.