From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] nestedhvm: ASID emulation Date: Wed, 13 Apr 2011 14:27:02 +0100 Message-ID: References: <4DA57CD0.9040704@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4DA57CD0.9040704@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 13/04/2011 11:37, "Christoph Egger" wrote: > > Implement ASID emulation. > This allows the l1 guest to run the l2 guest using hw ASID. > > Signed-off-by: Christoph Egger First, how much of a win is this compared with what we do currently? Second, the two-asids-per-vcpu allocation scheme in hvm_asid_handle_vmenter() looks broken. I mean, consider this comment: /* When asid generation changed last time when we were * were going to run l1 guest then next_asid <= nv->nv_n2asid. */ I don't see how you can assert this to be true. Arbitrary generations can have passed, and next_asid incremented to an arbitrary value, since the last time you allocated nv_n2asid. I wouldn't bother fixing #2 unless there's a convincing answer for #1. -- Keir