Re: [PATCH for-4.15] xen: Bump the minimum version of GCC supported to 4.9 (5.1 on arm64)

2021-03-08 Thread Jan Beulich
On 06.03.2021 22:41, Julien Grall wrote: > From: Julien Grall > > Compilers older than 4.8 have known codegen issues which can lead to > silent miscompilation: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 > > Furthermore, pre-4.9 GCC have known bugs (including things like > internal c

Re: [PATCH for-4.15] vtd: make sure QI/IR are disabled before initialisation

2021-03-08 Thread Jan Beulich
On 08.03.2021 08:00, Igor Druzhinin wrote: > BIOS might pass control to Xen leaving QI and/or IR in enabled and/or > partially configured state. In case of x2APIC code path where EIM is > enabled early in boot - those are correctly disabled by Xen before any > attempt to configure. But for xAPIC th

[qemu-mainline test] 159860: regressions - FAIL

2021-03-08 Thread osstest service owner
flight 159860 qemu-mainline real [real] flight 159867 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/159860/ http://logs.test-lab.xenproject.org/osstest/logs/159867/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [PATCH v2 1/2][4.15] x86/PV: conditionally avoid raising #GP for early guest MSR reads

2021-03-08 Thread Roger Pau Monné
On Fri, Mar 05, 2021 at 10:50:34AM +0100, Jan Beulich wrote: > Prior to 4.15 Linux, when running in PV mode, did not install a #GP > handler early enough to cover for example the rdmsrl_safe() of > MSR_K8_TSEG_ADDR in bsp_init_amd() (not to speak of the unguarded read > of MSR_K7_HWCR later in the

[PATCH 0/2] tools/x86: adjust populating of tools/include/xen/

2021-03-08 Thread Jan Beulich
While the first change is a possible 4.15 candidate, the second is pure cleanup (but could, should patch 1 end up being controversial, also be re-based ahead). 1: don't rebuild cpuid-autogen.h every time 2: move arch-specific include/xen/ population into arch-specific rule Jan

[PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Jan Beulich
The first thing the "xen-dir" rule does is delete the entire xen/ subtree. Obviously this includes deleting xen/lib/x86/*autogen.h. As a result there's no original version for $(move-if-changed ...) to compare against, and hence the file and all its consumers would get rebuilt every time. Introduce

[PATCH 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule

2021-03-08 Thread Jan Beulich
There's no need for the common "xen-dir" rule to have an arch-specific part when there already is a arch-specific rule where this can be taken care of. Signed-off-by: Jan Beulich --- I was tempted to also uniformly change the pattern from *autogen.h to *-autogen.h right here - thoughts? I was al

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Tim Deegan
At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: > We can't make correctness of our own behavior dependent upon a > hypervisor underneath us correctly telling us the true physical address > with hardware uses. Without knowing this, we can't be certain reserved > bit faults can actually be

Re: [PATCH v2 1/2][4.15] x86/PV: conditionally avoid raising #GP for early guest MSR reads

2021-03-08 Thread Jan Beulich
On 08.03.2021 09:56, Roger Pau Monné wrote: > On Fri, Mar 05, 2021 at 10:50:34AM +0100, Jan Beulich wrote: >> Prior to 4.15 Linux, when running in PV mode, did not install a #GP >> handler early enough to cover for example the rdmsrl_safe() of >> MSR_K8_TSEG_ADDR in bsp_init_amd() (not to speak of

Re: [PATCH 2/2][4.15?] x86/shadow: encode full GFN in magic MMIO entries

2021-03-08 Thread Tim Deegan
At 16:37 +0100 on 05 Mar (1614962265), Jan Beulich wrote: > Since we don't need to encode all of the PTE flags, we have enough bits > in the shadow entry to store the full GFN. Don't use literal numbers - > instead derive the involved values. Or, where derivation would become > too ugly, sanity-che

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Jan Beulich
On 08.03.2021 10:25, Tim Deegan wrote: > At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: >> We can't make correctness of our own behavior dependent upon a >> hypervisor underneath us correctly telling us the true physical address >> with hardware uses. Without knowing this, we can't be ce

Re: [PATCH for-4.15 2/2] tools/xenstore: Check the format printf for xprintf() and barf{,_perror}()

2021-03-08 Thread Ian Jackson
Julien Grall writes ("Re: [PATCH for-4.15 2/2] tools/xenstore: Check the format printf for xprintf() and barf{,_perror}()"): > Would the following comment work for you? > > /* Function pointer as xprintf() can be configured at runtime. */ > > I can fold it in my patch while committing. Sure, th

[linux-linus test] 159861: regressions - FAIL

2021-03-08 Thread osstest service owner
flight 159861 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/159861/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-xsm7 xen-install fail REGR. vs. 152332 test-amd64-i386-qem

preparations for 4.13.3

2021-03-08 Thread Jan Beulich
All, the release is overdue (my apologies). Please point out backports you find missing from the respective staging branches, but which you consider relevant. Ones that I have queued already, but which hadn't passed the push gate to master yet when doing a swipe late last week, are c6ad5a701b9a

Re: [PATCH for-4.15] xen: Bump the minimum version of GCC supported to 4.9 (5.1 on arm64)

2021-03-08 Thread Ian Jackson
Julien Grall writes ("[PATCH for-4.15] xen: Bump the minimum version of GCC supported to 4.9 (5.1 on arm64)"): > From: Julien Grall > > Compilers older than 4.8 have known codegen issues which can lead to > silent miscompilation: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 > > Furth

[PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Michal Orzel
Currently in order to link existing DTB into Xen image we need to either specify option CONFIG_DTB_FILE on the command line or manually add it into .config. Add Kconfig entries: CONFIG_LINK_DTB and CONFIG_DTB_FILE to be able to select this option and provide the path to DTB we want to embed into Xe

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Ian Jackson
Jan Beulich writes ("[PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time"): > The first thing the "xen-dir" rule does is delete the entire xen/ > subtree. Obviously this includes deleting xen/lib/x86/*autogen.h. As a > result there's no original version for $(move-if-changed ...

Re: [PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Jan Beulich
On 08.03.2021 10:52, Michal Orzel wrote: > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig > @@ -400,6 +400,20 @@ config DOM0_MEM > > Leave empty if you are not sure what to specify. > > +config LINK_DTB > + bool "Link DTB into Xen image" > + depends on ARM > + default n

Re: [PATCH 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule

2021-03-08 Thread Ian Jackson
Jan Beulich writes ("[PATCH 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule"): > There's no need for the common "xen-dir" rule to have an arch-specific > part when there already is a arch-specific rule where this can be taken > care of. I think the symlinks bein

Re: [PATCH 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule

2021-03-08 Thread Jan Beulich
On 08.03.2021 11:00, Ian Jackson wrote: > Jan Beulich writes ("[PATCH 2/2] tools/x86: move arch-specific include/xen/ > population into arch-specific rule"): >> There's no need for the common "xen-dir" rule to have an arch-specific >> part when there already is a arch-specific rule where this can

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Jan Beulich
On 08.03.2021 10:59, Ian Jackson wrote: > Jan Beulich writes ("[PATCH 1/2][4.15?] tools/x86: don't rebuild > cpuid-autogen.h every time"): >> The first thing the "xen-dir" rule does is delete the entire xen/ >> subtree. Obviously this includes deleting xen/lib/x86/*autogen.h. As a >> result there'

Re: [PATCH for-4.15] xen: Bump the minimum version of GCC supported to 4.9 (5.1 on arm64)

2021-03-08 Thread Julien Grall
On 08/03/2021 08:09, Jan Beulich wrote: On 06.03.2021 22:41, Julien Grall wrote: From: Julien Grall Compilers older than 4.8 have known codegen issues which can lead to silent miscompilation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 Furthermore, pre-4.9 GCC have known bugs (incl

Re: [PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Michal Orzel
Hi Jan, On 08.03.2021 11:00, Jan Beulich wrote: > On 08.03.2021 10:52, Michal Orzel wrote: >> --- a/xen/common/Kconfig >> +++ b/xen/common/Kconfig >> @@ -400,6 +400,20 @@ config DOM0_MEM >> >>Leave empty if you are not sure what to specify. >> >> +config LINK_DTB >> +bool "Link DTB

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time"): > On 08.03.2021 10:59, Ian Jackson wrote: > > Jan Beulich writes ("[PATCH 1/2][4.15?] tools/x86: don't rebuild > > cpuid-autogen.h every time"): > >> +# Arrange for preserving of auto-generated head

Re: [PATCH for-4.15] xen: Bump the minimum version of GCC supported to 4.9 (5.1 on arm64)

2021-03-08 Thread Jan Beulich
On 08.03.2021 11:51, Julien Grall wrote: > On 08/03/2021 08:09, Jan Beulich wrote: >> On 06.03.2021 22:41, Julien Grall wrote: >>> From: Julien Grall >>> >>> Compilers older than 4.8 have known codegen issues which can lead to >>> silent miscompilation: >>> >>> https://gcc.gnu.org/bugzilla/show_bu

Re: [PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Jan Beulich
On 08.03.2021 12:02, Michal Orzel wrote: > On 08.03.2021 11:00, Jan Beulich wrote: >> On 08.03.2021 10:52, Michal Orzel wrote: >>> +config DTB_FILE >>> + string "Absolute path to device tree blob" >>> + default "" >>> + depends on LINK_DTB >>> + ---help--- >>> + When using a bootloader

[PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Luca Fancellu
This patch prevents the dom0 to be loaded skipping its building and going forward to build domUs when the dom0 kernel is not found and at least one domU is present. Signed-off-by: Luca Fancellu Change-Id: Ieb9630b80cc7be7688d7d5fff3f839958f142ac0 --- xen/arch/arm/setup.c | 83 +++

[PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Luca Fancellu
This patch prevents the dom0 to be loaded skipping its building and going forward to build domUs when the dom0 kernel is not found and at least one domU is present. Signed-off-by: Luca Fancellu Change-Id: Ieb9630b80cc7be7688d7d5fff3f839958f142ac0 --- xen/arch/arm/setup.c | 83 +++

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Jan Beulich
On 08.03.2021 12:08, Ian Jackson wrote: > Jan Beulich writes ("Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild > cpuid-autogen.h every time"): >> On 08.03.2021 10:59, Ian Jackson wrote: >>> Jan Beulich writes ("[PATCH 1/2][4.15?] tools/x86: don't rebuild >>> cpuid-autogen.h every time"): +#

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Roger Pau Monné
On Fri, Mar 05, 2021 at 10:50:54AM +0100, Jan Beulich wrote: > Linux has been warning ("firmware bug") about this bit being clear for a > long time. While writable in older hardware it has been readonly on more > than just most recent hardware. For simplicitly report it always set (if > anything we

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Jan Beulich
On 08.03.2021 12:37, Roger Pau Monné wrote: > On Fri, Mar 05, 2021 at 10:50:54AM +0100, Jan Beulich wrote: >> Linux has been warning ("firmware bug") about this bit being clear for a >> long time. While writable in older hardware it has been readonly on more >> than just most recent hardware. For s

[PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Luca Fancellu
This patch prevents the dom0 to be loaded skipping its building and going forward to build domUs when the dom0 kernel is not found and at least one domU is present. Signed-off-by: Luca Fancellu --- xen/arch/arm/setup.c | 83 +++- 1 file changed, 59 inserti

Re: [PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Julien Grall
Hi Luca, On 08/03/2021 11:56, Luca Fancellu wrote: This patch prevents the dom0 to be loaded skipping its building and going forward to build domUs when the dom0 kernel is not found and at least one domU is present. Signed-off-by: Luca Fancellu I have received 3 versions of this patch, can yo

[xen-unstable-smoke test] 159871: tolerable all pass - PUSHED

2021-03-08 Thread osstest service owner
flight 159871 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/159871/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [PATCH 2/2][4.15?] x86/shadow: encode full GFN in magic MMIO entries

2021-03-08 Thread Jan Beulich
On 08.03.2021 10:39, Tim Deegan wrote: > At 16:37 +0100 on 05 Mar (1614962265), Jan Beulich wrote: >> Since we don't need to encode all of the PTE flags, we have enough bits >> in the shadow entry to store the full GFN. Don't use literal numbers - >> instead derive the involved values. Or, where de

Re: [PATCH v2 1/2][4.15] x86/PV: conditionally avoid raising #GP for early guest MSR reads

2021-03-08 Thread Roger Pau Monné
On Mon, Mar 08, 2021 at 10:33:12AM +0100, Jan Beulich wrote: > On 08.03.2021 09:56, Roger Pau Monné wrote: > > On Fri, Mar 05, 2021 at 10:50:34AM +0100, Jan Beulich wrote: > >> Prior to 4.15 Linux, when running in PV mode, did not install a #GP > >> handler early enough to cover for example the rdm

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time"): > Possibly, but it may end up being more complex: We want to only > retain files of specific names from a single dir. I don't think > this is as straightforward to express in a find rune. Of course >

Re: [PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Luca Fancellu
> On 8 Mar 2021, at 11:59, Julien Grall wrote: > > Hi Luca, > > On 08/03/2021 11:56, Luca Fancellu wrote: >> This patch prevents the dom0 to be loaded skipping its >> building and going forward to build domUs when the dom0 >> kernel is not found and at least one domU is present. >> Signed-off

[PATCH v5 05/12] x86/alternative: support ALTERNATIVE_TERNARY

2021-03-08 Thread Juergen Gross
Add ALTERNATIVE_TERNARY support for replacing an initial instruction with either of two instructions depending on a feature: ALTERNATIVE_TERNARY "default_instr", FEATURE_NR, "feature_on_instr", "feature_off_instr" which will start with "default_instr" and at patch time wil

[PATCH v5 03/12] x86/alternative: drop feature parameter from ALTINSTR_REPLACEMENT()

2021-03-08 Thread Juergen Gross
The macro ALTINSTR_REPLACEMENT() doesn't make use of the feature parameter, so drop it. Signed-off-by: Juergen Gross --- V5: - new patch --- arch/x86/include/asm/alternative.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b

[PATCH v5 01/12] staticcall: move struct static_call_key definition to static_call_types.h

2021-03-08 Thread Juergen Gross
Having the definition of static_call() in static_call_types.h makes no sense as long struct static_call_key isn't defined there, as the generic implementation of static_call() is referencing this structure. So move the definition of struct static_call_key to static_call_types.h. Signed-off-by: Ju

[PATCH v5 02/12] x86/paravirt: switch time pvops functions to use static_call()

2021-03-08 Thread Juergen Gross
The time pvops functions are the only ones left which might be used in 32-bit mode and which return a 64-bit value. Switch them to use the static_call() mechanism instead of pvops, as this allows quite some simplification of the pvops implementation. Signed-off-by: Juergen Gross --- V4: - drop p

[PATCH v5 04/12] x86/alternative: support not-feature

2021-03-08 Thread Juergen Gross
Add support for alternative patching for the case a feature is not present on the current cpu. For this purpose add a flag byte to struct alt_instr adding the information that the inverted feature should be used. For users of ALTERNATIVE() and friends an inverted feature is specified by negating

[PATCH v5 06/12] x86: add new features for paravirt patching

2021-03-08 Thread Juergen Gross
For being able to switch paravirt patching from special cased custom code sequences to ALTERNATIVE handling some X86_FEATURE_* are needed as new features. This enables to have the standard indirect pv call as the default code and to patch that with the non-Xen custom code sequence via ALTERNATIVE p

[PATCH v5 00/12] x86: major paravirt cleanup

2021-03-08 Thread Juergen Gross
This is a major cleanup of the paravirt infrastructure aiming at eliminating all custom code patching via paravirt patching. This is achieved by using ALTERNATIVE instead, leading to the ability to give objtool access to the patched in instructions. In order to remove most of the 32-bit special h

[PATCH v5 08/12] x86/paravirt: simplify paravirt macros

2021-03-08 Thread Juergen Gross
The central pvops call macros PVOP_CALL() and PVOP_VCALL() are looking very similar now. The main differences are using PVOP_VCALL_ARGS or PVOP_CALL_ARGS, which are identical, and the return value handling. So drop PVOP_VCALL_ARGS and instead of PVOP_VCALL() just use (void)PVOP_CA

[PATCH v5 07/12] x86/paravirt: remove no longer needed 32-bit pvops cruft

2021-03-08 Thread Juergen Gross
PVOP_VCALL4() is only used for Xen PV, while PVOP_CALL4() isn't used at all. Keep PVOP_CALL4() for 64 bits due to symmetry reasons. This allows to remove the 32-bit definitions of those macros leading to a substantial simplification of the paravirt macros, as those were the only ones needing non-e

[PATCH v5 10/12] x86/paravirt: add new macros PVOP_ALT* supporting pvops in ALTERNATIVEs

2021-03-08 Thread Juergen Gross
Instead of using paravirt patching for custom code sequences add support for using ALTERNATIVE handling combined with paravirt call patching. Signed-off-by: Juergen Gross --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49 ++- 1 file

[PATCH v5 09/12] x86/paravirt: switch iret pvops to ALTERNATIVE

2021-03-08 Thread Juergen Gross
The iret paravirt op is rather special as it is using a jmp instead of a call instruction. Switch it to ALTERNATIVE. Signed-off-by: Juergen Gross --- V3: - use ALTERNATIVE_TERNARY --- arch/x86/include/asm/paravirt.h | 6 +++--- arch/x86/include/asm/paravirt_types.h | 5 + arch/x86/ke

[PATCH v5 12/12] x86/paravirt: have only one paravirt patch function

2021-03-08 Thread Juergen Gross
There is no need any longer to have different paravirt patch functions for native and Xen. Eliminate native_patch() and rename paravirt_patch_default() to paravirt_patch(). Signed-off-by: Juergen Gross --- V3: - remove paravirt_patch_insns() (kernel test robot) --- arch/x86/include/asm/paravirt_

[PATCH v5 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-08 Thread Juergen Gross
Instead of using paravirt patching for custom code sequences use ALTERNATIVE for the functions with custom code replacements. Instead of patching an ud2 instruction for unpopulated vector entries into the caller site, use a simple function just calling BUG() as a replacement. Simplify the registe

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Roger Pau Monné
On Mon, Mar 08, 2021 at 12:47:44PM +0100, Jan Beulich wrote: > On 08.03.2021 12:37, Roger Pau Monné wrote: > > On Fri, Mar 05, 2021 at 10:50:54AM +0100, Jan Beulich wrote: > >> Linux has been warning ("firmware bug") about this bit being clear for a > >> long time. While writable in older hardware

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Andrew Cooper
On 05/03/2021 09:50, Jan Beulich wrote: > Linux has been warning ("firmware bug") about this bit being clear for a > long time. While writable in older hardware it has been readonly on more > than just most recent hardware. For simplicitly report it always set (if > anything we may want to log the

Re: [PATCH 2/2][4.15?] x86/shadow: encode full GFN in magic MMIO entries

2021-03-08 Thread Jan Beulich
On 05.03.2021 17:32, Andrew Cooper wrote: > On 05/03/2021 15:37, Jan Beulich wrote: >> Since we don't need to encode all of the PTE flags, we have enough bits >> in the shadow entry to store the full GFN. Don't use literal numbers - >> instead derive the involved values. Or, where derivation would

[ovmf test] 159866: all pass - PUSHED

2021-03-08 Thread osstest service owner
flight 159866 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/159866/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d28a68153492ce3e64fb0535674e11e7f46a88a8 baseline version: ovmf b8a92fa2fea548dccacc2

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Jan Beulich
On 08.03.2021 13:12, Ian Jackson wrote: > Jan Beulich writes ("Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild > cpuid-autogen.h every time"): >> Possibly, but it may end up being more complex: We want to only >> retain files of specific names from a single dir. I don't think >> this is as straigh

Re: [PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Michal Orzel
On 08.03.2021 12:28, Jan Beulich wrote: > On 08.03.2021 12:02, Michal Orzel wrote: >> On 08.03.2021 11:00, Jan Beulich wrote: >>> On 08.03.2021 10:52, Michal Orzel wrote: +config DTB_FILE + string "Absolute path to device tree blob" + default "" + depends on LINK_DTB

Re: [PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Jan Beulich
On 08.03.2021 14:11, Michal Orzel wrote: > > > On 08.03.2021 12:28, Jan Beulich wrote: >> On 08.03.2021 12:02, Michal Orzel wrote: >>> On 08.03.2021 11:00, Jan Beulich wrote: On 08.03.2021 10:52, Michal Orzel wrote: > +config DTB_FILE > + string "Absolute path to device tree blob" >>

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Roger Pau Monné
On Mon, Mar 08, 2021 at 12:41:26PM +, Andrew Cooper wrote: > On 05/03/2021 09:50, Jan Beulich wrote: > > Linux has been warning ("firmware bug") about this bit being clear for a > > long time. While writable in older hardware it has been readonly on more > > than just most recent hardware. For

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Jan Beulich
On 08.03.2021 13:41, Andrew Cooper wrote: > On 05/03/2021 09:50, Jan Beulich wrote: >> Linux has been warning ("firmware bug") about this bit being clear for a >> long time. While writable in older hardware it has been readonly on more >> than just most recent hardware. For simplicitly report it al

Re: [PATCH v2 2/2][4.15] x86/AMD: expose HWCR.TscFreqSel to guests

2021-03-08 Thread Jan Beulich
On 08.03.2021 13:29, Roger Pau Monné wrote: > On Mon, Mar 08, 2021 at 12:47:44PM +0100, Jan Beulich wrote: >> On 08.03.2021 12:37, Roger Pau Monné wrote: >>> On Fri, Mar 05, 2021 at 10:50:54AM +0100, Jan Beulich wrote: --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -315,6 +315,

Re: [PATCH] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Michal Orzel
On 08.03.2021 14:13, Jan Beulich wrote: > On 08.03.2021 14:11, Michal Orzel wrote: >> >> >> On 08.03.2021 12:28, Jan Beulich wrote: >>> On 08.03.2021 12:02, Michal Orzel wrote: On 08.03.2021 11:00, Jan Beulich wrote: > On 08.03.2021 10:52, Michal Orzel wrote: >> +config DTB_FILE >>>

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Andrew Cooper
On 08/03/2021 09:25, Tim Deegan wrote: > At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: >> We can't make correctness of our own behavior dependent upon a >> hypervisor underneath us correctly telling us the true physical address >> with hardware uses. Without knowing this, we can't be ce

Re: [PATCH v2 1/2][4.15] x86/PV: conditionally avoid raising #GP for early guest MSR reads

2021-03-08 Thread Jan Beulich
On 08.03.2021 13:11, Roger Pau Monné wrote: > On Mon, Mar 08, 2021 at 10:33:12AM +0100, Jan Beulich wrote: >> On 08.03.2021 09:56, Roger Pau Monné wrote: >>> On Fri, Mar 05, 2021 at 10:50:34AM +0100, Jan Beulich wrote: --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-o

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Jan Beulich
On 08.03.2021 14:47, Andrew Cooper wrote: > On 08/03/2021 09:25, Tim Deegan wrote: >> At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: >>> We can't make correctness of our own behavior dependent upon a >>> hypervisor underneath us correctly telling us the true physical address >>> with har

[PATCH v2] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Michal Orzel
Currently in order to link existing DTB into Xen image we need to either specify option CONFIG_DTB_FILE on the command line or manually add it into .config. Add Kconfig entry: CONFIG_DTB_FILE to be able to provide the path to DTB we want to embed into Xen image. If no path provided - the dtb will n

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Andrew Cooper
On 08/03/2021 13:51, Jan Beulich wrote: > On 08.03.2021 14:47, Andrew Cooper wrote: >> On 08/03/2021 09:25, Tim Deegan wrote: >>> At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: We can't make correctness of our own behavior dependent upon a hypervisor underneath us correctly tel

Re: [PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Julien Grall
Hi Luca, On 08/03/2021 11:56, Luca Fancellu wrote: This patch prevents the dom0 to be loaded skipping its building and going forward to build domUs when the dom0 kernel is not found and at least one domU is present. As you are skipping dom0, the domid 0 will not be usable for another domain.

Re: [PATCH] xen/arm: Prevent Dom0 to be loaded when using dom0less

2021-03-08 Thread Jan Beulich
On 08.03.2021 15:12, Julien Grall wrote: > On 08/03/2021 11:56, Luca Fancellu wrote: >> This patch prevents the dom0 to be loaded skipping its >> building and going forward to build domUs when the dom0 >> kernel is not found and at least one domU is present. > > As you are skipping dom0, the domid

Re: [PATCH v2] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Jan Beulich
On 08.03.2021 14:59, Michal Orzel wrote: > --- a/xen/arch/arm/Makefile > +++ b/xen/arch/arm/Makefile > @@ -68,7 +68,7 @@ extra-y += $(TARGET_SUBARCH)/head.o > > #obj-bin-y += o > > -ifdef CONFIG_DTB_FILE > +ifneq ($(CONFIG_DTB_FILE),"") > obj-y += dtb.o > AFLAGS-y += -DCONFIG_DTB_FILE=\"

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Jan Beulich
On 08.03.2021 14:59, Andrew Cooper wrote: > On 08/03/2021 13:51, Jan Beulich wrote: >> On 08.03.2021 14:47, Andrew Cooper wrote: >>> On 08/03/2021 09:25, Tim Deegan wrote: At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: > We can't make correctness of our own behavior dependent up

Re: [PATCH v2 for-4.15] x86/msr: introduce an option for HVM relaxed rdmsr behavior

2021-03-08 Thread Roger Pau Monné
On Fri, Mar 05, 2021 at 11:56:33AM +0100, Jan Beulich wrote: > On 04.03.2021 15:47, Roger Pau Monne wrote: > > --- a/xen/arch/x86/hvm/svm/svm.c > > +++ b/xen/arch/x86/hvm/svm/svm.c > > @@ -1795,6 +1795,7 @@ static int svm_msr_read_intercept(unsigned int msr, > > uint64_t *msr_content) > > con

Re: [PATCH v2] arm: Add Kconfig entry to select CONFIG_DTB_FILE

2021-03-08 Thread Julien Grall
Hi, On 08/03/2021 13:59, Michal Orzel wrote: Currently in order to link existing DTB into Xen image we need to either specify option CONFIG_DTB_FILE on the command line or manually add it into .config. Add Kconfig entry: CONFIG_DTB_FILE to be able to provide the path to DTB we want to embed into

[PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD
From: Anthony PERARD Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened since object_unparent() doesn't immediately frees

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Paolo Bonzini
On 08/03/21 15:32, Anthony PERARD wrote: From: Anthony PERARD Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened since

Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time

2021-03-08 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH 1/2][4.15?] tools/x86: don't rebuild cpuid-autogen.h every time"): > On 08.03.2021 13:12, Ian Jackson wrote: > > This will leave the entire directory structure but I think that is > > fine. The xen-dir target uses mkdir -p and should there be any stale > > director

Re: [PATCH 1/2][4.15?] x86/shadow: suppress "fast fault path" optimization when running virtualized

2021-03-08 Thread Andrew Cooper
On 08/03/2021 14:29, Jan Beulich wrote: > On 08.03.2021 14:59, Andrew Cooper wrote: >> On 08/03/2021 13:51, Jan Beulich wrote: >>> On 08.03.2021 14:47, Andrew Cooper wrote: On 08/03/2021 09:25, Tim Deegan wrote: > At 16:37 +0100 on 05 Mar (1614962224), Jan Beulich wrote: >> We can't ma

[xen-unstable test] 159864: tolerable FAIL

2021-03-08 Thread osstest service owner
flight 159864 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/159864/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 159858 test-amd64-amd64-qemuu-nested-amd 20

Re: [PATCH for-4.15] vtd: make sure QI/IR are disabled before initialisation

2021-03-08 Thread Igor Druzhinin
On 08/03/2021 08:18, Jan Beulich wrote: On 08.03.2021 08:00, Igor Druzhinin wrote: BIOS might pass control to Xen leaving QI and/or IR in enabled and/or partially configured state. In case of x2APIC code path where EIM is enabled early in boot - those are correctly disabled by Xen before any att

Re: [PATCH for-4.15] vtd: make sure QI/IR are disabled before initialisation

2021-03-08 Thread Jan Beulich
On 08.03.2021 15:52, Igor Druzhinin wrote: > On 08/03/2021 08:18, Jan Beulich wrote: >> On 08.03.2021 08:00, Igor Druzhinin wrote: >>> BIOS might pass control to Xen leaving QI and/or IR in enabled and/or >>> partially configured state. In case of x2APIC code path where EIM is >>> enabled early in

Re: [PATCH v5 01/12] staticcall: move struct static_call_key definition to static_call_types.h

2021-03-08 Thread Peter Zijlstra
On Mon, Mar 08, 2021 at 01:28:33PM +0100, Juergen Gross wrote: > Having the definition of static_call() in static_call_types.h makes > no sense as long struct static_call_key isn't defined there, as the > generic implementation of static_call() is referencing this structure. > > So move the defini

Re: [PATCH v5 00/12] x86: major paravirt cleanup

2021-03-08 Thread Peter Zijlstra
On Mon, Mar 08, 2021 at 01:28:32PM +0100, Juergen Gross wrote: > This is a major cleanup of the paravirt infrastructure aiming at > eliminating all custom code patching via paravirt patching. > > This is achieved by using ALTERNATIVE instead, leading to the ability > to give objtool access to the

Re: [PATCH v5 02/12] x86/paravirt: switch time pvops functions to use static_call()

2021-03-08 Thread Boris Ostrovsky
On 3/8/21 7:28 AM, Juergen Gross wrote: > --- a/arch/x86/xen/time.c > +++ b/arch/x86/xen/time.c > @@ -379,11 +379,6 @@ void xen_timer_resume(void) > } > } > > -static const struct pv_time_ops xen_time_ops __initconst = { > - .sched_clock = xen_sched_clock, > - .steal_clock = xen_

[PATCH] xen/arm: Use register_t type in cpuinfo entries

2021-03-08 Thread Bertrand Marquis
All cpu identification registers that we store in the cpuinfo structure are 64bit on arm64 and 32bit on arm32 so storing the values in 32bit on arm64 is removing the higher bits which might contain information in the future. This patch is changing the types in cpuinfo to register_t (which is 32bit

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD
On Mon, Mar 08, 2021 at 03:38:49PM +0100, Paolo Bonzini wrote: > On 08/03/21 15:32, Anthony PERARD wrote: > > From: Anthony PERARD > > > > Whenever a Xen block device is detach via xenstore, the image > > associated with it remained open by the backend QEMU and an error is > > logged: > > qe

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Paolo Bonzini
On 08/03/21 18:29, Anthony PERARD wrote: If nothing else works then I guess it's okay, but why can't you do the xen_block_drive_destroy from e.g. an unrealize callback? I'm not sure if that's possible. xen_block_device_create/xen_block_device_destroy() is supposed to be equivalent to do those

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD
On Mon, Mar 08, 2021 at 06:37:38PM +0100, Paolo Bonzini wrote: > On 08/03/21 18:29, Anthony PERARD wrote: > > > If nothing else works then I guess it's okay, but why can't you do the > > > xen_block_drive_destroy from e.g. an unrealize callback? > > > > I'm not sure if that's possible. > > > > xe

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Paolo Bonzini
On 08/03/21 19:14, Anthony PERARD wrote: On Mon, Mar 08, 2021 at 06:37:38PM +0100, Paolo Bonzini wrote: On 08/03/21 18:29, Anthony PERARD wrote: If nothing else works then I guess it's okay, but why can't you do the xen_block_drive_destroy from e.g. an unrealize callback? I'm not sure if that

Re: [PATCH v5 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-08 Thread Borislav Petkov
On Mon, Mar 08, 2021 at 01:28:43PM +0100, Juergen Gross wrote: > diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h > index 36cd71fa097f..04b3067f31b5 100644 > --- a/arch/x86/include/asm/paravirt.h > +++ b/arch/x86/include/asm/paravirt.h > @@ -137,7 +137,8 @@ static inli

Re: [PATCH] xen/arm: Use register_t type in cpuinfo entries

2021-03-08 Thread Julien Grall
Hi Bertrand, On 08/03/2021 17:18, Bertrand Marquis wrote: All cpu identification registers that we store in the cpuinfo structure are 64bit on arm64 and 32bit on arm32 so storing the values in 32bit on arm64 is removing the higher bits which might contain information in the future. This patch i

Re: [PATCH for-4.15] xen: Bump the minimum version of GCC supported to 4.9 (5.1 on arm64)

2021-03-08 Thread Julien Grall
Hi Jan, On 08/03/2021 11:20, Jan Beulich wrote: On 08.03.2021 11:51, Julien Grall wrote: On 08/03/2021 08:09, Jan Beulich wrote: On 06.03.2021 22:41, Julien Grall wrote: From: Julien Grall Compilers older than 4.8 have known codegen issues which can lead to silent miscompilation: https://g

Re: [PATCH v4 2/3] xen/events: don't unmask an event channel when an eoi is pending

2021-03-08 Thread Boris Ostrovsky
On 3/6/21 11:18 AM, Juergen Gross wrote: > An event channel should be kept masked when an eoi is pending for it. > When being migrated to another cpu it might be unmasked, though. > > In order to avoid this keep three different flags for each event channel > to be able to distinguish "normal" mas

[RFC 00/12] Intel Hardware P-States (HWP) support

2021-03-08 Thread Jason Andryuk
Hi, This patch series adds Hardware-Controlled Performance States (HWP) for Intel processors to Xen. With HWP, the processor makes its own determinations for frequency selection depending, though users can set some parameters and preferences. There is also Turbo Boost which pushes the max freque

[RFC 01/12] cpufreq: Allow restricting to internal governors only

2021-03-08 Thread Jason Andryuk
For hwp, the standard governors are not usable, and only the internal one is applicable. Add the cpufreq_governor_internal boolean to indicate when an internal governor, like hwp-internal, will be used. This is set during presmp_initcall, so that it can suppress governor registration during initca

[RFC 02/12] cpufreq: Add perf_freq to cpuinfo

2021-03-08 Thread Jason Andryuk
acpi-cpufreq scales the aperf/mperf measurements by max_freq, but HWP needs to scale by base frequency. Settings max_freq to base_freq "works" but the code is not obvious, and returning values to userspace is tricky. Add an additonal perf_freq member which is used for scaling aperf/mperf measurem

[RFC 03/12] cpufreq: Export intel_feature_detect

2021-03-08 Thread Jason Andryuk
Export feature_detect as intel_feature_detect so it can be re-used by HWP. Signed-off-by: Jason Andryuk --- xen/arch/x86/acpi/cpufreq/cpufreq.c | 4 ++-- xen/include/acpi/cpufreq/processor_perf.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/acpi/cpufr

[RFC 04/12] cpufreq: Add Hardware P-State (HWP) driver

2021-03-08 Thread Jason Andryuk
>From the Intel SDM: "Hardware-Controlled Performance States (HWP), which autonomously selects performance states while utilizing OS supplied performance guidance hints." Enable HWP to run in autonomous mode by poking the correct MSRs. There is no interface to configure - it hardcodes the default

[RFC 05/12] xenpm: Change get-cpufreq-para output for internal

2021-03-08 Thread Jason Andryuk
When using HWP, some of the returned data is not applicable. In that case, we should just omit it to avoid confusing the user. So switch to printing the base and turbo frequencies since those are relevant to HWP. Similarly, stop printing the CPU frequencies since those do not apply. Signed-off-b

[RFC 06/12] cpufreq: Export HWP parameters to userspace

2021-03-08 Thread Jason Andryuk
Extend xen_get_cpufreq_para to return hwp parameters. These match the hardware rather closely. We need the hw_features bitmask to indicated fields supported by the actual hardware. The use of uint8_t parameters matches the hardware size. uint32_t entries grows the sysctl_t past the build assert

[RFC 07/12] libxc: Include hwp_para in definitions

2021-03-08 Thread Jason Andryuk
Expose the hwp_para fields through libxc. Signed-off-by: Jason Andryuk --- tools/include/xenctrl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h index 318920166c..3b0ca62fc7 100644 --- a/tools/include/xenctrl.h +++ b/tools/include/xenctrl

  1   2   >