Re: [PATCH 07/23] KVM: PPC: Book3S PR: Use 64k host pages where possible

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

 



On 29.08.2013, at 07:23, Paul Mackerras wrote:

> On Thu, Aug 29, 2013 at 01:24:04AM +0200, Alexander Graf wrote:
>> 
>> On 06.08.2013, at 06:19, Paul Mackerras wrote:
>> 
>>> +#ifdef CONFIG_PPC_64K_PAGES
>>> +	/*
>>> +	 * Mark this as a 64k segment if the host is using
>>> +	 * 64k pages, the host MMU supports 64k pages and
>>> +	 * the guest segment page size is >= 64k,
>>> +	 * but not if this segment contains the magic page.
>> 
>> What's the problem with the magic page? As long as we map the magic page as a host 64k page and access only the upper 4k (which we handle today already) we should be set, no?
> 
> If we use a 64k host HPTE to map the magic page, then we are taking up
> 64k of the guest address space, and I was concerned that the guest
> might ask to map the magic page at address X and then map something
> else at address X+4k or X-4k.  If we use a 64k host HPTE then we would
> tromp on those nearby mappings.  If you think the guest will never try
> to create any nearby mappings, then we could relax this restriction.

I think we should just add this restriction to the documentation, yes :). So far the only 2 users I'm aware of are Linux and Mac-on-Linux. Both map the magic page to the top of the address space and don't care whether it's the upper 64k or upper 4k they clutter.

Also, we only map this as 64k when the guest is requesting 64k pages for that segment, no? So a guest that wants 4k granularity should still get it when it configures its segment accordingly.


Alex

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




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux