[Xen-devel] [PATCH-for-4.10] adapt SUPPORT.md to match 4.11

2018-04-25 Thread Juergen Gross
Some tags have been changed in 4.11. Adapt the 4.10 ones to match in order to produce an easier to read support HTML table. Signed-off-by: Juergen Gross <jgr...@suse.com> --- SUPPORT.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md

Re: [Xen-devel] [PATCH-for-4.10] adapt SUPPORT.md to match 4.11

2018-04-25 Thread Juergen Gross
On 25/04/18 16:09, Ian Jackson wrote: > Juergen Gross writes ("[PATCH-for-4.10] adapt SUPPORT.md to match 4.11"): >> Some tags have been changed in 4.11. Adapt the 4.10 ones to match in >> order to produce an easier to read support HTML table. > > This does not

Re: [Xen-devel] [PATCH v8 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-22 Thread Juergen Gross
On 22/04/18 18:39, Tim Deegan wrote: > At 19:11 +0200 on 21 Apr (1524337893), Juergen Gross wrote: >> On 21/04/18 15:32, Tim Deegan wrote: >>> At 09:44 +0200 on 19 Apr (1524131080), Juergen Gross wrote: >>>> Another alternative would be to pass another flag to the c

Re: [Xen-devel] [Bug 198497] handle_mm_fault / xen_pmd_val / radix_tree_lookup_slot Null pointer

2018-04-23 Thread Juergen Gross
On 20/04/18 17:20, Jason Andryuk wrote: > Adding xen-devel and the Linux Xen maintainers. > > Summary: Some Xen users (and maybe others) are hitting a BUG in > __radix_tree_lookup() under do_swap_page() - example backtrace is > provided at the end. Matthew Wilcox provided a band-aid patch that >

Re: [Xen-devel] [PATCH v2] Input: xen-kbdfront - allow better run-time configuration

2018-04-23 Thread Juergen Gross
On 23/04/18 10:02, Oleksandr Andrushchenko wrote: > Juergen, Jason, Dmitry > any comment on this? Oleksandr, please give us some time. I can't speak for others, but I am not sitting here idling and hoping that some work (e.g. patches to review) might appear. I have a lot of other stuff to do and

[Xen-devel] [PATCH-for-4.11] xpti: fix bug in double fault handling

2018-04-23 Thread Juergen Gross
When entering the hypervisor via the double fault handler resetting xen_cr3 was missing. This led to switching to pv_cr3 when returning from the next following interrupt, e.g. after re-enabling interrupts in machine_restart(). Signed-off-by: Juergen Gross <jgr...@suse.com> --- tools/firmwa

Re: [Xen-devel] [PATCH-for-4.11 v2] xpti: fix bug in double fault handling

2018-04-23 Thread Juergen Gross
g interrupt. So repair this in order to allow >> interrupt handling to work even after a double fault. >> >> Signed-off-by: Juergen Gross <jgr...@suse.com> > > With s/interrupt/exception/ (or s/interrupt/interruption/) on the > description (which is easy enough to do wh

Re: [Xen-devel] [PATCH-for-4.11 v2] xpti: fix bug in double fault handling

2018-04-23 Thread Juergen Gross
On 23/04/18 15:06, Andrew Cooper wrote: > On 23/04/18 13:38, Juergen Gross wrote: >> When entering the hypervisor via the double fault handler resetting >> xen_cr3 was missing. This led to switching to pv_cr3 when returning >> from the next following interrupt. So repair t

Re: [Xen-devel] [PATCH] x86: correct assertion in destroy_perdomain_mapping()

2018-04-23 Thread Juergen Gross
; > > Acked-by: Andrew Cooper <andrew.coop...@citrix.com> > Release-acked-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH-for-4.11] xpti: fix bug in double fault handling

2018-04-23 Thread Juergen Gross
On 23/04/18 14:11, Jan Beulich wrote: On 23.04.18 at 13:37, wrote: >> When entering the hypervisor via the double fault handler resetting >> xen_cr3 was missing. This led to switching to pv_cr3 when returning >> from the next following interrupt, e.g. after re-enabling

[Xen-devel] [PATCH-for-4.11 v2] xpti: fix bug in double fault handling

2018-04-23 Thread Juergen Gross
When entering the hypervisor via the double fault handler resetting xen_cr3 was missing. This led to switching to pv_cr3 when returning from the next following interrupt. So repair this in order to allow interrupt handling to work even after a double fault. Signed-off-by: Juergen Gross <

[Xen-devel] [PATCH v3] xpti: fix bug in double fault handling

2018-04-23 Thread Juergen Gross
When entering the hypervisor via the double fault handler resetting xen_cr3 was missing. This led to switching to pv_cr3 when returning from the next following exception, so repair this in order to allow exception handling to work even after a double fault. Signed-off-by: Juergen Gross <

Re: [Xen-devel] [RFC 0/2] To introduce xenwatch multithreading (xen mtwatch)

2018-04-24 Thread Juergen Gross
On 24/04/18 07:52, Dongli Zhang wrote: > Hi Juergen, > > On 04/24/2018 01:22 PM, Juergen Gross wrote: >> On 24/04/18 01:55, Dongli Zhang wrote: >>> Hi Wei, >>> >>> On 04/23/2018 10:09 PM, Wei Liu wrote: >>>> On Sat, Apr 07, 2018 at 07:2

[Xen-devel] [PATCH 2/7] doc: add architecture qualifier to boot parameter entries

2018-04-24 Thread Juergen Gross
Many of the architecture specific boot parameters are not qualified as such. Correct that. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/misc/xen-command-line.markdown | 168 ++-- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/doc

[Xen-devel] [PATCH 7/7] doc: correct intel_psr_cat_cdp.pandoc syntax

2018-04-24 Thread Juergen Gross
"make -C docs all" fails due to incorrect markdown syntax in intel_psr_cat_cdp.pandoc. Correct it. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/features/intel_psr_cat_cdp.pandoc | 366 - 1 file changed, 175 insertions(+), 191 deletion

[Xen-devel] [PATCH 1/7] doc: sort entries of boot parameters correctly

2018-04-24 Thread Juergen Gross
Some of the boot parameters in docs/misc/xen-command-line.markdown are not in the correct alphabetically order. Correct that. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/misc/xen-command-line.markdown | 226 ++-- 1 file changed, 113 insertions(+

[Xen-devel] [PATCH 4/7] doc: escape underscores in xen-command-line.markdown

2018-04-24 Thread Juergen Gross
Some underscores are not escaped in xen-command-line.markdown. Correct that. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/misc/xen-command-line.markdown | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/misc/xen-command-line.markdown

[Xen-devel] [PATCH 3/7] doc: add credit2_cap_period_ms boot parameter description

2018-04-24 Thread Juergen Gross
credit2_cap_period_ms isn't mentioned in xen-command-line.markdown. Add a description. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/misc/xen-command-line.markdown | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/misc/xen-command-line.markdown b/docs/mi

[Xen-devel] [PATCH 0/7] fix several issues documentation

2018-04-24 Thread Juergen Gross
e all" in the docs directory. Fix those as well. In case the maintainers are fine with my changes I believe the series should be included in 4.11. So for the series: Release-acked-by: Juergen Gross <jgr...@suse.com> Juergen Gross (7): doc: sort entries of boot parameters corr

Re: [Xen-devel] [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver

2018-04-24 Thread Juergen Gross
On 24/04/18 07:43, Oleksandr Andrushchenko wrote: > On 04/24/2018 01:41 AM, Boris Ostrovsky wrote: >> On 04/23/2018 08:10 AM, Oleksandr Andrushchenko wrote: >>> On 04/23/2018 02:52 PM, Wei Liu wrote: On Fri, Apr 20, 2018 at 02:25:20PM +0300, Oleksandr Andrushchenko wrote: >>>  

[Xen-devel] [PATCH 5/7] doc: correct livepatch.markdown syntax

2018-04-24 Thread Juergen Gross
"make -C docs all" fails due to incorrect markdown syntax in livepatch.markdown. Correct it. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/misc/livepatch.markdown | 589 --- 1 file changed, 272 insertions(+), 317 deletions(-) d

[Xen-devel] [PATCH 6/7] doc: correct feature-levelling.pandoc syntax

2018-04-24 Thread Juergen Gross
"make -C docs all" fails due to incorrect markdown syntax in feature-levelling.pandoc. Correct it. Signed-off-by: Juergen Gross <jgr...@suse.com> --- docs/features/feature-levelling.pandoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/feature-

Re: [Xen-devel] [RFC 0/2] To introduce xenwatch multithreading (xen mtwatch)

2018-04-24 Thread Juergen Gross
On 24/04/18 08:10, Dongli Zhang wrote: > > > On 04/24/2018 02:03 PM, Juergen Gross wrote: >> On 24/04/18 07:52, Dongli Zhang wrote: >>> Hi Juergen, >>> >>> On 04/24/2018 01:22 PM, Juergen Gross wrote: >>>> On 24/04/18 01:55, Dongli Zhang w

Re: [Xen-devel] [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver

2018-04-24 Thread Juergen Gross
On 24/04/18 10:07, Oleksandr Andrushchenko wrote: > On 04/24/2018 10:51 AM, Juergen Gross wrote: >> On 24/04/18 07:43, Oleksandr Andrushchenko wrote: >>> On 04/24/2018 01:41 AM, Boris Ostrovsky wrote: >>>> On 04/23/2018 08:10 AM, Oleksandr Andrushchenko wrote: >>

Re: [Xen-devel] [PATCH for-4.11] x86/spec_ctrl: Fix typo in ARCH_CAPS decode

2018-04-24 Thread Juergen Gross
On 24/04/18 11:44, Andrew Cooper wrote: > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> Release-acked-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists

Re: [Xen-devel] [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver

2018-04-24 Thread Juergen Gross
On 24/04/18 12:14, Oleksandr Andrushchenko wrote: > On 04/24/2018 01:01 PM, Wei Liu wrote: >> On Tue, Apr 24, 2018 at 11:08:41AM +0200, Juergen Gross wrote: >>> On 24/04/18 11:03, Oleksandr Andrushchenko wrote: >>>> On 04/24/2018 11:40 AM, Juergen Gross wrote: >

Re: [Xen-devel] [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver

2018-04-24 Thread Juergen Gross
On 24/04/18 11:03, Oleksandr Andrushchenko wrote: > On 04/24/2018 11:40 AM, Juergen Gross wrote: >> On 24/04/18 10:07, Oleksandr Andrushchenko wrote: >>> On 04/24/2018 10:51 AM, Juergen Gross wrote: >>>> On 24/04/18 07:43, Oleksandr Andrushchenko wrote: >&

Re: [Xen-devel] [RFC 0/2] To introduce xenwatch multithreading (xen mtwatch)

2018-04-23 Thread Juergen Gross
On 24/04/18 01:55, Dongli Zhang wrote: > Hi Wei, > > On 04/23/2018 10:09 PM, Wei Liu wrote: >> On Sat, Apr 07, 2018 at 07:25:53PM +0800, Dongli Zhang wrote: >>> About per-domU xenwatch thread create/destroy, a new type of xenstore node >>> is >>> introduced: '/local/domain/0/mtwatch/'. >>> >>>

Re: [Xen-devel] [PATCH v8 1/9] x86/xpti: avoid copying L4 page table contents when possible

2018-04-24 Thread Juergen Gross
On 24/04/18 12:31, Tim Deegan wrote: > At 07:45 +0200 on 23 Apr (1524469545), Juergen Gross wrote: >> On 22/04/18 18:39, Tim Deegan wrote: >>> At 19:11 +0200 on 21 Apr (1524337893), Juergen Gross wrote: >>>> On 21/04/18 15:32, Tim Deegan wrote: >>>>> A

[Xen-devel] Fwd: [tip:x86/urgent] x86, sched: Allow topologies where NUMA nodes share an LLC

2018-04-17 Thread Juergen Gross
Is this something we should be aware of in Xen, too? Juergen Forwarded Message Subject: [tip:x86/urgent] x86,sched: Allow topologies where NUMA nodes share an LLC Date: Tue, 17 Apr 2018 06:46:12 -0700 From: tip-bot for Alison Schofield Reply-To:

Re: [Xen-devel] [PATCH] x86/msr: further correct the emulation behaviour of MSR_PRED_CMD

2018-04-17 Thread Juergen Gross
this without incurring the overhead of an actual > barrier). Correcting this right away will also help whenever further > bits in the MSR might become defined. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Release-acked-by: J

Re: [Xen-devel] [PATCH for-4.11] libs/gnttab: fix FreeBSD gntdev interface

2018-04-17 Thread Juergen Gross
igned-off-by: Roger Pau Monné <roger@citrix.com> Release-acked-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] docs/support-matrix-generate: use `git log' not `git-log'

2018-04-25 Thread Juergen Gross
On 25/04/18 17:56, Ian Jackson wrote: > I found this bug when trying to set up the cron job. > > Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com> Release-acked-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel m

Re: [Xen-devel] [PATCH for-4.10 0/9] SUPPORT.md backports to support matrix generation [and 4 more messages]

2018-04-25 Thread Juergen Gross
On 25/04/18 17:58, Ian Jackson wrote: > Ian Jackson writes ("Re: [PATCH for-4.10 0/9] SUPPORT.md backports to support > matrix generation [and 4 more messages]"): >> Thanks everyone. I have pushed this to staging-4.10, including the >> patch 10/9. > > The first cut of the cron job is now

[Xen-devel] [PATCH-for-4.10 V2] adapt SUPPORT.md to match 4.11

2018-04-25 Thread Juergen Gross
Some tags have been changed in 4.11. Adapt the 4.10 ones to match in order to produce an easier to read support HTML table. Signed-off-by: Juergen Gross <jgr...@suse.com> --- SUPPORT.md | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md

[Xen-devel] [PATCH v4 2/7] x86/xpti: don't flush TLB twice when switching to 64-bit pv context

2018-03-27 Thread Juergen Gross
When switching to a 64-bit pv context the TLB is flushed twice today: the first time when switching to the new address space in write_ptbase(), the second time when switching to guest mode in restore_to_guest. Avoid the first TLB flush in that case. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v4 0/7] xen/x86: various XPTI speedups

2018-03-27 Thread Juergen Gross
2m21.767s (+97%)1m23.053s (+15%) Juergen Gross (7): x86/xpti: avoid copying L4 page table contents when possible x86/xpti: don't flush TLB twice when switching to 64-bit pv context xen/x86: support per-domain flag for xpti xen/x86: use invpcid for flushing the TLB xen/x86: disable gl

[Xen-devel] [PATCH v4 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-27 Thread Juergen Gross
states with cr3/cr4 having inconsistent values (e.g. global pages being activated while cr3 already specifies a XPTI address space) move loading of the new cr4 value to write_ptbase() (actually to write_cr3_cr4() called by write_ptbase()). Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: -

[Xen-devel] [PATCH v4 3/7] xen/x86: support per-domain flag for xpti

2018-03-27 Thread Juergen Gross
n/arch/x86/pv/domain.c as it is pv-domain specific. Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- V3: - latch get_cpu_info() return value in variable (Jan Beulich) - call always xpti_domain_init() for pv dom0 (Jan Beulich) - add __init an

[Xen-devel] [PATCH v4 6/7] xen/x86: use flag byte for decision whether xen_cr3 is valid

2018-03-27 Thread Juergen Gross
off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Jan Beulich <jbeul...@suse.com> --- V3: - renamed use_xen_cr3 to better fitting use_pv_cr3 - corrected comment regarding semantics of use_pv_cr3 (Jan Beulich) - prefer 32-bit operations over 8- or 16-bit ones (Jan Beulich) --- xen/ar

[Xen-devel] [PATCH v4 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-27 Thread Juergen Gross
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 <jgr...@sus

[Xen-devel] [PATCH v4 7/7] xen/x86: use PCID feature

2018-03-27 Thread Juergen Gross
global page. pv_guest_cr4_to_real_cr4() is switched from a macro to a real function now as it has become more complex. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: - add cr3 mask for page table address and use that in dbg_pv_va2mfn() (Jan Beulich) - use invpcid_flush_all_nong

[Xen-devel] [PATCH v4 4/7] xen/x86: use invpcid for flushing the TLB

2018-03-27 Thread Juergen Gross
of INVPCID (default to true). Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: - option "invpcid" instead of "noinvpcid" (Jan Beulich) V3: - new patch --- docs/misc/xen-command-line.markdown | 10 ++ xen/arch/x86/cpu/mtrr/generic.c | 37 +++

Re: [Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-27 Thread Juergen Gross
On 22/03/18 17:30, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> Instead of flushing the TLB from global pages when switching address >> spaces with XPTI being active just disable global pages via %cr4 >> completely when a domain subject to XPTI is active. This avoids

Re: [Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-27 Thread Juergen Gross
On 27/03/18 09:23, Jan Beulich wrote: On 27.03.18 at 09:14, wrote: >> On 22/03/18 17:30, Jan Beulich wrote: >> On 21.03.18 at 13:51, wrote: Instead of flushing the TLB from global pages when switching address spaces with XPTI being active just

Re: [Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-27 Thread Juergen Gross
On 27/03/18 10:33, Jan Beulich wrote: On 27.03.18 at 09:37, wrote: >> On 27/03/18 09:23, Jan Beulich wrote: >> On 27.03.18 at 09:14, wrote: On 22/03/18 17:30, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> Instead

[Xen-devel] [PATCH] correct maintainers file

2018-03-28 Thread Juergen Gross
Correct wrong entry in MAINTAINERS file. Signed-off-by: Juergen Gross <jgr...@suse.com> --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index eace09ed22..bb049c8664 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -416,7 +416,

Re: [Xen-devel] [PATCH] xen/acpi: off by one in read_acpi_id()

2018-03-28 Thread Juergen Gross
oo? E.g. something like: pr_debug("max acpi id %u, trying to set %u\n", nr_acpi_bits - 1, acpi_id); With that: Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 12:13, Jan Beulich wrote: On 26.03.18 at 10:55, wrote: >> On 26/03/18 10:28, Jan Beulich wrote: >> On 26.03.18 at 08:49, wrote: On 23/03/18 16:58, Jan Beulich wrote: On 23.03.18 at 15:11, wrote: >> On

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 23/03/18 16:58, Jan Beulich wrote: On 23.03.18 at 15:11, wrote: >> On 23/03/18 14:46, Jan Beulich wrote: >>> Valid point. Looking at all present uses of ->arch.cr3, it's probably >>> indeed better the way you have it. However, I'm now wondering >>> about something else:

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 10:28, Jan Beulich wrote: On 26.03.18 at 08:49, wrote: >> On 23/03/18 16:58, Jan Beulich wrote: >> On 23.03.18 at 15:11, wrote: On 23/03/18 14:46, Jan Beulich wrote: > So in the end the question is: Why not use just two PCIDs, and

[Xen-devel] Cut-off date for Xen 4.11 is March 30th, 2018

2018-03-29 Thread Juergen Gross
Hi all, The cut-off date for Xen 4.11 is March 30th, 2018. If you want your features to be included for the release, please make sure they are committed by March 30th, 2018. Juergen Gross ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https

[Xen-devel] Freeze date for 4.11 shifted by one week

2018-03-29 Thread Juergen Gross
Hi all, as the original freeze date (March 30th, 2018) is a holiday in many countries and some of the maintainers have been very busy with security work during most of the development phase of Xen 4.11 I've decided to shift the freeze date of Xen 4.11 by one week. So the new freeze date will be

Re: [Xen-devel] Cut-off date for Xen 4.11 is March 30th, 2018

2018-03-29 Thread Juergen Gross
On 29/03/18 11:53, George Dunlap wrote: > On 03/29/2018 07:52 AM, Juergen Gross wrote: >> Hi all, >> >> The cut-off date for Xen 4.11 is March 30th, 2018. If you want your >> features to be included for the release, please make sure they are >> committed by

Re: [Xen-devel] Cut-off date for Xen 4.11 is March 30th, 2018

2018-03-29 Thread Juergen Gross
On 29/03/18 12:50, Wei Liu wrote: > On Thu, Mar 29, 2018 at 04:35:27AM -0600, Jan Beulich wrote: >>>>> On 29.03.18 at 12:22, <george.dun...@citrix.com> wrote: >>> On 03/29/2018 10:56 AM, Juergen Gross wrote: >>>> On 29/03/18 11:53, George Dunlap wrote

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 12:43, Jan Beulich wrote: On 26.03.18 at 12:29, wrote: >> On 26/03/18 12:13, Jan Beulich wrote: >> On 26.03.18 at 10:55, wrote: I can change the scheme to use different values for guest PCIDs with XPTI on, of course. Are you fine

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-26 Thread Juergen Gross
On 26/03/18 14:19, Jan Beulich wrote: On 26.03.18 at 14:04, wrote: >> On 26/03/18 12:43, Jan Beulich wrote: >> On 26.03.18 at 12:29, wrote: On 26/03/18 12:13, Jan Beulich wrote: On 26.03.18 at 10:55, wrote: >> I can

Re: [Xen-devel] [PATCH v4 7/7] xen/x86: use PCID feature

2018-04-03 Thread Juergen Gross
On 29/03/18 17:37, Jan Beulich wrote: On 29.03.18 at 17:15, wrote: >> On 29/03/18 16:19, Jan Beulich wrote: >> On 27.03.18 at 11:07, wrote: @@ -102,7 +103,21 @@ void write_cr3_cr4(unsigned long cr3, unsigned long cr4) t =

Re: [Xen-devel] [PATCH v4 1/8] x86: NOP out XPTI entry/exit code when it's not in use

2018-04-03 Thread Juergen Gross
On 19/03/18 14:37, Jan Beulich wrote: > Introduce a synthetic feature flag to use alternative instruction > patching to NOP out all code on entry/exit paths. Having NOPs here is > generally better than using conditional branches. > > Also change the limit on the number of bytes we can patch in

Re: [Xen-devel] [PATCH v4 1/8] x86: NOP out XPTI entry/exit code when it's not in use

2018-04-04 Thread Juergen Gross
On 03/04/18 19:48, Juergen Gross wrote: > On 19/03/18 14:37, Jan Beulich wrote: >> Introduce a synthetic feature flag to use alternative instruction >> patching to NOP out all code on entry/exit paths. Having NOPs here is >> generally better than using conditional branch

Re: [Xen-devel] [linux-linus bisection] complete test-amd64-amd64-xl-pvhv2-amd

2018-04-04 Thread Juergen Gross
On 03/04/18 18:55, Sander Eikelenboom wrote: > On 03/04/18 12:29, Juergen Gross wrote: >> On 03/04/18 12:19, osstest service owner wrote: >>> branch xen-unstable >>> xenbranch xen-unstable >>> job test-amd64-amd64-xl-pvhv2-amd >>> testid guest-start

Re: [Xen-devel] [PATCH v4 7/7] xen/x86: use PCID feature

2018-03-29 Thread Juergen Gross
On 29/03/18 16:19, Jan Beulich wrote: On 27.03.18 at 11:07, wrote: >> --- a/xen/arch/x86/domain_page.c >> +++ b/xen/arch/x86/domain_page.c >> @@ -51,7 +51,7 @@ static inline struct vcpu *mapcache_current_vcpu(void) >> if ( (v = idle_vcpu[smp_processor_id()]) ==

Re: [Xen-devel] [PATCH v4 4/7] xen/x86: use invpcid for flushing the TLB

2018-03-29 Thread Juergen Gross
On 29/03/18 15:44, Jan Beulich wrote: On 27.03.18 at 11:07, wrote: >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -63,6 +63,10 @@ boolean_param("nosmp", opt_nosmp); >> static unsigned int __initdata max_cpus; >> integer_param("maxcpus", max_cpus); >>

Re: [Xen-devel] broken build: 448c03b3cbe14873ee637755a29ea26ee7ca9ef9

2018-03-20 Thread Juergen Gross
On 19/03/18 20:04, Doug Goldstein wrote: > commit 448c03b3cbe14873ee637755a29ea26ee7ca9ef9 > Author: Juergen Gross <jgr...@suse.com> > Date: Mon Feb 26 09:46:12 2018 +0100 > > This commit breaks the build of qemu-xen-traditional for: > > Ubuntu 14.04: https://g

Re: [Xen-devel] [PATCH] x86/xen: Delay get_cpu_cap until stack canary is established

2018-03-20 Thread Juergen Gross
On 19/03/18 23:22, Boris Ostrovsky wrote: > On 03/19/2018 12:58 PM, Jason Andryuk wrote: >> Commit 2cc42bac1c79 ("x86-64/Xen: eliminate W+X mappings") introduced a >> call to get_cpu_cap, which is fstack-protected. This is works on x86-64 > > s/This is works/This works/ > > Reviewed-by: Boris

[Xen-devel] TLB flushing

2018-03-20 Thread Juergen Gross
While hunting a strange bug in my PCID patch series hinting at some TLB invalidation problem I discovered a piece of code looking rather fishy to me. Is it correct for new_tlbflush_clock_period() to use FLUSH_TLB instead of FLUSH_TLB_GLOBAL? While not being a problem in current code as both will

Re: [Xen-devel] TLB flushing

2018-03-20 Thread Juergen Gross
On 20/03/18 10:19, Jan Beulich wrote: On 20.03.18 at 09:50, wrote: >> While hunting a strange bug in my PCID patch series hinting at some >> TLB invalidation problem I discovered a piece of code looking rather >> fishy to me. >> >> Is it correct for

Re: [Xen-devel] TLB flushing

2018-03-20 Thread Juergen Gross
On 20/03/18 10:56, Jan Beulich wrote: On 20.03.18 at 10:29, wrote: >> On 20/03/18 10:19, Jan Beulich wrote: >> On 20.03.18 at 09:50, wrote: While hunting a strange bug in my PCID patch series hinting at some TLB invalidation problem I

Re: [Xen-devel] [PATCH v3 3/7] xen/x86: support per-domain flag for xpti

2018-03-22 Thread Juergen Gross
On 22/03/18 16:26, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> +void xpti_domain_init(struct domain *d) >> +{ >> +if ( !is_pv_domain(d) || is_pv_32bit_domain(d) ) >> +return; > > As you rely on the zero-initialization of the field here, ... > >> +

Re: [Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-22 Thread Juergen Gross
On 22/03/18 15:31, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> --- a/xen/arch/x86/flushtlb.c >> +++ b/xen/arch/x86/flushtlb.c >> @@ -158,6 +158,9 @@ unsigned int flush_area_local(const void *va, unsigned >> int flags) >> } >> } >> >> +if ( flags &

Re: [Xen-devel] [PATCH v3 4/7] xen/x86: use invpcid for flushing the TLB

2018-03-22 Thread Juergen Gross
On 22/03/18 16:35, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> --- a/docs/misc/xen-command-line.markdown >> +++ b/docs/misc/xen-command-line.markdown >> @@ -1380,6 +1380,14 @@ Because responsibility for APIC setup is shared >> between Xen and the >> domain 0 kernel

Re: [Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-22 Thread Juergen Gross
On 22/03/18 17:30, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> Instead of flushing the TLB from global pages when switching address >> spaces with XPTI being active just disable global pages via %cr4 >> completely when a domain subject to XPTI is active. This avoids

Re: [Xen-devel] [PATCH v3 3/7] xen/x86: support per-domain flag for xpti

2018-03-22 Thread Juergen Gross
On 22/03/18 16:44, Jan Beulich wrote: On 22.03.18 at 16:29, wrote: >> On 22/03/18 16:26, Jan Beulich wrote: >> On 21.03.18 at 13:51, wrote: +void xpti_domain_init(struct domain *d) +{ +if ( !is_pv_domain(d) || is_pv_32bit_domain(d) )

Re: [Xen-devel] [PATCH v4 1/4] x86/PVHv2: Add memory map pointer to hvm_start_info struct

2018-03-21 Thread Juergen Gross
On 21/03/18 10:28, Roger Pau Monné wrote: > On Tue, Mar 20, 2018 at 09:48:56AM -0700, Maran Wilson wrote: >> The start info structure that is defined as part of the x86/HVM direct boot >> ABI and used for starting Xen PVH guests would be more versatile if it also >> included a way to pass

Re: [Xen-devel] [PATCH v4 7/8] x86: also NOP out xen_cr3 restores of XPTI

2018-03-21 Thread Juergen Gross
On 19/03/18 14:41, Jan Beulich wrote: > ... despite quite likely the gain being rather limited. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> Tested-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Juergen Gross <jg

Re: [Xen-devel] [PATCH v4 4/8] x86/XPTI: use %r12 to write zero into xen_cr3

2018-03-21 Thread Juergen Gross
On 19/03/18 14:39, Jan Beulich wrote: > Now that we zero all registers early on all entry paths, use that to > avoid a couple of immediates here. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> > Acked-by: Andrew Cooper <andrew.coop...@citrix.com> Tested-by: Jue

Re: [Xen-devel] [PATCH v4 5/8] x86/XPTI: reduce .text.entry

2018-03-21 Thread Juergen Gross
etween operands, and a pointless q suffix > from "retq". > > A few more small pieces could be moved, but it seems better to me to > leave them where they are to not make it overly hard to follow code > paths. > > Signed-off-by: Jan Beulich <jbeul...@suse.com>

Re: [Xen-devel] [PATCH 04/20] xen/domctl: Drop vcpu_alloc_lock

2018-03-20 Thread Juergen Gross
On 20/03/18 18:22, Andrew Cooper wrote: > On 20/03/18 16:58, Jan Beulich wrote: > On 19.03.18 at 20:13, wrote: >>> It is not entirely clear why this interlock was introduced in c/s 8cbb5278e >>> "x86/AMD: Add support for AMD's OSVW feature in guests". >>> >>> At the

Re: [Xen-devel] [PATCH v4 1/8] x86: NOP out XPTI entry/exit code when it's not in use

2018-03-21 Thread Juergen Gross
ulich <jbeul...@suse.com> Tested-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible

2018-03-21 Thread Juergen Gross
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 <jgr...@sus

[Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-21 Thread Juergen Gross
has shown not to perform better with PCID at least on some machines the default is to use PCID only for domains subject to XPTI. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V3: - support PCID for non-XPTI case, too - add command line parameter for controlling usage of PCID - check PCID

[Xen-devel] [PATCH v3 6/7] xen/x86: use flag byte for decision whether xen_cr3 is valid

2018-03-21 Thread Juergen Gross
off-by: Juergen Gross <jgr...@suse.com> --- V3: - renamed use_xen_cr3 to better fitting use_pv_cr3 - corrected comment regarding semantics of use_pv_cr3 (Jan Beulich) - prefer 32-bit operations over 8- or 16-bit ones (Jan Beulich) --- xen/arch/x86/domain.c | 1 + xen/arch

[Xen-devel] [PATCH v3 0/7] xen/x86: various XPTI speedups

2018-03-21 Thread Juergen Gross
2m21.767s (+97%)1m23.053s (+15%) A git branch of that series (+ Jan's patches) is available: https://github.com/jgross1/xen.git xpti Juergen Gross (7): x86/xpti: avoid copying L4 page table contents when possible x86/xpti: don't flush TLB twice when switching to 64-bit pv context xen/x8

[Xen-devel] [PATCH v3 3/7] xen/x86: support per-domain flag for xpti

2018-03-21 Thread Juergen Gross
n/arch/x86/pv/domain.c as it is pv-domain specific. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V3: - latch get_cpu_info() return value in variable (Jan Beulich) - call always xpti_domain_init() for pv dom0 (Jan Beulich) - add __init annotations (Jan Beulich) - drop per domain XPTI mess

[Xen-devel] [PATCH v3 4/7] xen/x86: use invpcid for flushing the TLB

2018-03-21 Thread Juergen Gross
ng the use of INVPCID. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V3: - new patch --- docs/misc/xen-command-line.markdown | 8 xen/arch/x86/cpu/mtrr/generic.c | 37 ++--- xen/arch/x86/flushtlb.c | 31 +

[Xen-devel] [PATCH v3 2/7] x86/xpti: don't flush TLB twice when switching to 64-bit pv context

2018-03-21 Thread Juergen Gross
When switching to a 64-bit pv context the TLB is flushed twice today: the first time when switching to the new address space in write_ptbase(), the second time when switching to guest mode in restore_to_guest. Avoid the first TLB flush in that case. Signed-off-by: Juergen Gross <jgr...@suse.

[Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-21 Thread Juergen Gross
states with cr3/cr4 having inconsistent values (e.g. global pages being activated while cr3 already specifies a XPTI address space) move loading of the new cr4 value to write_ptbase() (actually to write_cr3_cr4() called by write_ptbase()). Signed-off-by: Juergen Gross <jgr...@suse.com> --- V3:

Re: [Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-23 Thread Juergen Gross
On 23/03/18 08:46, Jan Beulich wrote: On 22.03.18 at 19:18, wrote: >> On 22/03/18 17:30, Jan Beulich wrote: >> On 21.03.18 at 13:51, wrote: Instead of flushing the TLB from global pages when switching address spaces with XPTI being active just

[Xen-devel] [PATCH for-4.11] tools/xenstore: fix linking libxenstore with ldl

2018-03-23 Thread Juergen Gross
nking libxenstore.so specifying "-ldl" as a trailing option. So use APPEND_LDFLAGS instead of LDFLAGS for adding the "-ldl" option when linking libxenstore.so. Signed-off-by: Juergen Gross <jgr...@suse.com> --- tools/xenstore/Makefile | 2 +- 1 file changed, 1 insertion(

Re: [Xen-devel] [PATCH v3 5/7] xen/x86: disable global pages for domains with XPTI active

2018-03-23 Thread Juergen Gross
On 23/03/18 09:14, Jan Beulich wrote: On 23.03.18 at 08:58, wrote: >> On 23/03/18 08:46, Jan Beulich wrote: >> On 22.03.18 at 19:18, wrote: On 22/03/18 17:30, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> Instead

Re: [Xen-devel] [PATCH v4 0/8] x86: Meltdown band-aid overhead reduction

2018-03-23 Thread Juergen Gross
On 19/03/18 14:32, Jan Beulich wrote: > 1: NOP out most XPTI entry/exit code when it's not in use > 2: disable XPTI when RDCL_NO > 3: x86: log XPTI enabled status > 4: use %r12 to write zero into xen_cr3 > 5: reduce .text.entry > 6: enable interrupts earlier with XPTI disabled > 7: also NOP out

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-23 Thread Juergen Gross
On 23/03/18 11:51, Jan Beulich wrote: On 21.03.18 at 13:51, wrote: >> Avoid flushing the complete TLB when switching %cr3 for mitigation of >> Meltdown by using the PCID feature if available. >> >> We are using 4 PCID values for a 64 bit pv domain subject to XPTI and >> 2

Re: [Xen-devel] [PATCH v3 2/7] x86/xpti: don't flush TLB twice when switching to 64-bit pv context

2018-03-23 Thread Juergen Gross
nd time when switching to guest mode in >> restore_to_guest. >> >> Avoid the first TLB flush in that case. >> >> Signed-off-by: Juergen Gross <jgr...@suse.com> >> --- >> V3: >> - omit setting root_pgt_changed to false (Jan Beulich) >> --- >>

Re: [Xen-devel] [PATCH v3 7/7] xen/x86: use PCID feature

2018-03-23 Thread Juergen Gross
On 23/03/18 14:46, Jan Beulich wrote: On 23.03.18 at 12:29, wrote: >> On 23/03/18 11:51, Jan Beulich wrote: >> On 21.03.18 at 13:51, wrote: Avoid flushing the complete TLB when switching %cr3 for mitigation of Meltdown by using the PCID

Re: [Xen-devel] [PATCH v4 1/4] x86/PVHv2: Add memory map pointer to hvm_start_info struct

2018-03-21 Thread Juergen Gross
On 21/03/18 17:46, Maran Wilson wrote: > On 3/21/2018 2:40 AM, Juergen Gross wrote: >> On 21/03/18 10:28, Roger Pau Monné wrote: >>> On Tue, Mar 20, 2018 at 09:48:56AM -0700, Maran Wilson wrote: >>>> +/* >>>>    * C representation of the x86/HVM start info

[Xen-devel] Xen 4.11 Development Update

2018-03-18 Thread Juergen Gross
config space emulation in Xen for PVH Dom0 (v8) - Roger Paul Monné * XPTI speedup (v2) - Juergen Gross === ARM === * SMMUv3 driver (RFC v4) - Sameer Goel * IORT support (RFC) - Manish Jaggi * Implement branch predictor hardening for affected Cortex-A CPUs (v1) - Julien Grall

Re: [Xen-devel] [PATCH v3 1/4] x86/PVHv2: Add memory map pointer to hvm_start_info struct

2018-03-16 Thread Juergen Gross
On 16/03/18 12:48, Jan Beulich wrote: On 16.03.18 at 12:37, wrote: >> On Fri, Mar 16, 2018 at 05:29:27AM -0600, Jan Beulich wrote: >> On 16.03.18 at 12:11, wrote: On Thu, Mar 15, 2018 at 02:33:09PM -0700, Maran Wilson wrote: > @@

Re: [Xen-devel] [PATCH 1/2] x86: report if PCID and INVPCID are supported

2018-03-05 Thread Juergen Gross
On 05/03/18 10:50, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.l...@citrix.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 2/2] x86: use invpcid to do global flushing

2018-03-05 Thread Juergen Gross
On 05/03/18 10:50, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.l...@citrix.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 1/2] x86: report if PCID and INVPCID are supported

2018-03-05 Thread Juergen Gross
On 05/03/18 12:20, Jan Beulich wrote: On 05.03.18 at 10:50, wrote: >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -1701,6 +1701,13 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> cpu_has_nx ? XENLOG_INFO : XENLOG_WARNING

<    5   6   7   8   9   10   11   12   13   14   >