All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 4 of 5] Nested p2m: flush only one p2m table when reallocating
Date: Mon, 27 Jun 2011 15:44:54 +0200	[thread overview]
Message-ID: <4E088956.30807@amd.com> (raw)
In-Reply-To: <0753351afbbe1c3fdde3.1309171574@whitby.uk.xensource.com>


I think, this patch can be folded into the first one.
Otherwise:

Ack-by: Christoph Egger <Christoph.Egger@amd.com>

On 06/27/11 12:46, Tim Deegan wrote:
> # HG changeset patch
> # User Tim Deegan<Tim.Deegan@citrix.com>
> # Date 1308929084 -3600
> # Node ID 0753351afbbe1c3fdde3a72dfb5a67105524f813
> # Parent  97e15368260c093078e1f1bc04521de30c1792cc
> Nested p2m: flush only one p2m table when reallocating.
> It's unhelpful to flush all of them when we only need one.
>
> Reported-by: Christoph Egger<Christoph.Egger@amd.com>
> Signed-off-by: Tim Deegan<Tim.Deegan@citrix.com>
>
> diff -r 97e15368260c -r 0753351afbbe xen/arch/x86/mm/p2m.c
> --- a/xen/arch/x86/mm/p2m.c	Fri Jun 24 16:24:44 2011 +0100
> +++ b/xen/arch/x86/mm/p2m.c	Fri Jun 24 16:24:44 2011 +0100
> @@ -1120,7 +1120,6 @@ p2m_get_nestedp2m(struct vcpu *v, uint64
>       volatile struct nestedvcpu *nv =&vcpu_nestedhvm(v);
>       struct domain *d;
>       struct p2m_domain *p2m;
> -    int i;
>
>       /* Mask out low bits; this avoids collisions with CR3_EADDR */
>       cr3&= ~(0xfffull);
> @@ -1146,12 +1145,9 @@ p2m_get_nestedp2m(struct vcpu *v, uint64
>       }
>
>       /* All p2m's are or were in use. Take the least recent used one,
> -     * flush it and reuse.
> -     */
> -    for (i = 0; i<  MAX_NESTEDP2M; i++) {
> -        p2m = p2m_getlru_nestedp2m(d, NULL);
> -        p2m_flush_locked(p2m);
> -    }
> +     * flush it and reuse. */
> +    p2m = p2m_getlru_nestedp2m(d, NULL);
> +    p2m_flush_locked(p2m);
>       nv->nv_p2m = p2m;
>       p2m->cr3 = cr3;
>       nv->nv_flushp2m = 0;
>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2011-06-27 13:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 10:46 [PATCH 0 of 5] v2: Nested-p2m cleanups and locking changes Tim Deegan
2011-06-27 10:46 ` [PATCH 1 of 5] Nested p2m: implement "flush" as a first-class action Tim Deegan
2011-06-30  9:51   ` Olaf Hering
2011-06-30 10:02     ` Tim Deegan
2011-06-27 10:46 ` [PATCH 2 of 5] Nested p2m: remove bogus check of CR3 value Tim Deegan
2011-06-27 10:46 ` [PATCH 3 of 5] Nested p2m: clarify logic in p2m_get_nestedp2m() Tim Deegan
2011-06-27 10:46 ` [PATCH 4 of 5] Nested p2m: flush only one p2m table when reallocating Tim Deegan
2011-06-27 13:44   ` Christoph Egger [this message]
2011-06-27 14:01     ` Tim Deegan
2011-06-27 10:46 ` [PATCH 5 of 5] Nested p2m: rework locking around nested-p2m flushes and updates Tim Deegan
2011-06-27 10:56 ` [PATCH 0 of 5] v2: Nested-p2m cleanups and locking changes Tim Deegan
2011-06-27 12:23   ` Christoph Egger
2011-06-27 13:15     ` Tim Deegan
2011-06-27 13:20       ` Tim Deegan
2011-06-27 13:24         ` Christoph Egger
2011-06-27 13:55           ` Tim Deegan
2011-06-27 15:48       ` Tim Deegan
2011-06-28 11:04         ` Christoph Egger
2011-06-28 13:47         ` Christoph Egger
2011-06-30  9:49         ` Tim Deegan
2011-07-01 10:00           ` Christoph Egger

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=4E088956.30807@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Tim.Deegan@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.