RE: [PATCH] Map guest (ts,tid) to individual shadow tid

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

 



> -----Original Message-----
> From: kvm-ppc-owner@xxxxxxxxxxxxxxx 
> [mailto:kvm-ppc-owner@xxxxxxxxxxxxxxx] On Behalf Of Liu Yu-B13201
> Sent: Thursday, April 09, 2009 11:45 AM
> To: Hollis Blanchard
> Cc: kvm-ppc@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH] Map guest (ts,tid) to individual shadow tid
> 
> > -----Original Message-----
> > From: Hollis Blanchard [mailto:hollisb@xxxxxxxxxx] 
> > Sent: Thursday, April 09, 2009 12:43 AM
> > To: Liu Yu-B13201
> > Cc: kvm-ppc@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH] Map guest (ts,tid) to individual shadow tid
> > 
> > On Tuesday 07 April 2009 21:11:11 Liu Yu-B13201 wrote:
> > > 
> > > > -----Original Message-----
> > > > From: Hollis Blanchard [mailto:hollisb@xxxxxxxxxx] 
> > > > Sent: Tuesday, April 07, 2009 11:41 PM
> > > > To: Liu Yu-B13201
> > > > Cc: kvm-ppc@xxxxxxxxxxxxxxx
> > > > Subject: Re: [PATCH] Map guest (ts,tid) to individual shadow tid
> > > > 
> > > > On Tue, 2009-04-07 at 17:51 +0800, Liu Yu wrote:
> > > > > Hi guys,
> > > > > 
> > > > > Thanks to Hollis's idea.
> > > > > This patch help to make KVMPPC be more friendly to OSes 
> > > > other than Linux.
> > > > 
> > > > Wow, that was quick. :)
> > > > 
> > > > Have you tested this code? Doesn't this break the assumption in
> > > > kvmppc_e500_tlb1_invalidate() (and probably elsewhere) 
> > that stid ==
> > > > gtid?
> > > 
> > > Yes, have taken a simple test.
> > 
> > Once we can reduce the number of TLB flushes (see below) it will be 
> > interesting to see if there's a performance impact.
> > 
> > >Good catch, it needs to handle it here in 
> > kvmppc_e500_tlb1_invalidate().
> > >Thanks.
> > >But it's ok for now, because TLB1 only contains tid=0 
> > entries, and tid=0
> > >always be mapped to stid=0.
> > >That's why the test is fine...
> > 
> > OK. Still, it makes me nervous to break such a simple 
> > assumption. We should 
> > introduce nice accessors to make it difficult to code it 
> > wrong in the future. 
> > I'm honestly surprised that kvmppc_e500_tlb1_invalidate() is 
> > the only affected 
> > site.
> 
> It is the only site. We don't pay much attention on shadow tid.
> For 500, shadow tid is inherit from guest tid.
> As guest tlb1 mapping is broken into 4K shadow mappings,
> the kvmppc_e500_tlb1_invalidate() need to check tid to find 
> all 4k shadow mappings related to an guest mapping.
> 
> Actually, I have been thinking about remove all shadow tlb 
> like 440 did.
> This maybe helpful to succedent work such as huge tlb mapping.
> After doing that, kvmppc_e500_tlb1_invalidate() won't has 
> this assumption.
> 
> Anyway, the patch is an RFC, not aimed at getting applied.
> Just make something to discuss. :)
> 

Well, I missed another site...
Host pid should be updated to stid in two case:
1. guest accesses to SPRN_PID
2. guest switch btween kernel and userspace. (if we map guest kernel
[tid=0] to non zero stid)
--
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