Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-09-13 Thread Jan Beulich
On 12.09.2019 20:03, Joe Jin wrote: > With below testcase, guest kernel reported "No irq handler for vector": > 1). Passthrough mlx ib VF to 2 pvhvm guests. > 2). Start rds-stress between 2 guests. > 3). Scale down 2 guests vcpu from 32 to 6 at the same time. > > Repeat above test several it

Re: [Xen-devel] [PATCH v10 12/16] x86/microcode: Synchronize late microcode loading

2019-09-13 Thread Jan Beulich
On 13.09.2019 09:01, Chao Gao wrote: > On Thu, Sep 12, 2019 at 05:32:22PM +0200, Jan Beulich wrote: >> On 12.09.2019 09:22, Chao Gao wrote: >>> +static int secondary_thread_fn(void) >>> +{ >>> +unsigned int primary = cpumask_first(this_cpu(cpu_sibling_mask)); >>> + >>> +if ( !wait_for_state

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

2019-09-13 Thread osstest service owner
flight 141263 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141263/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

Re: [Xen-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-13 Thread Paul Durrant
> -Original Message- > From: Xen-devel On Behalf Of Paul > Durrant > Sent: 12 September 2019 16:16 > To: Anthony Perard > Cc: xen-devel@lists.xenproject.org; Stefano Stabellini > ; qemu-de...@nongnu.org > Subject: Re: [Xen-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in > XenB

[Xen-devel] [PATCH v3 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-13 Thread Paul Durrant
Cleaning up offline XenDevice objects directly in xen_device_backend_changed() is dangerous as xen_device_unrealize() will modify the watch list that is being walked. Even the QLIST_FOREACH_SAFE() used in notifier_list_notify() is insufficient as *two* notifiers (for the frontend and backend watche

[Xen-devel] [PATCH v3 1/3] xen / notify: introduce a new XenWatchList abstraction

2019-09-13 Thread Paul Durrant
Xenstore watch call-backs are already abstracted away from XenBus using the XenWatch data structure but the associated NotifierList manipulation and file handle registration is still open coded in various xen_bus_...() functions. This patch creates a new XenWatchList data structure to allow these i

[Xen-devel] [PATCH v3 0/3] xen: fix a potential crash in xen-bus

2019-09-13 Thread Paul Durrant
This series fixes a potential segfault caused by NotifierList corruption in xen-bus. The first two patches lay the groundwork and the third actually fixes the problem. Paul Durrant (3): xen / notify: introduce a new XenWatchList abstraction xen: introduce separate XenWatchList for XenDevice ob

[Xen-devel] [PATCH v3 2/3] xen: introduce separate XenWatchList for XenDevice objects

2019-09-13 Thread Paul Durrant
This patch uses the XenWatchList abstraction to add a separate watch list for each device. This is more scalable than walking a single notifier list for all watches and is also necessary to implement a bug-fix in a subsequent patch. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc:

Re: [Xen-devel] [PATCH] xen: fix arm build with debugtrace configured

2019-09-13 Thread Julien Grall
Hi Jan, On 13/09/2019 07:13, Jan Beulich wrote: On 13.09.2019 07:44, Juergen Gross wrote: Add missing #includes. Signed-off-by: Juergen Gross Acked-by: Jan Beulich Albeit for the future it would be nice if the connection to the actual breakage was established in the description, by mentio

Re: [Xen-devel] [PATCH v10 00/16] improve late microcode loading

2019-09-13 Thread Jan Beulich
On 12.09.2019 09:22, Chao Gao wrote: > This series includes below changes: > 1. Patch 1-11: introduce a global microcode cache and some cleanup > 2. Patch 12: synchronize late microcode loading > 3. Patch 13: support parallel microcodes update on different cores > 4. Patch 14: block #NMI handli

Re: [Xen-devel] [PATCH v10 14/16] microcode: rendezvous CPUs in NMI handler and load ucode

2019-09-13 Thread Jan Beulich
On 12.09.2019 09:22, Chao Gao wrote: > When one core is loading ucode, handling NMI on sibling threads or > on other cores in the system might be problematic. By rendezvousing > all CPUs in NMI handler, it prevents NMI acceptance during ucode > loading. > > Basically, some work previously done in

Re: [Xen-devel] [PATCH v10 14/16] microcode: rendezvous CPUs in NMI handler and load ucode

2019-09-13 Thread Jan Beulich
On 12.09.2019 09:22, Chao Gao wrote: > @@ -419,14 +465,23 @@ static int control_thread_fn(const struct > microcode_patch *patch) > return ret; > } > > -/* Let primary threads load the given ucode update */ > -set_state(LOADING_ENTER); > - > +/* Control thread loads ucod

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

2019-09-13 Thread Jan Beulich
On 12.09.2019 09:22, Chao Gao wrote: > @@ -283,6 +284,27 @@ static enum microcode_match_result compare_patch( > : OLD_UCODE; > } > > +static bool is_blacklisted(void) > +{ > +struct cpuinfo_x86 *c = ¤t_cpu_data; > +uint64_t ll

Re: [Xen-devel] [PATCH v10 16/16] microcode/intel: writeback and invalidate cache conditionally

2019-09-13 Thread Jan Beulich
On 12.09.2019 09:22, Chao Gao wrote: > --- a/xen/arch/x86/microcode_intel.c > +++ b/xen/arch/x86/microcode_intel.c > @@ -305,6 +305,31 @@ static bool is_blacklisted(void) > return false; > } > > +static void microcode_quirk(void) > +{ > +struct cpuinfo_x86 *c; const > +uint64_t ll

Re: [Xen-devel] [PATCH v2 26/48] xen/sched: rework and rename vcpu_force_reschedule()

2019-09-13 Thread Juergen Gross
On 10.09.19 16:06, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: vcpu_force_reschedule() is only used for modifying the periodic timer of a vcpu. I don't think this is true prior to this patch, or else ... @@ -419,8 +419,6 @@ int pv_shim_shutdown(uint8_t reason) i

Re: [Xen-devel] [PATCH v2 26/48] xen/sched: rework and rename vcpu_force_reschedule()

2019-09-13 Thread Jan Beulich
On 13.09.2019 11:33, Juergen Gross wrote: > On 10.09.19 16:06, Jan Beulich wrote: >> On 09.08.2019 16:58, Juergen Gross wrote: >>> vcpu_force_reschedule() is only used for modifying the periodic timer >>> of a vcpu. >> >> I don't think this is true prior to this patch, or else ... >> >>> @@ -419,8

[Xen-devel] [PATCH v10 0/6] add per-domain IOMMU control

2019-09-13 Thread Paul Durrant
These are revisions of the remaining uncommitted patches from my previous series: https://lists.xenproject.org/archives/html/xen-devel/2019-08/msg01737.html Paul Durrant (6): domain: introduce XEN_DOMCTL_CDF_iommu flag use is_iommu_enabled() where appropriate... sysctl / libxl: report wheth

[Xen-devel] [PATCH v10 4/6] remove late (on-demand) construction of IOMMU page tables

2019-09-13 Thread Paul Durrant
Now that there is a per-domain IOMMU-enable flag, which should be set if any device is going to be passed through, stop deferring page table construction until the assignment is done. Also don't tear down the tables again when the last device is de-assigned; defer that task until domain destruction

[Xen-devel] [PATCH v10 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Paul Durrant
This patch defines a new bit reported in the hw_cap field of struct xen_sysctl_physinfo to indicate whether the platform supports sharing of HAP page tables (i.e. the P2M) with the IOMMU. This informs the toolstack whether the domain needs extra memory to store discrete IOMMU page tables or not. N

[Xen-devel] [PATCH v10 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros

2019-09-13 Thread Paul Durrant
Thes macros really ought to live in the common xen/iommu.h header rather then being distributed amongst architecture specific iommu headers and xen/sched.h. This patch moves them there. NOTE: Disabling 'sharept' in the command line iommu options should really be hard error on ARM (as opposed

[Xen-devel] [PATCH v10 2/6] use is_iommu_enabled() where appropriate...

2019-09-13 Thread Paul Durrant
...rather than testing the global iommu_enabled flag and ops pointer. Now that there is a per-domain flag indicating whether the domain is permitted to use the IOMMU (which determines whether the ops pointer will be set), many tests of the global iommu_enabled flag and ops pointer can be translate

[Xen-devel] [PATCH v10 6/6] introduce a 'passthrough' configuration option to xl.cfg...

2019-09-13 Thread Paul Durrant
...and hence the ability to disable IOMMU mappings, and control EPT sharing. This patch introduces a new 'libxl_passthrough' enumeration into libxl_domain_create_info. The value will be set by xl either when it parses a new 'passthrough' option in xl.cfg, or implicitly if there is passthrough hard

[Xen-devel] [PATCH v10 1/6] domain: introduce XEN_DOMCTL_CDF_iommu flag

2019-09-13 Thread Paul Durrant
This patch introduces a common domain creation flag to determine whether the domain is permitted to make use of the IOMMU. Currently the flag is always set for both dom0 and any domU created by libxl if the IOMMU is globally enabled (i.e. iommu_enabled == 1). sanitise_domain_config() is modified to

Re: [Xen-devel] [PATCH v5 5/5] xen: add function name to lock profiling data

2019-09-13 Thread Jan Beulich
On 12.09.2019 15:28, Juergen Gross wrote: > --- a/xen/common/spinlock.c > +++ b/xen/common/spinlock.c > @@ -348,6 +348,7 @@ static s_time_t lock_profile_start; > static struct lock_profile_anc *lock_profile_ancs; > static struct lock_profile_qhead lock_profile_glb_q; > static spinlock_t lock_pro

Re: [Xen-devel] [PATCH] livepatch: always print XENLOG_ERR information (ARM, ELF)

2019-09-13 Thread Ross Lagerwall
On 8/21/19 11:04 AM, Pawel Wieczorkiewicz wrote: This complements [1] commit for ARM and livepatch_elf files. [1] 4470efeae4 livepatch: always print XENLOG_ERR information Signed-off-by: Pawel Wieczorkiewicz --- xen/arch/arm/arm32/livepatch.c | 28 +-- xen/arch/arm/arm64/livepatch.

Re: [Xen-devel] [PATCH v10 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros

2019-09-13 Thread Jan Beulich
On 13.09.2019 11:47, Paul Durrant wrote: > --- a/xen/include/xen/iommu.h > +++ b/xen/include/xen/iommu.h > @@ -56,8 +56,10 @@ extern bool_t iommu_enable, iommu_enabled; > extern bool_t force_iommu, iommu_verbose, iommu_igfx; > extern bool_t iommu_snoop, iommu_qinval, iommu_intremap, iommu_intpost

Re: [Xen-devel] [PATCH v10 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros

2019-09-13 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 13 September 2019 11:05 > To: Paul Durrant > Cc: xen-devel@lists.xenproject.org; Julien Grall ; > Andrew Cooper > ; Roger Pau Monne ; > Volodymyr Babchuk > ; George Dunlap ; Ian > Jackson > ; Stefano Stabellini ; Konrad > Rzeszutek Wilk

Re: [Xen-devel] [PATCH v5 5/5] xen: add function name to lock profiling data

2019-09-13 Thread Juergen Gross
On 13.09.19 11:53, Jan Beulich wrote: On 12.09.2019 15:28, Juergen Gross wrote: --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -348,6 +348,7 @@ static s_time_t lock_profile_start; static struct lock_profile_anc *lock_profile_ancs; static struct lock_profile_qhead lock_profile_glb

Re: [Xen-devel] [PATCH] xen: xen-pciback: Reset MSI-X state when exposing a device

2019-09-13 Thread Spassov, Stanislav
On Thu, Dec 13, 2018 at 07:54, Chao Gao wrote: >On Thu, Dec 13, 2018 at 12:54:52AM -0700, Jan Beulich wrote: > On 13.12.18 at 04:46, wrote: >>> On Wed, Dec 12, 2018 at 08:21:39AM -0700, Jan Beulich wrote: >>> On 12.12.18 at 16:18, wrote: > On Wed, Dec 12, 2018 at 01:51:01AM -0700, Jan

[Xen-devel] [PATCH] tools/ocaml: abi check: Cope with consecutive relevant enums

2019-09-13 Thread Ian Jackson
If the end of one enum is the `type' line for the next enum, we would not notice it. Fix this by reordering the code, and getting rid of the else: now if the "we are within an enum" branch decides that it's the end of the enum, it unsets $ei and we then immediately process the line as a "not withi

Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-09-13 Thread Roger Pau Monné
On Thu, Sep 12, 2019 at 11:03:14AM -0700, Joe Jin wrote: > With below testcase, guest kernel reported "No irq handler for vector": > 1). Passthrough mlx ib VF to 2 pvhvm guests. > 2). Start rds-stress between 2 guests. > 3). Scale down 2 guests vcpu from 32 to 6 at the same time. > > Repeat

Re: [Xen-devel] [PATCH v10 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros

2019-09-13 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 13 September 2019 11:05 > To: Paul Durrant > Cc: xen-devel@lists.xenproject.org; Julien Grall ; > Andrew Cooper > ; Roger Pau Monne ; > Volodymyr Babchuk > ; George Dunlap ; Ian > Jackson > ; Stefano Stabellini ; Konrad > Rzeszutek Wilk

[Xen-devel] [PATCH for-4.13] xen/arm: Add Skeleton for using configuring early printk using Kconfig

2019-09-13 Thread Julien Grall
At the moment, early printk can only be configured on the make command line. It is not very handy because a user has to remove the option everytime it is using another command other than compiling the hypervisor. Furthermore, early printk is one of the few odds one that are not using Kconfig. So

[Xen-devel] [PATCH v11 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros

2019-09-13 Thread Paul Durrant
Thes macros really ought to live in the common xen/iommu.h header rather then being distributed amongst architecture specific iommu headers and xen/sched.h. This patch moves them there. NOTE: Disabling 'sharept' in the command line iommu options should really be hard error on ARM (as opposed

[Xen-devel] [PATCH v11 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Paul Durrant
This patch defines a new bit reported in the hw_cap field of struct xen_sysctl_physinfo to indicate whether the platform supports sharing of HAP page tables (i.e. the P2M) with the IOMMU. This informs the toolstack whether the domain needs extra memory to store discrete IOMMU page tables or not. N

[Xen-devel] [PATCH v11 6/6] introduce a 'passthrough' configuration option to xl.cfg...

2019-09-13 Thread Paul Durrant
...and hence the ability to disable IOMMU mappings, and control EPT sharing. This patch introduces a new 'libxl_passthrough' enumeration into libxl_domain_create_info. The value will be set by xl either when it parses a new 'passthrough' option in xl.cfg, or implicitly if there is passthrough hard

[Xen-devel] [PATCH v11 4/6] remove late (on-demand) construction of IOMMU page tables

2019-09-13 Thread Paul Durrant
Now that there is a per-domain IOMMU-enable flag, which should be set if any device is going to be passed through, stop deferring page table construction until the assignment is done. Also don't tear down the tables again when the last device is de-assigned; defer that task until domain destruction

[Xen-devel] [PATCH v11 0/6] add per-domain IOMMU control

2019-09-13 Thread Paul Durrant
These are revisions of the remaining uncommitted patches from my previous series: https://lists.xenproject.org/archives/html/xen-devel/2019-08/msg01737.html This series (particlarly patch #6) needs to be applied after: https://lists.xenproject.org/archives/html/xen-devel/2019-09/msg01204.html t

[Xen-devel] [PATCH v11 1/6] domain: introduce XEN_DOMCTL_CDF_iommu flag

2019-09-13 Thread Paul Durrant
This patch introduces a common domain creation flag to determine whether the domain is permitted to make use of the IOMMU. Currently the flag is always set for both dom0 and any domU created by libxl if the IOMMU is globally enabled (i.e. iommu_enabled == 1). sanitise_domain_config() is modified to

[Xen-devel] [PATCH v11 2/6] use is_iommu_enabled() where appropriate...

2019-09-13 Thread Paul Durrant
...rather than testing the global iommu_enabled flag and ops pointer. Now that there is a per-domain flag indicating whether the domain is permitted to use the IOMMU (which determines whether the ops pointer will be set), many tests of the global iommu_enabled flag and ops pointer can be translate

[Xen-devel] [PATCH v11.1 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Jan Beulich
This patch defines a new bit reported in the hw_cap field of struct xen_sysctl_physinfo to indicate whether the platform supports sharing of HAP page tables (i.e. the P2M) with the IOMMU. This informs the toolstack whether the domain needs extra memory to store discrete IOMMU page tables or not. N

Re: [Xen-devel] [RFC] Generating Go bindings for libxl

2019-09-13 Thread George Dunlap
On 9/12/19 6:35 PM, Nicholas Rosbrook wrote: > I'm not strongly opposed to the struct duplication, but I do prefer the > ability > to perform type assertions as a way to determine which field is "valid." Fair enough. >> So the advantage of this is that you can just call: >> >>     fromC(&di, &cd

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

2019-09-13 Thread osstest service owner
flight 141269 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141269/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

Re: [Xen-devel] [PATCH v11.1 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 13 September 2019 12:10 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Suravee Suthikulpanit ; Julien Grall > ; Andrew > Cooper ; Anthony Perard > ; Christian Lindig > ; Roger Pau Monne ; George > Dunlap > ; Ian Jackson ; Kevin

[Xen-devel] [PATCH] xen/sched: rework and rename vcpu_force_reschedule()

2019-09-13 Thread Juergen Gross
vcpu_force_reschedule() is only used for modifying the periodic timer of a vcpu. Forcing a vcpu to give up the physical cpu for that purpose is kind of brutal. So instead of doing the reschedule dance just operate on the timer directly. By protecting periodic timer modifications against concurrent

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

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

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

2019-09-13 Thread osstest service owner
flight 141252 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/141252/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 20 guest-start/debian.repeat fail REGR. vs. 139876 test-amd64-i386-xl

Re: [Xen-devel] [PATCH v2 27/48] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-13 Thread Juergen Gross
On 10.09.19 17:11, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -733,35 +733,40 @@ void vcpu_unblock(struct vcpu *v) } /* - * Do the actual movement of a vcpu from old to new CPU. Locks for *both* + * Do the actua

[Xen-devel] [PATCH net-next] MAINTAINERS: xen-netback: update my email address

2019-09-13 Thread Paul Durrant
My Citrix email address will expire shortly. Signed-off-by: Paul Durrant -- Cc: Wei Liu --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index e7a47b5210fd..b36d51f0fe5c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17646,7 +17646,7

Re: [Xen-devel] [PATCH v2 28/48] xen/sched: move struct task_slice into struct sched_unit

2019-09-13 Thread Juergen Gross
On 10.09.19 17:18, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: In order to prepare for multiple vcpus per schedule unit move struct task_slice in schedule() from the local stack into struct sched_unit of the currently running unit. The change looks mechanical enough to be prob

Re: [Xen-devel] [PATCH v2 29/48] xen/sched: add code to sync scheduling of all vcpus of a sched unit

2019-09-13 Thread Juergen Gross
On 10.09.19 17:36, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: +static bool sched_tasklet_check(unsigned int cpu) +{ +bool tasklet_work_scheduled = false; +const cpumask_t *mask = get_sched_res(cpu)->cpus; +int cpu_iter; unsigned int ? Yes. +static void conte

Re: [Xen-devel] [RFC] Generating Go bindings for libxl

2019-09-13 Thread Nicholas Rosbrook
> FWIW checked with Ian after I wrote this mail, and he confirmed that > that field (`link` in `libxl_event`) was only meant to be used > internally, and ideally we wouldn't even have that available in the Go > version of the struct (since it's not actually part of the public > interface). > > Unf

Re: [Xen-devel] [PATCH v11.1 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Jan Beulich
On 13.09.2019 13:47, Paul Durrant wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 13 September 2019 12:10 >> To: Paul Durrant ; xen-devel@lists.xenproject.org >> Cc: Suravee Suthikulpanit ; Julien Grall >> ; Andrew >> Cooper ; Anthony Perard >> ; Christian Lindig >> ; Roger Pa

Re: [Xen-devel] [PATCH v11.1 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Roger Pau Monné
On Fri, Sep 13, 2019 at 01:10:18PM +0200, Jan Beulich wrote: > --- a/tools/ocaml/libs/xc/xenctrl.mli > +++ b/tools/ocaml/libs/xc/xenctrl.mli > @@ -57,7 +57,6 @@ type domain_create_flag = >| CDF_OOS_OFF >| CDF_XS_DOMAIN >| CDF_IOMMU > - Stray deletion? > --- a/xen/include/public/sysctl

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

2019-09-13 Thread osstest service owner
flight 141254 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/141254/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-build fail in 141237 REGR. vs. 140844 Tests which are faili

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Juergen Gross
On 11.09.19 12:30, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -266,7 +266,7 @@ static inline void sched_unit_runstate_change(struct sched_unit *unit, struct vcpu *v = unit->vcpu_list; if ( running ) -

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Juergen Gross
On 12.09.19 12:24, Dario Faggioli wrote: On Fri, 2019-08-09 at 16:58 +0200, 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). With core sched

Re: [Xen-devel] [PATCH v11.1 3/6] sysctl / libxl: report whether IOMMU/HAP page table sharing is supported

2019-09-13 Thread Paul Durrant
> -Original Message- > From: Roger Pau Monne > Sent: 13 September 2019 14:54 > To: Jan Beulich > Cc: Paul Durrant ; xen-devel@lists.xenproject.org; > Suravee Suthikulpanit > ; Julien Grall ; Andrew > Cooper > ; Anthony Perard ; > Christian Lindig > ; George Dunlap ; Ian > Jackson > ;

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

2019-09-13 Thread osstest service owner
flight 141274 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141274/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

Re: [Xen-devel] [PATCH] xen/sched: rework and rename vcpu_force_reschedule()

2019-09-13 Thread Jan Beulich
On 13.09.2019 14:14, Juergen Gross wrote: > --- > - Carved out from my core scheduling series > - Reworked to avoid deadlock when 2 vcpus are trying to modify each > others periodic timers, leading to address all comments by Jan > Beulich. Oh, indeed - a mutual vcpu_pause() can't end well. >

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Jan Beulich
On 13.09.2019 16:07, Juergen Gross wrote: > On 11.09.19 12:30, Jan Beulich wrote: >> On 09.08.2019 16:58, Juergen Gross wrote: >>> --- a/xen/include/xen/sched.h >>> +++ b/xen/include/xen/sched.h >>> @@ -174,6 +174,7 @@ struct vcpu >>> XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t) compat;

[Xen-devel] [PATCH 00/11] OvmfPkg/XenBusDxe: Fix ExitBootServices handler to avoid allocation

2019-09-13 Thread Anthony PERARD
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2190 Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/ovmf.git br.xenbusdxe-fix-exitbootservices-v1 Hi, This patch series works toward removing usage of Memory Allocation Services in XenBusDxe when Exi

[Xen-devel] [PATCH 04/11] OvmfPkg/XenBusDxe: Avoid Allocate in XenStoreVSPrint

2019-09-13 Thread Anthony PERARD
In order to be able to use XenStoreVSPrint during the ExitBootServices, we remove the allocation done by the function and use the stack instead. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2190 Signed-off-by: Anthony PERARD --- OvmfPkg/XenBusDxe/XenStore.c | 21 + 1 f

[Xen-devel] [PATCH 01/11] OvmfPkg/XenBusDxe: Fix missing \n in DEBUG messages

2019-09-13 Thread Anthony PERARD
Fix missing \n in DEBUG messages in XenBusDxe and use DEBUG_*. Signed-off-by: Anthony PERARD --- OvmfPkg/XenBusDxe/EventChannel.c | 3 ++- OvmfPkg/XenBusDxe/XenStore.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/XenBusDxe/EventChannel.c b/OvmfPkg/XenBus

[Xen-devel] [PATCH 02/11] OvmfPkg/XenBusDxe: Have XenStoreFindWatch take a pointer

2019-09-13 Thread Anthony PERARD
Rework XenStoreFindWatch() to be able to search for a registered watch with a pointer instead of a string. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2190 Signed-off-by: Anthony PERARD --- OvmfPkg/XenBusDxe/XenStore.c | 20 +++- 1 file changed, 11 insertions(+), 9 deleti

[Xen-devel] [PATCH 03/11] OvmfPkg/XenBusDxe: Rework watch events reception

2019-09-13 Thread Anthony PERARD
This patch rework the reception of xenstore watch event to avoid allocation. Instead of queuing watch events, we simply mark a XENSTORE_WATCH as "triggered". We don't need to know how many time we received the event, only that it happened. That avoid to allocate a XENSTORE_MESSAGE for every watch

[Xen-devel] [PATCH 06/11] OvmfPkg/XenBusDxe: Rework XenStoreProcessMessage to avoid allocating memory

2019-09-13 Thread Anthony PERARD
This patch rework XenStoreProcessMessage in order to avoid memory allocation when a reply is expected. Instead of allocating a buffer for this reply, we are going to copy to a buffer passed by the caller. For messages that aren't fully received, they will be stored in a buffer that have been alloca

[Xen-devel] [PATCH 08/11] OvmfPkg/XenBus: Change XENBUS_PROTOCOL to not return allocated memory

2019-09-13 Thread Anthony PERARD
XsRead and XsBackendRead of the XENBUS_PROTOCOL return allocated memory but this isn't allowed during the ExitBootServices call. We need XsRead and XsBackendRead to disconnect from the device so XENBUS_PROTOCOL is changed to use a buffer supplied by a child driver. Ref: https://bugzilla.tianocore.

[Xen-devel] [PATCH 07/11] OvmfPkg/XenBusDxe: Use on stack buffer in internal functions

2019-09-13 Thread Anthony PERARD
We will use a buffer on the stack instead of allocating memory for internal functions that are expecting a reply from xenstore. The external interface XENBUS_PROTOCOL isn't changed yet, so allocation are made for XsRead and XsBackendRead. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2190 S

[Xen-devel] [PATCH 09/11] OvmfPkg/XenBusDxe: Fix NotifyExitBoot to avoid Memory Allocation Services

2019-09-13 Thread Anthony PERARD
This patch fix the EVT_SIGNAL_EXIT_BOOT_SERVICES handler to avoid using the Memory Allocation Services. This comes with a new interface named RegisterExitCallback so that PV drivers can disconnect from the backend before XenBusDxe is teared down. Instead of using Disconnect() to tear down the Xen

[Xen-devel] [PATCH 05/11] OvmfPkg/XenBusDxe: Construct paths without allocation

2019-09-13 Thread Anthony PERARD
When doing an action with a path and subpath in the xenstore, XenStoreJoin is called to generate "$path/$subpath". But this function do an allocation of memory which isn't necessary. Instead we will construct the path with WRITE_REQUEST and data used to generate the path will be copied directly to

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

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

Re: [Xen-devel] [PATCH] xen/sched: rework and rename vcpu_force_reschedule()

2019-09-13 Thread Juergen Gross
On 13.09.19 16:42, Jan Beulich wrote: On 13.09.2019 14:14, Juergen Gross wrote: --- - Carved out from my core scheduling series - Reworked to avoid deadlock when 2 vcpus are trying to modify each others periodic timers, leading to address all comments by Jan Beulich. Oh, indeed - a mutua

Re: [Xen-devel] [PATCH v2 31/48] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-13 Thread Juergen Gross
On 11.09.19 12:43, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: V1: - add special handling for idle unit in unit_runnable() and unit_runnable_state() Why was this done? Isn't vcpu_runnable() going to always return true for idle vCPU-s? The problem is the for_each_sched_uni

[Xen-devel] [PATCH 10/11] OvmfPkg/XenPvBlkDxe: Use XenBusIo->RegisterExitCallback

2019-09-13 Thread Anthony PERARD
In order to be able to reset the backend before handing it to the next operating system, it should be reset properly. This patch register a callback function to be called by XenBusDxe during the ExitBootServices event. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2190 Signed-off-by: Anthony

[Xen-devel] [PATCH 11/11] OvmfPkg/XenBusDxe: Fix XenStoreWaitForEvent use during EBS

2019-09-13 Thread Anthony PERARD
XenStoreWaitForEvent is going to be called when the ExitBootServices is signaled, but both CreateEvent and WaitForEvent can't be used. CreateEvent allocate some memory and WaitForEvent can only be used when TPL is TPL_APPLICATION. When ExitBootServices has been called, simply return immediately an

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-13 Thread Juergen Gross
On 13.09.19 16:44, Jan Beulich wrote: On 13.09.2019 16:07, Juergen Gross wrote: On 11.09.19 12:30, Jan Beulich wrote: On 09.08.2019 16:58, Juergen Gross wrote: --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -174,6 +174,7 @@ struct vcpu XEN_GUEST_HANDLE(vcpu_runstate_

Re: [Xen-devel] [PATCH] xen: xen-pciback: Reset MSI-X state when exposing a device

2019-09-13 Thread Chao Gao
On Fri, Sep 13, 2019 at 10:02:24AM +, Spassov, Stanislav wrote: >On Thu, Dec 13, 2018 at 07:54, Chao Gao wrote: >>On Thu, Dec 13, 2018 at 12:54:52AM -0700, Jan Beulich wrote: >> On 13.12.18 at 04:46, wrote: On Wed, Dec 12, 2018 at 08:21:39AM -0700, Jan Beulich wrote: On 12.12

Re: [Xen-devel] [PATCH net-next] MAINTAINERS: xen-netback: update my email address

2019-09-13 Thread Wei Liu
On Fri, 13 Sep 2019 at 13:47, Paul Durrant wrote: > > My Citrix email address will expire shortly. > > Signed-off-by: Paul Durrant Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listin

Re: [Xen-devel] [PATCH net-next] MAINTAINERS: xen-netback: update my email address

2019-09-13 Thread Wei Liu
On Fri, 13 Sep 2019 at 16:28, Wei Liu wrote: > > On Fri, 13 Sep 2019 at 13:47, Paul Durrant wrote: > > > > My Citrix email address will expire shortly. > > > > Signed-off-by: Paul Durrant > > Acked-by: Wei Liu Or rather: Acked-by: Wei Liu ___ Xen-

[Xen-devel] [PATCH V4 1/8] iommu/arm: Add iommu_helpers.c file to keep common for IOMMUs stuff

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Introduce a separate file to keep various helpers which could be used by more than one IOMMU driver in order not to duplicate code. The first candidates to be moved to the new file are SMMU driver's "map_page/unmap_page" callbacks. These callbacks neither contain any S

[Xen-devel] [PATCH V4 2/8] iommu/arm: Add ability to handle deferred probing request

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch adds minimal required support to General IOMMU framework to be able to handle a case when IOMMU driver requesting deferred probing for a device. In order not to pull Linux's error code (-EPROBE_DEFER) to Xen we have chosen -EAGAIN to be used for indicating t

[Xen-devel] [PATCH V4 0/8] iommu/arm: Add Renesas IPMMU-VMSA support + Linux's iommu_fwspec

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko The purpose of this patch series is to add IPMMU-VMSA support to Xen on ARM. Besides new IOMMU driver, this series contains "iommu_fwspec" support and new API iommu_add_dt_device() for adding DT device to IOMMU and many other things. The IPMMU-VMSA is VMSA-compatible

[Xen-devel] [PATCH V4 3/8] iommu/arm: Order the headers alphabetically in iommu.c

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Clean up the code a bit by putting the headers in alphabetical order. Signed-off-by: Oleksandr Tyshchenko --- xen/drivers/passthrough/arm/iommu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drive

[Xen-devel] [PATCH V4 5/8] xen/common: Introduce xrealloc_flex_struct() helper macros

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch introduces type-safe helper macros to re-allocate space for a structure with a flexible array of typed objects. For example, if we need to re-size an array with a single element: struct arrlen { size_t len; int data[1]; }; We can use t

[Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko We need to have some abstract way to add new device to the IOMMU based on the generic IOMMU DT bindings [1] which can be used for both DT (right now) and ACPI (in future). For that reason we can borrow the idea used in Linux these days called "iommu_fwspec". Having thi

[Xen-devel] [PATCH V4 4/8] xen/common: Introduce _xrealloc function

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch introduces type-unsafe function which besides re-allocation handles the following corner cases: 1. if requested size is zero, it will behave like xfree 2. if incoming pointer is not valid (NULL or ZERO_BLOCK_PTR), it will behave like xmalloc If both point

[Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko The main puprose of this patch is to add a way to register DT device (which is behind the IOMMU) using the generic IOMMU DT bindings [1] before assigning that device to a domain. So, this patch adds new "iommu_add_dt_device" API for adding DT device to the IOMMU using

[Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-13 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation and access protection functionalities to processing units and interconnect networks. Please note, current driver is supposed to work only with newest R-Car Gen3 SoCs

Re: [Xen-devel] [PATCH v3 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-13 Thread Anthony PERARD
On Fri, Sep 13, 2019 at 09:21:58AM +0100, Paul Durrant wrote: > Cleaning up offline XenDevice objects directly in > xen_device_backend_changed() is dangerous as xen_device_unrealize() will > modify the watch list that is being walked. Even the QLIST_FOREACH_SAFE() > used in notifier_list_notify() i

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

2019-09-13 Thread Andrew Cooper
Message such as: (XEN) d3v0 VIRIDIAN CRASH: 51 1 9700e146b000 1000 204 have confused many people into thinking the the problem is a bug in the viridian code. The prefix was intended to signify the use of the viridian crash-reporting interface. Replace the VIRIDIAN prefix with 'reported' t

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

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

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

2019-09-13 Thread Oleksandr
Hi, Juergen I have just pushed new version, so please update === ARM === *  Renesas IPMMU-VMSA support + Linux's iommu_fwspec (V4)    -  Oleksandr Tyshchenko -- Regards, Oleksandr Tyshchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject

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

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

Re: [Xen-devel] [PATCH v11 6/6] introduce a 'passthrough' configuration option to xl.cfg...

2019-09-13 Thread Anthony PERARD
On Fri, Sep 13, 2019 at 11:58:26AM +0100, Paul Durrant wrote: > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 12545130df..e4b9c539b6 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -415,6 +415,15 @@ > */ > #define LIBXL_HAVE_BUILDINFO_IOMMU_MEMKB 1 > > +/*

Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-09-13 Thread Joe Jin
Hi Jan, Thanks for your reply, see my reply in line please. On 9/13/19 12:14 AM, Jan Beulich wrote: > On 12.09.2019 20:03, Joe Jin wrote: >> With below testcase, guest kernel reported "No irq handler for vector": >> 1). Passthrough mlx ib VF to 2 pvhvm guests. >> 2). Start rds-stress between

Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-09-13 Thread Joe Jin
On 9/13/19 3:33 AM, Roger Pau Monné wrote: > On Thu, Sep 12, 2019 at 11:03:14AM -0700, Joe Jin wrote: >> With below testcase, guest kernel reported "No irq handler for vector": >> 1). Passthrough mlx ib VF to 2 pvhvm guests. >> 2). Start rds-stress between 2 guests. >> 3). Scale down 2 guests

Re: [Xen-devel] [PATCH v3 1/4] xen/sched: populate cpupool0 only after all cpus are up

2019-09-13 Thread Dario Faggioli
On Mon, 2019-09-09 at 11:33 +0200, Juergen Gross wrote: > Simplify cpupool initialization by populating cpupool0 with cpus only > after all cpus are up. This avoids having to call the cpu notifier > directly for cpu 0. > > With that in place there is no need to create cpupool0 earlier, so > do tha

Re: [Xen-devel] [PATCH v3 2/4] xen/sched: remove cpu from pool0 before removing it

2019-09-13 Thread Dario Faggioli
On Mon, 2019-09-09 at 11:33 +0200, Juergen Gross wrote: > Today a cpu which is removed from the system is taken directly from > Pool0 to the offline state. This will conflict with the new idle > scheduler, so remove it from Pool0 first. Additionally accept > removing > a free cpu instead of requiri

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

2019-09-13 Thread osstest service owner
flight 141279 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141279/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

  1   2   >