Re: [PATCH 2/3 V2] kvm tools: Prevent PFN wraparound

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sasha Levin <levinsasha928@xxxxxxxxx> wrote:

> +++ b/tools/kvm/include/kvm/virtio.h
> @@ -36,6 +36,11 @@ static inline bool virt_queue__available(struct virt_queue *vq)
>  	return vq->vring.avail->idx !=  vq->last_avail_idx;
>  }
>  
> +static inline void *guest_pfn_to_host(struct kvm *kvm, u32 pfn)
> +{
> +	return guest_flat_to_host(kvm, (unsigned long)pfn << 12);
> +}

We should at minimum document that on 32-bit hosts this will clip things at 
4GB.

Documenting such things helps, in case someone ventures into fixing this 
limitation in the future.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux