KVM: Fix vcpu freeing for guest smp

A vcpu can pin up to four mmu shadow pages, which means the freeing
loop will never terminate.  Fix by first unpinning shadow pages on
all vcpus, then freeing shadow pages.

Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
Avi Kivity 2007-06-05 12:17:03 +03:00
commit 7b53aa5650
2 changed files with 17 additions and 2 deletions