[Xen-devel] [PATCH] arm/dom0: Add check for maximum number of supported vGIC IRQs

2019-03-27 Thread Lukas Juenger
Xen's vGIC implementation supports a maximum number of 992 IRQ lines. GICv2 specification allows for 1020 IRQ lines. This commit adds a check for this discrepancy. Signed-off-by: Lukas Juenger (juen...@ice.rwth-aachen.de) --- xen/arch/arm/setup.c | 8 +++- 1 file changed, 7 insertions(+), 1 d

Re: [Xen-devel] Xen 4.12.0-rc Hangs Around masked ExtINT on CPU#

2019-03-27 Thread Jan Beulich
>>> On 26.03.19 at 18:21, wrote: > zeta /usr/local/src/xen # cat xen/.config |grep CONFIG_HVM > # CONFIG_HVM is not set > zeta /usr/local/src/xen # > > # tried 2 boot attempts > log at: https://pastebin.com/nL4BWJ6Y > > Hang points at lines: Thanks for trying anyway; one further possibility el

Re: [Xen-devel] [PATCH v3 01/14] x86/cpu: Create Hygon Dhyana architecture support file

2019-03-27 Thread Pu Wen
On 2019/3/26 23:49, Jan Beulich wrote: > On 25.03.19 at 14:29, wrote: >> -static unsigned int __initdata opt_cpuid_mask_l7s0_eax = ~0u; >> -integer_param("cpuid_mask_l7s0_eax", opt_cpuid_mask_l7s0_eax); >> -static unsigned int __initdata opt_cpuid_mask_l7s0_ebx = ~0u; >> -integer_param("cpuid_mask

Re: [Xen-devel] [PATCH v3 03/14] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU

2019-03-27 Thread Pu Wen
On 2019/3/27 0:10, Jan Beulich wrote: > On 25.03.19 at 14:30, wrote: >> --- a/xen/arch/x86/cpu/vpmu_amd.c >> +++ b/xen/arch/x86/cpu/vpmu_amd.c >> @@ -538,13 +538,37 @@ int svm_vpmu_initialise(struct vcpu *v) >> return 0; >> } >> >> -int __init amd_vpmu_init(void) >> +static int _vpmu_in

Re: [Xen-devel] [PATCH v3 01/14] x86/cpu: Create Hygon Dhyana architecture support file

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 09:14, wrote: > On 2019/3/26 23:49, Jan Beulich wrote: >> On 25.03.19 at 14:29, wrote: >>> @@ -116,6 +121,9 @@ bool __init probe_cpuid_faulting(void) >>> uint64_t val; >>> int rc; >>> >>> + if(boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) >>> + return fal

Re: [Xen-devel] [PATCH v3 03/14] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 09:16, wrote: > On 2019/3/27 0:10, Jan Beulich wrote: >> On 25.03.19 at 14:30, wrote: >>> -for ( i = 0; i < num_counters; i++ ) >>> +int __init hygon_vpmu_init(void) >>> +{ >>> +switch ( current_cpu_data.x86 ) >>> { >>> -rdmsrl(ctrls[i], ctrl_rsvd[i]); >>>

[Xen-devel] [qemu-mainline test] 134090: regressions - trouble: blocked/broken/fail/pass

2019-03-27 Thread osstest service owner
flight 134090 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/134090/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64

Re: [Xen-devel] [PATCH] x86/xen: Add "xen_timer_slop" command line option

2019-03-27 Thread Ryan Thibodeaux
On Tue, Mar 26, 2019 at 07:21:31PM -0400, Boris Ostrovsky wrote: > On 3/26/19 5:13 AM, Dario Faggioli wrote: > > On Mon, 2019-03-25 at 09:43 -0400, Boris Ostrovsky wrote: > >> On 3/25/19 8:05 AM, luca abeni wrote: > >>> The picture shows the latencies measured with an unpatched guest > >>> kernel >

Re: [Xen-devel] [PATCH v3 01/14] x86/cpu: Create Hygon Dhyana architecture support file

2019-03-27 Thread Pu Wen
On 2019/3/27 16:31, Jan Beulich wrote: > On 27.03.19 at 09:14, wrote: >> On 2019/3/26 23:49, Jan Beulich wrote: >>> On 25.03.19 at 14:29, wrote: @@ -116,6 +121,9 @@ bool __init probe_cpuid_faulting(void) uint64_t val; int rc; + if(boot_cpu_data.

Re: [Xen-devel] [PATCH v3 03/14] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU

2019-03-27 Thread Pu Wen
On 2019/3/27 16:38, Jan Beulich wrote: On 27.03.19 at 09:16, wrote: On 2019/3/27 0:10, Jan Beulich wrote: On 25.03.19 at 14:30, wrote: +default: +printk(XENLOG_WARNING "VPMU: Unsupported CPU family %#x\n", + current_cpu_data.x86); +return -EINVAL; }

[Xen-devel] [xen-unstable-coverity test] 134122: regressions - ALL FAIL

2019-03-27 Thread osstest service owner
flight 134122 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/134122/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: coverity-amd647 coverity-upload fail REGR. vs. 133615 version t

Re: [Xen-devel] [PATCH v1 1/1] hvmloader: allow overriding SMBIOS type 2 info

2019-03-27 Thread Xin Li (Talons)
Hi Jan, Thanks for reviewing. > -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, March 26, 2019 9:15 PM > To: Xin Li > Cc: Andrew Cooper ; Igor Druzhinin > ; Sergey Dyasli ; Xin Li > (Talons) ; xen-de...@lists.xen.org > Subject: Re: [Xen-devel] [PATCH

[Xen-devel] [xen-unstable-smoke test] 134107: trouble: blocked/broken/pass

2019-03-27 Thread osstest service owner
flight 134107 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134107/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xs

Re: [Xen-devel] [PATCH for-4.12] passthrough/vtd: Drop the "workaround_bios_bug" logic entirely

2019-03-27 Thread George Dunlap
On 3/25/19 3:24 PM, Jan Beulich wrote: On 21.03.19 at 21:26, wrote: >> It turns out that this code was previously dead. > > If it was entirely dead, why the rush to get the change into 4.12? > (I suppose the later parts of description are then justifying why > the code wasn't actually dead,

Re: [Xen-devel] [PATCH v1 1/1] hvmloader: allow overriding SMBIOS type 2 info

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 11:54, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Tuesday, March 26, 2019 9:15 PM >> >> >>> On 26.03.19 at 07:45, wrote: >> > @@ -518,7 +520,67 @@ smbios_type_2_init(void *start) >> > return (start + length); >> > } >> >> In the subject you

[Xen-devel] [distros-debian-squeeze test] 83830: trouble: blocked/broken

2019-03-27 Thread Platform Team regression test user
flight 83830 distros-debian-squeeze real [real] http://osstest.xensource.com/osstest/logs/83830/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvopsbroken build-i386

Re: [Xen-devel] [PATCH for-4.12] passthrough/vtd: Drop the "workaround_bios_bug" logic entirely

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 12:02, wrote: > On 3/25/19 3:24 PM, Jan Beulich wrote: > On 21.03.19 at 21:26, wrote: >>> It turns out that this code was previously dead. >> >> If it was entirely dead, why the rush to get the change into 4.12? >> (I suppose the later parts of description are then justify

Re: [Xen-devel] [PATCH v1 1/1] hvmloader: allow overriding SMBIOS type 2 info

2019-03-27 Thread Xin Li (Talons)
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Wednesday, March 27, 2019 7:24 PM > To: Xin Li (Talons) > Cc: Andrew Cooper ; Igor Druzhinin > ; Sergey Dyasli ; Xin Li > ; xen-de...@lists.xen.org > Subject: RE: [Xen-devel] [PATCH v1 1/1] hvmloader: allow overr

Re: [Xen-devel] [PATCH 2/6] xen: add helper for calling notifier_call_chain() to common/cpu.c

2019-03-27 Thread George Dunlap
On 3/18/19 1:11 PM, Juergen Gross wrote: > Add a helper cpu_notifier_call_chain() to call notifier_call_chain() > for a cpu with a specified action, returning an errno value. > > This avoids coding the same pattern multiple times. > > Signed-off-by: Juergen Gross Reviewed-by: George Dunlap __

Re: [Xen-devel] Xen 4.12.0-rc Hangs Around masked ExtINT on CPU#

2019-03-27 Thread John L. Poole
On 3/27/2019 1:14 AM, Jan Beulich wrote: On 26.03.19 at 18:21, wrote: zeta /usr/local/src/xen # cat xen/.config |grep CONFIG_HVM # CONFIG_HVM is not set zeta /usr/local/src/xen # # tried 2 boot attempts log at: https://pastebin.com/nL4BWJ6Y Hang points at lines: Thanks for trying anyway; on

[Xen-devel] xen disk spec and emulation

2019-03-27 Thread Paul Durrant
Hi, Currently, when specifying a virtual disk, the only way to determine the emulation model used is by selecting a particular 'vdev' numbering scheme as detailed in xl-disk-configuration in the docs. That document refers the reader to xen-vbd-interface which says: xvd* -> xen virtual disk (

Re: [Xen-devel] Xen 4.12.0-rc Hangs Around masked ExtINT on CPU#

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 14:25, wrote: > On 3/27/2019 1:14 AM, Jan Beulich wrote: > On 26.03.19 at 18:21, wrote: >>> zeta /usr/local/src/xen # cat xen/.config |grep CONFIG_HVM >>> # CONFIG_HVM is not set >>> zeta /usr/local/src/xen # >>> >>> # tried 2 boot attempts >>> log at: https://pastebin.com/

Re: [Xen-devel] xen disk spec and emulation

2019-03-27 Thread Paul Durrant
> -Original Message- > From: Paul Durrant > Sent: 27 March 2019 13:54 > To: xen-devel (xen-devel@lists.xenproject.org) > > Subject: xen disk spec and emulation > > Hi, > > Currently, when specifying a virtual disk, the only way to determine the > emulation model used is by > selectin

Re: [Xen-devel] xen disk spec and emulation

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 14:54, wrote: > Currently, when specifying a virtual disk, the only way to determine the > emulation model used is by selecting a particular 'vdev' numbering scheme as > detailed in xl-disk-configuration in the docs. That document refers the > reader to xen-vbd-interface wh

Re: [Xen-devel] [PATCH] x86/xen: Add "xen_timer_slop" command line option

2019-03-27 Thread Boris Ostrovsky
On 3/27/19 6:00 AM, Ryan Thibodeaux wrote: > On Tue, Mar 26, 2019 at 07:21:31PM -0400, Boris Ostrovsky wrote: >> On 3/26/19 5:13 AM, Dario Faggioli wrote: >>> On Mon, 2019-03-25 at 09:43 -0400, Boris Ostrovsky wrote: On 3/25/19 8:05 AM, luca abeni wrote: > The picture shows the latencies m

Re: [Xen-devel] [PATCH 1/3] mwait-idle: add support for using halt

2019-03-27 Thread Jan Beulich
>>> On 26.03.19 at 22:56, wrote: > On 3/26/19 10:54 AM, Jan Beulich wrote: > On 19.03.19 at 17:12, wrote: >>> On 3/15/19 3:37 AM, Jan Beulich wrote: Furthermore I'm then once again wondering what the gain is over using the ACPI driver: The suggested _CST looks to exactly match

Re: [Xen-devel] [PATCH] xen/pv: Add PV specific legacy_pic struct to expose legacy IRQs.

2019-03-27 Thread Boris Ostrovsky
On 3/25/19 10:40 AM, Paul Durrant wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf Of >> Jennifer Herbert >> Sent: 25 March 2019 14:24 >> To: Boris Ostrovsky ; x...@kernel.org; >> xen-devel@lists.xenproject.org; >> linux-ker...@vger

Re: [Xen-devel] xen disk spec and emulation

2019-03-27 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 27 March 2019 14:27 > To: Paul Durrant > Cc: xen-devel > Subject: Re: [Xen-devel] xen disk spec and emulation > > >>> On 27.03.19 at 14:54, wrote: > > Currently, when specifying a virtual disk, the only way to

Re: [Xen-devel] [PATCH for-4.12] passthrough/vtd: Drop the "workaround_bios_bug" logic entirely

2019-03-27 Thread Andrew Cooper
On 26/03/2019 13:39, Jan Beulich wrote: On 26.03.19 at 13:43, wrote: >> On 26/03/2019 09:08, Jan Beulich wrote: >> Leave the warning which identifies the problematic devices, but drop the >> remaining logic. This leaves the system in better overall state, and >> working >> i

Re: [Xen-devel] [PATCH] x86/xen: Add "xen_timer_slop" command line option

2019-03-27 Thread Ryan Thibodeaux
On Wed, Mar 27, 2019 at 10:46:21AM -0400, Boris Ostrovsky wrote: > On 3/27/19 6:00 AM, Ryan Thibodeaux wrote: > > On Tue, Mar 26, 2019 at 07:21:31PM -0400, Boris Ostrovsky wrote: > >> On 3/26/19 5:13 AM, Dario Faggioli wrote: > >>> On Mon, 2019-03-25 at 09:43 -0400, Boris Ostrovsky wrote: > On

[Xen-devel] [PATCH] x86/Xen: streamline (and fix) PV CPU enumeration

2019-03-27 Thread Jan Beulich
This started out with me noticing that "dom0_max_vcpus=" with larger than the number of physical CPUs reported through ACPI tables would not bring up the "excess" vCPU-s. Noticing that xen_fill_possible_map() gets called way too early, whereas xen_filter_cpu_maps() gets called too late (after per

Re: [Xen-devel] [PATCH] x86/xen: Add "xen_timer_slop" command line option

2019-03-27 Thread Dario Faggioli
On Wed, 2019-03-27 at 10:46 -0400, Boris Ostrovsky wrote: > On 3/27/19 6:00 AM, Ryan Thibodeaux wrote: > > On Tue, Mar 26, 2019 at 07:21:31PM -0400, Boris Ostrovsky wrote: > > > On 3/26/19 5:13 AM, Dario Faggioli wrote: > > > > > > > > And this is basically why I was also thinking we can/should >

[Xen-devel] [PATCH RFC v4] x86/mm: Clean up p2m_finish_type_change return value

2019-03-27 Thread Alexandru Stefan ISAILA
In the case of any errors, finish_type_change() passes values returned from p2m->recalc() up the stack (with some exceptions in the case where an error is expected); this eventually ends up being returned to the XEN_DOMOP_map_mem_type_to_ioreq_server hypercall. However, on Intel processors (but no

Re: [Xen-devel] [PATCH 1/4] libx86: Introduce x86_cpuid_lookup_vendor()

2019-03-27 Thread Andrew Cooper
On 26/03/2019 14:39, Jan Beulich wrote: On 26.03.19 at 15:23, wrote: >> IMO especially in the CPUID case it is desirable to explicitly specify >> the width of the data. Looking at nodes 0x8002 and following this >> should be rather clear (and I even think get_model_name() should be >> mod

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread George Dunlap
On 3/18/19 1:11 PM, Juergen Gross wrote: > cpu_disable_scheduler() is being called from __cpu_disable() today. > There is no need to call it on the cpu just being disabled, so use > the CPU_DEAD case of the cpu notifier chain. > > Signed-off-by: Juergen Gross Scheduler change: Acked-by: George

Re: [Xen-devel] [PATCH for-4.12] passthrough/vtd: Drop the "workaround_bios_bug" logic entirely

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 15:38, wrote: > There is absolutely nothing *at all* which guarantees that just because > a number of devices are identified to be behind specific IOMMUs, that > DMA wont start appearing from elsewhere in the system. I fully agree here. > Security of the system when it comes t

Re: [Xen-devel] [PATCH V2 00/10] block: enable multi-page bvec for passthrough IO

2019-03-27 Thread Jens Axboe
On 3/17/19 4:01 AM, Ming Lei wrote: > Hi, > > Now the whole IO stack is capable of handling multi-page bvec, and it has > been enabled in the normal FS IO path. However, it isn't done for > passthrough IO. > > Without enabling multi-bvec for passthough IO, we won't go ahead for > optimizing relat

Re: [Xen-devel] [PATCH 3/6] xen: add new cpu notifier action CPU_RESUME_FAILED

2019-03-27 Thread George Dunlap
On 3/18/19 1:11 PM, Juergen Gross wrote: > Add a new cpu notifier action CPU_RESUME_FAILED which is called for all > cpus which failed to come up at resume. The calls will be done after > all other cpus are already up. > > Signed-off-by: Juergen Gross Reviewed-by: George Dunlap ___

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Andrew Cooper
On 18/03/2019 13:11, Juergen Gross wrote: > cpu_disable_scheduler() is being called from __cpu_disable() today. > There is no need to call it on the cpu just being disabled, so use > the CPU_DEAD case of the cpu notifier chain. > > Signed-off-by: Juergen Gross > --- > xen/arch/x86/smpboot.c | 3

Re: [Xen-devel] [PATCH 3/6] xen: add new cpu notifier action CPU_RESUME_FAILED

2019-03-27 Thread Dario Faggioli
On Mon, 2019-03-25 at 13:29 +0100, Juergen Gross wrote: > On 25/03/2019 13:21, Dario Faggioli wrote: > > > Reviewed-by: Dario Faggioli > > > > One more (minor) thing... > > > > > /* CPU_REMOVE: CPU was removed. */ > > > -#define CPU_REMOVE (0x0009 | NOTIFY_REVERSE) > > > +#define CPU_REMO

Re: [Xen-devel] [PATCH 5/6] xen/cpupool: simplify suspend/resume handling

2019-03-27 Thread George Dunlap
On 3/18/19 1:11 PM, Juergen Gross wrote: > Instead of removing cpus temporarily from cpupools during > suspend/resume only remove cpus finally which didn't come up when > resuming. > > Signed-off-by: Juergen Gross Looks good overall -- one comment... > @@ -774,10 +741,15 @@ static int cpu_callb

Re: [Xen-devel] [PATCH 2/6] xen: add helper for calling notifier_call_chain() to common/cpu.c

2019-03-27 Thread Andrew Cooper
On 18/03/2019 13:11, Juergen Gross wrote: > Add a helper cpu_notifier_call_chain() to call notifier_call_chain() > for a cpu with a specified action, returning an errno value. > > This avoids coding the same pattern multiple times. > > Signed-off-by: Juergen Gross > --- > xen/common/cpu.c | 50 ++

Re: [Xen-devel] [PATCH RFCv2 0/4] mm/memory_hotplug: Introduce memory block types

2019-03-27 Thread David Hildenbrand
On 20.12.18 14:08, Michal Hocko wrote: > On Thu 20-12-18 13:58:16, David Hildenbrand wrote: >> On 30.11.18 18:59, David Hildenbrand wrote: >>> This is the second approach, introducing more meaningful memory block >>> types and not changing online behavior in the kernel. It is based on >>> latest li

Re: [Xen-devel] [PATCH 2/6] xen: add helper for calling notifier_call_chain() to common/cpu.c

2019-03-27 Thread Juergen Gross
On 27/03/2019 16:39, Andrew Cooper wrote: > On 18/03/2019 13:11, Juergen Gross wrote: >> Add a helper cpu_notifier_call_chain() to call notifier_call_chain() >> for a cpu with a specified action, returning an errno value. >> >> This avoids coding the same pattern multiple times. >> >> Signed-off-by

[Xen-devel] [linux-4.4 test] 134102: trouble: blocked/broken/fail/pass

2019-03-27 Thread osstest service owner
flight 134102 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134102/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken build-arm64-xsm

Re: [Xen-devel] [PATCH RFC v4] x86/mm: Clean up p2m_finish_type_change return value

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 16:21, wrote: > @@ -621,7 +623,7 @@ bool_t ept_handle_misconfig(uint64_t gpa) > > p2m_unlock(p2m); > > -return spurious ? (rc >= 0) : (rc > 0); > +return spurious && !rc; > } I think you've gone too far now: This is - afaict - the one place where the distincti

Re: [Xen-devel] [PATCH 4/6] xen: don't free percpu areas during suspend

2019-03-27 Thread Andrew Cooper
On 18/03/2019 13:11, Juergen Gross wrote: > Instead of freeing percpu areas during suspend and allocating them > again when resuming keep them. Only free an area in case a cpu didn't > come up again when resuming. > > Signed-off-by: Juergen Gross Hmm - this is slightly problematic, given the dual

Re: [Xen-devel] [PATCH 4/6] xen: don't free percpu areas during suspend

2019-03-27 Thread Juergen Gross
On 27/03/2019 16:55, Andrew Cooper wrote: > On 18/03/2019 13:11, Juergen Gross wrote: >> Instead of freeing percpu areas during suspend and allocating them >> again when resuming keep them. Only free an area in case a cpu didn't >> come up again when resuming. >> >> Signed-off-by: Juergen Gross >

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Jan Beulich
>>> On 18.03.19 at 14:11, wrote: > @@ -1738,6 +1733,9 @@ static int cpu_schedule_callback( > rc = cpu_schedule_up(cpu); > break; > case CPU_DEAD: > +rcu_read_lock(&domlist_read_lock); > +cpu_disable_scheduler(cpu); > +rcu_read_unlock(&domlist_read_loc

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Dario Faggioli
On Mon, 2019-03-18 at 14:11 +0100, Juergen Gross wrote: > cpu_disable_scheduler() is being called from __cpu_disable() today. > There is no need to call it on the cpu just being disabled, so use > the CPU_DEAD case of the cpu notifier chain. > So, what do you mean with "There is no need to call it

Re: [Xen-devel] [PATCH 3/6] xen: add new cpu notifier action CPU_RESUME_FAILED

2019-03-27 Thread Jan Beulich
>>> On 18.03.19 at 14:11, wrote: > --- a/xen/common/cpu.c > +++ b/xen/common/cpu.c > @@ -214,7 +214,12 @@ void enable_nonboot_cpus(void) > printk("Error bringing CPU%d up: %d\n", cpu, error); > BUG_ON(error == -EBUSY); > } > +else > +__cpumask

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Juergen Gross
On 27/03/2019 17:24, Dario Faggioli wrote: > On Mon, 2019-03-18 at 14:11 +0100, Juergen Gross wrote: >> cpu_disable_scheduler() is being called from __cpu_disable() today. >> There is no need to call it on the cpu just being disabled, so use >> the CPU_DEAD case of the cpu notifier chain. >> > So,

Re: [Xen-devel] [PATCH 3/6] xen: add new cpu notifier action CPU_RESUME_FAILED

2019-03-27 Thread Juergen Gross
On 27/03/2019 17:29, Jan Beulich wrote: On 18.03.19 at 14:11, wrote: >> --- a/xen/common/cpu.c >> +++ b/xen/common/cpu.c >> @@ -214,7 +214,12 @@ void enable_nonboot_cpus(void) >> printk("Error bringing CPU%d up: %d\n", cpu, error); >> BUG_ON(error == -EBUSY); >>

Re: [Xen-devel] [PATCH 5/6] xen/cpupool: simplify suspend/resume handling

2019-03-27 Thread Dario Faggioli
On Mon, 2019-03-18 at 14:11 +0100, Juergen Gross wrote: > Instead of removing cpus temporarily from cpupools during > suspend/resume only remove cpus finally which didn't come up when > resuming. > > Signed-off-by: Juergen Gross > --- > xen/common/cpupool.c | 130 ++

Re: [Xen-devel] [PATCH 4/6] xen: don't free percpu areas during suspend

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 17:18, wrote: > On 27/03/2019 16:55, Andrew Cooper wrote: >> On 18/03/2019 13:11, Juergen Gross wrote: >>> Instead of freeing percpu areas during suspend and allocating them >>> again when resuming keep them. Only free an area in case a cpu didn't >>> come up again when resuming

Re: [Xen-devel] [PATCH RFC v4] x86/mm: Clean up p2m_finish_type_change return value

2019-03-27 Thread George Dunlap
On 3/27/19 3:21 PM, Alexandru Stefan ISAILA wrote: > In the case of any errors, finish_type_change() passes values returned > from p2m->recalc() up the stack (with some exceptions in the case where > an error is expected); this eventually ends up being returned to the > XEN_DOMOP_map_mem_type_to_io

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Juergen Gross
On 27/03/2019 17:22, Jan Beulich wrote: On 18.03.19 at 14:11, wrote: >> @@ -1738,6 +1733,9 @@ static int cpu_schedule_callback( >> rc = cpu_schedule_up(cpu); >> break; >> case CPU_DEAD: >> +rcu_read_lock(&domlist_read_lock); >> +cpu_disable_scheduler(cpu

Re: [Xen-devel] [PATCH 4/6] xen: don't free percpu areas during suspend

2019-03-27 Thread Juergen Gross
On 27/03/2019 17:38, Jan Beulich wrote: On 27.03.19 at 17:18, wrote: >> On 27/03/2019 16:55, Andrew Cooper wrote: >>> On 18/03/2019 13:11, Juergen Gross wrote: Instead of freeing percpu areas during suspend and allocating them again when resuming keep them. Only free an area in case

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Dario Faggioli
On Wed, 2019-03-27 at 17:31 +0100, Juergen Gross wrote: > On 27/03/2019 17:24, Dario Faggioli wrote: > > On Mon, 2019-03-18 at 14:11 +0100, Juergen Gross wrote: > > > cpu_disable_scheduler() is being called from __cpu_disable() > > > today. > > > There is no need to call it on the cpu just being di

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Juergen Gross
On 27/03/2019 17:51, Dario Faggioli wrote: > On Wed, 2019-03-27 at 17:31 +0100, Juergen Gross wrote: >> On 27/03/2019 17:24, Dario Faggioli wrote: >>> On Mon, 2019-03-18 at 14:11 +0100, Juergen Gross wrote: cpu_disable_scheduler() is being called from __cpu_disable() today. There is

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Jan Beulich
>>> On 27.03.19 at 17:45, wrote: > On 27/03/2019 17:22, Jan Beulich wrote: >> Also while indeed (as the description says) there's no need to >> run the function on the CPU itself, it's not obvious to me that >> it's safe to run it outside of stop_machine() context. Or to be >> more precise, it's n

Re: [Xen-devel] [PATCH] x86/Xen: streamline (and fix) PV CPU enumeration

2019-03-27 Thread Boris Ostrovsky
On 3/27/19 11:12 AM, Jan Beulich wrote: > - > -static void __init xen_filter_cpu_maps(void) > +static void __init _get_smp_config(unsigned int early) > { > int i, rc; > unsigned int subtract = 0; > > - if (!xen_initial_domain()) > + if (early) > return; > >

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Juergen Gross
On 27/03/2019 17:58, Jan Beulich wrote: On 27.03.19 at 17:45, wrote: >> On 27/03/2019 17:22, Jan Beulich wrote: >>> Also while indeed (as the description says) there's no need to >>> run the function on the CPU itself, it's not obvious to me that >>> it's safe to run it outside of stop_machin

[Xen-devel] [xen-unstable-smoke test] 134127: trouble: blocked/broken/pass

2019-03-27 Thread osstest service owner
flight 134127 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134127/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xs

Re: [Xen-devel] [PATCH 1/3] mwait-idle: add support for using halt

2019-03-27 Thread Woods, Brian
On 3/27/19 9:48 AM, Jan Beulich wrote: On 26.03.19 at 22:56, wrote: >> On 3/26/19 10:54 AM, Jan Beulich wrote: >> On 19.03.19 at 17:12, wrote: On 3/15/19 3:37 AM, Jan Beulich wrote: > Furthermore I'm then once again wondering what the gain is > over using the ACPI driver: Th

[Xen-devel] [PATCH v2 1/2] xen-block: scale sector based quantities correctly

2019-03-27 Thread Paul Durrant
The Xen blkif protocol requires that sector based quantities should be interpreted strictly as multiples of 512 bytes. Specifically: "first_sect and last_sect in blkif_request_segment, as well as sector_number in blkif_request, are always expressed in 512-byte units." This patch modifies the xen-

[Xen-devel] [PATCH v2 0/2] xen-block: fix sector size confusion

2019-03-27 Thread Paul Durrant
The Xen blkif protocol is confusing but discussion with the maintainer has clarified that sector based quantities in requests and the 'sectors' value advertized in xenstore should always be in terms of 512-byte units and not the advertised logical 'sector-size' value. This series fixes xen-block t

[Xen-devel] [PATCH v2 2/2] xen-block: always report 'sectors' in terms of 512-byte units

2019-03-27 Thread Paul Durrant
The mail thread at [1] clarifies that the Xen blkif protocol requires that 'sectors' value reported in xenstore is strictly in terms of 512-byte units and is not dependent on the logical sector size reported in 'sector-size'. [1] https://lists.xenproject.org/archives/html/xen-devel/2019-03/msg0160

Re: [Xen-devel] [PATCH v2 0/2] xen-block: fix sector size confusion

2019-03-27 Thread Andrew Cooper
On 27/03/2019 17:32, Paul Durrant wrote: > The Xen blkif protocol is confusing but discussion with the maintainer > has clarified that sector based quantities in requests and the 'sectors' > value advertized in xenstore should always be in terms of 512-byte > units and not the advertised logical 's

[Xen-devel] [PATCH 09/12] xen/arm: guest_walk: Avoid theoritical unitialized value in get_top_bit

2019-03-27 Thread Julien Grall
Clang 8.0 throws an error in the get_top_bit function: guest_walk.c:328:15: error: variable 'topbit' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] else if ( is_64bit_domain(d) ) ^~ This is happening because clang think

[Xen-devel] [PATCH 08/12] xen/arm: cpufeature: Match register size with value size in cpus_have_const_cap

2019-03-27 Thread Julien Grall
Clang is pickier than GCC for the register size in asm statement. It expects the register size to match the value size. The asm statement expects a 32-bit (resp. 64-bit) value on Arm32 (resp. Arm64) whereas the value is a boolean (Clang consider to be 32-bit). It would be possible to impose 32-bi

[Xen-devel] [PATCH 01/12] xen: clang: Support correctly cross-compile

2019-03-27 Thread Julien Grall
Clang uses "-target" option for cross-compilation. Signed-off-by: Julien Grall --- config/StdGNU.mk | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/StdGNU.mk b/config/StdGNU.mk index 039274ea61..48c50b5ad7 100644 --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @

[Xen-devel] [PATCH 02/12] xen/arm: fix get_cpu_info() when built with clang

2019-03-27 Thread Julien Grall
Clang understands the GCCism in use here, but still complains that sp is unitialised. In such cases, resort to the older versions of this code, which directly read sp into the temporary variable. Note that we still keep the GCCism in the default case, as it causes GCC to create rather better assem

[Xen-devel] [PATCH 06/12] xen/arm64: sysreg: Implement the 32-bit helpers using the 64-bit helpers

2019-03-27 Thread Julien Grall
Clang is pickier than GCC for the register size in asm statement. It expects the register size to match the value size. The instructions msr/mrs are expecting a 64-bit register. This means the implementation of the 32-bit helpers is not correct. The easiest solution is to implement the 32-bit help

[Xen-devel] [PATCH 05/12] xen/arm64: bitops: Match the register size with the value size in flsl

2019-03-27 Thread Julien Grall
Clang is pickier than GCC for the register size in asm statement. It expects the register size to match the value size. The instruction clz is expecting the two operands to be the same size (i.e 32-bit or 64-bit). As the flsl function is dealing with 64-bit value, we need to make the destination v

[Xen-devel] [PATCH 04/12] xen/arm: memaccess: Initialize correctly *access in __p2m_get_mem_access

2019-03-27 Thread Julien Grall
The commit 8d84e701fd "xen/arm: initialize access" initializes *access using the wrong enumeration type. This result to a warning using clang: mem_access.c:50:20: error: implicit conversion from enumeration type 'p2m_access_t' to different enumeration type 'xenmem_access_t' [-Werror,-Wenum-convers

[Xen-devel] [PATCH 07/12] xen/arm: cpuerrata: Match register size with value size in check_workaround_*

2019-03-27 Thread Julien Grall
Clang is pickier than GCC for the register size in asm statement. It expects the register size to match the value size. The asm statement expects a 32-bit (resp. 64-bit) value on Arm32 (resp. Arm64) whereas the value is a boolean (Clang consider to be 32-bit). It would be possible to impose 32-bi

[Xen-devel] [PATCH 11/12] xen/arm: traps: Mark check_stack_alignment_constraints as unused

2019-03-27 Thread Julien Grall
Clang will throw an error if a function is unused unless you tell to ignore it. This can be done using __maybe_unused. Signed-off-by: Julien Grall --- xen/arch/arm/traps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index d8b9

[Xen-devel] [PATCH 12/12] xen/arm64: __cmpxchg and __cmpxchg_mb should always be inline

2019-03-27 Thread Julien Grall
Currently __cmpxchg_mb and __cmpxchg are only marked inline. The compiler is free to decide to not honor the inline. This will result to generate code use __bad_cmpxchg and lead a link failure. This was caught by Clang 8.0. Signed-off-by: Julien Grall --- xen/include/asm-arm/arm64/cmpxchg.h | 1

[Xen-devel] [PATCH 03/12] xen/arm: zynqmp: Fix header guard for xilinx-zynqmp-eemi.h

2019-03-27 Thread Julien Grall
The header guard for xilinx-zynqmp-eemi.h is not followed by a #define of the macro used in the guard. Signed-off-by: Julien Grall --- xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-arm/platforms/xilinx-zynqm

[Xen-devel] [PATCH 00/12] xen/arm: Add support to build with clang

2019-03-27 Thread Julien Grall
Hi all, This series adds support to build Xen Arm with clang. This series was tested with clang 8.0. Note that I only did build for arm64. I still need to look at the arm32 build. Cheers, Julien Grall (12): xen: clang: Support correctly cross-compile xen/arm: fix get_cpu_info() when built w

[Xen-devel] [PATCH 10/12] xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused

2019-03-27 Thread Julien Grall
Clang will throw an error if a function is unused unless you tell to ignore it. This can be done using __maybe_unused. Signed-off-by: Julien Grall --- xen/arch/arm/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 01ae20..d

Re: [Xen-devel] [PATCH 05/12] xen/arm64: bitops: Match the register size with the value size in flsl

2019-03-27 Thread Andrew Cooper
On 27/03/2019 18:45, Julien Grall wrote: > Clang is pickier than GCC for the register size in asm statement. It expects > the register size to match the value size. > > The instruction clz is expecting the two operands to be the same size > (i.e 32-bit or 64-bit). As the flsl function is dealing wi

Re: [Xen-devel] [PATCH 04/12] xen/arm: memaccess: Initialize correctly *access in __p2m_get_mem_access

2019-03-27 Thread Razvan Cojocaru
On 3/27/19 8:45 PM, Julien Grall wrote: > The commit 8d84e701fd "xen/arm: initialize access" initializes > *access using the wrong enumeration type. This result to a warning > using clang: > > mem_access.c:50:20: error: implicit conversion from enumeration type > 'p2m_access_t' to different enumer

Re: [Xen-devel] [PATCH 10/12] xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused

2019-03-27 Thread Andrew Cooper
On 27/03/2019 18:45, Julien Grall wrote: > Clang will throw an error if a function is unused unless you tell > to ignore it. This can be done using __maybe_unused. > > Signed-off-by: Julien Grall > --- > xen/arch/arm/mm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/

Re: [Xen-devel] [PATCH 06/12] xen/arm64: sysreg: Implement the 32-bit helpers using the 64-bit helpers

2019-03-27 Thread Andrew Cooper
On 27/03/2019 18:45, Julien Grall wrote: > Clang is pickier than GCC for the register size in asm statement. It > expects the register size to match the value size. > > The instructions msr/mrs are expecting a 64-bit register. This means the > implementation of the 32-bit helpers is not correct. Th

[Xen-devel] [PATCH] x86/vvmx: Fix debug prints to not have 17 unnecessary spaces

2019-03-27 Thread Andrew Cooper
This has been problematic since its introduction in Xen 4.3 Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Jun Nakajima CC: Kevin Tian --- xen/arch/x86/hvm/vmx/vvmx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x

[Xen-devel] [linux-4.19 test] 134109: regressions - trouble: blocked/broken/fail/pass

2019-03-27 Thread osstest service owner
flight 134109 linux-4.19 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134109/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-pvops

Re: [Xen-devel] [PATCH 05/12] xen/arm64: bitops: Match the register size with the value size in flsl

2019-03-27 Thread Julien Grall
Hi, On 27/03/2019 19:03, Andrew Cooper wrote: > On 27/03/2019 18:45, Julien Grall wrote: >> Clang is pickier than GCC for the register size in asm statement. It expects >> the register size to match the value size. >> >> The instruction clz is expecting the two operands to be the same size >> (i.e

Re: [Xen-devel] [PATCH 06/12] xen/arm64: sysreg: Implement the 32-bit helpers using the 64-bit helpers

2019-03-27 Thread Julien Grall
Hi, On 27/03/2019 19:15, Andrew Cooper wrote: > On 27/03/2019 18:45, Julien Grall wrote: >> Clang is pickier than GCC for the register size in asm statement. It >> expects the register size to match the value size. >> >> The instructions msr/mrs are expecting a 64-bit register. This means the >> i

Re: [Xen-devel] [PATCH v2 0/2] xen-block: fix sector size confusion

2019-03-27 Thread Paul Durrant
> -Original Message- > From: Andrew Cooper > Sent: 27 March 2019 18:20 > To: Paul Durrant ; xen-devel@lists.xenproject.org; > qemu-bl...@nongnu.org; > qemu-de...@nongnu.org > Cc: Kevin Wolf ; Stefano Stabellini > ; Max Reitz > ; Stefan Hajnoczi ; Anthony Perard > > Subject: Re: [Xen-dev

[Xen-devel] [xen-unstable-smoke test] 134136: trouble: blocked/broken/pass

2019-03-27 Thread osstest service owner
flight 134136 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134136/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xs

[Xen-devel] [ovmf test] 134113: all pass - PUSHED

2019-03-27 Thread osstest service owner
flight 134113 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/134113/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf c455bc8c8d78ad51c24426a500914ea32504bf06 baseline version: ovmf 2f2c51acfb70efe3dd020

[Xen-devel] [libvirt test] 134039: regressions - trouble: blocked/broken/fail/pass

2019-03-27 Thread osstest service owner
flight 134039 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/134039/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken build-arm64-pvops

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier

2019-03-27 Thread Dario Faggioli
On Wed, 2019-03-27 at 18:06 +0100, Juergen Gross wrote: > On 27/03/2019 17:58, Jan Beulich wrote: > > > > > > > Well, of course nothing's going to run on that CPU anymore. > > But vCPU-s may still have associations with it, so what I'm > > worried about is e.g. something finding v->processor point

Re: [Xen-devel] [PATCH 6/6] xen/sched: don't disable scheduler on cpus during suspend

2019-03-27 Thread Dario Faggioli
On Mon, 2019-03-18 at 14:11 +0100, Juergen Gross wrote: > Today there is special handling in cpu_disable_scheduler() for > suspend > by forcing all vcpus to the boot cpu. In fact there is no need for > that > as during resume the vcpus are put on the correct cpus again. > > So we can just omit the

[Xen-devel] [RFC PATCH 35/68] vfs: Convert xenfs to use the new mount API

2019-03-27 Thread David Howells
Convert the xenfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-of

[Xen-devel] [xen-unstable-smoke test] 134140: trouble: blocked/broken/pass

2019-03-27 Thread osstest service owner
flight 134140 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/134140/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm broken build-arm64-xs

[Xen-devel] [ovmf baseline-only test] 83833: trouble: blocked/broken

2019-03-27 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 83833 ovmf real [real] http://osstest.xensource.com/osstest/logs/83833/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm

[Xen-devel] [linux-4.9 test] 134117: regressions - trouble: blocked/broken/fail/pass

2019-03-27 Thread osstest service owner
flight 134117 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/134117/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvopsbroken build-arm64

  1   2   >