[Xen-devel] [PATCH v2 3/3] xen: add CONFIG item for default dom0 memory size

2018-12-06 Thread Juergen Gross
With being able to specify a dom0_mem value depending on host memory size on x86 make it easy for distros to specify a default dom0 size by adding a CONFIG_DOM0_MEM item which presets the dom0_mem boot parameter value. It will be used only if no dom0_mem parameter was specified in the boot paramet

[Xen-devel] [PATCH v2 0/3] xen/x86: support setting dom0_mem depending on host size

2018-12-06 Thread Juergen Gross
Setting the memory size of dom0 on a server for the non autoballooning case requires always specification of a boot parameter today. The value to set will depend mostly on the host memory size. In order to support that scenario add the possibility to set dom0_mem depending on the amount of physica

[Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Juergen Gross
Introduce parse_size_and_unit_or_int() similar to parse_size_and_unit() but not defaulting to kbytes in case the parameter is a number followed by a specified character. Signed-off-by: Juergen Gross --- xen/common/lib.c | 11 +-- xen/include/xen/lib.h | 2 ++ 2 files changed, 11 in

[Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Juergen Gross
Today the memory size of dom0 can be specified only in terms of bytes (either an absolute value or "host-mem - value"). When dom0 shouldn't be auto-ballooned this requires nearly always a manual adaption of the Xen boot parameters to reflect the actual host memory size. Add more possibilities to s

Re: [Xen-devel] [PATCH 2/5] x86/idle: re-arrange dead-idle handling

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 21:33, wrote: > On 10/09/2018 11:13, Jan Beulich wrote: >> >>> Equally, it may still be able to service #MC's, so I can't see how it is >>> safe for us to ever free the percpu data. >> I'm having trouble seeing how this remark relates to the series here. > > Because you've trie

Re: [Xen-devel] [PATCH 4/9] x86/amd: Introduce CPUID/MSR definitions for per-vcpu SSBD support

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 18:50, wrote: > On 05/12/2018 16:39, Jan Beulich wrote: > On 03.12.18 at 17:18, wrote: >>> As an alternative, MSR_VIRT_SPEC_CTRL is specified as an architectural >>> control >>> (with semantics equivilent to MSR_SPEC_CTRL) which is provided by the >>> hypervisor. This abs

Re: [Xen-devel] [PATCH 5/9] x86/amd: Probe for legacy SSBD interfaces on boot

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 18:09, wrote: > On 05/12/2018 16:50, Jan Beulich wrote: >> >>> --- a/xen/include/asm-x86/cpufeatures.h >>> +++ b/xen/include/asm-x86/cpufeatures.h >>> @@ -25,6 +25,7 @@ XEN_CPUFEATURE(XEN_SMAP,(FSCAPINTS+0)*32+11) /* >>> SMAP gets used by Xen it >>> XEN_CPUFEATURE(LFEN

Re: [Xen-devel] [PATCH 6/9] x86/amd: Allocate resources to cope with LS_CFG being per-core on Fam17h

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 18:05, wrote: > On 05/12/2018 16:57, Jan Beulich wrote: > On 03.12.18 at 17:18, wrote: >>> --- a/xen/arch/x86/cpu/amd.c >>> +++ b/xen/arch/x86/cpu/amd.c >>> @@ -419,6 +419,97 @@ static void __init noinline amd_probe_legacy_ssbd(void) >>> } >>> >>> /* >>> + * This is all

Re: [Xen-devel] [PATCH 8/9] x86/amd: Virtualise MSR_VIRT_SPEC_CTRL for guests

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 20:09, wrote: > On 05/12/2018 08:41, Jan Beulich wrote: > On 04.12.18 at 22:35, wrote: >>> The other thing I don't get is why advertise virtualized SSBD when the >>> guest setting it does nothing? If ssbd_opt=true is set, as the code is >>> now, why even advertise it to th

Re: [Xen-devel] [PATCH] x86/mm: Clarify comment in create_pae_xen_mappings()

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 20:45, wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -1444,7 +1444,13 @@ static int create_pae_xen_mappings(struct domain *d, > l3_pgentry_t *pl3e) > > pl3e = (l3_pgentry_t *)((unsigned long)pl3e & PAGE_MASK); > > -/* 3rd L3 slot contains L2 with

[Xen-devel] [PATCH v6 00/42] x86emul: fair parts of AVX512 support

2018-12-06 Thread Jan Beulich
01: support AVX512{F,BW} shift/rotate insns 02: support AVX512{F,BW,DQ} extract insns 03: support AVX512{F,BW,DQ} insert insns 04: basic AVX512F testing 05: support AVX512{F,BW,DQ} integer broadcast insns 06: basic AVX512VL testing 07: support AVX512{F,BW} zero- and sign-extending moves 08: support

Re: [Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Jan Beulich
>>> On 06.12.18 at 09:06, wrote: > @@ -477,7 +478,8 @@ unsigned long long parse_size_and_unit(const char *s, > const char **ps) > s1++; > break; > default: > -ret <<= 10; /* default to kB */ > +if ( *s1 && *s1 != no_size ) > +ret <<= 10; /* defau

[Xen-devel] [PATCH v6 02/42] x86emul: support AVX512{F, BW, DQ} extract insns

2018-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v4: Make use of d8s_dq64. v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -212,6 +212,7 @@ static const struct test avx512f_all[] = }; static const struct test avx512f_128[] = { +INSN(extractps, 66, 0f3a, 1

[Xen-devel] [PATCH v6 01/42] x86emul: support AVX512{F, BW} shift/rotate insns

2018-12-06 Thread Jan Beulich
Note that simd_packed_fp for the opcode space 0f38 major opcodes 14 and 15 is not really correct, but sufficient for the purposes here. Further adjustments may later be needed for the down conversion unsigned saturating VPMOV* insns, first and foremost for the different Disp8 scaling those ones use

[Xen-devel] [PATCH v6 03/42] x86emul: support AVX512{F, BW, DQ} insert insns

2018-12-06 Thread Jan Beulich
Also correct the comment of the AVX form of VINSERTPS. Signed-off-by: Jan Beulich --- v6: Don't refuse to emulate VINSERTPS without AVX512VL. v4: Make use of d8s_dq64. v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -213,6 +213,7 @@ static cons

[Xen-devel] [PATCH v6 04/42] x86emul: basic AVX512F testing

2018-12-06 Thread Jan Beulich
Test various of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Fix formatting in simd.h. v5: Add VSQRT* tests. v4: Make eq() also work for 4- and 8-byte integer element sizes. v3: New. --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makef

[Xen-devel] [PATCH v6 05/42] x86emul: support AVX512{F, BW, DQ} integer broadcast insns

2018-12-06 Thread Jan Beulich
Note that the pbroadcastw table entry in evex-disp8.c is slightly different from what one would expect, due to it requiring EVEX.W to be zero. Signed-off-by: Jan Beulich --- v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -164,6 +164,9 @@ stati

[Xen-devel] [PATCH v6 07/42] x86emul: support AVX512{F, BW} zero- and sign-extending moves

2018-12-06 Thread Jan Beulich
Note that the testing in simd.c doesn't really follow the ISA extension pattern - to fit the scheme, extensions from byte and word granular vectors can (currently) sensibly only happen in the AVX512BW case (and hence respective abstraction macros will be added there rather than here). Signed-off-b

[Xen-devel] [PATCH v6 06/42] x86emul: basic AVX512VL testing

2018-12-06 Thread Jan Beulich
Test the 128- and 256-bit variants of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Don't enable AVX512VL for scalar tests, nor for S/G ones with index wider than data. Re-base over changes earlier in the series. v4: Move OVR() additions into __AVX512VL__ c

[Xen-devel] [PATCH v6 08/42] x86emul: support AVX512{F, BW} down conversion moves

2018-12-06 Thread Jan Beulich
Note that the vpmov{,s,us}{d,q}w table entries in evex-disp8.c are slightly different from what one would expect, due to them requiring EVEX.W to be zero. Signed-off-by: Jan Beulich --- v5: Also adjust x86_insn_is_mem_write(). v4: Also #UD when evex.z is set with a memory operand. v3: New. --- a

[Xen-devel] [PATCH v6 09/42] x86emul: support AVX512{F, BW} integer unpack insns

2018-12-06 Thread Jan Beulich
There's once again one extra twobyte_table[] entry which gets its Disp8 shift value set right away without getting support implemented just yet, again to avoid needlessly splitting groups of entries. Signed-off-by: Jan Beulich --- v6: Re-base over changes earlier in the series. v4: Move OVR() add

[Xen-devel] [PATCH v6 10/42] x86emul: support AVX512{F, BW, _VBMI} full permute insns

2018-12-06 Thread Jan Beulich
Take the liberty and also correct the (public interface) name of the AVX512_VBMI feature flag, on the assumption that no external consumer has actually been using that flag so far. Furthermore make it have AVX512BW instead of AVX512F as a prerequisite, for requiring full 64-bit mask registers (the

[Xen-devel] [PATCH v6 12/42] x86emul: support AVX512{BW, DQ} mask move insns

2018-12-06 Thread Jan Beulich
Entries to the tables in evex-disp8.c are added despite these insns not allowing for memory operands, with the goal of the tables giving a complete picture of the supported EVEX-encoded insns in the end. Signed-off-by: Jan Beulich --- v3: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/to

[Xen-devel] [PATCH v6 11/42] x86emul: support AVX512{F, BW} integer shuffle insns

2018-12-06 Thread Jan Beulich
Also include shuff{32x4,64x2} as being very similar to shufi{32x4,64x2}. Signed-off-by: Jan Beulich --- v6: Re-base over changes earlier in the series. v5: Re-base over changes earlier in the series. v4: Move OVR() addition into __AVX512VL__ conditional. Correct comments. v3: New. --- a/tools/te

[Xen-devel] [PATCH v6 13/42] x86emul: basic AVX512BW testing

2018-12-06 Thread Jan Beulich
Test various of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Re-base over changes earlier in the series. v4: Add __AVX512VL__ conditional around majority of OVR() additions. Correct eq() for 1- and 2-byte cases. v3: New. --- a/tools/tests/x86_emulator/Mak

[Xen-devel] [PATCH v6 14/42] x86emul: basic AVX512DQ testing

2018-12-06 Thread Jan Beulich
Test various of the insns which have been implemented already. Signed-off-by: Jan Beulich --- v6: Re-base. v5: Re-base over changes earlier in the series. v4: Wrap OVR(pmullq) in __AVX512VL__ conditional. v3: New. --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@

[Xen-devel] [PATCH v6 15/42] x86emul: support AVX512F move high/low insns

2018-12-06 Thread Jan Beulich
No explicit test harness additions other than the overrides, as the compiler already makes use of the insns. Signed-off-by: Jan Beulich --- v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -253,6 +253,16 @@ static const struct test avx512f_128[]

[Xen-devel] [PATCH v6 17/42] x86emul: support AVX512{F, BW, _VBMI} permute insns

2018-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v5: Re-base over changes earlier in the series. v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -178,6 +178,10 @@ static const struct test avx512f_all[] = INSN(pcmpu,66, 0f3a, 1e,vl, dq, vl),

[Xen-devel] [PATCH v6 16/42] x86emul: support AVX512F move duplicate insns

2018-12-06 Thread Jan Beulich
Judging from insn prefixes, these are scalar insns, but their (memory) operands are vector ones (with the exception of 128-bit VMOVDDUP). For this some adjustments to disp8scale calculation code are needed. No explicit test harness additions other than the overrides, as the compiler already makes

[Xen-devel] [PATCH v6 18/42] x86emul: support AVX512BW pack insns

2018-12-06 Thread Jan Beulich
No further test harness additions - what is there is good enough for these rather "regular" insns. Signed-off-by: Jan Beulich --- v4: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -306,6 +306,10 @@ static const struct test avx512bw_all[] INS

[Xen-devel] [PATCH v6 20/42] x86emul: support AVX512F legacy-equivalent packed int/FP conversion insns

2018-12-06 Thread Jan Beulich
... including the two AVX512DQ forms which shared encodings, just with EVEX.W set there. VCVTDQ2PD, sharing its main opcode with others, needs a "manual" override of disp8scale. The simd_size changes for the twobyte_table[] entries are benign to pre-existing code, but allow decode_disp8scale() to

[Xen-devel] [PATCH v6 19/42] x86emul: support AVX512F floating-point conversion insns

2018-12-06 Thread Jan Beulich
VCVTPS2PD, sharing its main opcode with others, needs a "manual" override of disp8scale. The simd_size change for twobyte_table[0x5a] is benign to pre-existing code, but allows decode_disp8scale() to work as is here. Also correct the comment on an AVX counterpart. Signed-off-by: Jan Beulich ---

[Xen-devel] [PATCH v6 21/42] x86emul: support AVX512F legacy-equivalent scalar int/FP conversion insns

2018-12-06 Thread Jan Beulich
VCVT{,T}S{S,D}2SI use EVEX.W for their destination (register) rather than their (possibly memory) source operand size and hence need a "manual" override of disp8scale. Slightly adjust the scalar to_int() in the test harness, to increase the chances of the operand ending up in memory. Signed-off-b

Re: [Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Juergen Gross
On 06/12/2018 10:50, Jan Beulich wrote: On 06.12.18 at 09:06, wrote: >> @@ -477,7 +478,8 @@ unsigned long long parse_size_and_unit(const char *s, >> const char **ps) >> s1++; >> break; >> default: >> -ret <<= 10; /* default to kB */ >> +if ( *s1 && *s1

[Xen-devel] [PATCH v6 22/42] x86emul: support AVX512DQ packed quad-int/FP conversion insns

2018-12-06 Thread Jan Beulich
VCVT{,T}PS2QQ, sharing their main opcodes with others, once again need "manual" overrides of disp8scale. While not directly related here, also add a scalar variant of to_wint() to the test harness. Signed-off-by: Jan Beulich --- v6: Workaround for gcc 7 quirk. v5: Re-base over changes earlier in

[Xen-devel] [PATCH v6 23/42] x86emul: support AVX512{F, DQ} uint-to-FP conversion insns

2018-12-06 Thread Jan Beulich
Some "manual" overrides of disp8scale are needed here again. In particular code ends up simpler when using d8s_dq64 in the twobyte_table[] entry. Test harness additions will be done once the reverse conversions are also available. Signed-off-by: Jan Beulich --- v4: New. --- a/tools/tests/x86_em

[Xen-devel] [PATCH v6 24/42] x86emul: support AVX512{F, DQ} FP-to-uint conversion insns

2018-12-06 Thread Jan Beulich
Along the lines of prior patches, VCVT{,T}PS2UQQ as well as VCVT{,T}S{S,D}2USI need "manual" overrides of disp8scale. The twobyte_table[] entries get altered, with their prior values now put in place in x86_decode_twobyte(). Signed-off-by: Jan Beulich --- v4: New. --- a/tools/tests/x86_emulator

[Xen-devel] [PATCH v6 27/42] x86emul: support AVX512{F, ER} reciprocal insns

2018-12-06 Thread Jan Beulich
Also include the only other AVX512ER insn pair, VEXP2P{D,S}. Note that despite the replacement of the SHA insns' table slots there's no need to special case their decoding: Their insn-specific code already sets op_bytes (as was required due to simd_other), and TwoOp is of no relevance for legacy e

[Xen-devel] [PATCH v6 26/42] x86emul: support remaining AVX512BW legacy-equivalent insns

2018-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -354,6 +354,7 @@ static const struct test avx512bw_all[] INSN(paddusb, 66, 0f, dc,vl,b, vl), INSN(paddusw, 66, 0f, dd,vl,w, vl),

[Xen-devel] [PATCH v6 25/42] x86emul: support remaining AVX512F legacy-equivalent insns

2018-12-06 Thread Jan Beulich
Plus their AVX512BW counterparts. Take the opportunity and also eliminate a pair of open coded instances of scalar_1op(). Signed-off-by: Jan Beulich --- v6: Re-base over changes earlier in the series. v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8

[Xen-devel] [PATCH v6 28/42] x86emul: support AVX512F floating point manipulation insns

2018-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -140,6 +140,8 @@ static const struct test avx512f_all[] = INSN(cvtusi2sd,f2, 0f, 7b,el, dq64, el), INSN(cvtusi2ss,f3, 0f, 7b,el, dq6

[Xen-devel] [PATCH v6 29/42] x86emul: support AVX512DQ floating point manipulation insns

2018-12-06 Thread Jan Beulich
This completes support of AVX512DQ in the insn emulator. Signed-off-by: Jan Beulich --- v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -457,11 +457,17 @@ static const struct test avx512dq_all[] INSN(cvttps2uqq, 66, 0f, 78, vl_2, d,

[Xen-devel] [PATCH v6 30/42] x86emul: support AVX512{F, _VBMI2} compress/expand insns

2018-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v6: Re-base. Add tests for the byte/word forms. v5: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -109,6 +109,7 @@ static const struct test avx512f_all[] = INSN_FP(cmp, 0f, c2), INSN(comisd,

[Xen-devel] [PATCH v6 31/42] x86emul: support remaining misc AVX512{F, BW} insns

2018-12-06 Thread Jan Beulich
This completes support of AVX512BW in the insn emulator, and leaves just the scatter/gather ones open in the AVX512F set. Signed-off-by: Jan Beulich --- v5: New. --- TBD: The *blendm* inline functions don't reliably produce the intended insns, as the respective moves are about as good a fit

[Xen-devel] [PATCH v6 32/42] x86emul: support AVX512F gather insns

2018-12-06 Thread Jan Beulich
This requires getting modrm_reg and sib_index set correctly in the EVEX case, to account for the high 16 [XYZ]MM registers. Extend the adjustments to modrm_rm as well, such that x86_insn_modrm() would correctly report register numbers (this was a latent issue only as we don't currently have callers

[Xen-devel] [PATCH v6 33/42] x86emul: add high register S/G test cases

2018-12-06 Thread Jan Beulich
In order to verify that in particular the index register decoding works correctly in the S/G emulation paths, add dedicated (64-bit only) cases disallowing the compiler to use the lower registers. Other than in the generic SIMD case, where occasional uses of %xmm or %ymm registers in generated code

[Xen-devel] [PATCH v6 35/42] x86emul: support AVX512PF insns

2018-12-06 Thread Jan Beulich
Some adjustments are necessary to the EVEX Disp8 scaling test code to account for the zero byte reads/writes. I have to admit though that I'm not fully convinced the SDM describes the faulting behavior correctly: Other prefetch insns, including the Xeon Phi Coprocessor S/G ones, don't produce #GP/#

[Xen-devel] [PATCH v6 34/42] x86emul: support AVX512F scatter insns

2018-12-06 Thread Jan Beulich
This completes support of AVX512F in the insn emulator. Note that in the test harness there's a little bit of trickery needed to get around the not fully consistent naming of AVX512VL gather and scatter built-ins. To suppress expansion of the "di" and "si" tokens they get constructed by token conc

[Xen-devel] [PATCH v6 36/42] x86emul: support AVX512CD insns

2018-12-06 Thread Jan Beulich
Since the insns here and in particular their memory access patterns follow the usual scheme I didn't think it was necessary to add contrived tests specifically for them, beyond the Disp8 scaling ones. Signed-off-by: Jan Beulich --- v6: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools

[Xen-devel] [PATCH v6 37/42] x86emul: complete support of AVX512_VBMI insns

2018-12-06 Thread Jan Beulich
Also add testing of ones support for which was added before. Sadly gcc's command line option naming is not in line with Intel's naming of the feature, which makes it necessary to mis-name things in the test harness. Since the only new insn here and in particular its memory access pattern follows t

[Xen-devel] [PATCH v6 39/42] x86emul: support of AVX512_IFMA insns

2018-12-06 Thread Jan Beulich
Once again take the liberty and also correct the (public interface) name of the AVX512_IFMA feature flag, on the assumption that no external consumer has actually been using that flag so far. As in a few cases before, since the insns here and in particular their memory access patterns follow the u

[Xen-devel] [PATCH v6 38/42] x86emul: support of AVX512* population count insns

2018-12-06 Thread Jan Beulich
Plus the only other AVX512_BITALG one. As in a few cases before, since the insns here and in particular their memory access patterns follow the usual scheme, I didn't think it was necessary to add a contrived test specifically for them, beyond the Disp8 scaling one. Signed-off-by: Jan Beulich --

[Xen-devel] [PATCH v6 40/42] x86emul: support remaining AVX512_VBMI2 insns

2018-12-06 Thread Jan Beulich
As in a few cases before, since the insns here and in particular their memory access patterns follow the usual scheme, I didn't think it was necessary to add a contrived test specifically for them, beyond the Disp8 scaling one. Signed-off-by: Jan Beulich --- v6: New. --- a/tools/tests/x86_emulat

[Xen-devel] [PATCH v6 41/42] x86emul: support AVX512_4FMAPS insns

2018-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- v6: New. --- a/tools/tests/x86_emulator/evex-disp8.c +++ b/tools/tests/x86_emulator/evex-disp8.c @@ -538,6 +538,13 @@ static const struct test avx512pf_512[] INSNX(scatterpf1q, 66, 0f38, c7, 6, vl, sd, el), }; +static const struct test avx512_4fmaps_512[] =

[Xen-devel] [PATCH v6 42/42] x86emul: support AVX512_4VNNIW insns

2018-12-06 Thread Jan Beulich
As in a few cases before, since the insns here and in particular their memory access patterns follow the AVX512_4FMAPS scheme, I didn't think it was necessary to add contrived tests specifically for them, beyond the Disp8 scaling ones. Signed-off-by: Jan Beulich --- v6: New. --- a/tools/tests/x8

Re: [Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Jan Beulich
>>> On 06.12.18 at 11:01, wrote: > On 06/12/2018 10:50, Jan Beulich wrote: > On 06.12.18 at 09:06, wrote: >>> @@ -477,7 +478,8 @@ unsigned long long parse_size_and_unit(const char *s, > const char **ps) >>> s1++; >>> break; >>> default: >>> -ret <<= 10; /* defa

Re: [Xen-devel] [PATCH v2 1/3] xen: introduce parse_size_and_unit_or_int

2018-12-06 Thread Juergen Gross
On 06/12/2018 11:15, Jan Beulich wrote: On 06.12.18 at 11:01, wrote: >> On 06/12/2018 10:50, Jan Beulich wrote: >> On 06.12.18 at 09:06, wrote: @@ -477,7 +478,8 @@ unsigned long long parse_size_and_unit(const char *s, >> const char **ps) s1++; break; >>>

[Xen-devel] [PATCH] libxl: Documentation about the domain configuration on disk

2018-12-06 Thread Anthony PERARD
It isn't currently written how one is supposed to update the domain configuration in libxl's private data store. This patch attempt to document the unwritten rules. Signed-off-by: Anthony PERARD --- tools/libxl/CODING_STYLE | 24 1 file changed, 24 insertions(+) diff --

Re: [Xen-devel] [PATCH 7/9] x86/amd: Support context switching legacy SSBD interface

2018-12-06 Thread Jan Beulich
>>> On 03.12.18 at 17:18, wrote: > --- a/xen/arch/x86/cpu/amd.c > +++ b/xen/arch/x86/cpu/amd.c > @@ -442,6 +442,74 @@ static struct ssbd_ls_cfg { > } *ssbd_ls_cfg[4]; > static unsigned int ssbd_max_cores; > > +/* > + * Must only be called when the LEGACY_SSBD is in used. Called with NULL to

[Xen-devel] [distros-debian-wheezy test] 75638: all pass

2018-12-06 Thread Platform Team regression test user
flight 75638 distros-debian-wheezy real [real] http://osstest.xensource.com/osstest/logs/75638/ Perfect :-) All tests in this flight passed as required baseline version: flight 75626 jobs: build-amd64 pass build-armhf

Re: [Xen-devel] [PATCH 8/9] x86/amd: Virtualise MSR_VIRT_SPEC_CTRL for guests

2018-12-06 Thread Jan Beulich
>>> On 03.12.18 at 17:18, wrote: > The semantics of MSR_VIRT_SPEC_CTRL are that unknown bits are write-discard > and read as zero. Only VIRT_SPEC_CTRL.SSBD is defined at the moment. > > To facilitate making this per-guest, the legacy SSBD state needs context > switching between vcpus. amd_ctxt_

Re: [Xen-devel] [PATCH 9/9] x86/amd: Offer MSR_VIRT_SPEC_CTRL to guests

2018-12-06 Thread Jan Beulich
>>> On 03.12.18 at 17:18, wrote: > --- a/xen/arch/x86/cpuid.c > +++ b/xen/arch/x86/cpuid.c > @@ -370,6 +370,16 @@ static void __init > guest_common_feature_adjustments(uint32_t *fs) > */ > if ( host_cpuid_policy.feat.ibrsb ) > __set_bit(X86_FEATURE_IBPB, fs); > + > +/* > +

Re: [Xen-devel] [PATCH 5/9] x86/amd: Probe for legacy SSBD interfaces on boot

2018-12-06 Thread Jan Beulich
>>> On 03.12.18 at 17:18, wrote: > --- a/xen/include/asm-x86/cpufeatures.h > +++ b/xen/include/asm-x86/cpufeatures.h > @@ -25,6 +25,7 @@ XEN_CPUFEATURE(XEN_SMAP,(FSCAPINTS+0)*32+11) /* > SMAP gets used by Xen it > XEN_CPUFEATURE(LFENCE_DISPATCH, (FSCAPINTS+0)*32+12) /* lfence set as > D

Re: [Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Jan Beulich
>>> On 06.12.18 at 09:06, wrote: > Today the memory size of dom0 can be specified only in terms of bytes > (either an absolute value or "host-mem - value"). When dom0 shouldn't > be auto-ballooned this requires nearly always a manual adaption of the > Xen boot parameters to reflect the actual host

Re: [Xen-devel] [PATCH v2 3/3] xen: add CONFIG item for default dom0 memory size

2018-12-06 Thread Jan Beulich
>>> On 06.12.18 at 09:06, wrote: > With being able to specify a dom0_mem value depending on host memory > size on x86 make it easy for distros to specify a default dom0 size by > adding a CONFIG_DOM0_MEM item which presets the dom0_mem boot parameter > value. > > It will be used only if no dom0_m

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-12-06 Thread Greg KH
On Thu, Nov 29, 2018 at 02:35:17PM +0100, Juergen Gross wrote: > On 29/11/2018 14:26, Kirill A. Shutemov wrote: > > On Thu, Nov 29, 2018 at 09:41:25AM +, Juergen Gross wrote: > >> On 29/11/2018 02:22, Hans van Kranenburg wrote: > >>> Hi, > >>> > >>> As also seen at: > >>> https://bugs.debian.or

Re: [Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Juergen Gross
On 06/12/2018 12:08, Jan Beulich wrote: On 06.12.18 at 09:06, wrote: >> Today the memory size of dom0 can be specified only in terms of bytes >> (either an absolute value or "host-mem - value"). When dom0 shouldn't >> be auto-ballooned this requires nearly always a manual adaption of the >> X

Re: [Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Jan Beulich
>>> On 06.12.18 at 12:20, wrote: > On 06/12/2018 12:08, Jan Beulich wrote: > On 06.12.18 at 09:06, wrote: >>> Today the memory size of dom0 can be specified only in terms of bytes >>> (either an absolute value or "host-mem - value"). When dom0 shouldn't >>> be auto-ballooned this requires nea

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-12-06 Thread Juergen Gross
On 06/12/2018 12:13, Greg KH wrote: > On Thu, Nov 29, 2018 at 02:35:17PM +0100, Juergen Gross wrote: >> On 29/11/2018 14:26, Kirill A. Shutemov wrote: >>> On Thu, Nov 29, 2018 at 09:41:25AM +, Juergen Gross wrote: On 29/11/2018 02:22, Hans van Kranenburg wrote: > Hi, > > As als

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-12-06 Thread Hans van Kranenburg
On 12/6/18 12:31 PM, Juergen Gross wrote: > On 06/12/2018 12:13, Greg KH wrote: >> On Thu, Nov 29, 2018 at 02:35:17PM +0100, Juergen Gross wrote: >>> On 29/11/2018 14:26, Kirill A. Shutemov wrote: On Thu, Nov 29, 2018 at 09:41:25AM +, Juergen Gross wrote: > On 29/11/2018 02:22, Hans va

Re: [Xen-devel] [PATCH v2 2/3] xen/x86: add dom0 memory sizing variants

2018-12-06 Thread Juergen Gross
On 06/12/2018 12:28, Jan Beulich wrote: On 06.12.18 at 12:20, wrote: >> On 06/12/2018 12:08, Jan Beulich wrote: >> On 06.12.18 at 09:06, wrote: Today the memory size of dom0 can be specified only in terms of bytes (either an absolute value or "host-mem - value"). When dom0 shou

Re: [Xen-devel] [PATCH] tools/xenstore: Document failure for xs_{read, directory, read_watch}

2018-12-06 Thread Wei Liu
On Wed, Dec 05, 2018 at 04:26:02PM +, Anthony PERARD wrote: > Those functions can return NULL on failure, document it in the public > header. > > Signed-off-by: Anthony PERARD Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenprojec

Re: [Xen-devel] Linux 4.19.5 fails to boot as Xen dom0

2018-12-06 Thread Greg KH
On Thu, Dec 06, 2018 at 12:31:15PM +0100, Juergen Gross wrote: > On 06/12/2018 12:13, Greg KH wrote: > > On Thu, Nov 29, 2018 at 02:35:17PM +0100, Juergen Gross wrote: > >> On 29/11/2018 14:26, Kirill A. Shutemov wrote: > >>> On Thu, Nov 29, 2018 at 09:41:25AM +, Juergen Gross wrote: > On

Re: [Xen-devel] [PATCH for-4.12 v2 17/17] xen/arm: Track page accessed between batch of Set/Way operations

2018-12-06 Thread Julien Grall
Hi, On 12/4/18 8:26 PM, Julien Grall wrote: At the moment, the implementation of Set/Way operations will go through all the entries of the guest P2M and flush them. However, this is very expensive and may render unusable a guest OS using them. For instance, Linux 32-bit will use Set/Way operati

Re: [Xen-devel] [PATCH] libxl: Documentation about the domain configuration on disk

2018-12-06 Thread Wei Liu
On Thu, Dec 06, 2018 at 10:43:32AM +, Anthony PERARD wrote: > It isn't currently written how one is supposed to update the domain > configuration in libxl's private data store. This patch attempt to > document the unwritten rules. > > Signed-off-by: Anthony PERARD > --- > tools/libxl/CODING_

Re: [Xen-devel] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 December 2018 12:34 > To: Paul Durrant > Cc: qemu-bl...@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini ; > Kevin Wolf ; Max Reitz > Subject: Re: [PATCH 14/18

Re: [Xen-devel] [PATCH v2 1/2] x86/dom0: rename paging function

2018-12-06 Thread Wei Liu
On Wed, Dec 05, 2018 at 03:54:59PM +0100, Roger Pau Monne wrote: > To note it's calculating the approximate amount of memory required by > shadow paging. > > No functional change. > > Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu ___ Xen-devel

Re: [Xen-devel] [PATCH 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 December 2018 15:35 > To: Paul Durrant > Cc: qemu-bl...@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini > Subject: Re: [PATCH 15/18] xen: add a mechanism to a

Re: [Xen-devel] [PATCH v2 2/2] x86/dom0: improve paging memory usage calculations

2018-12-06 Thread Wei Liu
On Wed, Dec 05, 2018 at 03:55:00PM +0100, Roger Pau Monne wrote: > Current approximation of paging memory usage is based on the required > amount when running in shadow mode and doesn't take into account the > memory required by the IOMMU page tables. > > Fix this by introducing a function to calc

Re: [Xen-devel] [PATCH 3/9] x86/cpuid: Extend the cpuid= command line option to support all named features

2018-12-06 Thread Wei Liu
On Mon, Dec 03, 2018 at 04:18:16PM +, Andrew Cooper wrote: > For gen-cpuid.py, fix a comment describing self.names, and generate the > reverse mapping in self.values. Write out INIT_FEATURE_NAMES which maps a > string name to a bit position. > > For parse_cpuid(), introduce a slightly fuzzy s

Re: [Xen-devel] [PATCH] tools/libxl: fix boot of HVM domain with Xenstore-stubdom

2018-12-06 Thread Wei Liu
On Tue, Dec 04, 2018 at 03:28:57PM +0100, Juergen Gross wrote: > The Xenstore domid isn't set for HVM domains. This will result in > failure when booting a HVM domain on a system with Xenstore not running > in dom0. > > Same applies for console domid, so set both. > > This is broken since commit

Re: [Xen-devel] [PATCH 16/18] xen: automatically create XenQdiskDevice-s

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 December 2018 16:41 > To: Paul Durrant > Cc: qemu-bl...@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf ; Max Reitz > ; Stefano Stabellini > Subject: Re: [PATCH 16/18

[Xen-devel] [PATCH] pvusb: set max grants only in initialise

2018-12-06 Thread Juergen Gross
Don't call xen_be_set_max_grant_refs() in usbback_alloc(), as the gnttabdev pointer won't be initialised yet. The call can easily be moved to usbback_connect(). Signed-off-by: Juergen Gross --- hw/usb/xen-usb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/u

[Xen-devel] [GRUB PATCH 0/2] verifiers: Fallout cleanup

2018-12-06 Thread Daniel Kiper
Hey, Yeah, fallout cleanup after verifiers introduction. Sorry about that. Now I test build all x86 and ARM supported platforms. I am going to add others to my test script soon to avoid such mess in the future. Daniel grub-core/loader/arm64/xen_boot.c | 8 grub-core/loader/i386/xen.c

[Xen-devel] [GRUB PATCH 1/2] verifiers: Xen fallout cleanup

2018-12-06 Thread Daniel Kiper
Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for fine-grained signature-verification controlling). Signed-off-by: Daniel Kiper --- grub-core/loader/i386/xen.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grub-core/loader/i386/xen.c b/grub

[Xen-devel] [GRUB PATCH 2/2] verifiers: ARM Xen fallout cleanup

2018-12-06 Thread Daniel Kiper
ARM Xen fallout cleanup after commit ca0a4f689 (verifiers: File type for fine-grained signature-verification controlling). Signed-off-by: Daniel Kiper --- grub-core/loader/arm64/xen_boot.c | 8 include/grub/file.h | 5 + 2 files changed, 9 insertions(+), 4 deletions(-)

Re: [Xen-devel] [PATCH] CONTRIBUTING: Clarifications on how to handle license deviations

2018-12-06 Thread Wei Liu
On Mon, Nov 19, 2018 at 06:05:10PM +, Lars Kurth wrote: > This patch makes a few clarifications which were discussed on > IRC recently. > > Specifically: > - Highlight the principle that license deviations > should be brought to the attention of maintainers > - Add a requirement for GPLv2

[Xen-devel] [linux-4.9 test] 131014: regressions - FAIL

2018-12-06 Thread osstest service owner
flight 131014 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/131014/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-multivcpu 16 guest-start/debian.repeat fail REGR. vs. 130869 Tests which are fa

[Xen-devel] [xen-unstable-smoke test] 131076: tolerable all pass - PUSHED

2018-12-06 Thread osstest service owner
flight 131076 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/131076/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH v3 2/4] iommu: rename wrapper functions

2018-12-06 Thread Jan Beulich
>>> On 05.12.18 at 12:29, wrote: > A subsequent patch will add semantically different versions of > iommu_map/unmap() so, in advance of that change, this patch renames the > existing functions to iommu_legacy_map/unmap() and modifies all call-sites. > It also adjusts a comment that refers to iommu

Re: [Xen-devel] [PATCH] libxl: Documentation about the domain configuration on disk

2018-12-06 Thread Anthony PERARD
On Thu, Dec 06, 2018 at 12:16:40PM +, Wei Liu wrote: > On Thu, Dec 06, 2018 at 10:43:32AM +, Anthony PERARD wrote: > > +UPDATE OF DOMAIN CONFIGURATION > > +-- > > + > > +Also known as "libxl-json" userdata or `libxl_domain_config'. > > + > > +Whenever a running d

Re: [Xen-devel] remove the ->mapping_error method from dma_map_ops V3

2018-12-06 Thread Christoph Hellwig
I've pulled this into the dma-mapping for-next tree, with the suggestion from Robin that improves bisectability, and two unused variables found by the build bot. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailm

[Xen-devel] [PATCH v2 06/10] libxl: Move qmp cleanup into devicemodel destroy function

2018-12-06 Thread George Dunlap
Removing the qmp connection is logically part of the device model destruction; having the caller destroy it is a mild layering violation. Move libxl__qmp_cleanup() into libxl__destroy_device_model(). This will make it easier when we make devicemodel destruction asynchronous. Signed-off-by: Georg

[Xen-devel] [PATCH v2 01/10] libxl: Move dm user determination logic into a helper function

2018-12-06 Thread George Dunlap
To reliably kill an untrusted devicemodel, we need to know not only its pid, but its uid. In preparation for this, move the userid determination logic into a helper function. Create a new field, `dm_runas`, in libxl__domain_build_state to store the value during domain creation. This change also

[Xen-devel] [PATCH v2 07/10] libxl: Make killing of device model asynchronous

2018-12-06 Thread George Dunlap
Or at least, give it an asynchronous interface so that we can make it actually asynchronous in subsequent patches. Create state structures and callback function signatures. Add the state structure to libxl__destroy_domid_state. Break libxl__destroy_domid down into two functions. No functional c

[Xen-devel] [PATCH v2 03/10] libxl: Clean up userlookup_helper_getpw* helper

2018-12-06 Thread George Dunlap
Bring conventions more in line with libxl__xs_read_checked(): - If found, return 0 and set pointer to non-NULL - If not found, return 0 and set pointer to NULL - On error, return libxl-style error number. Update documentation to match. Use CODING_STYLE compliant `r` rather than `ret`. On error,

[Xen-devel] [PATCH v2 02/10] libxl: Get rid of support for QEMU_USER_BASE (xen-qemuuser-domidNN)

2018-12-06 Thread George Dunlap
QEMU_USER_BASE allows a user to specify the UID to use when running the devicemodel for a specific domain number. Unfortunately, this is not really practical: It requires nearly 32,000 entries in /etc/passwd. QEMU_USER_RANGE_BASE is much more practical. Remove support for QEMU_USER_BASE. Signed

[Xen-devel] [PATCH v2 05/10] libxl: Do root checks once in libxl__domain_get_device_model_uid

2018-12-06 Thread George Dunlap
At the moment, we check for equivalence to literal "root" before deciding whether to add the `runas` command-line option to QEMU. This is unsatisfactory for several reasons. First, just because the string doesn't match "root" doesn't mean the final uid won't end up being zero; in particular, the

[Xen-devel] [PATCH v2 04/10] dm_depriv: Describe expected usage of device_model_user parameter

2018-12-06 Thread George Dunlap
A number of subsequent patches rely on as-yet undefined behavior for what the `device_model_user` parameter does. Rather than implement it incorrectly (or randomly), or remove the feature, describe an expected usage for the feature. Further patches will make decisions based on this expected usage

[Xen-devel] [PATCH v2 09/10] libxl: Kill QEMU with "reaper" ruid

2018-12-06 Thread George Dunlap
Using kill(-1) to killing an untrusted dm process with the real uid equal to the dm_uid isn't guaranteed to succeed: the process in question may be able to kill the reaper process after the setresuid() and before the kill(). Instead, set the real uid to the QEMU user for domain 0 (QEMU_USER_RANGE_

  1   2   >