Re: [Xen-devel] [PATCH] xen: remove sched-if.h includes from various sources

2019-09-05 Thread Andrew Cooper
uergen Gross > Given the tag in place already I'm not sure this is needed, but just > in case: > Acked-by: Jan Beulich Acked-by: Andrew Cooper Last time I played this game (which was this dev cycle), I found that all includes were still necessary.  Clearly someth

Re: [Xen-devel] [PATCH -tip 0/2] x86: Prohibit kprobes on XEN_EMULATE_PREFIX

2019-09-05 Thread Andrew Cooper
On 05/09/2019 02:49, Masami Hiramatsu wrote: > On Wed, 4 Sep 2019 12:54:55 +0100 > Andrew Cooper wrote: > >> On 04/09/2019 12:45, Masami Hiramatsu wrote: >>> Hi, >>> >>> These patches allow x86 instruction decoder to decode >>> xen-cpuid which

Re: [Xen-devel] [ANNOUNCE] Call for agenda items for September 5th Community Call @ 15:00 UTC

2019-09-05 Thread Andrew Cooper
On 05/09/2019 08:49, Lars Kurth wrote: > On 05/09/2019, 08:41, "Rich Persaud" wrote: > > > On Sep 5, 2019, at 03:19, Jan Beulich wrote: > > > > Forgive me asking, but why is this put up as an agenda item here? > > IMO this is the kind of thing where you would send a proposal and

Re: [Xen-devel] [ANNOUNCE] Call for agenda items for September 5th Community Call @ 15:00 UTC

2019-09-05 Thread Andrew Cooper
On 05/09/2019 09:00, Lars Kurth wrote: > IMPORTANT: I had a few additions to the agenda, but do not know WHO added > these. I believe one was Juergen. Who added the items related to MA Youngs > patches? Steven Haigh I believe. Booting fedora guests is currently in a very broken state. ~Andrew

Re: [Xen-devel] [PATCH -tip 0/2] x86: Prohibit kprobes on XEN_EMULATE_PREFIX

2019-09-05 Thread Andrew Cooper
On 05/09/2019 09:26, Peter Zijlstra wrote: > On Thu, Sep 05, 2019 at 08:54:17AM +0100, Andrew Cooper wrote: > >> I don't know if you've spotted, but the prefix is a ud2a instruction >> followed by 'xen' in ascii. >> >> The KVM version was add

Re: [Xen-devel] [PATCH -tip 0/2] x86: Prohibit kprobes on XEN_EMULATE_PREFIX

2019-09-05 Thread Andrew Cooper
On 05/09/2019 10:26, Peter Zijlstra wrote: > On Thu, Sep 05, 2019 at 09:53:32AM +0100, Andrew Cooper wrote: >> On 05/09/2019 09:26, Peter Zijlstra wrote: >>> On Thu, Sep 05, 2019 at 08:54:17AM +0100, Andrew Cooper wrote: >>> >>>> I don't know if you'

Re: [Xen-devel] [PATCH] x86/libxl: choose a sane default for HAP

2019-09-05 Thread Andrew Cooper
On 05/09/2019 10:52, Jan Beulich wrote: > On 05.09.2019 11:34, Roger Pau Monne wrote: >> Current libxl code will always enable Hardware Assisted Paging (HAP), >> expecting that the hypervisor will fallback to shadow if HAP is not >> available. With the changes to the domain builder that's not the c

Re: [Xen-devel] [PATCH] x86/libxl: choose a sane default for HAP

2019-09-05 Thread Andrew Cooper
On 05/09/2019 11:32, Jan Beulich wrote: > On 05.09.2019 12:01, Roger Pau Monné wrote: >> On Thu, Sep 05, 2019 at 11:52:59AM +0200, Jan Beulich wrote: >>> On 05.09.2019 11:34, Roger Pau Monne wrote: Current libxl code will always enable Hardware Assisted Paging (HAP), expecting that the h

Re: [Xen-devel] [PATCH v3 2/2] x86/AMD: Fix handling of x87 exception pointers on Fam17h hardware

2019-09-05 Thread Andrew Cooper
On 05/09/2019 10:00, Jan Beulich wrote: > On 04.09.2019 19:57, Andrew Cooper wrote: >> AMD Pre-Fam17h CPUs "optimise" {F,}X{SAVE,RSTOR} by not saving/restoring >> FOP/FIP/FDP if an x87 exception isn't pending. This causes an information >> leak, CVE-2006-105

Re: [Xen-devel] [PATCH -tip 0/2] x86: Prohibit kprobes on XEN_EMULATE_PREFIX

2019-09-05 Thread Andrew Cooper
On 05/09/2019 14:09, Masami Hiramatsu wrote: > On Thu, 5 Sep 2019 20:32:24 +0900 > Masami Hiramatsu wrote: > >> On Thu, 5 Sep 2019 08:54:17 +0100 >> Andrew Cooper wrote: >> >>> On 05/09/2019 02:49, Masami Hiramatsu wrote: >>>> On Wed, 4 S

[Xen-devel] [PATCH] x86/boot: Don't explicitly map the VGA region as UC-

2019-09-05 Thread Andrew Cooper
ssing MTRRs of different cacheability. While adjusting the pagetable construction, switch from pfn to idx for consistency with all the other construction logic. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné As a future optimisation, Xen could rewrite l2_ide

[Xen-devel] [PATCH v2] x86/cpuid: Extend the cpuid= option to support all named features

2019-09-05 Thread Andrew Cooper
() is needed to break at equals signs as well. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * Rebase over cmdline_strcmp() --- xen/arch/x86/cpuid.c | 75 +++--- xen/common/kernel.c| 6 ++-- xen/include

Re: [Xen-devel] [PATCH] x86/boot: Don't explicitly map the VGA region as UC-

2019-09-06 Thread Andrew Cooper
On 06/09/2019 12:06, Roger Pau Monné wrote: > On Thu, Sep 05, 2019 at 08:04:18PM +0100, Andrew Cooper wrote: >> All 64-bit capable processors use PAT, and with PAT, it is explicitly >> permitted to have mappings with a cacheability different to MTRRs. >> >> On a nativ

Re: [Xen-devel] [PATCH] x86/shadow: fold p2m page accounting into sh_min_allocation()

2019-09-06 Thread Andrew Cooper
On 05/09/2019 09:34, Jan Beulich wrote: > This is to make the function live up to the promise its name makes. And > it simplifies all callers. > > Suggested-by: Andrew Cooper > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper I haven't looked at the calculations in det

Re: [Xen-devel] RFC: Criteria for checking in core scheduling series

2019-09-06 Thread Andrew Cooper
On 06/09/2019 12:09, George Dunlap wrote: > There was a discussion on the community call about the core scheduling > series being developed by Juergen Gross [1]. The conclusion can be > summarized as follows: > > * We normally wait to check in series until they are quite good -- all > the i's dott

Re: [Xen-devel] [xen-unstable-smoke test] 141063: regressions - FAIL

2019-09-06 Thread Andrew Cooper
On 06/09/2019 08:29, Jan Beulich wrote: > On 06.09.2019 00:04, osstest service owner wrote: >> flight 141063 xen-unstable-smoke real [real] >> http://logs.test-lab.xenproject.org/osstest/logs/141063/ >> >> Regressions :-( >> >> Tests which did not succeed and are blocking, >> including tests which

Re: [Xen-devel] [xen-unstable-smoke test] 141063: regressions - FAIL

2019-09-06 Thread Andrew Cooper
On 06/09/2019 14:12, Jan Beulich wrote: > On 06.09.2019 14:28, Andrew Cooper wrote: >> On 06/09/2019 08:29, Jan Beulich wrote: >>> On 06.09.2019 00:04, osstest service owner wrote: >>>> flight 141063 xen-unstable-smoke real [real] >>>> http://logs.t

Re: [Xen-devel] [PATCH] x86/mwait-idle: add support for Jacobsville

2019-09-06 Thread Andrew Cooper
On 06/09/2019 14:54, Jan Beulich wrote: > From: Zhang Rui > > Jacobsville uses the same C-states as Denverton. > > Signed-off-by: Zhang Rui > [Linux commit 04b1d5d098491244f506c4265cc95b87210eef2f] > Signed-off-by: Jan Beulich Ac

Re: [Xen-devel] [PATCH 1/3] x86: drop CONFIG_X86_MCE_THERMAL

2019-09-06 Thread Andrew Cooper
On 06/09/2019 15:00, Jan Beulich wrote: > There's no point having this if it's not exposed through Kconfig. > > Take the liberty and also drop an unnecessary "return" in context. > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper __

Re: [Xen-devel] [PATCH 2/3] x86/apic: include the LDR when clearing out APIC registers

2019-09-06 Thread Andrew Cooper
gt; > Signed-off-by: Bandan Das > [Linux commit 558682b5291937a70748d36fd9ba757fb25b99ae] > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 3/3] x86/apic: do not initialize LDR and DFR for bigsmp

2019-09-06 Thread Andrew Cooper
> > This is not intended to work around the KVM APIC bug. The LDR/DFR > ininitalization is wrong on its own. > > Suggested-by: Thomas Gleixner > Signed-off-by: Bandan Das > [Linux commit bae3a8d3308ee69a7dbdf145911b18dfda8ade0d] > > Drop init_apic_ldr_x2apic_phys()

Re: [Xen-devel] [PATCH 09/11] swiotlb-xen: simplify cache maintainance

2019-09-06 Thread Andrew Cooper
On 06/09/2019 15:01, Christoph Hellwig wrote: > On Fri, Sep 06, 2019 at 09:52:12AM -0400, Boris Ostrovsky wrote: >> We need nop definitions of these two for x86. >> >> Everything builds now but that's probably because the calls are under >> 'if (!dev_is_dma_coherent(dev))' which is always false so

Re: [Xen-devel] [PATCH v3 2/2] sysctl/libxl: choose a sane default for HAP

2019-09-06 Thread Andrew Cooper
On 06/09/2019 15:30, Roger Pau Monne wrote: > Current libxl code will always enable Hardware Assisted Paging (HAP), > expecting that the hypervisor will fallback to shadow if HAP is not > available. With the changes to the domain builder that's not the case "domain builder" is usually libxenguest.

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

2019-09-06 Thread Andrew Cooper
On 06/09/2019 16:18, Jan Beulich wrote: > On 05.09.2019 21:49, Andrew Cooper wrote: >> --- a/xen/arch/x86/cpuid.c >> +++ b/xen/arch/x86/cpuid.c >> @@ -21,45 +21,62 @@ static const uint32_t deep_features[] = >> INIT_DEEP_FEATURES; >> >> static i

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-09-06 Thread Andrew Cooper
On 06/09/2019 16:39, Arnd Bergmann wrote: > HYPERVISOR_platform_op() is an inline function and should not > be exported. Since commit 15bfc2348d54 ("modpost: check for > static EXPORT_SYMBOL* functions"), this causes a warning: > > WARNING: "HYPERVISOR_platform_op" [vmlinux] is a static EXPORT_SYMB

Re: [Xen-devel] [ANNOUNCE] Xen 4.13 Development Update

2019-09-06 Thread Andrew Cooper
On 06/09/2019 08:40, Juergen Gross wrote: > This email only tracks big items for xen.git tree. Please reply for items you > would like to see in 4.13 so that people have an idea what is going on and > prioritise accordingly. > > You're welcome to provide description and use cases of the feature you

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-09-06 Thread Andrew Cooper
On 06/09/2019 17:00, Arnd Bergmann wrote: > On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper > wrote: >> On 06/09/2019 16:39, Arnd Bergmann wrote: >>> HYPERVISOR_platform_op() is an inline function and should not >>> be exported. Since commit 15bfc2348d54 (

[Xen-devel] [PATCH] x86/boot: Improve code generation from bootsym()

2019-09-09 Thread Andrew Cooper
12939 11570 -1369 Total: Before=3341298, After=3337042, chg -0.13% No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/include/asm-x86/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen

[Xen-devel] [PATCH] x86: Misc trivial cleanup of bootsym_phys()

2019-09-09 Thread Andrew Cooper
s the compiled function. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-134 (-134) Function old new delta tboot_shutdown 620 486-134 Total: Before=3337042, After=3336908, chg -0.00% Signed-off-by: Andrew Cooper -

Re: [Xen-devel] [PATCH v3] x86emul: fix test harness and fuzzer build dependencies

2019-09-09 Thread Andrew Cooper
which is achieved by introducing a new top-level target > pattern (for just the "run" part for now). > > Further cpuid.o did not have any dependencies added for it. > > Finally, while at it, add a "run" target to the cpu-policy test harness. > > Signed-of

Re: [Xen-devel] [PATCH RFC] x86/HVM: use single (atomic) MOV for aligned emulated writes

2019-09-09 Thread Andrew Cooper
nsns as correctly as possible. Fall > back to memcpy() only for misaligned accesses as well as ones not 2, 4, > or 8 bytes in size. > > Suggested-by: Andrew Cooper > Signed-off-by: Jan Beulich > --- > RFC: Besides wanting to hear if this is considered acceptable and >

Re: [Xen-devel] [PATCH] docs/sphinx: todo/wishlist

2019-09-09 Thread Andrew Cooper
On 09/09/2019 12:02, Ian Jackson wrote: > Andrew Cooper writes ("Re: [PATCH] docs/sphinx: todo/wishlist"): >> It has been pointed out that calling this the wishlist is a poor name.  >> A better name would be the technical debt list.  I won't resend for just >> t

Re: [Xen-devel] [PATCH] x86/IRQ: make 'i' debug output more tabular again

2019-09-09 Thread Andrew Cooper
On 09/09/2019 13:07, Jan Beulich wrote: > Since the affinity values are no longer of uniform width, move them > further to the right such that as much of the output as possible comes > out aligned with one another. > > Signed-off-by: Jan Beulich Acked-by

[Xen-devel] [PATCH] tools/ocaml: Fix xenctrl ABI and introduce build-time checks

2019-09-09 Thread Andrew Cooper
esult in a compile time failure whenever constants get renumbered/added without a compatible adjustment to the Ocaml ABI. Signed-off-by: Andrew Cooper --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Christian Lindig CC: Rob Hoes A patch along these lines wants backporting to at least

Re: [Xen-devel] [PATCH] tools/ocaml: Fix xenctrl ABI and introduce build-time checks

2019-09-09 Thread Andrew Cooper
On 09/09/2019 14:32, Andrew Cooper wrote: > c/s f089fddd941 broke the Ocaml ABI by renumering XEN_SYSCTL_PHYSCAP_directio > without adjusting the Ocaml physinfo_cap_flag enumeration. Fix this by > inserting CAP_PV between CAP_HVM and CAP_DirectIO. > > c/s 82239182e

[Xen-devel] [PATCH v2] tools/ocaml: Fix xenctrl ABI and introduce build-time checks

2019-09-09 Thread Andrew Cooper
igned-off-by: Andrew Cooper --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Christian Lindig CC: Rob Hoes CC: Edwin Török This needs backporting to Xen 4.12 v2: * Base this patch correctly. --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli

[Xen-devel] [PATCH] fixup sysctl/libxl: choose a sane default for HAP

2019-09-09 Thread Andrew Cooper
This delta wants folding to keep the Ocaml stubs in line. Signed-off-by: Andrew Cooper --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Christian Lindig CC: Rob Hoes --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc

Re: [Xen-devel] [PATCH v2] tools/ocaml: Fix xenctrl ABI and introduce build-time checks

2019-09-09 Thread Andrew Cooper
On 09/09/2019 15:25, Ian Jackson wrote: > Andrew Cooper writes ("[PATCH v2] tools/ocaml: Fix xenctrl ABI and introduce > build-time checks"): >> c/s f089fddd941 broke the Ocaml ABI by renumering XEN_SYSCTL_PHYSCAP_directio >> without adjusting the Ocaml physinfo_cap_fl

[Xen-devel] [PATCH] x86/cpuid: Fix handling of the CPUID.7[0].eax levelling MSR

2019-09-09 Thread Andrew Cooper
7a0 is an integer field, not a mask - taking the logical and of the hardware and policy values results in nonsense. Instead, take the policy value directly. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné Even Rome hardware has 7[0].eax still as 0, and there

[Xen-devel] [PATCH] x86/cpuid: Fix build with CentOS 6 following c/s 7479151106

2019-09-09 Thread Andrew Cooper
ssues. Spotted by Gitlab CI. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index 36b1e2ce4c..acba0f7583 100644 --- a/x

Re: [Xen-devel] [PATCH] x86/cpuid: Fix handling of the CPUID.7[0].eax levelling MSR

2019-09-10 Thread Andrew Cooper
On 10/09/2019 10:29, Roger Pau Monné wrote: > On Mon, Sep 09, 2019 at 04:51:24PM +0100, Andrew Cooper wrote: >> 7a0 is an integer field, not a mask - taking the logical and of the hardware >> and policy values results in nonsense. Instead, take the policy value >> directly

Re: [Xen-devel] [PATCH] x86/cpuid: Fix handling of the CPUID.7[0].eax levelling MSR

2019-09-10 Thread Andrew Cooper
On 10/09/2019 10:57, Roger Pau Monné wrote: > On Tue, Sep 10, 2019 at 10:35:26AM +0100, Andrew Cooper wrote: >> On 10/09/2019 10:29, Roger Pau Monné wrote: >>> On Mon, Sep 09, 2019 at 04:51:24PM +0100, Andrew Cooper wrote: >>>> 7a0 is an integer field, not a mask -

Re: [Xen-devel] [PATCH] x86/cpuid: Fix handling of the CPUID.7[0].eax levelling MSR

2019-09-10 Thread Andrew Cooper
On 10/09/2019 11:24, Jan Beulich wrote: > On 09.09.2019 17:51, Andrew Cooper wrote: >> --- a/xen/arch/x86/domctl.c >> +++ b/xen/arch/x86/domctl.c >> @@ -218,11 +218,16 @@ static int update_domain_cpuid_info(struct domain *d, >> if ( is_pv_domain(d) &

Re: [Xen-devel] [PATCH v3 03/12] tools/ocaml: Introduce xenctrl ABI build-time checks

2019-09-10 Thread Andrew Cooper
will check the ABI correspondence. >> >> This will result in a compile time failure whenever constants get >> renumbered/added without a compatible adjustment to the Ocaml ABI. >> >> Signed-off-by: Andrew Cooper >> Signed-off-by: Ian Jackson >> Acked-by: C

Re: [Xen-devel] [PATCH v3 04/12] xen/domctl: Drop guest suffix from XEN_DOMCTL_CDF_hvm

2019-09-10 Thread Andrew Cooper
On 10/09/2019 13:01, Ian Jackson wrote: > From: Andrew Cooper > > Signed-off-by: Andrew Cooper I should probably have finished writing my commit message before handing the branch off. "The suffix is redundant, and dropping it helps to simplify the Ocaml/C ABI checking." or

Re: [Xen-devel] [PATCH v3 06/12] tools/ocaml: abi handling: Provide ocaml->C conversion/check

2019-09-10 Thread Andrew Cooper
On 10/09/2019 13:02, Ian Jackson wrote: > From: Andrew Cooper > > No users of this yet so no overall change. > > Signed-off-by: Andrew Cooper > Signed-off-by: Ian Jackson I'm afraid this doesn't bisect.  It needs to be in the same patch as

[Xen-devel] [PATCH] tools/ocaml: Fix build error with CentOS 7

2019-09-10 Thread Andrew Cooper
s errors GCC doesn't point at the correct piece of code, but the diagnostic text is correct, and can occur when the list is empty. Initialise val to 0. Signed-off-by: Andrew Cooper --- CC: Ian Jackson CC: Wei Liu CC: Christian Lindig --- tools/ocaml/libs/xc/xenctrl_stubs.c | 2 +- 1 file

Re: [Xen-devel] [PATCH] fixup sysctl/libxl: choose a sane default for HAP

2019-09-10 Thread Andrew Cooper
On 10/09/2019 15:43, Jan Beulich wrote: > On 09.09.2019 15:47, Andrew Cooper wrote: >> --- a/tools/ocaml/libs/xc/xenctrl_stubs.c >> +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c >> @@ -690,7 +690,8 @@ CAMLprim value stub_xc_physinfo(value xch) >> BUILD_BUG_ON(XEN_SYS

Re: [Xen-devel] [PATCH] tools/ocaml: abi check: #include on x86 only

2019-09-10 Thread Andrew Cooper
On 10/09/2019 16:17, Ian Jackson wrote: Subject += Spotted by Gitlab CI. > Reported-by: Andrew Cooper > Signed-off-by: Ian Jackson Acked-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproje

Re: [Xen-devel] [PATCH v4 1/2] sysctl/libxl: choose a sane default for HAP

2019-09-10 Thread Andrew Cooper
On 10/09/2019 16:25, Roger Pau Monne wrote: > diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml > index e544ef84da..a5e77c943a 100644 > --- a/tools/ocaml/libs/xc/xenctrl.ml > +++ b/tools/ocaml/libs/xc/xenctrl.ml > @@ -107,6 +107,7 @@ type physinfo_cap_flag = > | CAP

Re: [Xen-devel] [RFC PATCH 0/5] Add hypervisor sysfs-like support

2019-09-11 Thread Andrew Cooper
On 11/09/2019 07:19, Juergen Gross wrote: > On the 2019 Xen developer summit there was agreement that the Xen > hypervisor should gain support for a hierarchical name-value store > similar to the Linux kernel's sysfs. > > This is a first implementation of that idea adding the basic > functionality

[Xen-devel] [PATCH 8/8] x86/cpuid: Enable CPUID Faulting for the control domain

2019-09-11 Thread Andrew Cooper
The domain builder no longer uses CPUID instructions for policy decisions. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/cpu/common.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/xen/arch/x86/cpu

[Xen-devel] [PATCH 1/8] libx86: Introduce x86_cpu_policies_are_compatible()

2019-09-11 Thread Andrew Cooper
cleaned up. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- tools/tests/cpu-policy/Makefile | 2 +- tools/tests/cpu-policy/test-cpu-policy.c | 111 ++- xen/include/xen/lib/x86/cpu-policy.h | 19 ++ xen/lib/x8

[Xen-devel] [PATCH 7/8] x86/domctl: Drop XEN_DOMCTL_set_cpuid

2019-09-11 Thread Andrew Cooper
With the final users moved over to using XEN_DOMCTL_set_cpumsr_policy, drop this domctl and associated infrastructure. Rename the preexisting set_cpuid XSM vector to set_cpu_policy, now that it is back to having a single user. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC

[Xen-devel] [PATCH 4/8] tools/libxc: Pre-cleanup for xc_cpuid_{set, apply_policy}()

2019-09-11 Thread Andrew Cooper
id_apply_policy(), const-ify the featureset pointer. It isn't written to, and was never intended to be mutable. Drop three pieces of trailing whitespace. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Ian Jackson --- tools/libxc/in

[Xen-devel] [PATCH 6/8] tools/libxc: Rework xc_cpuid_apply_policy() to use {get, set}_cpu_policy()

2019-09-11 Thread Andrew Cooper
topology representation is another future area of work. No (expected) change in behaviour. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Ian Jackson The repositioning of xc_cpuid_apply_policy() relative to xc_cpuid_set() is simply to make the diff

[Xen-devel] [PATCH 3/8] x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy

2019-09-11 Thread Andrew Cooper
x86_cpu_policies_are_compatible() is still only a stub, retain the call to recalculate_cpuid_policy() to discard unsafe toolstack settings. Signed-off-by: Andrew Cooper Signed-off-by: Sergey Dyasli Signed-off-by: Roger Pau Monné --- CC: Jan Beulich CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Daniel De

[Xen-devel] [PATCH 5/8] tools/libxc: Rework xc_cpuid_set() to use {get, set}_cpu_policy()

2019-09-11 Thread Andrew Cooper
rather more error logging than before. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Ian Jackson --- tools/libxc/xc_cpuid_x86.c | 95 -- 1 file changed, 84 insertions(+), 11 deletions(-) diff --git a/tools

[Xen-devel] [PATCH 0/8] x86/cpuid: Switch to using XEN_DOMCTL_set_cpumsr_policy

2019-09-11 Thread Andrew Cooper
http://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/xen-cpuid Andrew Cooper (8): libx86: Introduce x86_cpu_policies_are_compatible() x86/cpuid: Split update_domain_cpuid_info() in half x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy tools/libxc: Pre-cleanu

[Xen-devel] [PATCH 2/8] x86/cpuid: Split update_domain_cpuid_info() in half

2019-09-11 Thread Andrew Cooper
allows for a cleaner set of following changes. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/domctl.c | 245 -- 1 file changed, 99 insertions(+), 146 deletions(-) diff --git a/xen/arch/x86

Re: [Xen-devel] [PATCH 1/8] libx86: Introduce x86_cpu_policies_are_compatible()

2019-09-12 Thread Andrew Cooper
On 12/09/2019 08:43, Jan Beulich wrote: > On 11.09.2019 22:04, Andrew Cooper wrote: >> This helper will eventually be the core "can a guest confiured like this run >> on the CPU?" logic. For now, it is just enough of a stub to allow us to >> replace the hypercal

Re: [Xen-devel] [PATCH 2/8] x86/cpuid: Split update_domain_cpuid_info() in half

2019-09-12 Thread Andrew Cooper
On 12/09/2019 08:52, Jan Beulich wrote: > On 11.09.2019 22:04, Andrew Cooper wrote: >> update_domain_cpuid_info() currently serves two purposes. First to merge new >> CPUID data from the toolstack, and second, to perform any necessary updating >> of derived domain/vcpu sett

Re: [Xen-devel] [PATCH 5/8] tools/libxc: Rework xc_cpuid_set() to use {get, set}_cpu_policy()

2019-09-12 Thread Andrew Cooper
On 12/09/2019 09:19, Jan Beulich wrote: > On 11.09.2019 22:05, Andrew Cooper wrote: >> The purpose of this change is to stop using xc_cpuid_do_domctl(), and to stop >> basing decisions on a local CPUID instruction. This is not an appropriate >> way >> to construct p

Re: [Xen-devel] [PATCH 4/8] tools/libxc: Pre-cleanup for xc_cpuid_{set, apply_policy}()

2019-09-12 Thread Andrew Cooper
On 12/09/2019 09:17, Jan Beulich wrote: > On 11.09.2019 22:05, Andrew Cooper wrote: >> @@ -935,6 +935,13 @@ int xc_cpuid_set( >> goto fail; >> } >> >> +/* >> + * Notes for following this algorithm: >> + *

Re: [Xen-devel] [PATCH 8/8] x86/cpuid: Enable CPUID Faulting for the control domain

2019-09-12 Thread Andrew Cooper
On 12/09/2019 10:07, Jan Beulich wrote: > On 11.09.2019 22:05, Andrew Cooper wrote: >> The domain builder no longer uses CPUID instructions for policy decisions. > How certain are we that there are no other components left relying > on being able to see raw CPUID output in Dom0? Cs

Re: [Xen-devel] [PATCH v4 2/2] sysctl: report shadow paging capability

2019-09-12 Thread Andrew Cooper
On 10/09/2019 16:25, Roger Pau Monne wrote: > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 3ff67792a7..e8f5ebe929 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -401,6 +401,12 @@ > */ > #define LIBXL_HAVE_PHYSINFO_CAP_HAP 1 > > +/* > + * LIBXL_HAVE_PHYSIN

Re: [Xen-devel] [PATCH 1/8] libx86: Introduce x86_cpu_policies_are_compatible()

2019-09-12 Thread Andrew Cooper
On 12/09/2019 09:22, Jan Beulich wrote: > On 12.09.2019 09:59, Andrew Cooper wrote: >> On 12/09/2019 08:43, Jan Beulich wrote: >>> On 11.09.2019 22:04, Andrew Cooper wrote: >>>> This helper will eventually be the core "can a guest confiured like this >>>

Re: [Xen-devel] [PATCH 3/8] x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy

2019-09-12 Thread Andrew Cooper
On 12/09/2019 09:06, Jan Beulich wrote: > On 11.09.2019 22:04, Andrew Cooper wrote: >> --- a/tools/libxc/xc_cpuid_x86.c >> +++ b/tools/libxc/xc_cpuid_x86.c >> @@ -229,6 +229,55 @@ int xc_get_domain_cpu_policy(xc_interface *xch, >> uint32_t domid, >>

Re: [Xen-devel] [PATCH 5/8] tools/libxc: Rework xc_cpuid_set() to use {get, set}_cpu_policy()

2019-09-12 Thread Andrew Cooper
On 12/09/2019 10:11, Jan Beulich wrote: > On 12.09.2019 10:36, Andrew Cooper wrote: >> On 12/09/2019 09:19, Jan Beulich wrote: >>> On 11.09.2019 22:05, Andrew Cooper wrote: >>>> The purpose of this change is to stop using xc_cpuid_do_domctl(), and to >>>

Re: [Xen-devel] [PATCH 6/8] tools/libxc: Rework xc_cpuid_apply_policy() to use {get, set}_cpu_policy()

2019-09-12 Thread Andrew Cooper
On 12/09/2019 10:02, Jan Beulich wrote: > On 11.09.2019 22:05, Andrew Cooper wrote: >> The purpose of this change is to stop using xc_cpuid_do_domctl(), and to stop >> basing decisions on a local CPUID instruction. This is not a correct or >> appropriate way to construct p

Re: [Xen-devel] [PATCH 3/8] x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy

2019-09-12 Thread Andrew Cooper
On 12/09/2019 14:15, Andrew Cooper wrote: > On 12/09/2019 09:06, Jan Beulich wrote: >> On 11.09.2019 22:04, Andrew Cooper wrote: >>> --- a/tools/libxc/xc_cpuid_x86.c >>> +++ b/tools/libxc/xc_cpuid_x86.c >>> @@ -229,6 +229,55 @@ int xc_get_domain_cpu_policy(xc

[Xen-devel] [PATCH v2 8/8] x86/cpuid: Enable CPUID Faulting for the control domain by default

2019-09-12 Thread Andrew Cooper
the first cpu_has_cpuid_faulting condition to reduce the indentation for the CPUID faulting logic. Advertise virtualised faulting support to control domains unless the opt-out has been used. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné opt_dom0_cpuid_faulting would id

[Xen-devel] [PATCH v2 0.5/8] libx86: Proactively initialise error pointers

2019-09-12 Thread Andrew Cooper
This results in better behaviour for the caller. Suggested-by: Jan Beulich Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * New --- tools/tests/cpu-policy/test-cpu-policy.c | 4 ++-- xen/include/xen/lib/x86/cpuid.h | 6 +++--- xen/include/xen

Re: [Xen-devel] [PATCH v10 15/16] microcode: disable late loading if CPUs are affected by BDF90

2019-09-13 Thread Andrew Cooper
On 12/09/2019 08:22, Chao Gao wrote: > It ports the implementation of is_blacklisted() in linux kernel > to Xen. > > Late loading may cause system hang if CPUs are affected by BDF90. > Check against BDF90 before performing a late loading. > > Signed-off-by: Chao Gao There is an Intel-blessed work

Re: [Xen-devel] [PATCH v2 8/8] x86/cpuid: Enable CPUID Faulting for the control domain by default

2019-09-13 Thread Andrew Cooper
On 13/09/2019 07:38, Jan Beulich wrote: > >> v2: >> * Introduce a command line option to retain old behaviour. >> * Advertise virtualised faulting support to dom0 when it is used. >> >> RFC: The previous logic was slightly buggy in that even PVH dom0's had >> virtualised faulting support hidden f

[Xen-devel] [PATCH] x86/viridian: Reword HV_X64_MSR_CRASH_CTL print message

2019-09-13 Thread Andrew Cooper
orted' to reduce the confusion to non-xen-developers trying to interpret the message. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Paul Durrant This wants backporting to every stable tree which has viridian crash interface support. --- xen/ar

[Xen-devel] [PATCH] x86/vpmu: Drop "VPMU: disabled" message

2019-09-13 Thread Andrew Cooper
Printing "$foo disabled" is unnecessary noise during boot. All other VPMU settings emit a message, so this doesn't result in any ambiguity. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/cpu/vpmu.c | 3 --- 1 file chang

[Xen-devel] [PATCH] drivers/acpi: Drop "ERST table was not found" message

2019-09-13 Thread Andrew Cooper
ERST isn't a mandatory table, and also isn't very common to find. The message is unnecessary noise during boot. Furthermore, it is redundant with the list of found ACPI tables printed just ahead. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/drivers/acpi/apei/erst.c |

[Xen-devel] [PATCH v2 09/10] x86/domctl: Drop XEN_DOMCTL_set_cpuid

2019-09-13 Thread Andrew Cooper
With the final users moved over to using XEN_DOMCTL_set_cpumsr_policy, drop this domctl and associated infrastructure. Rename the preexisting set_cpuid XSM vector to set_cpu_policy, now that it is back to having a single user. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan

[Xen-devel] [PATCH v2 03/10] libx86: Introduce x86_cpu_policies_are_compatible()

2019-09-13 Thread Andrew Cooper
cleaned up. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * Rebase over 'plaform' typo fix * Proactively initialise the error pointer * Expand the function documentation --- tools/tests/cpu-policy/Makefile

[Xen-devel] [PATCH v2 02/10] libx86: Proactively initialise error pointers

2019-09-13 Thread Andrew Cooper
This results in better behaviour for the caller. Suggested-by: Jan Beulich Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * New --- tools/tests/cpu-policy/test-cpu-policy.c | 4 ++-- xen/include/xen/lib/x86/cpuid.h | 6

[Xen-devel] [PATCH v2 07/10] tools/libxc: Rework xc_cpuid_set() to use {get, set}_cpu_policy()

2019-09-13 Thread Andrew Cooper
rather more error logging than before. No semantics changes to xc_cpuid_set(). There are conceptual problems with how the function works, which will be addressed in future toolstack work. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau

[Xen-devel] [PATCH v2 00/10] x86/cpuid: Switch to using XEN_DOMCTL_set_cpumsr_policy

2019-09-13 Thread Andrew Cooper
http://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/xen-cpuid Large changes from v2: * Split several changes out into earlier patches. Rebase around. * Introduce dom0=no-cpuid-faulting to restore previous behaviour. See individual patches for changes. Andrew C

[Xen-devel] [PATCH v2 06/10] tools/libxc: Pre-cleanup for xc_cpuid_{set, apply_policy}()

2019-09-13 Thread Andrew Cooper
For xc_cpuid_apply_policy(), const-ify the featureset pointer. It isn't written to, and was never intended to be mutable. Drop three pieces of trailing whitespace. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné C

[Xen-devel] [PATCH v2 01/10] x86/msr: Offer CPUID Faulting to PVH control domains

2019-09-13 Thread Andrew Cooper
t any less broken. Tweak the logic to only exclude PV control domains. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * New --- xen/arch/x86/cpu/common.c | 5 +++-- xen/arch/x86/msr.c| 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) di

[Xen-devel] [PATCH v2 08/10] tools/libxc: Rework xc_cpuid_apply_policy() to use {get, set}_cpu_policy()

2019-09-13 Thread Andrew Cooper
keep it identical to before. Fixing topology representation is another future area of work. No (expected) change in behaviour. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Ian Jackson The repositioning of xc_cpuid_apply_policy() relative to xc_cpuid_set

[Xen-devel] [PATCH v2 05/10] x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy

2019-09-13 Thread Andrew Cooper
x86_cpu_policies_are_compatible() is still only a stub, retain the call to recalculate_cpuid_policy() to discard unsafe toolstack settings. Signed-off-by: Andrew Cooper Signed-off-by: Sergey Dyasli Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Ian Jackson CC: Wei Liu CC

[Xen-devel] [PATCH v2 04/10] x86/cpuid: Split update_domain_cpuid_info() in half

2019-09-13 Thread Andrew Cooper
a cleaner set of following changes. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * Drop duplicate 'hypercall' in commit message * Fix for_each_vcpu () style --- xen/arch/x86/domc

[Xen-devel] [PATCH v2 10/10] x86/cpuid: Enable CPUID Faulting for PV control domains by default

2019-09-13 Thread Andrew Cooper
ol domains unless the opt-out has been used. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné v2: * Introduce a command line option to retain old behaviour. * Advertise virtualised faulting support to dom0 when it is used. v2.1: * Split the PVH adjustment ou

Re: [Xen-devel] [PATCH] x86/viridian: Reword HV_X64_MSR_CRASH_CTL print message

2019-09-16 Thread Andrew Cooper
On 15/09/2019 12:51, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper >> Sent: 13 September 2019 17:04 >> To: Xen-devel >> Cc: Andrew Cooper ; Jan Beulich >> ; Wei Liu ; >> Roger Pau Monne ; Paul Durrant >> >> Subj

Re: [Xen-devel] [PATCH] x86/viridian: Reword HV_X64_MSR_CRASH_CTL print message

2019-09-16 Thread Andrew Cooper
On 16/09/2019 13:56, Paul Durrant wrote: >> -Original Message- >> From: Andrew Cooper >> Sent: 16 September 2019 13:48 >> To: Paul Durrant ; Xen-devel >> >> Cc: Jan Beulich ; Wei Liu ; Roger Pau Monne >> >> Subject: Re: [PATCH] x86/vir

[Xen-devel] Regression with vcpu runstate info and XEN_RUNSTATE_UPDATE

2019-09-16 Thread Andrew Cooper
Hello, After a complicated investigation, it turns out that c/s 2529c850ea48 broke xc_vcpu_getinfo(). The bug looks as if it is in vcpu_runstate_get(), which doesn't account for XEN_RUNSTATE_UPDATE and calculating a wildly inappropriate delta.  Ultimately, the result of XEN_DOMCTL_getvcpuinfo end

Re: [Xen-devel] [PATCH v2 03/10] libx86: Introduce x86_cpu_policies_are_compatible()

2019-09-16 Thread Andrew Cooper
On 16/09/2019 11:59, Jan Beulich wrote: > On 13.09.2019 21:27, Andrew Cooper wrote: >> --- /dev/null >> +++ b/xen/lib/x86/policy.c >> @@ -0,0 +1,54 @@ >> +#include "private.h" >> + >> +#include >> + >> +int

Re: [Xen-devel] [PATCH v2 05/10] x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy

2019-09-16 Thread Andrew Cooper
On 16/09/2019 12:04, Jan Beulich wrote: > On 13.09.2019 21:27, Andrew Cooper wrote: >> v2: >> * Bump the DOMCTL interface version >> * Proactively set the error pointers in xc_set_domain_cpu_policy() > From this I would have expected ... > >> --- a/tools/libxc/xc

Re: [Xen-devel] [PATCH v2 06/10] tools/libxc: Pre-cleanup for xc_cpuid_{set, apply_policy}()

2019-09-16 Thread Andrew Cooper
On 16/09/2019 12:09, Jan Beulich wrote: > On 13.09.2019 21:27, Andrew Cooper wrote: >> @@ -932,6 +932,13 @@ int xc_cpuid_set( >> goto fail; >> } >> >> +/* >> + * Notes for following this algorithm: >> + *

Re: [Xen-devel] [PATCH v2 08/10] tools/libxc: Rework xc_cpuid_apply_policy() to use {get, set}_cpu_policy()

2019-09-16 Thread Andrew Cooper
On 16/09/2019 12:17, Jan Beulich wrote: > On 13.09.2019 21:27, Andrew Cooper wrote: >> -static void intel_xc_cpuid_policy(const struct cpuid_domain_info *info, >> - const unsigned int *input, unsigned int >> *regs) >>

Re: [Xen-devel] [PATCH v2 10/10] x86/cpuid: Enable CPUID Faulting for PV control domains by default

2019-09-16 Thread Andrew Cooper
On 16/09/2019 12:22, Jan Beulich wrote: > On 13.09.2019 21:27, Andrew Cooper wrote: >> The domain builder no longer uses local CPUID instructions for policy >> decisions. This resolves a key issue for PVH dom0's. However, as PV dom0's >> have never had faulting

Re: [Xen-devel] [PATCH v5 03/10] AMD/IOMMU: don't free shared IRT multiple times

2019-09-17 Thread Andrew Cooper
Signed-off-by: Jan Beulich Acked-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v5 04/10] AMD/IOMMU: introduce a "valid" flag for IVRS mappings

2019-09-17 Thread Andrew Cooper
t;. Add a separate boolean field instead. > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v5 05/10] AMD/IOMMU: let callers of amd_iommu_alloc_intremap_table() handle errors

2019-09-17 Thread Andrew Cooper
On 06/08/2019 14:09, Jan Beulich wrote: > Additional users of the function will want to handle errors more > gracefully. Remove the BUG_ON()s and make the current caller panic() > instead. > > Signed-off-by: Jan Beulich Acked-by

<    1   2   3   4   5   6   7   8   9   10   >