All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Juergen Gross <jgross@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v7 1/9] x86/xpti: avoid copying L4 page table contents when possible
Date: Fri, 13 Apr 2018 02:43:15 -0600	[thread overview]
Message-ID: <5AD06DA302000078001BAFB0@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20180412180944.31735-2-jgross@suse.com>

>>> On 12.04.18 at 20:09, <jgross@suse.com> wrote:
> For mitigation of Meltdown the current L4 page table is copied to the
> cpu local root page table each time a 64 bit pv guest is entered.
> 
> Copying can be avoided in cases where the guest L4 page table hasn't
> been modified while running the hypervisor, e.g. when handling
> interrupts or any hypercall not modifying the L4 page table or %cr3.
> 
> So add a per-cpu flag indicating whether the copying should be
> performed and set that flag only when loading a new %cr3 or modifying
> the L4 page table.  This includes synchronization of the cpu local
> root page table with other cpus, so add a special synchronization flag
> for that case.
> 
> A simple performance check (compiling the hypervisor via "make -j 4")
> in dom0 with 4 vcpus shows a significant improvement:
> 
> - real time drops from 112 seconds to 103 seconds
> - system time drops from 142 seconds to 131 seconds
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> ---
> V7:
> - add missing flag setting in shadow code

This now needs an ack from Tim (now Cc-ed).

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-04-13  8:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 18:09 [PATCH v7 0/9] xen/x86: various XPTI speedups Juergen Gross
2018-04-12 18:09 ` [PATCH v7 1/9] x86/xpti: avoid copying L4 page table contents when possible Juergen Gross
2018-04-13  8:43   ` Jan Beulich [this message]
2018-04-16 15:34     ` Tim Deegan
2018-04-16 18:22       ` Juergen Gross
2018-04-18  6:55         ` Juergen Gross
2018-04-12 18:09 ` [PATCH v7 2/9] xen/x86: add a function for modifying cr3 Juergen Gross
2018-04-12 18:09 ` [PATCH v7 3/9] xen/x86: support per-domain flag for xpti Juergen Gross
2018-04-12 18:09 ` [PATCH v7 4/9] xen/x86: use invpcid for flushing the TLB Juergen Gross
2018-04-12 18:09 ` [PATCH v7 5/9] xen/x86: disable global pages for domains with XPTI active Juergen Gross
2018-04-12 18:09 ` [PATCH v7 6/9] xen/x86: use flag byte for decision whether xen_cr3 is valid Juergen Gross
2018-04-12 18:09 ` [PATCH v7 7/9] xen/x86: convert pv_guest_cr4_to_real_cr4() to a function Juergen Gross
2018-04-12 18:09 ` [PATCH v7 8/9] xen/x86: add some cr3 helpers Juergen Gross
2018-04-12 18:09 ` [PATCH v7 9/9] xen/x86: use PCID feature Juergen Gross
2018-04-13  9:59 ` [PATCH v7 0/9] xen/x86: various XPTI speedups Andrew Cooper
2018-04-13 10:29   ` Juergen Gross

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=5AD06DA302000078001BAFB0@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgross@suse.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.