Re: [XEN PATCH v4] hvmloader: Enable MMIO and I/O decode, after all resource allocation

2020-04-15 Thread Jan Beulich
On 14.04.2020 19:15, Harsha Shamsundara Havanur wrote: > @@ -120,6 +121,11 @@ void pci_setup(void) > */ > bool allow_memory_relocate = 1; > > +BUILD_BUG_ON((typeof(*pci_devfn_decode_type))PCI_COMMAND_MEMORY > +!= PCI_COMMAND_MEMORY); > +BUILD_BUG_ON((typeof(*pci_dev

[xen-unstable test] 149648: tolerable FAIL - PUSHED

2020-04-15 Thread osstest service owner
flight 149648 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/149648/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 18 guest-localmigrate/x10 fail like 149642 test-amd64-i386-xl-qemut-win7-amd64

Re: [PATCH v2 2/5] x86_64/mm: map and unmap page tables in m2p_mapped

2020-04-15 Thread Jan Beulich
On 08.04.2020 15:36, Hongyan Xia wrote: > --- a/xen/arch/x86/x86_64/mm.c > +++ b/xen/arch/x86/x86_64/mm.c > @@ -129,14 +129,14 @@ static mfn_t alloc_hotadd_mfn(struct mem_hotadd_info > *info) > static int m2p_mapped(unsigned long spfn) > { > unsigned long va; > -l3_pgentry_t *l3_ro_mpt;

Re: [PATCH v2 3/5] x86_64/mm: map and unmap page tables in share_hotadd_m2p_table

2020-04-15 Thread Jan Beulich
On 08.04.2020 15:36, Hongyan Xia wrote: > From: Wei Liu > > Fetch lYe by mapping and unmapping lXe instead of using the direct map, > which is now done via the lYe_from_lXe() helpers. > > Signed-off-by: Wei Liu > Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich

Re: [PATCH-for-5.1 1/3] target: Remove unnecessary CPU() cast

2020-04-15 Thread Cédric Le Goater
On 4/12/20 11:09 PM, Philippe Mathieu-Daudé wrote: > The CPU() macro is defined as: > > #define CPU(obj) ((CPUState *)(obj)) > > Remove an unnecessary CPU() cast. > > Patch created mechanically using spatch with this script: > > @@ > typedef CPUState; > CPUState *s; > @@ > - CPU(s

Re: [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast

2020-04-15 Thread Cédric Le Goater
On 4/12/20 11:09 PM, Philippe Mathieu-Daudé wrote: > The DEVICE() macro is defined as: > > #define DEVICE(obj) OBJECT_CHECK(DeviceState, (obj), TYPE_DEVICE) > > Remove unnecessary DEVICE() casts. > > Patch created mechanically using spatch with this script: > > @@ > typedef DeviceState; >

RE: [PATCH] docs: update xenstore migration design document

2020-04-15 Thread Paul Durrant
> -Original Message- > From: Xen-devel On Behalf Of Juergen > Gross > Sent: 14 April 2020 17:00 > To: xen-devel@lists.xenproject.org > Cc: Juergen Gross ; Stefano Stabellini > ; Julien Grall > ; Wei Liu ; Andrew Cooper > ; Ian Jackson > ; George Dunlap ; Jan > Beulich > Subject: [PATC

[PATCH 0/2] x86: high compat r/o M2P table handling adjustments

2020-04-15 Thread Jan Beulich
While looking at "x86_64/mm: map and unmap page tables in destroy_compat_m2p_mapping" it occurred to me that the mappings changed there can be dropped altogether, as can the linear address range used for this. Note that both patches have only been lightly tested so far, I guess in particular the 2n

[PATCH] arm/xen: make _xen_start_info static

2020-04-15 Thread Jason Yan
Fix the following sparse warning: arch/arm64/xen/../../arm/xen/enlighten.c:39:19: warning: symbol '_xen_start_info' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- arch/arm/xen/enlighten.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 2/2] x86: drop high compat r/o M2P table address range

2020-04-15 Thread Jan Beulich
Now that we don't properly hook things up into the page tables anymore we also don't need to set aside an address range. Drop it, using compat_idle_pg_table_l2[] simply (explicitly) from slot 0. While doing the re-arrangement, which is accompanied by the dropping or replacing of some local variabl

[PATCH 1/2] x86: drop unnecessary page table walking in compat r/o M2P handling

2020-04-15 Thread Jan Beulich
We have a global variable where the necessary L2 table is recorded; no need to inspect L4 and L3 tables (and this way a few less places will eventually need adjustment when we want to support 5-level page tables). Also avoid setting up the L3 entry, as the address range never gets used anyway (it'l

Re: [PATCH v2 4/5] x86_64/mm: map and unmap page tables in destroy_compat_m2p_mapping

2020-04-15 Thread Jan Beulich
On 08.04.2020 15:36, Hongyan Xia wrote: > From: Wei Liu > > Signed-off-by: Wei Liu > Signed-off-by: Hongyan Xia > > --- > Changed in v2: > - there is pretty much no point in keeping l3_ro_mpt mapped, just fetch > the l3e instead, which also cleans up the code. Even better, there's no need t

Re: [PATCH v2 5/5] x86_64/mm: map and unmap page tables in destroy_m2p_mapping

2020-04-15 Thread Jan Beulich
On 08.04.2020 15:36, Hongyan Xia wrote: > @@ -290,26 +291,30 @@ static void destroy_m2p_mapping(struct mem_hotadd_info > *info) > continue; > } > > -l2_ro_mpt = l3e_to_l2e(l3_ro_mpt[l3_table_offset(va)]); > -if (!(l2e_get_flags(l2_ro_mpt[l2_table_offset(va)]

Re: [PATCH] docs: update xenstore migration design document

2020-04-15 Thread Jürgen Groß
On 15.04.20 10:09, Paul Durrant wrote: -Original Message- From: Xen-devel On Behalf Of Juergen Gross Sent: 14 April 2020 17:00 To: xen-devel@lists.xenproject.org Cc: Juergen Gross ; Stefano Stabellini ; Julien Grall ; Wei Liu ; Andrew Cooper ; Ian Jackson ; George Dunlap ; Jan Beulich

[PATCH 0/3] xenoprof: XSA-313 follow-up

2020-04-15 Thread Jan Beulich
Patch 1 was considered to become part of the XSA, but it was then decided against. The other two are a little bit of cleanup, albeit there's certainly far more room for tidying. Yet then again Paul, in his mail from Mar 13, was asking whether we shouldn't drop xenoprof altogether, at which point cl

[xen-4.9-testing test] 149649: tolerable trouble: fail/pass/starved - PUSHED

2020-04-15 Thread osstest service owner
flight 149649 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/149649/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-qemuu-ws16-amd64 14 guest-localmigrate fail REGR. vs. 146210 Tests which did not s

RE: [PATCH 0/3] xenoprof: XSA-313 follow-up

2020-04-15 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 15 April 2020 09:45 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; George Dunlap > ; Ian Jackson > ; Julien Grall ; Stefano Stabellini > ; Wei Liu ; Paul Durrant > Subject: [PATCH 0/3] xenoprof: XSA-313 follow-up > > Patch 1 w

[PATCH 1/3] xenoprof: adjust ordering of page sharing vs domain type setting

2020-04-15 Thread Jan Beulich
Buffer pages should be shared with "ignored" or "active" guests only (besides, obviously, the primary profiling domain). Hence domain type should be set to "ignored" before unsharing from the primary domain (which implies even a previously "passive" domain may then access its buffers, albeit that's

[PATCH OSSTEST 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Roger Pau Monne
Check if hosts have SMT based on the number of threads per core. A value of threads per core different than 0 implies SMT support. Signed-off-by: Roger Pau Monné --- sg-run-job | 1 + ts-examine-cpu | 32 2 files changed, 33 insertions(+) create mode 100755

[PATCH 3/3] xenoprof: limit scope of types and #define-s

2020-04-15 Thread Jan Beulich
Quite a few of the items are used by xenoprof.c only, so move them there to limit their visibility as well as the amount of re-building needed in case of changes. Also drop the inclusion of the public header there. Signed-off-by: Jan Beulich --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x

[PATCH 2/3] xenoprof: drop unused struct xenoprof fields

2020-04-15 Thread Jan Beulich
Both is_primary and domain_ready are only ever written to. Drop both fields and restrict structure visibility to just the one involved CU. While doing so (and just for starters) make "is_compat" properly bool. Signed-off-by: Jan Beulich --- a/xen/common/xenoprof.c +++ b/xen/common/xenoprof.c @@

[PATCH OSSTEST 2/2] make-flight: add a core scheduling job

2020-04-15 Thread Roger Pau Monne
Run a simple core scheduling tests on a host that has SMT support. This is only enabled for Xen >= 4.13. The runvar difference is: +test-amd64-coresched-amd64-xl all_host_di_version 2020-02-10 +test-amd64-coresched-i386-xl all_host_di_version 2020-02-10 +test-amd64-coresched-amd64-xl all_host_su

Re: [PATCH 0/3] xenoprof: XSA-313 follow-up

2020-04-15 Thread Andrew Cooper
On 15/04/2020 09:50, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 15 April 2020 09:45 >> To: xen-devel@lists.xenproject.org >> Cc: Andrew Cooper ; George Dunlap >> ; Ian Jackson >> ; Julien Grall ; Stefano >> Stabellini >> ; Wei Liu ; Paul Durrant >> Subject:

Re: xenoprof

2020-04-15 Thread Jan Beulich
On 13.03.2020 18:28, Paul Durrant wrote: > I'm trying to determine the status of HYPERVISOR_xenoprof_op. The code > behind it appears to be unmaintained and I cannot find any > support statement for it. Googling around finds some mentions of Xen and > oprofile but it's not clear whether it work

Re: [Xen-devel] [PATCH] sched/core: Fix bug when moving a domain between cpupools

2020-04-15 Thread Jürgen Groß
On 27.03.20 20:30, Jeff Kubascik wrote: For each UNIT, sched_set_affinity is called before unit->priv is updated to the new cpupool private UNIT data structure. The issue is sched_set_affinity will call the adjust_affinity method of the cpupool. If defined, the new cpupool may use unit->priv (e.g

Re: [PATCH 01/12] xen: introduce xen_dom_flags

2020-04-15 Thread Jan Beulich
On 15.04.2020 03:02, Stefano Stabellini wrote: > We are passing an extra special boolean flag at domain creation to > specify whether we want to the domain to be privileged (i.e. dom0) or > not. Another flag will be introduced later in this series. > > Introduce a new struct xen_dom_flags and move

Re: [PATCH v2] Introduce a description of a new optional tag for Backports

2020-04-15 Thread George Dunlap
> On Apr 15, 2020, at 7:23 AM, Jan Beulich wrote: > > On 14.04.2020 18:54, Stefano Stabellini wrote: >> On Tue, 14 Apr 2020, Jan Beulich wrote: >>> On 10.04.2020 18:49, Stefano Stabellini wrote: >> [snip] +Backport: all + +It marks a commit for being a candidate for backpor

Re: [XEN PATCH v4] hvmloader: Enable MMIO and I/O decode, after all resource allocation

2020-04-15 Thread Shamsundara Havanur, Harsha
On Wed, 2020-04-15 at 09:13 +0200, Jan Beulich wrote: > CAUTION: This email originated from outside of the organization. Do > not click links or open attachments unless you can confirm the sender > and know the content is safe. > > > > On 14.04.2020 19:15, Harsha Shamsundara Havanur wrote: > > @

Re: [PATCH v2] Introduce a description of a new optional tag for Backports

2020-04-15 Thread Julien Grall
On 15/04/2020 10:43, George Dunlap wrote: On Apr 15, 2020, at 7:23 AM, Jan Beulich wrote: On 14.04.2020 18:54, Stefano Stabellini wrote: On Tue, 14 Apr 2020, Jan Beulich wrote: On 10.04.2020 18:49, Stefano Stabellini wrote: [snip] +Backport: all + +It marks a commit for being a

Re: [PATCH v2] Introduce a description of a new optional tag for Backports

2020-04-15 Thread George Dunlap
> On Apr 15, 2020, at 10:49 AM, Julien Grall wrote: > > > > On 15/04/2020 10:43, George Dunlap wrote: >>> On Apr 15, 2020, at 7:23 AM, Jan Beulich wrote: >>> >>> On 14.04.2020 18:54, Stefano Stabellini wrote: On Tue, 14 Apr 2020, Jan Beulich wrote: > On 10.04.2020 18:49, Stefano St

Re: [PATCH 1/2] x86: drop unnecessary page table walking in compat r/o M2P handling

2020-04-15 Thread Hongyan Xia
On Wed, 2020-04-15 at 10:23 +0200, Jan Beulich wrote: > We have a global variable where the necessary L2 table is recorded; > no > need to inspect L4 and L3 tables (and this way a few less places will > eventually need adjustment when we want to support 5-level page > tables). > Also avoid setting

[PATCH OSSTEST v2 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Roger Pau Monne
Check if hosts have SMT based on the number of threads per core. A value of threads per core greater than 1 implies SMT support. Signed-off-by: Roger Pau Monné --- Changes since v1: - Fix regex and set SMT if number of threads per core is > 1. --- sg-run-job | 1 + ts-examine-cpu | 32

Re: [PATCH] docs: update xenstore migration design document

2020-04-15 Thread Edwin Torok
On Tue, 2020-04-14 at 17:59 +0200, Juergen Gross wrote: > In the past there have been several attempts to make Xenstore > restartable. This requires to transfer the internal Xenstore state to > the new instance. With the Xenstore migration protocol added recently > to Xen's documentation a first ba

Re: [PATCH 02/12] xen/arm: introduce arch_xen_dom_flags and direct_map

2020-04-15 Thread Jan Beulich
On 15.04.2020 03:02, Stefano Stabellini wrote: > --- a/xen/arch/arm/domain.c > +++ b/xen/arch/arm/domain.c > @@ -682,6 +682,7 @@ int arch_domain_create(struct domain *d, > return 0; > > ASSERT(config != NULL); > +d->arch.direct_map = flags != NULL ? flags->arch.is_direct_map : f

Re: [PATCH 1/2] x86: drop unnecessary page table walking in compat r/o M2P handling

2020-04-15 Thread Jan Beulich
On 15.04.2020 11:59, Hongyan Xia wrote: > On Wed, 2020-04-15 at 10:23 +0200, Jan Beulich wrote: >> @@ -627,16 +612,10 @@ void __init paging_init(void) >> #undef MFN >> >> /* Create user-accessible L2 directory to map the MPT for compat >> guests. */ >> -BUILD_BUG_ON(l4_table_offset(RDWR

[xen-unstable-coverity test] 149674: all pass - PUSHED

2020-04-15 Thread osstest service owner
flight 149674 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/149674/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen fcd06227f83643194f8018f8dd37adce57763a61 baseline version: xen 7372

Re: [PATCH v2] Introduce a description of a new optional tag for Backports

2020-04-15 Thread Jan Beulich
On 15.04.2020 11:49, Julien Grall wrote: > > > On 15/04/2020 10:43, George Dunlap wrote: >> >> >>> On Apr 15, 2020, at 7:23 AM, Jan Beulich wrote: >>> >>> On 14.04.2020 18:54, Stefano Stabellini wrote: On Tue, 14 Apr 2020, Jan Beulich wrote: > On 10.04.2020 18:49, Stefano Stabellini wro

Re: [XEN PATCH v4] hvmloader: Enable MMIO and I/O decode, after all resource allocation

2020-04-15 Thread Jan Beulich
On 15.04.2020 11:32, Shamsundara Havanur, Harsha wrote: > On Wed, 2020-04-15 at 09:13 +0200, Jan Beulich wrote: >> On 14.04.2020 19:15, Harsha Shamsundara Havanur wrote: >>> @@ -526,10 +538,17 @@ void pci_setup(void) >>> * has IO enabled, even if there is no I/O BAR on that >>>

Re: [PATCH v2] Introduce a description of a new optional tag for Backports

2020-04-15 Thread Jan Beulich
On 15.04.2020 11:56, George Dunlap wrote: > > >> On Apr 15, 2020, at 10:49 AM, Julien Grall wrote: >> >> >> >> On 15/04/2020 10:43, George Dunlap wrote: On Apr 15, 2020, at 7:23 AM, Jan Beulich wrote: On 14.04.2020 18:54, Stefano Stabellini wrote: > On Tue, 14 Apr 2020, Jan B

Re: [PATCH] docs: update xenstore migration design document

2020-04-15 Thread Jürgen Groß
On 15.04.20 12:16, Edwin Torok wrote: On Tue, 2020-04-14 at 17:59 +0200, Juergen Gross wrote: In the past there have been several attempts to make Xenstore restartable. This requires to transfer the internal Xenstore state to the new instance. With the Xenstore migration protocol added recently

Re: [PATCH 1/2] x86: drop unnecessary page table walking in compat r/o M2P handling

2020-04-15 Thread Hongyan Xia
On Wed, 2020-04-15 at 12:34 +0200, Jan Beulich wrote: > On 15.04.2020 11:59, Hongyan Xia wrote: > > ... > > I would like to drop relevant map/unmap patches and replace them > > with > > the new clean-up ones (and place them at the beginning of the > > series), > > if there is no objection with that

Re: [PATCH V8] x86/altp2m: Hypercall to set altp2m view visibility

2020-04-15 Thread Jan Beulich
On 13.04.2020 08:51, Alexandru Isaila wrote: > @@ -4786,6 +4787,19 @@ static int do_altp2m_op( > break; > } > > +case HVMOP_altp2m_set_visibility: > +{ > +unsigned int idx = a.u.set_visibility.altp2m_idx; > + > +if ( a.u.set_visibility.pad ) > +rc

[PATCH] x86/altp2m: add missing break

2020-04-15 Thread Roger Pau Monne
Add a missing break in the HVMOP_altp2m_set_visibility case, or else code flow will continue into the default case and trigger the assert. Fixes: 3fd3e9303ec4b1 ('x86/altp2m: hypercall to set altp2m view visibility') Coverity-ID: 1461759 Signed-off-by: Roger Pau Monné --- xen/arch/x86/hvm/hvm.c

Re: [PATCH 1/2] x86: drop unnecessary page table walking in compat r/o M2P handling

2020-04-15 Thread Wei Liu
On Wed, Apr 15, 2020 at 10:23:31AM +0200, Jan Beulich wrote: > We have a global variable where the necessary L2 table is recorded; no > need to inspect L4 and L3 tables (and this way a few less places will > eventually need adjustment when we want to support 5-level page tables). > Also avoid setti

Re: [PATCH] x86/altp2m: add missing break

2020-04-15 Thread Wei Liu
On Wed, Apr 15, 2020 at 01:09:39PM +0200, Roger Pau Monne wrote: > Add a missing break in the HVMOP_altp2m_set_visibility case, or else > code flow will continue into the default case and trigger the assert. > > Fixes: 3fd3e9303ec4b1 ('x86/altp2m: hypercall to set altp2m view visibility') > Coveri

Re: [PATCH 2/3] xenoprof: drop unused struct xenoprof fields

2020-04-15 Thread Wei Liu
On Wed, Apr 15, 2020 at 10:53:20AM +0200, Jan Beulich wrote: > Both is_primary and domain_ready are only ever written to. Drop both > fields and restrict structure visibility to just the one involved CU. > While doing so (and just for starters) make "is_compat" properly bool. > > Signed-off-by: Ja

Re: [PATCH 3/3] xenoprof: limit scope of types and #define-s

2020-04-15 Thread Wei Liu
On Wed, Apr 15, 2020 at 10:53:38AM +0200, Jan Beulich wrote: > Quite a few of the items are used by xenoprof.c only, so move them there > to limit their visibility as well as the amount of re-building needed in > case of changes. Also drop the inclusion of the public header there. > > Signed-off-b

Re: [PATCH 04/12] xen: split alloc_heap_pages in two halves for reusability

2020-04-15 Thread Wei Liu
On Tue, Apr 14, 2020 at 06:02:47PM -0700, Stefano Stabellini wrote: > This patch splits the implementation of alloc_heap_pages into two halves > so that the second half can be reused by the next patch. It would be good if you can put a summary on what each half does here so that we can check you i

Re: [PATCH 02/12] xen/arm: introduce arch_xen_dom_flags and direct_map

2020-04-15 Thread Andrew Cooper
On 15/04/2020 11:27, Jan Beulich wrote: > On 15.04.2020 03:02, Stefano Stabellini wrote: >> --- a/xen/arch/arm/domain.c >> +++ b/xen/arch/arm/domain.c >> @@ -682,6 +682,7 @@ int arch_domain_create(struct domain *d, >> return 0; >> >> ASSERT(config != NULL); >> +d->arch.direct_ma

[PATCH AUTOSEL 5.6 062/129] x86/xen: Make the boot CPU idle task reliable

2020-04-15 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 2f62f36e62daec43aa7b9633ef7f18e042a80bed ] The unwinder reports the boot CPU idle task's stack on XEN PV as unreliable, which affects at least live patching. There are two reasons for this. First, the task does not follow the x86 convention that its stack s

[PATCH AUTOSEL 5.5 053/106] x86/xen: Make the boot CPU idle task reliable

2020-04-15 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 2f62f36e62daec43aa7b9633ef7f18e042a80bed ] The unwinder reports the boot CPU idle task's stack on XEN PV as unreliable, which affects at least live patching. There are two reasons for this. First, the task does not follow the x86 convention that its stack s

Re: [PATCH v9 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-15 Thread Roger Pau Monné
On Tue, Apr 14, 2020 at 05:06:23PM +0200, Jan Beulich wrote: > On 14.04.2020 16:53, Roger Pau Monné wrote: > > On Tue, Apr 14, 2020 at 03:50:15PM +0200, Jan Beulich wrote: > >> On 14.04.2020 13:19, Roger Pau Monné wrote: > > I think this should work, but I would rather do it in a separate > >>>

Re: [PATCH v9 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-15 Thread Jan Beulich
On 15.04.2020 13:49, Roger Pau Monné wrote: > On Tue, Apr 14, 2020 at 05:06:23PM +0200, Jan Beulich wrote: >> On 14.04.2020 16:53, Roger Pau Monné wrote: >>> On Tue, Apr 14, 2020 at 03:50:15PM +0200, Jan Beulich wrote: On 14.04.2020 13:19, Roger Pau Monné wrote: >>> I think this should wor

[PATCH] x86: retrieve and log CPU frequency information

2020-04-15 Thread Jan Beulich
While from just a single Skylake system it is already clear that we can't base any of our logic on CPUID leaf 15 [1] (leaf 16 is documented to be used for display purposes only anyway), logging this information may still give us some reference in case of problems as well as for future work. Additio

[PATCH v3 1/4] x86/shim: map and unmap page tables in replace_va_mapping

2020-04-15 Thread Hongyan Xia
From: Wei Liu Also, introduce lYe_from_lXe() macros which do not rely on the direct map when walking page tables. Unfortunately, they cannot be inline functions due to the header dependency on domain_page.h, so keep them as macros just like map_lYt_from_lXe(). Signed-off-by: Wei Liu Signed-off-

[PATCH v3 0/4] use new API for Xen page tables

2020-04-15 Thread Hongyan Xia
From: Hongyan Xia This small series is basically just rewriting functions using the new API to map and unmap PTEs. Each patch is independent. Apart from mapping and unmapping page tables, no other functional change intended. --- Changed in v3: - address all comments in v2. - drop patch 4, since

[PATCH v3 4/4] x86_64/mm: map and unmap page tables in destroy_m2p_mapping

2020-04-15 Thread Hongyan Xia
From: Wei Liu Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia --- Changed in v3: - rename l2_ro_mpt into pl2e to avoid confusion. Changed in v2: - no point in re-mapping l2t because it is exactly the same as l2_ro_mpt. - point l2_ro_mpt to the entry instead of doing l2_table_offset() all

[PATCH v3 3/4] x86_64/mm: map and unmap page tables in share_hotadd_m2p_table

2020-04-15 Thread Hongyan Xia
From: Wei Liu Fetch lYe by mapping and unmapping lXe instead of using the direct map, which is now done via the lYe_from_lXe() helpers. Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v2: - the introduction of the macros is now lifted to a previous p

[PATCH v3 2/4] x86_64/mm: map and unmap page tables in m2p_mapped

2020-04-15 Thread Hongyan Xia
From: Wei Liu Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v3: - rename l3e_ro_mpt and l2e_ro_mpt, just call them l3e and l2e. Changed in v2: - avoid adding goto labels, simply get the PTE and unmap quickly. - code style fixes. --- xen/arch/x86/x

Re: [PATCH OSSTEST 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST 1/2] exanime: test for SMT and add a host flag"): > Check if hosts have SMT based on the number of threads per core. A > value of threads per core different than 0 implies SMT support. ... > +logm("$ho->{Ident} threads per core: $threads"); > +hostflag_putat

Re: [PATCH OSSTEST 2/2] make-flight: add a core scheduling job

2020-04-15 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST 2/2] make-flight: add a core scheduling job"): > Run a simple core scheduling tests on a host that has SMT support. > This is only enabled for Xen >= 4.13. ... > + # Core-scheduling tests are x86 only > + if [ x$test_coresched = xy -a $xenarch = amd64 ]; t

Re: [PATCH OSSTEST v2 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH OSSTEST v2 1/2] exanime: test for SMT and add a host flag"): > Check if hosts have SMT based on the number of threads per core. A > value of threads per core greater than 1 implies SMT support. I spotted the "0" in v1 but since you had clearly stated the same thing

Re: [PATCH 05/12] xen: introduce reserve_heap_pages

2020-04-15 Thread Julien Grall
On 15/04/2020 02:02, Stefano Stabellini wrote: Introduce a function named reserve_heap_pages (similar to alloc_heap_pages) that allocates a requested memory range. Call __alloc_heap_pages for the implementation. Change __alloc_heap_pages so that the original page doesn't get modified, giving bac

Re: [PATCH 01/12] xen: introduce xen_dom_flags

2020-04-15 Thread Julien Grall
On 15/04/2020 10:12, Jan Beulich wrote: On 15.04.2020 03:02, Stefano Stabellini wrote: We are passing an extra special boolean flag at domain creation to specify whether we want to the domain to be privileged (i.e. dom0) or not. Another flag will be introduced later in this series. Introduce

Re: [PATCH 03/12] xen/arm: introduce 1:1 mapping for domUs

2020-04-15 Thread Julien Grall
On 15/04/2020 02:02, Stefano Stabellini wrote: In some cases it is desirable to map domU memory 1:1 (guest physical == physical.) For instance, because we want to assign a device to the domU but the IOMMU is not present or cannot be used. In these cases, other mechanisms should be used for DMA

Re: [PATCH 06/12] xen/arm: reserve 1:1 memory for direct_map domUs

2020-04-15 Thread Julien Grall
On 15/04/2020 02:02, Stefano Stabellini wrote: Use reserve_domheap_pages to implement the direct-map ranges allocation for DomUs. Signed-off-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deletions(-)

Re: [PATCH 07/12] xen/arm: new vgic: rename vgic_cpu/dist_base to c/dbase

2020-04-15 Thread Julien Grall
Hi, On 15/04/2020 02:02, Stefano Stabellini wrote: To be uniform with the old vgic. Name uniformity will become immediately useful in the following patch. Please no. Those fields are not meant to be exposed outside of the vGIC. 'cbase' is also much less obvious to read over vgic_cpu_base. In

[xen-4.10-testing test] 149650: regressions - trouble: fail/pass/starved

2020-04-15 Thread osstest service owner
flight 149650 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/149650/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-5 51 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 146101 Tests which di

Re: [PATCH OSSTEST 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Roger Pau Monné
On Wed, Apr 15, 2020 at 02:04:35PM +0100, Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH OSSTEST 1/2] exanime: test for SMT and add a > host flag"): > > Check if hosts have SMT based on the number of threads per core. A > > value of threads per core different than 0 implies SMT support. > ..

Re: [PATCH OSSTEST 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Ian Jackson
Roger Pau Monne writes ("Re: [PATCH OSSTEST 1/2] exanime: test for SMT and add a host flag"): > If OTOH we don't want to be that fine grained I think > hw-{smt,iommu,vmx,...} would also be fine. > > Not sure whether this has helped much. I guess my vote would be for > cpu-smt namespace. Let's go

[PATCH V1] Fix for Coverity ID: 1461759

2020-04-15 Thread Alexandru Isaila
Signed-off-by: Alexandru Isaila --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/hvm/hvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 6f6f3f73a8..45959d3412 100644 --- a/xen/arch/x86/hvm/hv

Re: [PATCH V1] Fix for Coverity ID: 1461759

2020-04-15 Thread Wei Liu
On Wed, Apr 15, 2020 at 04:53:13PM +0300, Alexandru Isaila wrote: > Signed-off-by: Alexandru Isaila Thanks, but Roger already posted a fix for this. Wei.

Re: [PATCH 08/12] xen/arm: if is_domain_direct_mapped use native addresses for GICv2

2020-04-15 Thread Julien Grall
On 15/04/2020 02:02, Stefano Stabellini wrote: Today we use native addresses to map the GICv2 for Dom0 and fixed addresses for DomUs. This patch changes the behavior so that native addresses are used for any domain that is_domain_direct_mapped. Signed-off-by: Stefano Stabellini --- xen/ar

Re: [PATCH v3 1/4] x86/shim: map and unmap page tables in replace_va_mapping

2020-04-15 Thread Jan Beulich
On 15.04.2020 13:59, Hongyan Xia wrote: > From: Wei Liu > > Also, introduce lYe_from_lXe() macros which do not rely on the direct > map when walking page tables. Unfortunately, they cannot be inline > functions due to the header dependency on domain_page.h, so keep them as > macros just like map_

Re: [PATCH v3 4/4] x86_64/mm: map and unmap page tables in destroy_m2p_mapping

2020-04-15 Thread Jan Beulich
On 15.04.2020 13:59, Hongyan Xia wrote: > @@ -285,26 +286,30 @@ static void destroy_m2p_mapping(struct mem_hotadd_info > *info) > continue; > } > > -l2_ro_mpt = l3e_to_l2e(l3_ro_mpt[l3_table_offset(va)]); > -if (!(l2e_get_flags(l2_ro_mpt[l2_table_offset(va)]

Re: [PATCH 09/12] xen/arm: if is_domain_direct_mapped use native addresses for GICv3

2020-04-15 Thread Julien Grall
Hi, On 15/04/2020 02:02, Stefano Stabellini wrote: Today we use native addresses to map the GICv3 for Dom0 and fixed addresses for DomUs. This patch changes the behavior so that native addresses are used for any domain that is_domain_direct_mapped. The patch has to introduce one #ifndef CONFIG_

[PATCH OSSTEST v3 1/2] exanime: test for SMT and add a host flag

2020-04-15 Thread Roger Pau Monne
Check if hosts have SMT based on the number of threads per core. A value of threads per core greater than 1 implies SMT support. Signed-off-by: Roger Pau Monné --- Changes since v2: - Use hw-smt. Changes since v1: - Fix regex and set SMT if number of threads per core is > 1. --- sg-run-job

[PATCH OSSTEST v3 2/2] make-flight: add a core scheduling job

2020-04-15 Thread Roger Pau Monne
Run a simple core scheduling tests on a host that has SMT support. This is only enabled for Xen >= 4.13. The runvar difference is: +test-amd64-coresched-amd64-xl all_host_di_version 2020-02-10 +test-amd64-coresched-i386-xl all_host_di_version 2020-02-10 +test-amd64-coresched-amd64-xl all_host_su

Re: [XEN PATCH v4 06/18] xen/build: have the root Makefile generates the CFLAGS

2020-04-15 Thread Anthony PERARD
On Wed, Apr 08, 2020 at 01:50:33PM +0200, Jan Beulich wrote: > On 31.03.2020 12:30, Anthony PERARD wrote: > > # Always build obj-bin files as binary even if they come from C source. > > -$(obj-bin-y): CFLAGS := $(filter-out -flto,$(CFLAGS)) > > +# FIXME LTO broken, but we would need a different w

Re: [PATCH V1] Fix for Coverity ID: 1461759

2020-04-15 Thread Alexandru Stefan ISAILA
From: Xen-devel on behalf of Wei Liu Sent: Wednesday, April 15, 2020 4:59 PM To: Alexandru Stefan ISAILA Cc: xen-devel@lists.xenproject.org ; Roger Pau Monné ; Wei Liu ; Jan Beulich ; Andrew Cooper Subject: Re: [PATCH V1] Fix for Coverity ID: 1461759 On Wed

Re: [PATCH 10/12] xen/arm: if is_domain_direct_mapped use native UART address for vPL011

2020-04-15 Thread Julien Grall
Hi Stefano, On 15/04/2020 02:02, Stefano Stabellini wrote: We always use a fix address to map the vPL011 to domains. The address could be a problem for domains that are directly mapped. Instead, for domains that are directly mapped, reuse the address of the physical UART on the platform to avoi

Re: [PATCH 11/12] xen/arm: if xen_force don't try to setup the IOMMU

2020-04-15 Thread Julien Grall
Hi Stefano, On 15/04/2020 02:02, Stefano Stabellini wrote: If xen_force (which means xen,force-assign-without-iommu was requested) don't try to add the device to the IOMMU. Return early instead. Could you explain why this is an issue to call xen_force after iommu_add_dt_device()? Cheers, -

Re: [XEN PATCH v5] hvmloader: Enable MMIO and I/O decode, after all resource allocation

2020-04-15 Thread Jan Beulich
On 15.04.2020 14:27, Harsha Shamsundara Havanur wrote: > It was observed that PCI MMIO and/or IO BARs were programmed with > memory and I/O decodes (bits 0 and 1 of PCI COMMAND register) enabled, > during PCI setup phase. This resulted in incorrect memory mapping as > soon as the lower half of the

Re: [PATCH 12/12] xen/arm: call iomem_permit_access for passthrough devices

2020-04-15 Thread Julien Grall
On 15/04/2020 02:02, Stefano Stabellini wrote: iomem_permit_access should be called for MMIO regions of devices assigned to a domain. Currently it is not called for MMIO regions of passthrough devices of Dom0less guests. This patch fixes it. You can already have cases today where the MMIO re

Re: preparations for 4.13.1 and 4.12.3

2020-04-15 Thread Sander Eikelenboom
On 09/04/2020 09:41, Jan Beulich wrote: > All, > > the releases are due in a week or two. Please point out backports > you find missing from the respective staging branches, but which > you consider relevant. (Ian, I notice there haven't been any > tools side backports at all so far. Julien, Stefa

RE: [XEN PATCH v5] hvmloader: Enable MMIO and I/O decode, after all resource allocation

2020-04-15 Thread Paul Durrant
> -Original Message- > From: Xen-devel On Behalf Of Harsha > Shamsundara Havanur > Sent: 15 April 2020 13:28 > To: xen-devel@lists.xenproject.org > Cc: Wei Liu ; Andrew Cooper ; Ian > Jackson > ; Jan Beulich ; Harsha > Shamsundara Havanur > ; Roger Pau Monné > Subject: [XEN PATCH v5] h

Xen Project {lists,mail,downloads} outage, 22 April

2020-04-15 Thread Ian Jackson
Our listserver and mailserver are going to be updated to current Debian stable on Wednesday the 22nd of April. The outage window is 0600-0900 UTC, but we hope not to use all of it. During this time we expect that mail will be delayed, but hopefully not lost or rejected. The mailing list manageme

Re: [XEN PATCH v5] hvmloader: Enable MMIO and I/O decode, after all resource allocation

2020-04-15 Thread Shamsundara Havanur, Harsha
On Wed, 2020-04-15 at 16:14 +0200, Jan Beulich wrote: > CAUTION: This email originated from outside of the organization. Do > not click links or open attachments unless you can confirm the sender > and know the content is safe. > > > > On 15.04.2020 14:27, Harsha Shamsundara Havanur wrote: > > I

Re: [XEN PATCH v4 07/18] build: Introduce documentation for xen Makefiles

2020-04-15 Thread Anthony PERARD
On Wed, Apr 08, 2020 at 02:00:43PM +0200, Jan Beulich wrote: > On 31.03.2020 12:30, Anthony PERARD wrote: > > This start explainning the variables that can be used in the many > > Makefiles in xen/. > > > > Most of the document copies and modifies text from Linux v5.4 document > > linux.git/Docume

Re: [PATCH v9 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-15 Thread Roger Pau Monné
On Tue, Apr 14, 2020 at 05:06:23PM +0200, Jan Beulich wrote: > On 14.04.2020 16:53, Roger Pau Monné wrote: > > On Tue, Apr 14, 2020 at 03:50:15PM +0200, Jan Beulich wrote: > >> On 14.04.2020 13:19, Roger Pau Monné wrote: > >>> On Tue, Apr 14, 2020 at 12:13:04PM +0200, Jan Beulich wrote: > On 1

[xen-4.11-testing test] 149651: tolerable FAIL - PUSHED

2020-04-15 Thread osstest service owner
flight 149651 xen-4.11-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/149651/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-dmrestrict-amd64-dmrestrict 10 debian-hvm-install fail never pass test-amd64-i386-xl

Re: [PATCH v9 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-15 Thread Jan Beulich
On 15.04.2020 16:49, Roger Pau Monné wrote: > On Tue, Apr 14, 2020 at 05:06:23PM +0200, Jan Beulich wrote: >> On 14.04.2020 16:53, Roger Pau Monné wrote: >>> On Tue, Apr 14, 2020 at 03:50:15PM +0200, Jan Beulich wrote: On 14.04.2020 13:19, Roger Pau Monné wrote: > On Tue, Apr 14, 2020 at 1

Re: [PATCH v9 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-15 Thread Roger Pau Monné
On Wed, Apr 15, 2020 at 05:42:20PM +0200, Jan Beulich wrote: > On 15.04.2020 16:49, Roger Pau Monné wrote: > > On Tue, Apr 14, 2020 at 05:06:23PM +0200, Jan Beulich wrote: > >> On 14.04.2020 16:53, Roger Pau Monné wrote: > >>> On Tue, Apr 14, 2020 at 03:50:15PM +0200, Jan Beulich wrote: > On 1

Re: [XEN PATCH v4 06/18] xen/build: have the root Makefile generates the CFLAGS

2020-04-15 Thread Jan Beulich
On 15.04.2020 16:10, Anthony PERARD wrote: > On Wed, Apr 08, 2020 at 01:50:33PM +0200, Jan Beulich wrote: >> On 31.03.2020 12:30, Anthony PERARD wrote: >>> # Always build obj-bin files as binary even if they come from C source. >>> -$(obj-bin-y): CFLAGS := $(filter-out -flto,$(CFLAGS)) >>> +# FIX

Re: [PATCH v9 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-15 Thread Jan Beulich
On 15.04.2020 17:54, Roger Pau Monné wrote: > On Wed, Apr 15, 2020 at 05:42:20PM +0200, Jan Beulich wrote: >> On 15.04.2020 16:49, Roger Pau Monné wrote: >>> On Tue, Apr 14, 2020 at 05:06:23PM +0200, Jan Beulich wrote: On 14.04.2020 16:53, Roger Pau Monné wrote: > On Tue, Apr 14, 2020 at 0

Re: [XEN PATCH v4 10/18] xen/build: use if_changed on built_in.o

2020-04-15 Thread Anthony PERARD
On Wed, Apr 08, 2020 at 03:35:17PM +0200, Jan Beulich wrote: > On 08.04.2020 15:13, Andrew Cooper wrote: > > On 08/04/2020 13:40, Jan Beulich wrote: > >> On 31.03.2020 12:30, Anthony PERARD wrote: > >>> --- a/xen/Rules.mk > >>> +++ b/xen/Rules.mk > >>> @@ -130,15 +130,24 @@ include $(BASEDIR)/arch/

Re: [XEN PATCH v4 12/18] xen/build: factorise generation of the linker scripts

2020-04-15 Thread Anthony PERARD
On Wed, Apr 08, 2020 at 02:46:42PM +0200, Jan Beulich wrote: > On 31.03.2020 12:30, Anthony PERARD wrote: > > - avoid using "define" for cmd_cc_lds_S, as adding '; \' on each line is > > still mandatory for if_changed (or cmd) macro to work. > > I still don't believe in there being a nee

[PATCH] x86/boot: Fix early exception handling with CONFIG_PERF_COUNTERS

2020-04-15 Thread Andrew Cooper
The PERFC_INCR() macro uses current->processor, but current is not valid during early boot. This causes the following crash to occur if e.g. rdmsr_safe() has to recover from a #GP fault. (XEN) Early fatal page fault at e008:82d0803b1a39 (cr2=0004, ec=) (XEN) [ Xen-4.1

[PATCH v4 1/4] x86/shim: map and unmap page tables in replace_va_mapping

2020-04-15 Thread Hongyan Xia
From: Wei Liu Also, introduce lYe_from_lXe() macros which do not rely on the direct map when walking page tables. Unfortunately, they cannot be inline functions due to the header dependency on domain_page.h, so keep them as macros just like map_lYt_from_lXe(). Signed-off-by: Wei Liu Signed-off-

[PATCH v4 2/4] x86_64/mm: map and unmap page tables in m2p_mapped

2020-04-15 Thread Hongyan Xia
From: Wei Liu Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v3: - rename l3e_ro_mpt and l2e_ro_mpt, just call them l3e and l2e. Changed in v2: - avoid adding goto labels, simply get the PTE and unmap quickly. - code style fixes. --- xen/arch/x86/x

  1   2   >