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

2019-09-23 Thread Jürgen Groß
On 16.09.19 17:44, Jan Beulich wrote: On 16.09.2019 16:50, Andrew Cooper wrote: 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

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

2019-09-23 Thread Jürgen Groß
On 23.09.19 11:51, Jan Beulich wrote: On 23.09.2019 11:42, Jürgen Groß wrote: On 16.09.19 17:44, Jan Beulich wrote: On 16.09.2019 16:50, Andrew Cooper wrote: After a complicated investigation, it turns out that c/s 2529c850ea48 broke xc_vcpu_getinfo(). The bug looks as if it is in

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

2019-09-23 Thread Jürgen Groß
On 23.09.19 12:12, Jan Beulich wrote: On 23.09.2019 11:56, Jürgen Groß wrote: On 23.09.19 11:51, Jan Beulich wrote: On 23.09.2019 11:42, Jürgen Groß wrote: On 16.09.19 17:44, Jan Beulich wrote: On 16.09.2019 16:50, Andrew Cooper wrote: After a complicated investigation, it turns out that c

Re: [Xen-devel] [PATCH v3 32/47] xen/sched: support allocating multiple vcpus into one sched unit

2019-09-24 Thread Jürgen Groß
On 24.09.19 11:46, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -366,18 +380,38 @@ static void sched_free_unit(struct sched_unit *unit) xfree(unit); } +static void sched_unit_add_vcpu(struct sched_unit *unit, struct vcpu *v) +{ +v->sched_unit = unit; +if (

Re: [Xen-devel] [PATCH] xen/sched: don't let XEN_RUNSTATE_UPDATE leak into vcpu_runstate_get()

2019-09-24 Thread Jürgen Groß
On 24.09.19 10:39, Jan Beulich wrote: On 24.09.2019 09:42, Juergen Gross wrote: vcpu_runstate_get() should never return a state entry time with XEN_RUNSTATE_UPDATE set. To avoid this let update_runstate_area() operate on a local runstate copy. This problem was introduced with commit 2529c850ea4

Re: [Xen-devel] Moving next week's community call to Thu 10th

2019-09-24 Thread Jürgen Groß
On 24.09.19 10:36, Lars Kurth wrote: Hi all, because many of us will be at the Platform Security Summit next week, I propose to move the community call to Thu 10^th at the usual time +1 ... especially as there is a public holiday in Germany on Oct 3rd. Juergen ___

Re: [Xen-devel] [PATCH v3 00/47] xen: add core scheduling support

2019-09-24 Thread Jürgen Groß
On 24.09.19 13:15, Sergey Dyasli wrote: Hi Juergen, After an extensive testing of your jgross1/sched-v3 branch in XenRT, I'm happy to say that we've found no functional regressions so far when running in the default (thread/cpu) mode. Hopefully this gives some level of confidence to this series

Re: [Xen-devel] [PATCH v3 07/47] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-24 Thread Jürgen Groß
On 19.09.19 17:27, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: This prepares support of larger scheduling granularities, e.g. core scheduling. While at it move sched_has_urgent_vcpu() from include/asm-x86/cpuidle.h into sched.h removing the need for including sched-if.h in cpui

Re: [Xen-devel] [PATCH v3 09/47] xen/sched: move some per-vcpu items to struct sched_unit

2019-09-24 Thread Jürgen Groß
On 19.09.19 17:38, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: Affinities are scheduler specific attributes, they should be per scheduling unit. So move all affinity related fields in struct vcpu to struct sched_unit. While at it switch affinity related functions in sched-if.h t

Re: [Xen-devel] [PATCH v3 10/47] xen/sched: add scheduler helpers hiding vcpu

2019-09-24 Thread Jürgen Groß
On 19.09.19 17:45, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: Add the following helpers using a sched_unit as input instead of a vcpu: - is_idle_unit() similar to is_idle_vcpu() - is_unit_online() similar to is_vcpu_online() (returns true when any of its vcpus is online) -

Re: [Xen-devel] [PATCH v3 13/47] xen/sched: add is_running indicator to struct sched_unit

2019-09-24 Thread Jürgen Groß
On 19.09.19 17:53, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -1673,8 +1676,10 @@ static void schedule(void) * switch, else lost_records resume will not work properly. */ -ASSERT(!next->is_running); +ASSERT(!next->sched_unit->is_running); next

Re: [Xen-devel] [PATCH v3 23/47] xen/sched: switch sched_move_irqs() to take sched_unit as parameter

2019-09-24 Thread Jürgen Groß
On 20.09.19 16:34, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -474,12 +474,20 @@ int sched_init_vcpu(struct vcpu *v) return 0; } -static void sched_move_irqs(struct vcpu *v) +static void vcpu_move_irqs(struc

Re: [Xen-devel] [PATCH v3 24/47] xen: switch from for_each_vcpu() to for_each_sched_unit()

2019-09-24 Thread Jürgen Groß
On 20.09.19 17:05, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -508,25 +515,27 @@ int sched_move_domain(struct domain *d, struct cpupool *c) if ( IS_ERR(domdata) ) return PTR_ERR(domdata); -vcpu_priv = xzalloc_array(void *, d->max_vcpus); -if ( vcp

Re: [Xen-devel] [PATCH v3 13/47] xen/sched: add is_running indicator to struct sched_unit

2019-09-24 Thread Jürgen Groß
On 24.09.19 14:00, Jan Beulich wrote: On 24.09.2019 13:47, Jürgen Groß wrote: On 19.09.19 17:53, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -1673,8 +1676,10 @@ static void schedule(void) * switch, else lost_records resume will not work properly

Re: [Xen-devel] [PATCH v3 25/47] xen/sched: add runstate counters to struct sched_unit

2019-09-24 Thread Jürgen Groß
On 20.09.19 17:27, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -368,7 +372,7 @@ static struct sched_unit *sched_alloc_unit(struct vcpu *v) unit->vcpu_list = v; unit->unit_id = v->vcpu_id; unit->domain = d; -v->sched_unit = unit; +unit->runstate_cnt[v

Re: [Xen-devel] [PATCH v3 28/47] xen/sched: add code to sync scheduling of all vcpus of a sched unit

2019-09-24 Thread Jürgen Groß
On 20.09.19 18:08, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -55,6 +55,9 @@ boolean_param("sched_smt_power_savings", sched_smt_power_savings); int sched_ratelimit_us = SCHED_DEFAULT_RATELIMIT_US; integer_param("sc

Re: [Xen-devel] [PATCH v3 29/47] xen/sched: introduce unit_runnable_state()

2019-09-24 Thread Jürgen Groß
On 23.09.19 17:24, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: Today the vcpu runstate of a new scheduled vcpu is always set to "running" even if at that time vcpu_runnable() is already returning false due to a race (e.g. with pausing the vcpu). I can see this part, ... With

Re: [Xen-devel] [PATCH v3 30/47] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-24 Thread Jürgen Groß
On 23.09.19 17:41, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -266,15 +267,16 @@ static inline void vcpu_runstate_change( static inline void sched_unit_runstate_change(struct sched_unit *unit, bool running, s_time_t new_entry_time) { -struct vcpu *v = unit->vcp

Re: [Xen-devel] [PATCH for-4.13 v2 0/2] Errata implementation and doc update

2019-09-24 Thread Jürgen Groß
On 24.09.19 16:35, Julien Grall wrote: Hi all, The two patches are not related but the second one dependends on the first one. So I decided to merge them together. Cheers, Julien Grall (2): xen/arm: Implement workaround for Cortex A-57 and Cortex A72 AT speculate docs: Replace all i

Re: [Xen-devel] [PATCH v3 31/47] xen/sched: modify cpupool_domain_cpumask() to be an unit mask

2019-09-24 Thread Jürgen Groß
On 23.09.19 17:44, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: cpupool_domain_cpumask() is used by scheduling to select cpus or to iterate over cpus. In order to support scheduling units spanning multiple cpus let cpupool_domain_cpumask() return a cpumask with only one bit set p

Re: [Xen-devel] [PATCH v3 31/47] xen/sched: modify cpupool_domain_cpumask() to be an unit mask

2019-09-24 Thread Jürgen Groß
On 23.09.19 17:50, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -36,26 +36,35 @@ static DEFINE_SPINLOCK(cpupool_lock); DEFINE_PER_CPU(struct cpupool *, cpupool); +static void free_cpupool_struct(struct cpupool *c)

Re: [Xen-devel] [PATCH v3 29/47] xen/sched: introduce unit_runnable_state()

2019-09-24 Thread Jürgen Groß
On 24.09.19 16:45, Jan Beulich wrote: On 24.09.2019 16:25, Jürgen Groß wrote: On 23.09.19 17:24, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: Today the vcpu runstate of a new scheduled vcpu is always set to "running" even if at that time vcpu_runnable() is already

Re: [Xen-devel] [PATCH v3 24/47] xen: switch from for_each_vcpu() to for_each_sched_unit()

2019-09-24 Thread Jürgen Groß
On 24.09.19 14:31, Jan Beulich wrote: On 24.09.2019 14:13, Jürgen Groß wrote: On 20.09.19 17:05, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -896,18 +929,22 @@ void restore_vcpu_affinity(struct domain *d) cpupool_domain_cpumask(d)); if

Re: [Xen-devel] [PATCH v3 30/47] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-24 Thread Jürgen Groß
On 24.09.19 17:00, Jan Beulich wrote: On 24.09.2019 16:41, Jürgen Groß wrote: On 23.09.19 17:41, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -1851,7 +1852,7 @@ void sched_context_switched(struct vcpu *vprev, struct vcpu *vnext) while ( atomic_read(&

Re: [Xen-devel] [PATCH v3 07/47] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-24 Thread Jürgen Groß
On 24.09.19 14:08, Jan Beulich wrote: On 24.09.2019 13:41, Jürgen Groß wrote: Regarding to rename "sd" to "sr": I agree this would be a sensible change. OTOH I'd like to be consistent, so I'd like to defer that to the planned scheduling cleanup series. Seeing a

Re: [Xen-devel] [PATCH v3 32/47] xen/sched: support allocating multiple vcpus into one sched unit

2019-09-24 Thread Jürgen Groß
On 24.09.19 12:13, Jan Beulich wrote: On 24.09.2019 12:06, Jürgen Groß wrote: On 24.09.19 11:46, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -366,18 +380,38 @@ static void sched_free_unit(struct sched_unit *unit) xfree(unit); } +static void

Re: [Xen-devel] [PATCH v3 33/47] xen/sched: add a percpu resource index

2019-09-24 Thread Jürgen Groß
On 24.09.19 12:05, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -71,6 +71,7 @@ static void poll_timer_fn(void *data); /* This is global for now so that private implementations can reach it */ DEFINE_PER_CPU(struct sch

Re: [Xen-devel] [PATCH] xen/sched: don't let XEN_RUNSTATE_UPDATE leak into vcpu_runstate_get()

2019-09-24 Thread Jürgen Groß
On 24.09.19 17:16, Jan Beulich wrote: On 24.09.2019 09:42, Juergen Gross wrote: vcpu_runstate_get() should never return a state entry time with XEN_RUNSTATE_UPDATE set. To avoid this let update_runstate_area() operate on a local runstate copy. This problem was introduced with commit 2529c850ea4

Re: [Xen-devel] [PATCH v3 07/47] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-24 Thread Jürgen Groß
On 24.09.19 14:08, Jan Beulich wrote: On 24.09.2019 13:41, Jürgen Groß wrote: Regarding to rename "sd" to "sr": I agree this would be a sensible change. OTOH I'd like to be consistent, so I'd like to defer that to the planned scheduling cleanup series. Seeing a

Re: [Xen-devel] [PATCH] ACPI/cpuidle: bump maximum number of power states we support

2019-09-25 Thread Jürgen Groß
On 25.09.19 11:12, Jan Beulich wrote: Commit 4c6cd64519 ("mwait_idle: Skylake Client Support") added a table with 8 entries, which - together with C0 - rendered the current limit too low. It should have been accompanied by an increase of the constant; do this now. Don't bump by too much though, a

Re: [Xen-devel] [PATCH] SVM: correct CPUID event processing

2019-09-25 Thread Jürgen Groß
On 19.09.19 12:37, Jan Beulich wrote: hvm_monitor_cpuid() expects the input registers, not two of the outputs. However, once having made the necessary adjustment, the SVM and VMX functions are so similar that they should be folded (thus avoiding further similar asymmetries to get introduced). Us

Re: [Xen-devel] [PATCH v3 26/47] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-25 Thread Jürgen Groß
On 25.09.19 00:33, Dario Faggioli wrote: On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: Now that vcpu_migrate_start() and vcpu_migrate_finish() are used only to ensure a vcpu is running on a suitable processor Is this sentence like this (I mean with that "Now" at the beginning) becaus

Re: [Xen-devel] [PATCH v3 30/47] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-25 Thread Jürgen Groß
On 24.09.19 17:22, Jan Beulich wrote: On 24.09.2019 17:09, Jürgen Groß wrote: On 24.09.19 17:00, Jan Beulich wrote: On 24.09.2019 16:41, Jürgen Groß wrote: for_each_sched_unit_vcpu() for an idle unit might end premature when one of the vcpus is running in another unit (idle_vcpu->sched_u

Re: [Xen-devel] [PATCH v3 34/47] xen/sched: add fall back to idle vcpu when scheduling unit

2019-09-25 Thread Jürgen Groß
On 24.09.19 12:53, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: When scheduling an unit with multiple vcpus there is no guarantee all vcpus are available (e.g. above maxvcpus or vcpu offline). Fall back to idle vcpu of the current cpu in that case. This requires to store the corr

Re: [Xen-devel] [PATCH v3 14/47] xen/sched: make null scheduler vcpu agnostic.

2019-09-25 Thread Jürgen Groß
On 25.09.19 14:51, Dario Faggioli wrote: On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: Switch null scheduler completely from vcpu to sched_unit usage. Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli With, if possible, all the occurrences of 'item' in comments actually re

Re: [Xen-devel] [PATCH v3 35/47] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-09-25 Thread Jürgen Groß
On 24.09.19 13:55, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -724,8 +724,10 @@ void sched_destroy_domain(struct domain *d) } } -void vcpu_sleep_nosync_locked(struct vcpu *v) +static void vcpu_sleep_nosync_l

Re: [Xen-devel] [PATCH v3 36/47] xen/sched: carve out freeing sched_unit memory into dedicated function

2019-09-25 Thread Jürgen Groß
On 24.09.19 14:04, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -351,26 +351,10 @@ static void sched_spin_unlock_double(spinlock_t *lock1, spinlock_t *lock2, spin_unlock_irqrestore(lock1, flags); } -static voi

Re: [Xen-devel] [PATCH v3 37/47] xen/sched: move per-cpu variable scheduler to struct sched_resource

2019-09-25 Thread Jürgen Groß
On 24.09.19 14:16, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -352,9 +352,10 @@ DEFINE_PER_CPU(unsigned int, last_tickle_cpu); static inline void __runq_tickle(struct csched_unit *new) { unsigned int c

Re: [Xen-devel] [PATCH v3 34/47] xen/sched: add fall back to idle vcpu when scheduling unit

2019-09-25 Thread Jürgen Groß
On 25.09.19 15:11, Jan Beulich wrote: On 25.09.2019 14:58, Jürgen Groß wrote: On 24.09.19 12:53, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -2015,7 +2079,8 @@ static void sched_slave(void) pcpu_schedule_unlock_irq(lock, cpu); -sched_context_switch(vprev

Re: [Xen-devel] [PATCH v3 38/47] xen/sched: move per-cpu variable cpupool to struct sched_resource

2019-09-25 Thread Jürgen Groß
On 24.09.19 15:10, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: Having a pointer to struct cpupool in struct sched_resource instead of per cpu is enough. Signed-off-by: Juergen Gross Technically / mechanically Reviewed-by: Jan Beulich However, I'm confused by what appears t

Re: [Xen-devel] [PATCH v3 40/47] xen/sched: prepare per-cpupool scheduling granularity

2019-09-25 Thread Jürgen Groß
On 24.09.19 15:34, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -175,6 +175,8 @@ static struct cpupool *cpupool_create( return NULL; } } +c->granularity = sched_granularity; +c->opt_gra

Re: [Xen-devel] [PATCH v3 43/47] xen/sched: support multiple cpus per scheduling resource

2019-09-25 Thread Jürgen Groß
On 24.09.19 15:49, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -59,7 +59,7 @@ integer_param("sched_ratelimit_us", sched_ratelimit_us); enum sched_gran __read_mostly opt_sched_granularity = SCHED_GRAN_cpu; unsigned in

Re: [Xen-devel] [PATCH v3 17/47] xen/sched: make credit2 scheduler vcpu agnostic.

2019-09-25 Thread Jürgen Groß
On 25.09.19 17:02, Dario Faggioli wrote: On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: Switch credit2 scheduler completely from vcpu to sched_unit usage. As we are touching lots of lines remove some white space at the end of the line, too. Signed-off-by: Juergen Gross Reviewed-by:

Re: [Xen-devel] [[PATCH for-4.13]] xen/arm: mm: Allow generic xen page-tables helpers to be called early

2019-09-25 Thread Jürgen Groß
On 25.09.19 17:23, Julien Grall wrote: Hi, I am CCing Juergen to mark this as a blocker for 4.13. Without this patch, Xen cannot be booted using GRUB. Cheers, On 17/09/2019 17:02, Julien Grall wrote: The current implementations of xen_{map, unmap}_table() expect {map, unmap}_domain_page() t

Re: [Xen-devel] dom0less + sched=null => broken in staging

2019-09-25 Thread Jürgen Groß
On 25.09.19 17:39, Julien Grall wrote: Hi, On 25/09/2019 16:34, Dario Faggioli wrote: On Wed, 2019-09-25 at 16:19 +0100, Julien Grall wrote: (+Juergen) Hi Dario, Hi, On 11/09/2019 14:53, Dario Faggioli wrote: On Fri, 2019-08-23 at 18:16 -0700, Stefano Stabellini wrote: Ok, thanks again f

Re: [Xen-devel] [PATCH v3 19/47] xen: add sched_unit_pause_nosync() and sched_unit_unpause()

2019-09-25 Thread Jürgen Groß
On 25.09.19 17:20, Dario Faggioli wrote: On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: The credit scheduler calls vcpu_pause_nosync() and vcpu_unpause() today. It does. And, FWIW, I hate it with all my heart because of that (among other things! :-D). Add sched_unit_pause_nosync() a

Re: [Xen-devel] [PATCH v3 26/47] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-25 Thread Jürgen Groß
On 25.09.19 18:37, Dario Faggioli wrote: On Wed, 2019-09-25 at 14:04 +0200, Jürgen Groß wrote: On 25.09.19 00:33, Dario Faggioli wrote: As it is needed anyway call vcpu_sync_execstate() for each vcpu of the unit when changing processors. Again, what do you mean with "As it is needed a

Re: [Xen-devel] [PATCH v3 47/47] xen/sched: add scheduling granularity enum

2019-09-26 Thread Jürgen Groß
On 26.09.19 11:46, Dario Faggioli wrote: On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: Add a scheduling granularity enum ("cpu", "core", "socket") for specification of the scheduling granularity. Initially it is set to "cpu", this can be modified by the new boot parameter (x86 only) "s

Re: [Xen-devel] [PATCH v3 30/47] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-26 Thread Jürgen Groß
On 26.09.19 15:53, Dario Faggioli wrote: On Wed, 2019-09-25 at 15:07 +0200, Jan Beulich wrote: On 25.09.2019 14:40, Jürgen Groß wrote: On 24.09.19 17:22, Jan Beulich wrote: On 24.09.2019 17:09, Jürgen Groß wrote: On 24.09.19 17:00, Jan Beulich wrote: On 24.09.2019 16:41, Jürgen Groß wrote

Re: [Xen-devel] [PATCH v2] xen/sched: don't let XEN_RUNSTATE_UPDATE leak into vcpu_runstate_get()

2019-09-26 Thread Jürgen Groß
On 26.09.19 16:27, Julien Grall wrote: Hi, On 9/25/19 5:29 AM, Juergen Gross wrote: vcpu_runstate_get() should never return a state entry time with XEN_RUNSTATE_UPDATE set. To avoid this let update_runstate_area() operate on a local runstate copy. This problem was introduced with commit 2529c8

Re: [Xen-devel] [PATCH] x86/shim: fix ballooning down the guest

2019-09-26 Thread Jürgen Groß
On 26.09.19 15:51, Roger Pau Monné wrote: On Thu, Sep 26, 2019 at 02:36:18PM +0100, Sergey Dyasli wrote: Currently ballooning down a pvshim guest causes the following errors inside the shim: d3v0 failed to reserve 512 extents of order 512 for offlining And the ballooned-out pages stay in

Re: [Xen-devel] [PATCH] x86/CPUID: RSTR_FP_ERR_PTRS depends on FPU

2019-09-26 Thread Jürgen Groß
On 25.09.19 17:27, Jan Beulich wrote: There's nothing to restore here if there's no FPU in the first place. Signed-off-by: Jan Beulich Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://list

Re: [Xen-devel] [PATCH RFC for-4.13 00/10] xen/arm: XSA-201 and XSA-263 fixes

2019-09-26 Thread Jürgen Groß
On 26.09.19 20:37, Julien Grall wrote: Hi all, This patch series aims to fix two bugs in the entry path from the guest: 1) Make sure that SSBD workaround is enabled before executing any hypervisor code 2) Avoid guest state corruption when an virtual SError is received The full series

Re: [Xen-devel] [PATCH v3 35/47] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-09-26 Thread Jürgen Groß
On 25.09.19 15:07, Jürgen Groß wrote: On 24.09.19 13:55, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -765,16 +774,22 @@ void vcpu_wake(struct vcpu *v)   {   unsigned long flags;   spinlock_t *lock; +    struct sched_unit *unit = v->sched_unit;   TRACE

Re: [Xen-devel] [PATCH 1/2] xen/sched: fix locking in a653sched_free_vdata()

2019-09-27 Thread Jürgen Groß
On 25.09.19 12:59, Dario Faggioli wrote: On Wed, 2019-09-25 at 09:05 +0200, Juergen Gross wrote: The arinc653 scheduler's free_vdata() function is missing proper locking: as it is modifying the scheduler's private vcpu list it needs to take the scheduler lock during that operation. Signed-off-b

Re: [Xen-devel] [PATCH v3 35/47] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-09-27 Thread Jürgen Groß
On 27.09.19 09:32, Dario Faggioli wrote: On Fri, 2019-09-27 at 06:42 +0200, Jürgen Groß wrote: On 25.09.19 15:07, Jürgen Groß wrote: On 24.09.19 13:55, Jan Beulich wrote: On 14.09.2019 10:52, Juergen Gross wrote: @@ -765,16 +774,22 @@ void vcpu_wake(struct vcpu *v) { unsigned long

Re: [Xen-devel] [PATCH 1/2] xen/sched: fix locking in a653sched_free_vdata()

2019-09-27 Thread Jürgen Groß
On 27.09.19 10:20, Jan Beulich wrote: On 27.09.2019 09:23, Jürgen Groß wrote: On 25.09.19 12:59, Dario Faggioli wrote: On Wed, 2019-09-25 at 09:05 +0200, Juergen Gross wrote: The arinc653 scheduler's free_vdata() function is missing proper locking: as it is modifying the scheduler'

Re: [Xen-devel] [PATCH v4 10/46] xen/sched: add scheduler helpers hiding vcpu

2019-09-27 Thread Jürgen Groß
On 27.09.19 10:52, Dario Faggioli wrote: On Fri, 2019-09-27 at 09:00 +0200, Juergen Gross wrote: Add the following helpers using a sched_unit as input instead of a vcpu: - is_idle_unit() similar to is_idle_vcpu() - is_unit_online() similar to is_vcpu_online() (returns true when any of its vc

Re: [Xen-devel] [PATCH v4 24/46] xen: switch from for_each_vcpu() to for_each_sched_unit()

2019-09-27 Thread Jürgen Groß
On 27.09.19 11:32, Dario Faggioli wrote: On Fri, 2019-09-27 at 09:00 +0200, Juergen Gross wrote: Where appropriate switch from for_each_vcpu() to for_each_sched_unit() in order to prepare core scheduling. As it is beneficial once here and for sure in future add a unit_scheduler() helper and let

Re: [Xen-devel] [PATCH] x86/iommu: improve logging message

2019-09-27 Thread Jürgen Groß
On 27.09.19 12:48, Roger Pau Monne wrote: Switch to using pd and also print the pfn that failed. No functional change intended. Signed-off-by: Roger Pau Monné Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing list Xen-devel@lists.xe

Re: [Xen-devel] [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support

2019-09-27 Thread Jürgen Groß
On 27.09.19 12:37, Ian Jackson wrote: Juergen Gross writes ("[PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support"): 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 Lin

Re: [Xen-devel] [PATCH v1 3/6] libs: add libxenhypfs

2019-09-27 Thread Jürgen Groß
On 27.09.19 12:40, Ian Jackson wrote: Juergen Gross writes ("[PATCH v1 3/6] libs: add libxenhypfs"): Add the new library libxenhypfs for access to the hypervisor filesystem. This code looks as expected to me. Acked-by: Ian Jackson It does make me thing you have had to write rather a lot of

Re: [Xen-devel] [PATCH v1 4/6] tools: add xenfs tool

2019-09-27 Thread Jürgen Groß
On 27.09.19 12:42, Ian Jackson wrote: Juergen Gross writes ("[PATCH v1 4/6] tools: add xenfs tool"): Add the xenfs tool for accessing the hypervisor filesystem. Thanks for taking care about exit status. Can you document the exit statuses somewhere ? Yes. Might be a good reason to add a man-

Re: [Xen-devel] [PATCH] iommu: fix PVH dom0 settings

2019-09-27 Thread Jürgen Groß
On 27.09.19 14:02, Jan Beulich wrote: On 27.09.2019 13:45, Paul Durrant wrote: PVH dom0 must operate with the iommu settings in 'strict' mode i.e. only the domain's own pages will be mapped in the IOMMU. The check_hwdom_reqs() is supposed to ensure this. Unfortunately the test for a PVH dom0 is

Re: [Xen-devel] [PATCH] x86: correct bogus error indicator of cpu_add()

2019-09-27 Thread Jürgen Groß
On 27.09.19 16:43, Jan Beulich wrote: Commit 54ce2db8b8 ("x86/numa: adjust datatypes for node and pxm") changed this from the -1 (i.e. -EPERM, which was already bogus) that comes back from setup_node() to NUMA_NO_NODE (0xff). Use a proper error indicator instead. Signed-off-by: Jan Beulich Re

Re: [Xen-devel] [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support

2019-09-27 Thread Jürgen Groß
On 27.09.19 15:37, Ian Jackson wrote: Jürgen Groß writes ("Re: [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support"): On 27.09.19 12:37, Ian Jackson wrote: I guess that keys will be chosen from some limited safe character set ? What about values ? Might

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

2019-09-29 Thread Jürgen Groß
On 30.09.19 06:23, osstest service owner wrote: flight 141990 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/141990/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-debianhvm-amd64 7 xe

Re: [Xen-devel] [PATCH for-4.13] xen/arm: p2m: Fix typo in the comment on top of P2M_ROOT_LEVEL

2019-09-29 Thread Jürgen Groß
On 29.09.19 18:35, Julien Grall wrote: Signed-off-by: Julien Grall Release-acked-by: Juergen Gross Juergen ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH for-4.13 1/2] xen/arm: domain_build: Avoid implicit conversion from ULL to UL

2019-09-29 Thread Jürgen Groß
On 29.09.19 17:56, Julien Grall wrote: Clang 8.0 will fail to build domain_build.c on Arm32 because of the following error: domain_build.c:448:21: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 1090921693184 to 0 [-Werror,-Wconstant-conversion] b

Re: [Xen-devel] [PATCH] x86/iommu: fix hwdom iommu requirements check

2019-09-29 Thread Jürgen Groß
On 28.09.19 10:26, Roger Pau Monne wrote: Both a shadow and a HAP hwdom require an iommu and must be run in strict mode. Change the HAP check into a hvm domain check. Signed-off-by: Roger Pau Monné Release-acked-by: Juergen Gross Juergen ___ Xen

Re: [Xen-devel] [PATCH] xen/efi: Set nonblocking callbacks

2019-09-29 Thread Jürgen Groß
On 27.09.19 17:49, Ross Lagerwall wrote: Other parts of the kernel expect these nonblocking EFI callbacks to exist and crash when running under Xen. Since the implementations of xen_efi_set_variable() and xen_efi_query_variable_info() do not take any locks, use them for the nonblocking callbacks

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

2019-09-30 Thread Jürgen Groß
On 30.09.19 08:01, Jürgen Groß wrote: On 30.09.19 06:23, osstest service owner wrote: flight 141990 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/141990/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run:   test

Re: [Xen-devel] [PATCH 1/1] xen-netfront: do not use ~0U as error return value for xennet_fill_frags()

2019-09-30 Thread Jürgen Groß
On 30.09.19 09:44, Dongli Zhang wrote: xennet_fill_frags() uses ~0U as return value when the sk_buff is not able to cache extra fragments. This is incorrect because the return type of xennet_fill_frags() is RING_IDX and 0x is an expected value for ring buffer index. In the situation when

Re: [Xen-devel] [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support

2019-09-30 Thread Jürgen Groß
On 27.09.19 17:19, Ian Jackson wrote: Jürgen Groß writes ("Re: [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support"): On 27.09.19 15:37, Ian Jackson wrote: I think this is ASCII printing characters with the exception of ! " ` $ % ^ & * = + {

Re: [Xen-devel] [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support

2019-09-30 Thread Jürgen Groß
On 30.09.19 10:57, Jan Beulich wrote: On 30.09.2019 10:17, Jürgen Groß wrote: On 27.09.19 17:19, Ian Jackson wrote: Jürgen Groß writes ("Re: [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support"): On 27.09.19 15:37, Ian Jackson wrote: I think thi

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

2019-09-30 Thread Jürgen Groß
On 30.09.19 11:17, Paul Durrant wrote: -Original Message- From: Jan Beulich Sent: 30 September 2019 10:07 To: Paul Durrant Cc: xen-devel@lists.xenproject.org; Juergen Gross ; osstest service owner Subject: Re: [Xen-devel] [xen-unstable test] 141990: regressions - FAIL On 30.09.2019 1

Re: [Xen-devel] [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support

2019-09-30 Thread Jürgen Groß
On 30.09.19 12:07, Ian Jackson wrote: Jürgen Groß writes ("Re: [PATCH v1 1/6] docs: add feature document for Xen hypervisor sysfs-like support"): On 30.09.19 10:57, Jan Beulich wrote: On 30.09.2019 10:17, Jürgen Groß wrote: .config can contain user supplied strings. While not m

Re: [Xen-devel] [PATCH v5 01/19] xen/sched: add code to sync scheduling of all vcpus of a sched unit

2019-09-30 Thread Jürgen Groß
On 30.09.19 12:39, Jan Beulich wrote: On 30.09.2019 12:38, Andrew Cooper wrote: On 30/09/2019 11:36, Jan Beulich wrote: On 30.09.2019 07:21, Juergen Gross wrote: When switching sched units synchronize all vcpus of the new unit to be scheduled at the same time. A variable sched_granularity is

Re: [Xen-devel] [PATCH for Xen 4.13] iommu/arm: Remove arch_iommu_populate_page_table() completely

2019-09-30 Thread Jürgen Groß
On 30.09.19 12:34, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The Arm realization should have been removed in the following commit as redundant: f89f555 remove late (on-demand) construction of IOMMU page tables So, remove unused function completely. Signed-off-by: Oleksandr Tyshch

Re: [Xen-devel] [PATCH v5 20/19] docs: add "sched-gran" boot parameter documentation

2019-09-30 Thread Jürgen Groß
On 30.09.19 12:25, Jan Beulich wrote: On 30.09.2019 12:09, Juergen Gross wrote: Add documentation for the new "sched-gran" hypervisor boot parameter. Signed-off-by: Juergen Gross --- docs/misc/xen-command-line.pandoc | 21 + 1 file changed, 21 insertions(+) diff --git a

Re: [Xen-devel] [PATCH] SUPPORT.md: Add PV display/sound, update keyboard

2019-09-30 Thread Jürgen Groß
On 30.09.19 12:33, George Dunlap wrote: On 9/30/19 11:29 AM, George Dunlap wrote: On 9/30/19 9:56 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Signed-off-by: Oleksandr Andrushchenko --- SUPPORT.md | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) d

Re: [Xen-devel] [PATCH v5 20/19] docs: add "sched-gran" boot parameter documentation

2019-09-30 Thread Jürgen Groß
On 30.09.19 13:02, Jan Beulich wrote: On 30.09.2019 12:51, Jürgen Groß wrote: On 30.09.19 12:25, Jan Beulich wrote: On 30.09.2019 12:09, Juergen Gross wrote: Add documentation for the new "sched-gran" hypervisor boot parameter. Signed-off-by: Juergen Gross --- docs/misc/x

Re: [Xen-devel] [PATCH v5 20/19] docs: add "sched-gran" boot parameter documentation

2019-09-30 Thread Jürgen Groß
On 30.09.19 13:20, Jan Beulich wrote: On 30.09.2019 13:13, Jürgen Groß wrote: On 30.09.19 13:02, Jan Beulich wrote: On 30.09.2019 12:51, Jürgen Groß wrote: On 30.09.19 12:25, Jan Beulich wrote: On 30.09.2019 12:09, Juergen Gross wrote: Add documentation for the new "sched-gran"

Re: [Xen-devel] [TESTDAY] Test report

2019-11-17 Thread Jürgen Groß
On 16.11.19 02:12, Roman Shaposhnik wrote: NOTE: this may or may not be a hair on fire problem, reporting it anyway since I'd hate to pass on something that maybe a serious issue. I haven't had time to debug this just yet -- so just reporting it here pretty raw. Software: Xen 4.13 RC2 Li

Re: [Xen-devel] [PATCH 13/15] xen/gntdev-dmabuf: Ditch dummy map functions

2019-11-18 Thread Jürgen Groß
On 18.11.19 11:35, Daniel Vetter wrote: There's no in-kernel users for the k(un)map stuff. And the mmap one is actively harmful - return 0 and then _not_ actually mmaping can't end well. Signed-off-by: Daniel Vetter Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@l

Re: [Xen-devel] Issue with 5.3.8 kernel in a ArchLinux guest

2019-11-18 Thread Jürgen Groß
Florijan Hamzic wrote: > my machine recently crashes randomly. I found this thing in my logs > before the crash happened: ... Can you share more information regarding the Xen version you are using? Juergen ___ Xen-devel mailing list Xen-devel@lists

Re: [Xen-devel] [PATCH] x86/nested-hap: Fix handling of L0_ERROR

2019-11-18 Thread Jürgen Groß
On 18.11.19 19:15, Andrew Cooper wrote: When nestedhvm_hap_nested_page_fault() returns L0_ERROR, hvm_hap_nested_page_fault() operates on the adjusted gpa. However, it operates with the original npfec, which is no longer be correct. In particular, it is possible to get a nested fault where the t

Re: [Xen-devel] [PATCH 1/2] x86/Xen/32: make xen_iret_crit_fixup independent of frame layout

2019-11-19 Thread Jürgen Groß
On 11.11.19 15:32, Jan Beulich wrote: Now that SS:ESP always get saved by SAVE_ALL, this also needs to be accounted for in xen_iret_crit_fixup. Otherwise the old_ax value gets interpreted as EFLAGS, and hence VM86 mode appears to be active all the time, leading to random "vm86_32: no user_vm86: B

Re: [Xen-devel] [PATCH 2/2] x86/Xen/32: simplify xen_iret_crit_fixup's ring check

2019-11-19 Thread Jürgen Groß
On 11.11.19 15:32, Jan Beulich wrote: This can be had with two instead of six insns, by just checking the high CS.RPL bit. Also adjust the comment - there would be no #GP in the mentioned cases, as there's no segment limit violation or alike. Instead there'd be #PF, but that one reports the targ

Re: [Xen-devel] [PATCH for-4.13] efi: do not use runtime services table with efi=no-rs

2019-11-19 Thread Jürgen Groß
On 17.11.19 00:47, Marek Marczykowski-Górecki wrote: Before df6631 "efi: use directmap to access runtime services table" all usages of efi_rs pointer were guarded by efi_rs_enter(), which implicitly refused to operate with efi=no-rs (by checking if efi_l4_pgtable is NULL - which is the case f

Re: [Xen-devel] [PATCH for-4.13] x86/cpuid: Fix Lisbon/Magny-Cours Opterons WRT SSSE3/SSE4A

2019-11-19 Thread Jürgen Groß
On 19.11.19 18:00, Andrew Cooper wrote: c/s ff66ccefe5 "x86/CPUID: adjust SSEn dependencies" made SSE4A depend on SSSE3, but these processors really do have have SSE4A without SSSE3. This manifests as an upgrade regression, as the SSE4A feature disappears from view. Adjust the SSE4A feature to

Re: [Xen-devel] [PATCH for-4.13 0/3] Fix PV shim ballooning problems

2019-11-19 Thread Jürgen Groß
On 01.11.19 21:24, Andrew Cooper wrote: I decided to dust off my early CPUID adjustments work in an effort to get patch 3 in a sensible state for 4.13. Ever so slightly RFC for 4.13 given where we are in the release, but this is fairly self contained. Andrew Cooper (2): x86/boot: Remove cach

Re: [Xen-devel] [XEN PATCH for-4.13] configure: Fix test for python 3.8

2019-11-20 Thread Jürgen Groß
On 15.11.19 17:15, Anthony PERARD wrote: https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build To embed Python into an application, a new --embed option must be passed to python3-config --libs --embed to get -lpython3.8 (link the application to libpython).

Re: [Xen-devel] [PATCH] xen: Add missing va_end() in hypercall_create_continuation()

2019-11-20 Thread Jürgen Groß
On 20.11.19 15:06, Andrew Cooper wrote: On 20/11/2019 13:56, Jan Beulich wrote: On 20.11.2019 14:37, Julien Grall wrote: From: Julien Grall The documentation requires va_start() to always be matched with a corresponding va_end(). However, this is not the case in the path used for bad format.

Re: [Xen-devel] [PATCH for-4.13 v3] passthrough: simplify locking and logging

2019-11-20 Thread Jürgen Groß
On 15.11.19 19:59, Igor Druzhinin wrote: From: Paul Durrant Dropping the pcidevs lock between calling device_assigned() and assign_device() means that the latter has to do the same check as the former for no obvious gain. Also, since long running operations under pcidevs lock already drop the l

Re: [Xen-devel] [XEN PATCH] xen/arch/x86/Makefile: Remove $(guard) use from $(TARGET).efi target

2019-11-20 Thread Jürgen Groß
On 20.11.19 08:50, Jan Beulich wrote: On 19.11.2019 18:58, Anthony PERARD wrote: Following the patch 65d104984c04 ("x86: fix race to build arch/x86/efi/relocs-dummy.o"), the error message nm: 'efi/relocs-dummy.o': No such file" started to appear on system which can't build the .efi target. Th

Re: [Xen-devel] Ping: [PATCH v2] build: provide option to disambiguate symbol names

2019-11-20 Thread Jürgen Groß
On 20.11.19 17:30, Jan Beulich wrote: On 08.11.2019 12:18, Jan Beulich wrote: The .file assembler directives generated by the compiler do not include any path components (gcc) or just the ones specified on the command line (clang, at least version 5), and hence multiple identically named source

Re: [Xen-devel] [OSSTEST PATCH 00/13] Speed up and restore host history

2019-11-20 Thread Jürgen Groß
On 20.11.19 18:54, Ian Jackson wrote: Hi, I promised you to do a risk/benefit analysis on this series and here is my report. With your permission I plan to push it on Sunday night or Monday morning, if you think that is a convenient time. TYVM. I'm fine with your plan. Juergen Summary:

[Xen-devel] Status of 4.13

2019-11-20 Thread Jürgen Groß
Where do we stand with Xen 4.13 regarding blockers and related patches? 1. OSStest failure regarding nested test: I'm not quite sure whether the currently debated patch of Andrew is fixing the problem. If not, do we know what is missing or how to address the issue? If yes, could we pleas

Re: [Xen-devel] Status of 4.13

2019-11-20 Thread Jürgen Groß
On 21.11.19 08:30, Steven Haigh wrote: On 2019-11-21 17:05, Jürgen Groß wrote: Where do we stand with Xen 4.13 regarding blockers and related patches? 2. Ryzen/Rome failures with Windows guests:    What is the currently planned way to address the problem? Who is    working on that? A

  1   2   3   4   5   6   7   8   9   10   >