RE: [PATCH] qemu: define and use VIRTIO_PFN_SHIFT

"Zhang, Xiantao" <[email protected]>
Newsgroups org.kernel.vger.kvm-ia64,org.kernel.vger.kvm,org.kernel.vger.kvm-ppc
Message-ID <706158FABBBA044BAD4FE898A02E4BC21983FDC1@pdsmsx503.ccr.corp.intel.com>
Hollis Blanchard wrote:
> On Thursday 06 November 2008 19:38:40 Zhang, Xiantao wrote:
>> 
>> Hi, Hollis
>> 	Currenlty, kvm-qemu only supports the only case which is host
>> page_size = 
> qemu's target page size for ia64. Does your patch meets the
> requirement ? For ia64, current linux support 4K, 16K and 64k page
> size, and 1M 16M 64M or bigger page will be supported in future, so
> if your patch consider the case, it should work for ia64.  Thanks!
> 
> Take a look at the patch and you tell me. :) I've hardcoded the PFN
> shift as 16, which matches your TARGET_PAGE_BITS, but does it *have*
> to be the same? I don't believe it does.
> Out of curiosity, if you had 4K Linux host pages, and you redefined
> TARGET_PAGE_BITS to be 12, would everything just work?

Yes, if the host linux use 4K page size, we should define TARGET_PAGE_BITS to 12 when compiling qemu. 

> Also, as long as I have you... can we use getpagesize() instead of
> 65536/4096 in qemu_vmalloc()?

We tried it at early stage, seems it can't work, because current code very depens on TARGET_PAGE_BITS. 
Xiantao
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.