I think what you're going to find is that it's possible but probably not advisable to do this. In looking at 3 virtualization technologies:
It would appear to be possible in the first 2 (VirtualBox and VMWare):
For KVM it seems possible as well but with several caveats. For one with newer versions of RHEL a new technology called KSM - Kernel Samepage Merging has been deployed which allows identical pages across VM guests to be shared, however they are "pinned" in memory and cannot be swapped out.
excerpt - Kernel Virtual Machine (KVM) Best practices for KVM
The system cannot swap memory pages that are shared by KSM because
they are pinned.
So it becomes unclear what happens if the VM has it's own swap, and one of these guest's pages needs to be swapped by the VM. So it would do so, but the physical memory wouldn't become freed (would be my guess) thus wasting now disk within the VM's swap and still continuing to use the physical RAM.
Additionally it seems dangerous to have all the VMs using the same swap for this reason: What happens when the swap becomes full, all the VMs are at risk since the resource has been essentially exhausted.
excerpt Overcommitting with KVM
As KVM virtual machines are Linux processes, memory used by
virtualized guests can be put into swap if the guest is idle or not in
heavy use. Memory can be committed over the total size of the swap and
physical RAM. This can cause issues if virtualized guests use their
total RAM. Without sufficient swap space for the virtual machine
processes to be swapped to the pdflush process, the cleanup process,
starts. pdflush kills processes to free memory so the system does not
crash. pdflush may destroy virtualized guests or other system
processes which may cause file system errors and may leave virtualized
Anatomy of a swap out on KVM
There is an excellent write up on the KVM website that discusses how a VM provisions memory as well as how it eventually will make use of swap. It was written for qemu-kvm v0.12, so I don't know how much has changed since that version.
excerpt from above page
Now, let's say the host is under memory pressure. The page from above
has gone through the Linux LRU and has found itself on the inactive
list. The kernel decides that it wants the page back:
The host kernel uses rmap structures to find out in which VMA (vm_area_struct) the page is mapped.
The host kernel looks up the mm_struct associated with that VMA, and walks down the Linux page tables to find the host hardware page
table entry (pte_t) for the page.
The host kernel swaps out the page and clears out the pte_t (let's assume that this page was only used in a single place). But, before
freeing the page.
The host kernel calls the mmu_notifier invalidate_page(). This looks up the page's entry in the NPT/EPT structures and removes it.
Now, any subsequent access to the page will trap into the host ((2) in the fault-in path above)
So what the above is trying to say is that when a page of the guest VM's memory needs to be swapped out, it's done so by the host. But realize this is when the entire host has exhausted it's RAM, not when a guest VM has.
Should you use swap in KVM?
I do and as long as you understand that if you have a lot of VMs on a system they may all be hitting the disk if they're over provisioned, and so you'll be creating a ton of I/O on your disk. See this ServerFault question for more details.