All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Huang <wei.huang2@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "'xen-devel@lists.xensource.com'" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] clflush instruction emulation
Date: Thu, 15 Apr 2010 12:25:11 -0500	[thread overview]
Message-ID: <4BC74BF7.1040000@amd.com> (raw)
In-Reply-To: <C7ED046D.116B4%keir.fraser@eu.citrix.com>

WBINVD is a bit heavy since it flushes all caches. I saw 1170 times of 
CLFLUSH during FreeBSD booting. After guest boots, 0 was observed. 1170 
is not huge though.

-Wei

Keir Fraser wrote:
> On 15/04/2010 17:38, "Wei Huang" <wei.huang2@amd.com> 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
>
>
>
>   

  reply	other threads:[~2010-04-15 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 16:38 [PATCH] clflush instruction emulation Wei Huang
2010-04-15 16:59 ` Keir Fraser
2010-04-15 17:25   ` Wei Huang [this message]
2010-04-15 17:32     ` Keir Fraser
2010-04-15 17:49       ` Keir Fraser
2010-04-15 18:43         ` Huang2, Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC74BF7.1040000@amd.com \
    --to=wei.huang2@amd.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.