Re: [Xen-devel] [PATCH] xen/typesafe: Force helpers to be always_inline

2019-10-23 Thread Jan Beulich
On 21.10.2019 13:10, George Dunlap wrote: > On 10/7/19 10:25 AM, Jan Beulich wrote: >> On 04.10.2019 19:02, George Dunlap wrote: >>> On 10/2/19 9:11 AM, Jan Beulich wrote: On 01.10.2019 22:59, Andrew Cooper wrote: > On 01/10/2019 09:38, Jan Beulich wrote: >> On 30.09.2019 21:16, Andrew

Re: [Xen-devel] [PATCH RFC v1 00/12] mm: Don't mark hotplugged pages PG_reserved (including ZONE_DEVICE)

2019-10-23 Thread David Hildenbrand
On 22.10.19 23:54, Dan Williams wrote: > Hi David, > > Thanks for tackling this! Thanks for having a look :) [...] >> I am probably a little bit too careful (but I don't want to break things). >> In most places (besides KVM and vfio that are nuts), the >> pfn_to_online_page() check could most

Re: [Xen-devel] [PATCH] xen: mm: include for missing declarations

2019-10-23 Thread Ben Dooks
On 22/10/2019 18:09, Stefano Stabellini wrote: On Tue, 22 Oct 2019, Stefano Stabellini wrote: On Tue, 22 Oct 2019, Ben Dooks (Codethink) wrote: Include for xen_{create,destroy}_contigous_region call declarations. Fixes the following sparse warnings: arch/arm/xen/mm.c:119:5: warning: symbol 'x

Re: [Xen-devel] [PATCH for-next v3 1/9] x86: introduce CONFIG_GUEST and move code

2019-10-23 Thread Paul Durrant
On Mon, 21 Oct 2019 at 16:59, Wei Liu wrote: > > Xen is able to run as a guest on Xen. We plan to make it able to run > on Hyper-V as well. > > Introduce CONFIG_GUEST which is set to true if either running on Xen > or Hyper-V is desired. Restructure code hierarchy for new code to > come. > > No fu

Re: [Xen-devel] [PATCH RFC v1 06/12] staging/gasket: Prepare gasket_release_page() for PG_reserved changes

2019-10-23 Thread David Hildenbrand
On 22.10.19 19:12, David Hildenbrand wrote: Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that. The pages are obtained via get_user_pages_fast(). I assume, these could be ZONE_DEVICE pages. Let's just exclude them as well explicitly. Cc: Rob Springer Cc: Todd Poyno

Re: [Xen-devel] [PATCH RFC v1 02/12] mm/usercopy.c: Prepare check_page_span() for PG_reserved changes

2019-10-23 Thread David Hildenbrand
On 22.10.19 19:12, David Hildenbrand wrote: Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that. Let's make sure that the logic in the function won't change. Once we no longer set these pages to reserved, we can rework this function to perform separate checks for ZONE

Re: [Xen-devel] [PATCH for-next v3 5/9] x86: introduce hypervisor framework

2019-10-23 Thread Paul Durrant
On Mon, 21 Oct 2019 at 17:01, Wei Liu wrote: > > We will soon implement Hyper-V support for Xen. Add a framework for > that. > > This requires moving some of the hypervisor_* functions from xen.h to > hypervisor.h. > > Signed-off-by: Wei Liu Reviewed-by: Paul Durrant > --- > xen/arch/x86/gues

[Xen-devel] [PATCH 0/1] tools/configure

2019-10-23 Thread K. Kahurani
This patch fixes or tries to fix an issue in the configure scripts whereby the script will choke on systems that do not have a default python executable and subsequently give a garbage error message. Now that Python 2 is being phased out, it should be expected that some systems, at the very lea

[Xen-devel] [PATCH 1/1] tools/configure: remove redundancy

2019-10-23 Thread K. Kahurani
This piece of code is redundant and results in a garbage error message on systems that do not have a default python executable. Signed-off-by: K. Kahurani --- tools/configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/configure b/tools/configure index 82947ad..a

Re: [Xen-devel] [PATCH for-next v3 7/9] x86: switch xen implementation to use hypervisor framework

2019-10-23 Thread Paul Durrant
On Mon, 21 Oct 2019 at 17:00, Wei Liu wrote: > > Take the chance to change probe_hypervisor to hypervisor_probe. > > Signed-off-by: Wei Liu Reviewed-by: Paul Durrant > --- > V3: > 1. Address Roger's comments > 2. Change xen_hypervisor_ops to xen_ops > --- > xen/arch/x86/guest/hypervisor.c |

Re: [Xen-devel] [PATCH for-next v3 8/9] x86: be more verbose when running on a hypervisor

2019-10-23 Thread Paul Durrant
On Mon, 21 Oct 2019 at 17:00, Wei Liu wrote: > > Signed-off-by: Wei Liu Reviewed-by: Paul Durrant > --- > V3: Address Roger's comment, add ASSERTs > --- > xen/arch/x86/guest/hypervisor.c| 6 ++ > xen/arch/x86/setup.c | 6 +- > xen/include/asm-x86/guest/hyperv

[Xen-devel] [PATCH for-4.13] x86/tsc: update vcpu time info on guest TSC adjustments

2019-10-23 Thread Roger Pau Monne
If a HVM/PVH guest writes to MSR_IA32_TSC{_ADJUST} and thus changes the value of the time stamp counter the vcpu time info must also be updated, or the time calculated by the guest using the Xen PV clock interface will be skewed. Update the vcpu time info when the guest writes to either MSR_IA32_T

Re: [Xen-devel] [PATCH for-4.13] x86/tsc: update vcpu time info on guest TSC adjustments

2019-10-23 Thread Jürgen Groß
On 23.10.19 10:57, Roger Pau Monne wrote: If a HVM/PVH guest writes to MSR_IA32_TSC{_ADJUST} and thus changes the value of the time stamp counter the vcpu time info must also be updated, or the time calculated by the guest using the Xen PV clock interface will be skewed. Update the vcpu time inf

Re: [Xen-devel] [PATCH for-next v3 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-23 Thread Paul Durrant
On Mon, 21 Oct 2019 at 17:01, Wei Liu wrote: > > We use the same code structure as we did for Xen. > > As starters, detect Hyper-V in probe routine. More complex > functionalities will be added later. > > Signed-off-by: Wei Liu Reviewed-by: Paul Durrant ...with one suggestion... > --- > V3: >

Re: [Xen-devel] [PATCH v1] x86/altp2m: Add hypercall to create a new view and set sve bits

2019-10-23 Thread Alexandru Stefan ISAILA
On 03.09.2019 20:24, Tamas K Lengyel wrote: > On Tue, Sep 3, 2019 at 9:53 AM Jan Beulich wrote: >> >> On 02.09.2019 10:11, Alexandru Stefan ISAILA wrote: >>> @@ -1355,6 +1355,23 @@ void p2m_init_altp2m_ept(struct domain *d, unsigned >>> int i) >>> ept = &p2m->ept; >>> ept->mfn = pag

[Xen-devel] [linux-linus test] 143029: regressions - trouble: broken/fail/pass

2019-10-23 Thread osstest service owner
flight 143029 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/143029/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-libvirt-xsm broken test-amd64-i386-examine 8 reboot

Re: [Xen-devel] [PATCH] xen/typesafe: Force helpers to be always_inline

2019-10-23 Thread George Dunlap
On 10/23/19 8:27 AM, Jan Beulich wrote: > On 21.10.2019 13:10, George Dunlap wrote: >> On 10/7/19 10:25 AM, Jan Beulich wrote: >>> On 04.10.2019 19:02, George Dunlap wrote: On 10/2/19 9:11 AM, Jan Beulich wrote: > On 01.10.2019 22:59, Andrew Cooper wrote: >> On 01/10/2019 09:38, Jan Be

[Xen-devel] [xen-unstable-coverity test] 143058: all pass - PUSHED

2019-10-23 Thread osstest service owner
flight 143058 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/143058/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen a7ecdf8139e3646c0eb9c9bd9ed0fe3b344e6fed baseline version: xen 59d0

Re: [Xen-devel] [PATCH for-next v3 1/9] x86: introduce CONFIG_GUEST and move code

2019-10-23 Thread Wei Liu
On Wed, Oct 23, 2019 at 08:55:24AM +0100, Paul Durrant wrote: > On Mon, 21 Oct 2019 at 16:59, Wei Liu wrote: > > > > Xen is able to run as a guest on Xen. We plan to make it able to run > > on Hyper-V as well. > > > > Introduce CONFIG_GUEST which is set to true if either running on Xen > > or Hype

Re: [Xen-devel] [PATCH for-next v3 9/9] x86: introduce CONFIG_HYPERV and detection code

2019-10-23 Thread Wei Liu
On Wed, Oct 23, 2019 at 10:07:24AM +0100, Paul Durrant wrote: > On Mon, 21 Oct 2019 at 17:01, Wei Liu wrote: > > > > We use the same code structure as we did for Xen. > > > > As starters, detect Hyper-V in probe routine. More complex > > functionalities will be added later. > > > > Signed-off-by:

Re: [Xen-devel] [PATCH] xen/typesafe: Force helpers to be always_inline

2019-10-23 Thread Jan Beulich
On 23.10.2019 11:37, George Dunlap wrote: > On 10/23/19 8:27 AM, Jan Beulich wrote: >> On 21.10.2019 13:10, George Dunlap wrote: >>> Let's do a cost-benefits analysis of always_inline vs clang_inline. >>> >>> For each future gcc version, either it will choose to inline this >>> function with the `i

Re: [Xen-devel] [PATCH for-4.13] x86/tsc: update vcpu time info on guest TSC adjustments

2019-10-23 Thread Wei Liu
On Wed, Oct 23, 2019 at 10:57:39AM +0200, Roger Pau Monne wrote: > If a HVM/PVH guest writes to MSR_IA32_TSC{_ADJUST} and thus changes > the value of the time stamp counter the vcpu time info must also be > updated, or the time calculated by the guest using the Xen PV clock > interface will be skew

Re: [Xen-devel] [PATCH for-4.13] x86/tsc: update vcpu time info on guest TSC adjustments

2019-10-23 Thread Roger Pau Monné
On Wed, Oct 23, 2019 at 11:55:13AM +0100, Wei Liu wrote: > On Wed, Oct 23, 2019 at 10:57:39AM +0200, Roger Pau Monne wrote: > > If a HVM/PVH guest writes to MSR_IA32_TSC{_ADJUST} and thus changes > > the value of the time stamp counter the vcpu time info must also be > > updated, or the time calcul

Re: [Xen-devel] [PATCH for-4.13] x86/tsc: update vcpu time info on guest TSC adjustments

2019-10-23 Thread Wei Liu
On Wed, Oct 23, 2019 at 01:05:14PM +0200, Roger Pau Monné wrote: > On Wed, Oct 23, 2019 at 11:55:13AM +0100, Wei Liu wrote: > > On Wed, Oct 23, 2019 at 10:57:39AM +0200, Roger Pau Monne wrote: > > > If a HVM/PVH guest writes to MSR_IA32_TSC{_ADJUST} and thus changes > > > the value of the time stam

[Xen-devel] [xen-unstable test] 143036: regressions - FAIL

2019-10-23 Thread osstest service owner
flight 143036 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/143036/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvopsbroken in 142997 build-arm64-pvops 4 h

Re: [Xen-devel] (no subject)

2019-10-23 Thread Sergey Dyasli
On 22/10/2019 10:27, Jürgen Groß wrote: > And now a more sane patch to try. > The patch definitely fixes the issue for Null scheduler at least: Tested-by: Sergey Dyasli It's still a bit unnerving to have places where sched_set_res() is called without unit_schedule_lock(), but I hope that's

Re: [Xen-devel] [PATCH v1] x86/altp2m: Add hypercall to create a new view and set sve bits

2019-10-23 Thread Roger Pau Monné
On Wed, Oct 23, 2019 at 09:11:54AM +, Alexandru Stefan ISAILA wrote: > > > On 03.09.2019 20:24, Tamas K Lengyel wrote: > > On Tue, Sep 3, 2019 at 9:53 AM Jan Beulich wrote: > >> > >> On 02.09.2019 10:11, Alexandru Stefan ISAILA wrote: > >>> --- a/xen/include/public/hvm/hvm_op.h > >>> +++ b/x

[Xen-devel] [PATCH] xen/pvhsim: fix cpu onlining

2019-10-23 Thread Juergen Gross
Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor") the initial processor for all pv-shim vcpus will be 0, as no other cpus are online when the vcpus are created. Before that commit the vcpus would have processors set not being online yet, which worked just by chance. When the

[Xen-devel] [linux-4.4 test] 143042: regressions - FAIL

2019-10-23 Thread osstest service owner
flight 143042 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/143042/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-credit1 broken in 143025 test-amd64-amd64-xl-pvshim 18 gue

Re: [Xen-devel] [PATCH] xen/pvhsim: fix cpu onlining

2019-10-23 Thread Roger Pau Monné
On Wed, Oct 23, 2019 at 02:12:09PM +0200, Juergen Gross wrote: > Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor") > the initial processor for all pv-shim vcpus will be 0, as no other cpus > are online when the vcpus are created. Before that commit the vcpus > would have proce

[Xen-devel] [XEN PATCH for-4.13 v7 11/11] libxl: On ARM, reject future new passthrough modes too

2019-10-23 Thread Ian Jackson
This is most pleasantly done by also changing the if to a switch. Suggested-by: Julien Grall CC: Julien Grall CC: Stefano Stabellini Signed-off-by: Ian Jackson --- v7: New patch in this version of the series. --- tools/libxl/libxl_arm.c | 10 -- 1 file changed, 8 insertions(+), 2 del

[Xen-devel] [XEN PATCH for-4.13 v7 04/11] libxl: libxl_domain_need_memory: Make it take a domain_config

2019-10-23 Thread Ian Jackson
This should calculate the extra memory needed for shadow and iommu, the defaults for which depend on values in c_info. So we need this to have the complete domain config available. And the defaults should actually be updated and stored. So make it non-const. We provide the usual kind of compati

[Xen-devel] [XEN PATCH for-4.13 v7 10/11] libxl/xl: Overhaul passthrough setting logic

2019-10-23 Thread Ian Jackson
LIBXL_PASSTHROUGH_UNKNOWN (aka "ENABLED" in an earlier uncommitted version of this code) is doing double duty. We actually need all of the following to be specifiable: * "default": enable PT iff we have devices to pass through specified in the initial config file. * "enabled" (and fail if

[Xen-devel] [XEN PATCH for-4.13 v7 09/11] libxl: Move domain_create_info_setdefault earlier

2019-10-23 Thread Ian Jackson
We need this before we start to figure out the passthrough mode. I have checked that nothing in libxl__domain_create_info_setdefault nor the two implementations of ..._arch_... accesses anything else, other than (i) the domain type (which this function is responsible for setting and nothing before

[Xen-devel] [XEN PATCH for-4.13 v7 01/11] libxl: Offer API versions 0x040700 and 0x040800

2019-10-23 Thread Ian Jackson
According to git log -G: 0x040700 was introduced in 304400459ef0 (aka 4.7.0-rc1~481) "tools/libxl: rename remus device to checkpoint device" 0x040800 was introduced in 57f8b13c7240 (aka 4.8.0-rc1~437) "libxl: memory size in kb requires 64 bit variable" It is surprising that no-one noticed th

[Xen-devel] [XEN PATCH for-4.13 v7 00/11] libxl memkb & pt defaulting

2019-10-23 Thread Ian Jackson
I *still* want to sort out the shadow/iommu memory and pci passthrough situation in 4.13, to avoid promulgating a wrong libxl API in a stable release. The only changes since v4 are change the default value name for the "passthrough" config setting to "default", apropos of the discussion, and to ad

[Xen-devel] [XEN PATCH for-4.13 v7 08/11] libxl: create: setdefault: Move physinfo into config_setdefault

2019-10-23 Thread Ian Jackson
No functional change. This will let us refer to it in code we are about to add to this function. Signed-off-by: Ian Jackson Acked-by: Wei Liu --- v2: New patch in this version of the series. --- tools/libxl/libxl_create.c | 17 - tools/libxl/libxl_dm.c | 7 ++- too

[Xen-devel] [XEN PATCH for-4.13 v7 06/11] libxl: Remove/deprecate libxl_get_required_*_memory from the API

2019-10-23 Thread Ian Jackson
These are now redundant because shadow_memkb and iommu_memkb are now defaulted automatically by libxl_domain_need_memory and libxl_domain_create etc. Callers should not now call these; instead, they should just let libxl take care of it. libxl_get_required_shadow_memory was introduced in f89f5558

[Xen-devel] [XEN PATCH for-4.13 v7 02/11] xl: Pass libxl_domain_config to freemem(), instead of b_info

2019-10-23 Thread Ian Jackson
We are going to change the libxl API in a moment and this change will make it simpler. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD --- tools/xl/xl_vmcontrol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c i

[Xen-devel] [XEN PATCH for-4.13 v7 05/11] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl

2019-10-23 Thread Ian Jackson
Defaulting is supposed to be done by libxl. So these calculations should be here in libxl. libxl__domain_config_setdefault has all the necessary information including the values of max_memkb and max_vcpus. The overall functional effect depends on the caller: For xl, no change. The code moves f

[Xen-devel] [XEN PATCH for-4.13 v7 07/11] libxl: create: setdefault: Make libxl_physinfo info[1]

2019-10-23 Thread Ian Jackson
No functional change. This will let us make it into a pointer without textual change other than to the definition. While we are here, fix some style errors (missing { }). Signed-off-by: Ian Jackson Acked-by: Wei Liu --- v2: New patch in this version of the series. --- tools/libxl/libxl_create

[Xen-devel] [XEN PATCH for-4.13 v7 03/11] libxl: libxl__domain_config_setdefault: New function

2019-10-23 Thread Ian Jackson
Break out this into a new function. We are going to want to call it from a new call site. Unfortunately not all of the defaults can be moved into the new function without changing the order in which things are done. That does not seem wise at this stage of the release. The effect is that additi

Re: [Xen-devel] [PATCH for-next v2 8/9] x86: be more verbose when running on a hypervisor

2019-10-23 Thread Jan Beulich
On 21.10.2019 12:00, Roger Pau Monné wrote: > On Mon, Sep 30, 2019 at 04:00:42PM +0100, Wei Liu wrote: >> --- a/xen/include/asm-x86/guest/hypervisor.h >> +++ b/xen/include/asm-x86/guest/hypervisor.h >> @@ -36,6 +36,7 @@ bool hypervisor_probe(void); >> void hypervisor_setup(void); >> void hypervis

Re: [Xen-devel] [XEN PATCH for-4.13 v7 02/11] xl: Pass libxl_domain_config to freemem(), instead of b_info

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: We are going to change the libxl API in a moment and this change will make it simpler. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing li

Re: [Xen-devel] [XEN PATCH for-4.13 v7 01/11] libxl: Offer API versions 0x040700 and 0x040800

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: According to git log -G: 0x040700 was introduced in 304400459ef0 (aka 4.7.0-rc1~481) "tools/libxl: rename remus device to checkpoint device" 0x040800 was introduced in 57f8b13c7240 (aka 4.8.0-rc1~437) "libxl: memory size in kb requires 64 bit variable

Re: [Xen-devel] [XEN PATCH for-4.13 v7 03/11] libxl: libxl__domain_config_setdefault: New function

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: Break out this into a new function. We are going to want to call it from a new call site. Unfortunately not all of the defaults can be moved into the new function without changing the order in which things are done. That does not seem wise at this stage of

Re: [Xen-devel] [XEN PATCH for-4.13 v7 04/11] libxl: libxl_domain_need_memory: Make it take a domain_config

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: This should calculate the extra memory needed for shadow and iommu, the defaults for which depend on values in c_info. So we need this to have the complete domain config available. And the defaults should actually be updated and stored. So make it non-cons

Re: [Xen-devel] [XEN PATCH for-4.13 v7 07/11] libxl: create: setdefault: Make libxl_physinfo info[1]

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: No functional change. This will let us make it into a pointer without textual change other than to the definition. While we are here, fix some style errors (missing { }). Signed-off-by: Ian Jackson Acked-by: Wei Liu Release-acked-by: Juergen Gross J

Re: [Xen-devel] [XEN PATCH for-4.13 v7 05/11] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: Defaulting is supposed to be done by libxl. So these calculations should be here in libxl. libxl__domain_config_setdefault has all the necessary information including the values of max_memkb and max_vcpus. The overall functional effect depends on the calle

Re: [Xen-devel] [XEN PATCH for-4.13 v7 06/11] libxl: Remove/deprecate libxl_get_required_*_memory from the API

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: These are now redundant because shadow_memkb and iommu_memkb are now defaulted automatically by libxl_domain_need_memory and libxl_domain_create etc. Callers should not now call these; instead, they should just let libxl take care of it. libxl_get_required_

Re: [Xen-devel] [XEN PATCH for-4.13 v7 09/11] libxl: Move domain_create_info_setdefault earlier

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: We need this before we start to figure out the passthrough mode. I have checked that nothing in libxl__domain_create_info_setdefault nor the two implementations of ..._arch_... accesses anything else, other than (i) the domain type (which this function is re

Re: [Xen-devel] [XEN PATCH for-4.13 v7 08/11] libxl: create: setdefault: Move physinfo into config_setdefault

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: No functional change. This will let us refer to it in code we are about to add to this function. Signed-off-by: Ian Jackson Acked-by: Wei Liu Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing l

Re: [Xen-devel] [XEN PATCH for-4.13 v7 11/11] libxl: On ARM, reject future new passthrough modes too

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: This is most pleasantly done by also changing the if to a switch. Suggested-by: Julien Grall CC: Julien Grall CC: Stefano Stabellini Signed-off-by: Ian Jackson Release-acked-by: Juergen Gross Juergen ___

Re: [Xen-devel] [XEN PATCH for-4.13 v7 10/11] libxl/xl: Overhaul passthrough setting logic

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:00, Ian Jackson wrote: LIBXL_PASSTHROUGH_UNKNOWN (aka "ENABLED" in an earlier uncommitted version of this code) is doing double duty. We actually need all of the following to be specifiable: * "default": enable PT iff we have devices to pass through specified in the initia

Re: [Xen-devel] [PATCH] xen/pvhsim: fix cpu onlining

2019-10-23 Thread Jürgen Groß
On 23.10.19 14:55, Roger Pau Monné wrote: On Wed, Oct 23, 2019 at 02:12:09PM +0200, Juergen Gross wrote: Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor") the initial processor for all pv-shim vcpus will be 0, as no other cpus are online when the vcpus are created. Before t

Re: [Xen-devel] [PATCH] xen/pvhsim: fix cpu onlining

2019-10-23 Thread Jan Beulich
On 23.10.2019 14:55, Roger Pau Monné wrote: > On Wed, Oct 23, 2019 at 02:12:09PM +0200, Juergen Gross wrote: >> Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor") >> the initial processor for all pv-shim vcpus will be 0, as no other cpus >> are online when the vcpus are created

Re: [Xen-devel] [PATCH v2] MAINTAINERS: Switch SVM maintainership to x86

2019-10-23 Thread Jan Beulich
On 19.10.2019 04:04, Andrew Cooper wrote: > We are now down to 0 SVM maintainers who are active and wish to hold the > position. In agreement with AMD, Jan and I will take over maintainership in > the short term. > > Signed-off-by: Andrew Cooper > Acked-by: Boris Ostrovsky Acked-by: Jan Beulic

Re: [Xen-devel] [PATCH for-4.13] docs: Extend with details about runtime microcode loading

2019-10-23 Thread Jan Beulich
On 12.10.2019 20:18, Andrew Cooper wrote: > The xen-ucode utility is new with the late loading improvements in 4.13. > Update the documentation suitably. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@list

[Xen-devel] [libvirt test] 143051: regressions - FAIL

2019-10-23 Thread osstest service owner
flight 143051 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/143051/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-pair 10 xen-boot/src_host fail REGR. vs. 143023 test-amd64-amd64-libvir

[Xen-devel] [PATCH] x86/tsc: limit the usage of synchronization rendezvous

2019-10-23 Thread Roger Pau Monne
If Xen detects the TSC is unreliable it will set a rendezvous helper that tries to synchronize the different CPUs TSC value by propagating the one from CPU#0 and writing it into the IA32_TSC MSR on each CPU. When the system has a single thread and there are no hotplugable CPUs doing the above just

[Xen-devel] [PATCH v3 1/7] x86/nospec: Two trivial fixes

2019-10-23 Thread Andrew Cooper
The include of asm/cpuid.h in spec_ctrl.c was an artefact of an older version of c/s 3860d5534df, and is not used in its current incarnation. Fix a typo in a comment. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Juergen Gross v3: * New --- xen/arch/

[Xen-devel] [PATCH v3 7/7] x86/nospec: Optimise array_index_mask_nospec() for power-of-2 arrays

2019-10-23 Thread Andrew Cooper
When the compiler can determine that an array bound is a power of two, the array index can be bounded even under speculation with a single and instruction. Respecify array_index_mask_nospec() to allow for masks other than ~0 and 0, and introduce an IS_POWER_OF_2() helper. Signed-off-by: Andrew Co

[Xen-devel] [PATCH v3 4/7] x86/nospec: Rename and rework l1tf-barrier as branch-harden

2019-10-23 Thread Andrew Cooper
l1tf-barrier is an inappropriate name, and came about because of restrictions on could be discussed publicly when the patches were proposed. In practice, it is for general Spectre v1 mitigations, and is necessary in all cases. An adversary which can control speculation in Xen can leak data in cro

[Xen-devel] [PATCH v3 5/7] x86/livepatch: Fail the build if duplicate symbols exist

2019-10-23 Thread Andrew Cooper
From: Ross Lagerwall The binary diffing algorithm used by xen-livepatch depends on having unique symbols. Signed-off-by: Ross Lagerwall The livepatch loading algorithm used by Xen resolves relocations by symbol name, and thus also depends on having unique symbols. Introduce CONFIG_ENFORCE_UNI

[Xen-devel] [PATCH for-4.13 v3 0/7] Unbreak evaluate_nospec() and livepatching

2019-10-23 Thread Andrew Cooper
This resolves an oustanding blocker for 4.13, fixing both the code generation for evaulate_nospec(), and making the resulting hypervisor able to be livepatched. Andrew Cooper (6): x86/nospec: Two trivial fixes xen/nospec: Use always_inline to fix code gen for evaluate_nospec xen/nospec: Intr

[Xen-devel] [PATCH v3 3/7] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_BRANCH

2019-10-23 Thread Andrew Cooper
Just as with CONFIG_SPECULATIVE_HARDEN_ARRAY, branch hardening should be configurable at compile time. The previous CONFIG_HVM was a consequence of what could be discussed publicly at the time the patches were submitted, and wasn't actually correct. Later patches will make further corrections. S

[Xen-devel] [PATCH v3 2/7] xen/nospec: Use always_inline to fix code gen for evaluate_nospec

2019-10-23 Thread Andrew Cooper
evaluate_nospec() is incredibly fragile, and this is one giant bodge. To correctly protect jumps, the generated code needs to be of the form: cmp/test jcc 1f lfence ... 1: lfence ... Critically, the lfence must be at the head of both basic blocks, later in the instruction s

[Xen-devel] [PATCH for-next v3 6/7] x86/nospec: Move array_index_mask_nospec() into nospec.h

2019-10-23 Thread Andrew Cooper
system.h isn't an appropriate place to live, now that asm/nospec.h exists. This should arguably have been part of c/s db591d6e76e No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Juergen Gross This is probably post-4.13 content ---

[Xen-devel] [PATCH v2] xen/pvhsim: fix cpu onlining

2019-10-23 Thread Juergen Gross
Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor") the initial processor for all pv-shim vcpus will be 0, as no other cpus are online when the vcpus are created. Before that commit the vcpus would have processors set not being online yet, which worked just by chance. When the

Re: [Xen-devel] [PATCH for-4.13] x86/VT-d: Drop unhelpful information in diagnostics

2019-10-23 Thread Jan Beulich
On 11.10.2019 17:33, Roger Pau Monné wrote: > On Fri, Oct 11, 2019 at 04:02:53PM +0100, Andrew Cooper wrote: >> The virtual address of the base of the IOMMU's regsters is not useful for >> diagnostic purposes, and is quite voluminous. The PCI coordinates is by far >> the most useful piece of iden

Re: [Xen-devel] [PATCH v3 1/7] x86/nospec: Two trivial fixes

2019-10-23 Thread Jan Beulich
On 23.10.2019 15:58, Andrew Cooper wrote: > The include of asm/cpuid.h in spec_ctrl.c was an artefact of an older version > of c/s 3860d5534df, and is not used in its current incarnation. > > Fix a typo in a comment. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich

Re: [Xen-devel] [PATCH for-4.13] x86/tsc: update vcpu time info on guest TSC adjustments

2019-10-23 Thread Jan Beulich
On 23.10.2019 10:57, Roger Pau Monne wrote: > If a HVM/PVH guest writes to MSR_IA32_TSC{_ADJUST} and thus changes > the value of the time stamp counter the vcpu time info must also be > updated, or the time calculated by the guest using the Xen PV clock > interface will be skewed. > > Update the v

Re: [Xen-devel] [PATCH v2] xen/pvhsim: fix cpu onlining

2019-10-23 Thread George Dunlap
On 10/23/19 2:59 PM, Juergen Gross wrote: > Since commit 8d3c326f6756d1 ("xen: let vcpu_create() select processor") > the initial processor for all pv-shim vcpus will be 0, as no other cpus > are online when the vcpus are created. Before that commit the vcpus > would have processors set not being o

Re: [Xen-devel] [PATCH] x86/tsc: limit the usage of synchronization rendezvous

2019-10-23 Thread Jan Beulich
On 23.10.2019 15:56, Roger Pau Monne wrote: > If Xen detects the TSC is unreliable it will set a rendezvous helper > that tries to synchronize the different CPUs TSC value by propagating > the one from CPU#0 and writing it into the IA32_TSC MSR on each CPU. > > When the system has a single thread

Re: [Xen-devel] [XEN PATCH for-4.13 v7 10/11] libxl/xl: Overhaul passthrough setting logic

2019-10-23 Thread Anthony PERARD
On Wed, Oct 23, 2019 at 02:00:12PM +0100, Ian Jackson wrote: > LIBXL_PASSTHROUGH_UNKNOWN (aka "ENABLED" in an earlier uncommitted > version of this code) is doing double duty. We actually need all of > the following to be specifiable: > * "default": enable PT iff we have devices to > pass th

Re: [Xen-devel] [PATCH] x86/tsc: limit the usage of synchronization rendezvous

2019-10-23 Thread Jürgen Groß
On 23.10.19 16:17, Jan Beulich wrote: On 23.10.2019 15:56, Roger Pau Monne wrote: If Xen detects the TSC is unreliable it will set a rendezvous helper that tries to synchronize the different CPUs TSC value by propagating the one from CPU#0 and writing it into the IA32_TSC MSR on each CPU. When

Re: [Xen-devel] [PATCH] x86/tsc: limit the usage of synchronization rendezvous

2019-10-23 Thread Roger Pau Monné
On Wed, Oct 23, 2019 at 04:17:11PM +0200, Jan Beulich wrote: > On 23.10.2019 15:56, Roger Pau Monne wrote: > > If Xen detects the TSC is unreliable it will set a rendezvous helper > > that tries to synchronize the different CPUs TSC value by propagating > > the one from CPU#0 and writing it into th

Re: [Xen-devel] [PATCH for-4.13 v2] xen/arm: Don't use _end in is_xen_fixed_mfn()

2019-10-23 Thread Jan Beulich
On 16.10.2019 12:53, Julien Grall wrote: > virt_to_maddr() is using the hardware page-table walk instructions to > translate a virtual address to physical address. The function should > only be called on virtual address mapped. > > _end points past the end of Xen binary and may not be mapped when

Re: [Xen-devel] [PATCH v3 3/7] xen/nospec: Introduce CONFIG_SPECULATIVE_HARDEN_BRANCH

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:58, Andrew Cooper wrote: Just as with CONFIG_SPECULATIVE_HARDEN_ARRAY, branch hardening should be configurable at compile time. The previous CONFIG_HVM was a consequence of what could be discussed publicly at the time the patches were submitted, and wasn't actually correct. Later

Re: [Xen-devel] [PATCH v3 5/7] x86/livepatch: Fail the build if duplicate symbols exist

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:58, Andrew Cooper wrote: From: Ross Lagerwall The binary diffing algorithm used by xen-livepatch depends on having unique symbols. Signed-off-by: Ross Lagerwall The livepatch loading algorithm used by Xen resolves relocations by symbol name, and thus also depends on having uni

Re: [Xen-devel] [PATCH v3 4/7] x86/nospec: Rename and rework l1tf-barrier as branch-harden

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:58, Andrew Cooper wrote: l1tf-barrier is an inappropriate name, and came about because of restrictions on could be discussed publicly when the patches were proposed. In practice, it is for general Spectre v1 mitigations, and is necessary in all cases. An adversary which can contr

Re: [Xen-devel] [PATCH v3 2/7] xen/nospec: Use always_inline to fix code gen for evaluate_nospec

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:58, Andrew Cooper wrote: evaluate_nospec() is incredibly fragile, and this is one giant bodge. To correctly protect jumps, the generated code needs to be of the form: cmp/test jcc 1f lfence ... 1: lfence ... Critically, the lfence must be at the head

Re: [Xen-devel] [PATCH v3 1/7] x86/nospec: Two trivial fixes

2019-10-23 Thread Jürgen Groß
On 23.10.19 15:58, Andrew Cooper wrote: The include of asm/cpuid.h in spec_ctrl.c was an artefact of an older version of c/s 3860d5534df, and is not used in its current incarnation. Fix a typo in a comment. Signed-off-by: Andrew Cooper Release-acked-by: Juergen Gross Juergen

[Xen-devel] [OSSTEST PATCH 1/2] make-flight: Rework arch_branch_filter_callback slightly

2019-10-23 Thread Ian Jackson
Now we have two lists of things not supported on ARM: one of branches where that's inherent in the branch somehow, and one for those where the kernel is simply too old. The latter are going to differ between armhf and arm64. No functional change. (Verified with standalone-generate-dump-flight-run

[Xen-devel] [PATCH] x86: fix off-by-one in is_xen_fixed_mfn()

2019-10-23 Thread Jan Beulich
__2M_rwdata_end marks the first byte after the Xen image, not its last byte. Subtract 1 to obtain the upper bound to compare against. (Note that instead switching from <= to < is less desirable, as in principle __pa() might return rubbish for addresses outside of the Xen image.) Since the & needs

[Xen-devel] [OSSTEST PATCH 2/2] make-flight: Drop arm64 with Linux before 4.10

2019-10-23 Thread Ian Jackson
The driver for the laxtons' network cards is not in 4.4 (and that's quite old). Our ThunderX's may even require something more recent but we will cross that bridge when we see it. Effect is to drop the following jobs: linux-4.1 *arm64* linux-4.4 *arm64* linux-4.9 *arm64* (Checked by eyeb

[Xen-devel] [qemu-mainline test] 143050: regressions - FAIL

2019-10-23 Thread osstest service owner
flight 143050 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/143050/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pygrub 7 xen-boot fail REGR. vs. 142915 test-amd64-amd64-

Re: [Xen-devel] [OSSTEST PATCH 2/2] make-flight: Drop arm64 with Linux before 4.10

2019-10-23 Thread Julien Grall
Hi Ian, On 23/10/2019 16:01, Ian Jackson wrote: The driver for the laxtons' network cards is not in 4.4 (and that's quite old). Our ThunderX's may even require something more recent but we will cross that bridge when we see it. Effect is to drop the following jobs: linux-4.1 *arm64* lin

Re: [Xen-devel] [PATCH v3 1/2] efi: remove old SetVirtualAddressMap() arrangement

2019-10-23 Thread Jan Beulich
On 13.10.2019 00:11, Marek Marczykowski-Górecki wrote: > @@ -1099,9 +1096,6 @@ static void __init efi_exit_boot(EFI_HANDLE > ImageHandle, EFI_SYSTEM_TABLE *Syste > > /* Adjust pointers into EFI. */ > efi_ct = (void *)efi_ct + DIRECTMAP_VIRT_START; > -#ifdef USE_SET_VIRTUAL_ADDRESS_MAP

Re: [Xen-devel] [PATCH] x86: fix off-by-one in is_xen_fixed_mfn()

2019-10-23 Thread Andrew Cooper
On 23/10/2019 16:02, Jan Beulich wrote: > __2M_rwdata_end marks the first byte after the Xen image, not its last > byte. Subtract 1 to obtain the upper bound to compare against. (Note > that instead switching from <= to < is less desirable, as in principle > __pa() might return rubbish for addresse

Re: [Xen-devel] [PATCH] x86: fix off-by-one in is_xen_fixed_mfn()

2019-10-23 Thread Jürgen Groß
On 23.10.19 17:02, Jan Beulich wrote: __2M_rwdata_end marks the first byte after the Xen image, not its last byte. Subtract 1 to obtain the upper bound to compare against. (Note that instead switching from <= to < is less desirable, as in principle __pa() might return rubbish for addresses outsid

Re: [Xen-devel] [OSSTEST PATCH 2/2] make-flight: Drop arm64 with Linux before 4.10

2019-10-23 Thread Ian Jackson
Julien Grall writes ("Re: [OSSTEST PATCH 2/2] make-flight: Drop arm64 with Linux before 4.10"): > On 23/10/2019 16:01, Ian Jackson wrote: > > The driver for the laxtons' network cards is not in 4.4 (and that's > > quite old). Our ThunderX's may even require something more recent but > > we will c

Re: [Xen-devel] [PATCH v3 1/2] efi: remove old SetVirtualAddressMap() arrangement

2019-10-23 Thread Jan Beulich
On 13.10.2019 00:11, Marek Marczykowski-Górecki wrote: > @@ -1591,10 +1576,6 @@ void __init efi_init_memory(void) > return; > } > > -#ifdef USE_SET_VIRTUAL_ADDRESS_MAP > -efi_rs->SetVirtualAddressMap(efi_memmap_size, efi_mdesc_size, > - mdesc_ver

Re: [Xen-devel] [PATCH v3 1/2] efi: remove old SetVirtualAddressMap() arrangement

2019-10-23 Thread Marek Marczykowski-Górecki
On Wed, Oct 23, 2019 at 05:15:42PM +0200, Jan Beulich wrote: > On 13.10.2019 00:11, Marek Marczykowski-Górecki wrote: > > @@ -1099,9 +1096,6 @@ static void __init efi_exit_boot(EFI_HANDLE > > ImageHandle, EFI_SYSTEM_TABLE *Syste > > > > /* Adjust pointers into EFI. */ > > efi_ct = (vo

Re: [Xen-devel] [PATCH v3 2/2] xen/efi: optionally call SetVirtualAddressMap()

2019-10-23 Thread Jan Beulich
On 13.10.2019 00:11, Marek Marczykowski-Górecki wrote: > Some UEFI implementations are not happy about running in 1:1 addressing, > but really virtual address space. I have to admit that I find this misleading. There's no true "physical mode" on x86-64 anyway. What I assume happens is that people

Re: [Xen-devel] [XEN PATCH for-4.13 v7 11/11] libxl: On ARM, reject future new passthrough modes too

2019-10-23 Thread Anthony PERARD
On Wed, Oct 23, 2019 at 02:00:13PM +0100, Ian Jackson wrote: > This is most pleasantly done by also changing the if to a switch. > > Suggested-by: Julien Grall > CC: Julien Grall > CC: Stefano Stabellini > Signed-off-by: Ian Jackson > > --- > v7: New patch in this version of the series. > ---

Re: [Xen-devel] [XEN PATCH for-4.13 v7 11/11] libxl: On ARM, reject future new passthrough modes too

2019-10-23 Thread Ian Jackson
Anthony PERARD writes ("Re: [XEN PATCH for-4.13 v7 11/11] libxl: On ARM, reject future new passthrough modes too"): > On Wed, Oct 23, 2019 at 02:00:13PM +0100, Ian Jackson wrote: > > -if (c_info->passthrough == LIBXL_PASSTHROUGH_SYNC_PT) { > > +switch (c_info->passthrough) { > > +case

Re: [Xen-devel] [PATCH v3 2/2] xen/efi: optionally call SetVirtualAddressMap()

2019-10-23 Thread Marek Marczykowski-Górecki
On Wed, Oct 23, 2019 at 05:37:33PM +0200, Jan Beulich wrote: > On 13.10.2019 00:11, Marek Marczykowski-Górecki wrote: > > Some UEFI implementations are not happy about running in 1:1 addressing, > > but really virtual address space. > > I have to admit that I find this misleading. There's no true

Re: [Xen-devel] [PATCH v3 1/2] efi: remove old SetVirtualAddressMap() arrangement

2019-10-23 Thread Jan Beulich
On 23.10.2019 17:36, Marek Marczykowski-Górecki wrote: > On Wed, Oct 23, 2019 at 05:15:42PM +0200, Jan Beulich wrote: >> On 13.10.2019 00:11, Marek Marczykowski-Górecki wrote: >>> @@ -1099,9 +1096,6 @@ static void __init efi_exit_boot(EFI_HANDLE >>> ImageHandle, EFI_SYSTEM_TABLE *Syste >>> >>>

Re: [Xen-devel] [XEN PATCH v1] libxl: Add DTB compatible list to config file

2019-10-23 Thread Oleksandr
On 16.10.19 18:04, Julien Grall wrote: Hi, Hi Julien just my 2 cents) Below is example from linux kernel sources: linux/sound/ppc/awacs.c:741:    if (of_machine_is_compatible("PowerBook3,1") linux/sound/ppc/awacs.c:742:    || of_machine_is_compatible("PowerBook3,2")) { linux/soun

  1   2   >