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] clflush instruction emulation

To: Wei Huang <wei.huang2@xxxxxxx>, "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] clflush instruction emulation
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 15 Apr 2010 17:59:09 +0100
Cc:
Delivery-date: Thu, 15 Apr 2010 10:00:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BC740FD.5090502@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: Acrcut6IznNkLn6lQraYv1oXB9zgMQAAhiCk
Thread-topic: [Xen-devel] [PATCH] clflush instruction emulation
User-agent: Microsoft-Entourage/12.24.0.100205
On 15/04/2010 17:38, "Wei Huang" <wei.huang2@xxxxxxx> wrote:

> I created a patch which enables clflush emulation. I have verified that
> this patch solves FreeBSD issue. This patch returns immediately without
> doing anything. Note that we don't have to intercept clflush in SVM. So
> the only time we have page_fault for clflush instruction is when guest
> VM flushes MMIO space. In this case, do we need to send this command
> over to QEMU? I didn't do it in this patch anyway.

I don't think we need to anything since all guest reads/writes to the mmio
space will get intercepted to qemu, and hence qemu's view of the space is
coherent with the guest with no need for special handling of CLFLUSH.

Still the emulator should call out and let the caller decide what to do. We
could safely turn CLFLUSH into WBINVD (i.e., call the existing wbinvd hook).
Do you know if these CLFLUSH emulations happen often or only very rarely?
That might help us decide how smart we need to be about emulating CLFLUSH
(i.e., add a hook specifically for clflush, separately from wbinvd).

 -- Keir



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