public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: mingo@elte.hu, hpa@zytor.com, tglx@linutronix.de,
	arjan@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 7/7] x86, cpa: global flush tlb after splitting large page and before doing cpa
Date: Sat, 13 Sep 2008 10:10:53 -0700	[thread overview]
Message-ID: <48CBF41D.5080202@goop.org> (raw)
In-Reply-To: <20080911204151.287251000@linux-os.sc.intel.com>

Suresh Siddha wrote:
> Do a global flush tlb after splitting the large page and before we do the
> actual change page attribute in the PTE.
>
> With out this, we violate the TLB application note, which says
>     "The TLBs may contain both ordinary and large-page translations for
>      a 4-KByte range of linear addresses. This may occur if software
>      modifies the paging structures so that the page size used for the
>      address range changes. If the two translations differ with respect
>      to page frame or attributes (e.g., permissions), processor behavior
>      is undefined and may be implementation-specific."
>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> ---
>
> Index: tip/arch/x86/mm/pageattr.c
> ===================================================================
> --- tip.orig/arch/x86/mm/pageattr.c	2008-09-11 13:25:55.000000000 -0700
> +++ tip/arch/x86/mm/pageattr.c	2008-09-11 13:25:57.000000000 -0700
> @@ -131,6 +131,18 @@
>  	mb();
>  }
>  
> +static void __global_flush_tlb(void *arg)
> +{
> +	__flush_tlb_all();
> +}
> +
> +static void global_flush_tlb(void)
> +{
> +	BUG_ON(irqs_disabled());
> +
> +	on_each_cpu(__global_flush_tlb, NULL, 1);
> +}
>   

Use flush_tlb_others(), which will get paravirtualized properly.

    J

  reply	other threads:[~2008-09-13 17:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11 20:30 [patch 0/7] x86, cpa: cpa related changes to be inline with TLB Application note Suresh Siddha
2008-09-11 20:30 ` [patch 1/7] x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot Suresh Siddha
2008-09-11 20:30 ` [patch 2/7] x86, cpa: remove USER permission from the very early identity mapping attribute Suresh Siddha
2008-09-11 20:30 ` [patch 3/7] x86, cpa: make the kernel physical mapping initialization a two pass sequence Suresh Siddha
2008-09-11 20:30 ` [patch 4/7] x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC Suresh Siddha
2008-09-11 20:30 ` [patch 5/7] x86, cpa: fix taking the pgd_lock with interrupts off Suresh Siddha
2008-09-11 20:30 ` [patch 6/7] x86, cpa: remove cpa pool code Suresh Siddha
2008-09-11 20:30 ` [patch 7/7] x86, cpa: global flush tlb after splitting large page and before doing cpa Suresh Siddha
2008-09-13 17:10   ` Jeremy Fitzhardinge [this message]
2008-09-14 15:29 ` [patch 0/7] x86, cpa: cpa related changes to be inline with TLB Application note Ingo Molnar
2008-09-14 16:59   ` Ingo Molnar
2008-09-16  5:44     ` Suresh Siddha
2008-09-14 15:40 ` Arjan van de Ven
2008-09-14 15:52   ` Ingo Molnar

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=48CBF41D.5080202@goop.org \
    --to=jeremy@goop.org \
    --cc=arjan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox