Re: [PATCH] KVM: add KVM_SYNC_SHADOW_WITH_USER ioctl

Dor Laor
2008-01-08T22:56:07Z

Marcelo Tosatti wrote:
> The host needs to zap its shadow entries before performing an inflate
> operation to avoid the guest from using stale ones.
>
> So add an ioctl to interface with kvm_mmu_zap_all().
>
> Signed-off-by: Marcelo Tosatti <mtosatti-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> Index: kvm.quilt/virt/kvm/kvm_main.c
> ===================================================================
> --- kvm.quilt.orig/virt/kvm/kvm_main.c
> +++ kvm.quilt/virt/kvm/kvm_main.c
> @@ -971,6 +971,11 @@ static long kvm_vm_ioctl(struct file *fi
> goto out;
> break;
> }
> + case KVM_SYNC_SHADOW_WITH_USER: {
> + r = 0;
> + kvm_mmu_zap_all(kvm);
> + break;
> + }
>
It should go into the arch ioctl below since the mmu is under x86
> default:
> r = kvm_arch_vm_ioctl(filp, ioctl, arg);
> }
>
>
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.