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@xxxxxxx>
Date: Thu, 14 Apr 2011 15:43:55 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 14 Apr 2011 07:45:00 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type; bh=Ho4jys/I+V5Lush//AqXFhjvybYEEai3Si/1ztj1ZU8=; b=ZmWOKH2xJt+T5N00hnGjijB+Kuj/Gv6DqFBvb/lO/MiGr46dE3ZZ8Pl0lraigD4y8E zyHZxnjWqw+dD6fW1I5YrEH24Z36Cd+iTRql8RwZ5DhvLBvM1EtWpXkDKSTvz29SMtn6 prpd3WXqlGxgZlouOs9m48lzGVqjxbRurvPyk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type; b=Qrlb/+Cod09hGZZW4f4krDaCg4F09ay70mr5GAHpZuE5e6OfRSxKbgl2cspRLO29AK OnDYsXwMU5fzBxnXXsf7zrYZHGlUxKKpxKsiic9bbCZqIfvacmkBnc7VD2FB0kdzoc9D 17oSI3E3BCRn8WWkAuynKIMaqijeVJcwfgwGw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DA6FE54.2050403@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: Acv6smETzj3KXFGYVkG64+JtoXT/fg==
Thread-topic: [Xen-devel] [PATCH] nestedhvm: ASID emulation
User-agent: Microsoft-Entourage/12.28.0.101117
On 14/04/2011 15:01, "Christoph Egger" <Christoph.Egger@xxxxxxx> wrote:

>> 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.
> 
> I am not sure if I got you right. You mean what if two vcpus run on one
> physical cpu? In this case svm_do_resume() calls hvm_asid_flush_vcpu()
> before so that asid_generation and core_asid_generation do not match and
> a new asid is always assigned.

No, it only does that if a given VCPU gets scheduled onto a *different* PCPU
than last time it ran.

I've attached a mostly rewritten version of your patch that is about half
the size and I believe has a fighting chance of being correct (however it is
only build tested). Give it a look and a spin.

 -- Keir

> Christoph

Attachment: 00-nhvm-asid
Description: Binary data

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