WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] nestedhvm: ASID emulation

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] nestedhvm: ASID emulation
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Thu, 14 Apr 2011 11:28:54 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 14 Apr 2011 03:30:16 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:user-agent:date:subject:from:to:cc:message-id :thread-topic:thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=xYpwg/JvBaf9PYbywlgh/wfG3H1ctVzkc8YXZq3xRTU=; b=TKt7nkhtClsL6UYHNuEkc8zoiPblhNU+FRGkW1dr9YWWPdBun1t3nk8a2/RlPamDLa ZjcW4Y9afElxaFGr7FSXh1JVVdCx6J2GxjXbNkxXye9rXDLlwZY/yH3RQxnDAM6u5tSR rg16qnjjEQcLrnB/HZD3tx9ThZQoxbcBXWnm0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=qmqHpLHC/J/LIjuRwkrl6uyCO7Q8YBeebzzaV0BhthyT8lEfUSPWB+7TbHm8grQBA/ HLQ4oIO3gkp21bZLMjUhuZ7ct/qpOON/6mmPyFKVQRjJpZ0TZBFN0/2V6i/hkOCrtkBJ jgyuIlmCGD2QrwskzOWc/TG7Ml7tddTUWBF60=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DA6BDAD.9040300@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acv6jsD4qkU/YC7ibUiuLRuaYdVyiw==
Thread-topic: [Xen-devel] [PATCH] nestedhvm: ASID emulation
User-agent: Microsoft-Entourage/12.28.0.101117
On 14/04/2011 10:26, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:

>> What if nv_n2asid wast last assigned on a previous generation, but nv_n1asid
>> was assigned from the current generation? Then you'd have next_asid>
>> nv_n2asid, but nv_n2asid is stale.
> 
> When the generation changes, next_asid is set back to 1 and the hw TLB
> flushed.
> 
> If next_asid is larger than nv_n2asid then it is reused and this is ok
> since the hw TLB got flushed. It is just important that nv_n1asid never
> gets the same hw ASID assigned and that is what the do { } while loop
> ensures.

What if some other vcpu's nv_n1asid or nv_n2asid got assigned the same HW
asid in this generation as this vcpu's (now stale, as it's from a previous
generation's) nv_n2asid? This PCPU can be interleaving execution of other
HVM VCPUs after all.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel