Re: [Xen-devel] [PATCH] EFI: add efi=mapbs option and parse efi= early

2019-08-09 Thread Jan Beulich
On 08.08.2019 18:08, Marek Marczykowski-Górecki wrote: On Thu, Aug 08, 2019 at 03:25:19PM +, Jan Beulich wrote: On 08.08.2019 11:21, Marek Marczykowski-Górecki wrote: On Thu, Aug 08, 2019 at 08:21:54AM +, Jan Beulich wrote: On 08.08.2019 02:31, Marek Marczykowski-Górecki wrote: ---

Re: [Xen-devel] [PATCH v2] evtchn: make support for different ABIs tunable

2019-08-09 Thread Jan Beulich
On 08.08.2019 20:54, Eslam Elnikety wrote: I take it that the concern here is that whatever changes the patch proposes should play nicely with potential future changes introducing such a generic framework. Any concrete suggestions? Well, involved domctl(s) can be changed at any time, so the mai

[Xen-devel] [linux-linus bisection] complete test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm

2019-08-09 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm testid xen-boot Tree: libvirt git://xenbits.xen.org/libvirt.git Tree: libvirt_gnulib https://git.savannah.gnu.org/git/gnulib.git/ Tree: libvirt_keycodemapdb https://gitlab.com/keycodemap/keycodemapdb.g

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

2019-08-09 Thread Dario Faggioli
On Thu, 2019-08-08 at 13:44 -0700, Stefano Stabellini wrote: > On Thu, 8 Aug 2019, George Dunlap wrote: > > On 8/7/19 7:22 PM, Stefano Stabellini wrote: > > > Hi Dario, George, > > > > > > Dom0less with sched=null is broken on staging, it simply hangs > > > soon > > > after Xen is finished loading

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Roger Pau Monné
On Fri, Aug 09, 2019 at 04:01:37AM +0200, Marek Marczykowski-Górecki wrote: > GCC9 complains about "%.12s" format with an argument having exactly 12 > bytes and no terminating null character. This is intentional > construct, so disable the warning. IIRC this is deemed as a gcc bug, albeit I'm not

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Jan Beulich
On 09.08.2019 09:51, Roger Pau Monné wrote: On Fri, Aug 09, 2019 at 04:01:37AM +0200, Marek Marczykowski-Górecki wrote: GCC9 complains about "%.12s" format with an argument having exactly 12 bytes and no terminating null character. This is intentional construct, so disable the warning. IIRC t

[Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Chao Gao
Hi everyone, I have a device which only supports secondary bus reset. After being assigned to a VM, it would be placed under host bridge. For devices under host bridge, secondary bus reset is not applicable. Thus, a VM has no way to reset this device. This device's usage would be limited without

Re: [Xen-devel] [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-09 Thread Jan Kara
On Wed 07-08-19 19:36:37, Ira Weiny wrote: > On Wed, Aug 07, 2019 at 10:46:49AM +0200, Michal Hocko wrote: > > > So I think your debug option and my suggested renaming serve a bit > > > different purposes (and thus both make sense). If you do the renaming, you > > > can just grep to see unconverted

Re: [Xen-devel] [PATCH v3] x86/atomic: Improvements and simplifications to assembly constraints

2019-08-09 Thread Jan Beulich
On 08.08.2019 17:29, Andrew Cooper wrote: * Constraints in the form "=r" (x) : "0" (x) can be folded to just "+r" (x) * Switch to using named parameters (mostly for legibility) which in particular helps with... * __xchg(), __cmpxchg() and __cmpxchg_user() modify their memory operand, so

Re: [Xen-devel] [PATCH 00/34] put_user_pages(): miscellaneous call sites

2019-08-09 Thread Jan Kara
On Thu 08-08-19 16:25:04, Weiny, Ira wrote: > > I thought I'd caught things early enough to get away with the > > rename and deletion of that. You could either: > > > > a) open code an implementation of vaddr_put_pages_dirty_lock() that > > doesn't call any of the *put_user_pages_dirty*() variants

Re: [Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Jan Beulich
On 09.08.2019 10:38, Chao Gao wrote: I have a device which only supports secondary bus reset. After being assigned to a VM, it would be placed under host bridge. For devices under host bridge, secondary bus reset is not applicable. Thus, a VM has no way to reset this device. This device's usage

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

2019-08-09 Thread osstest service owner
flight 139843 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/139843/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 35ec41803c33cb3b6977f5dd8e5c0cc3ff2bbcea baseline version: ovmf 111bbcf87621953dc6cef

Re: [Xen-devel] [PATCH 0/3] xen/sched: use new idle scheduler for free cpus

2019-08-09 Thread Juergen Gross
On 02.08.19 15:07, Juergen Gross wrote: These three patches have been carved out from my core scheduling series as they are sufficiently independent to be applied even without the big series. Without this little series there are messages like the following to be seen on the console when booting

Re: [Xen-devel] [PATCH V2 6/6] iommu/arm: Add Renesas IPMMU-VMSA support

2019-08-09 Thread Julien Grall
(+ Robin) On 09/08/2019 00:32, Oleksandr Tyshchenko wrote: Hi Julien. Hi, Sorry for the possible format issues. чт, 8 авг. 2019 г., 23:32 Julien Grall >: Hi Oleksandr, On 8/8/19 8:29 PM, Oleksandr wrote: >> >>> Sorry for the possibl

Re: [Xen-devel] [PATCH v4 1/6] xen/arm: introduce p2m_is_mmio

2019-08-09 Thread Julien Grall
Hi Stefano, On 07/08/2019 01:23, Stefano Stabellini wrote: Add a p2m_is_mmio macro for easy checkings. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall Cheers, --- xen/include/asm-arm/p2m.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/include/asm-arm/p2m.h b/x

Re: [Xen-devel] [PATCH v4 2/6] xen: add a p2mt parameter to map_mmio_regions

2019-08-09 Thread Julien Grall
Hi, On 07/08/2019 01:23, Stefano Stabellini wrote: Add a p2mt parameter to map_mmio_regions, pass p2m_mmio_direct_dev on ARM and p2m_mmio_direct on x86 -- no changes in behavior. On x86, introduce a macro to strip away the last parameter and rename the existing implementation of map_mmio_region

[Xen-devel] [PATCH v2 0/2] x86/boot: cleanup

2019-08-09 Thread Jan Beulich
This is my slight adjustment of the original patch 4 in Andrew's series, plus a (new) prereq adjustment. I think the result is cleaner overall. 1: x86: define a few selector values 2: x86/desc: Build boot_{,compat_}gdt[] in C Jan ___ Xen-devel mailing

Re: [Xen-devel] [PATCH 0/3] xen/sched: use new idle scheduler for free cpus

2019-08-09 Thread Dario Faggioli
On Fri, 2019-08-09 at 11:47 +0200, Juergen Gross wrote: > On 02.08.19 15:07, Juergen Gross wrote: > > > > Juergen Gross (3): > >xen/sched: populate cpupool0 only after all cpus are up > >xen/sched: remove cpu from pool0 before removing it > >xen/sched: add minimalistic idle scheduler f

Re: [Xen-devel] [PATCH v4 2/6] xen: add a p2mt parameter to map_mmio_regions

2019-08-09 Thread Jan Beulich
On 09.08.2019 12:23, Julien Grall wrote: On 07/08/2019 01:23, Stefano Stabellini wrote: Add a p2mt parameter to map_mmio_regions, pass p2m_mmio_direct_dev on ARM and p2m_mmio_direct on x86 -- no changes in behavior. On x86, introduce a macro to strip away the last parameter and rename the exist

[Xen-devel] [PATCH v2 1/2] x86: define a few selector values

2019-08-09 Thread Jan Beulich
TSS, LDT, and per-CPU entries all can benefit a little from also having their selector values defined. Signed-off-by: Jan Beulich --- v2: New. --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -761,7 +761,7 @@ void load_system_tables(void) per_cpu(full_gdt_loaded, cpu)

[Xen-devel] [PATCH v2 2/2] x86/desc: Build boot_{, compat_}gdt[] in C

2019-08-09 Thread Jan Beulich
From: Andrew Cooper ... where we can at least get the compiler to fill in the surrounding space without having to do it manually. This also results in the symbols having proper type/size information in the debug symbols. Reorder 'raw' in the seg_desc_t union to allow for easier initialisation.

[Xen-devel] [qemu-mainline test] 139835: trouble: broken/fail/pass

2019-08-09 Thread osstest service owner
flight 139835 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/139835/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win10-i386 broken Tests which

Re: [Xen-devel] [PATCH v2 0/2] x86/boot: cleanup

2019-08-09 Thread Jan Beulich
On 09.08.2019 12:34, Jan Beulich wrote: This is my slight adjustment of the original patch 4 in Andrew's series, plus a (new) prereq adjustment. I think the result is cleaner overall. 1: x86: define a few selector values 2: x86/desc: Build boot_{,compat_}gdt[] in C And I realize I should have

Re: [Xen-devel] [PATCH 1/2] python: fix -Wsign-compare warnings

2019-08-09 Thread Ian Jackson
Marek Marczykowski-Górecki writes ("[PATCH 1/2] python: fix -Wsign-compare warnings"): > Specifically: > xen/lowlevel/xc/xc.c: In function ‘pyxc_domain_create’: > xen/lowlevel/xc/xc.c:147:24: error: comparison of integer expressions of > different signedness: ‘int’ and ‘long unsigned int’ [-Werro

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Ian Jackson
Marek Marczykowski-Górecki writes ("[PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow"): > GCC9 complains about "%.12s" format with an argument having exactly 12 > bytes and no terminating null character. This is intentional > construct, so disable the warning. Is there some good reas

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Jan Beulich
On 09.08.2019 12:41, Ian Jackson wrote: Marek Marczykowski-Górecki writes ("[PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow"): GCC9 complains about "%.12s" format with an argument having exactly 12 bytes and no terminating null character. This is intentional construct, so disable

Re: [Xen-devel] [PATCH v4 2/6] xen: add a p2mt parameter to map_mmio_regions

2019-08-09 Thread Julien Grall
Hi, On 09/08/2019 11:37, Jan Beulich wrote: On 09.08.2019 12:23, Julien Grall wrote: On 07/08/2019 01:23, Stefano Stabellini wrote: Add a p2mt parameter to map_mmio_regions, pass p2m_mmio_direct_dev on ARM and p2m_mmio_direct on x86 -- no changes in behavior. On x86, introduce a macro to stri

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Ian Jackson
Jan Beulich writes ("Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow"): > Would you mind clarifying which 12 you mean to change to 13? > The one in "%.12s" would, if changed and afaict, then > legitimately trigger the warning. And we've already objected > to the array

Re: [Xen-devel] [PATCH v4 2/6] xen: add a p2mt parameter to map_mmio_regions

2019-08-09 Thread Jan Beulich
On 09.08.2019 12:51, Julien Grall wrote: Hi, On 09/08/2019 11:37, Jan Beulich wrote: On 09.08.2019 12:23, Julien Grall wrote: On 07/08/2019 01:23, Stefano Stabellini wrote: Add a p2mt parameter to map_mmio_regions, pass p2m_mmio_direct_dev on ARM and p2m_mmio_direct on x86 -- no changes in be

Re: [Xen-devel] [PATCH v4 2/6] xen: add a p2mt parameter to map_mmio_regions

2019-08-09 Thread Jan Beulich
On 07.08.2019 02:23, Stefano Stabellini wrote: Add a p2mt parameter to map_mmio_regions, pass p2m_mmio_direct_dev on ARM and p2m_mmio_direct on x86 -- no changes in behavior. On x86, introduce a macro to strip away the last parameter and rename the existing implementation of map_mmio_regions to

Re: [Xen-devel] [PATCH v4 3/6] xen: extend XEN_DOMCTL_memory_mapping to handle memory policy

2019-08-09 Thread Jan Beulich
On 07.08.2019 02:23, Stefano Stabellini wrote: @@ -950,9 +951,29 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) if ( add ) { printk(XENLOG_G_DEBUG - "memory_map:add: dom%d gfn=%lx mfn=%lx nr=%lx\n", - d->doma

Re: [Xen-devel] [PATCH v2] tools/xenstore: Do not abort xenstore-ls if a node disappears while iterating

2019-08-09 Thread Ian Jackson
David Woodhouse writes ("Re: [PATCH v2] tools/xenstore: Do not abort xenstore-ls if a node disappears while iterating"): > On Wed, 2019-08-07 at 16:37 +0100, Ian Jackson wrote: > > So with a permissions error silently ignored, xenstore-ls might > > silently produce partial output. > > Even withou

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Jan Beulich
On 09.08.2019 13:05, Ian Jackson wrote: Jan Beulich writes ("Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow"): Would you mind clarifying which 12 you mean to change to 13? The one in "%.12s" would, if changed and afaict, then legitimately trigger the warning. And

Re: [Xen-devel] [PATCH v3 20/41] fbdev/pvr2fb: convert put_page() to put_user_page*()

2019-08-09 Thread Bartlomiej Zolnierkiewicz
On 8/7/19 3:33 AM, john.hubb...@gmail.com wrote: > From: John Hubbard > > For pages that were retained via get_user_pages*(), release those pages > via the new put_user_page*() routines, instead of via put_page() or > release_pages(). > > This is part a tree-wide conversion, as described in com

Re: [Xen-devel] [PATCH v2] tools/xenstore: Do not abort xenstore-ls if a node disappears while iterating

2019-08-09 Thread David Woodhouse
On Fri, 2019-08-09 at 12:27 +0100, Ian Jackson wrote: > Can you explain to me what your needs are for all this ? I want > xenstore-ls to be able to do what you want, but I don't want to impose > a lot of work on you. I also want the correctness property I mention > above. Ultimately, I don't rea

Re: [Xen-devel] [PATCH v2 1/2] x86: define a few selector values

2019-08-09 Thread Andrew Cooper
On 09/08/2019 11:38, Jan Beulich wrote: > --- a/xen/include/asm-x86/desc.h > +++ b/xen/include/asm-x86/desc.h > @@ -36,6 +36,10 @@ >  #define LDT_ENTRY (TSS_ENTRY + 2) >  #define PER_CPU_GDT_ENTRY (LDT_ENTRY + 2) >   > +#define TSS_SELECTOR (TSS_ENTRY << 3) > +#define LDT_SELECTOR (

[Xen-devel] [linux-linus test] 139832: regressions - FAIL

2019-08-09 Thread osstest service owner
flight 139832 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/139832/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-examine 8 reboot fail REGR. vs. 133580 test-amd64-i386-xl-

Re: [Xen-devel] [PATCH v2] tools/xenstore: Do not abort xenstore-ls if a node disappears while iterating

2019-08-09 Thread David Woodhouse
On Fri, 2019-08-09 at 12:48 +0100, David Woodhouse wrote: > > I'll send a v3 of the original patch which *only* ignores ENOENT. That > one really shouldn't need to cause a non-zero exit status because it's > equivalent to the case where the child node didn't exist when we called > xs_directory() o

[Xen-devel] [PATCH] xen/page_alloc: Keep away MFN 0 from the buddy allocator

2019-08-09 Thread Julien Grall
Combining of buddies happens only such that the resulting larger buddy is still order-aligned. To cross a zone boundary while merging, the implication is that both the buddy [0, 2^n-1] and the buddy [2^n, 2^(n+1)] are free. Ideally we want to fix the allocator, but for now we can just prevent addi

Re: [Xen-devel] [PATCH v2 2/2] x86/desc: Build boot_{, compat_}gdt[] in C

2019-08-09 Thread Andrew Cooper
On 09/08/2019 11:40, Jan Beulich wrote: > Signed-off-by: Andrew Cooper > > Introduce SEL2GDT(). Correct GDT indices in public header. "Correct" here is ambiguous because it implies there is a breakage. You appear to have reversed FLAT_RING3_CS64 and DS32 (retaining the original comments) and cha

Re: [Xen-devel] [PATCH v3 38/41] powerpc: convert put_page() to put_user_page*()

2019-08-09 Thread Michael Ellerman
John Hubbard writes: > On 8/7/19 10:42 PM, Michael Ellerman wrote: >> Hi John, >> >> john.hubb...@gmail.com writes: >>> diff --git a/arch/powerpc/mm/book3s64/iommu_api.c >>> b/arch/powerpc/mm/book3s64/iommu_api.c >>> index b056cae3388b..e126193ba295 100644 >>> --- a/arch/powerpc/mm/book3s64/iomm

[Xen-devel] [PATCH v4 0/2] x86/xpti: Don't leak TSS-adjacent percpu data via Meltdown

2019-08-09 Thread Jan Beulich
From: Andrew Cooper 1: xen/link: Introduce .bss.percpu.page_aligned 2: x86/xpti: Don't leak TSS-adjacent percpu data via Meltdown Addressing my own v3 review comments, albeit in a slightly extended form. Jan xen/link: Introduce .bss.percpu.page_aligned Future changes are going to need to page

[Xen-devel] [PATCH v4 1/2] xen/link: Introduce .bss.percpu.page_aligned

2019-08-09 Thread Jan Beulich
From: Andrew Cooper Future changes are going to need to page align some percpu data. Shuffle the exact link order of items within the BSS to give .bss.percpu.page_aligned appropriate alignment, even on CPU0, which uses .bss.percpu itself. Insert explicit alignment such that the result is safe

[Xen-devel] More QEMU gcc-9.1 build issues

2019-08-09 Thread Dario Faggioli
Hey Anthony, There's more of those issues related to building our QEMU with recent (the one in openSUSE Tumbleweed) GCC: gcc version 9.1.1 20190723 [gcc-9-branch revision 273734] (SUSE Linux) I've just tried building staging, and run into this: CC hw/display/qxl-render.o /home/dario/src/

[Xen-devel] [PATCH v4 2/2] x86/xpti: Don't leak TSS-adjacent percpu data via Meltdown

2019-08-09 Thread Jan Beulich
From: Andrew Cooper The XPTI work restricted the visibility of most of memory, but missed a few aspects when it came to the TSS. Given that the TSS is just an object in percpu data, the 4k mapping for it created in setup_cpu_root_pgt() maps adjacent percpu data, making it all leakable via Meltd

Re: [Xen-devel] [PATCH v2 1/2] x86: define a few selector values

2019-08-09 Thread Jan Beulich
On 09.08.2019 13:50, Andrew Cooper wrote: On 09/08/2019 11:38, Jan Beulich wrote: --- a/xen/include/asm-x86/desc.h +++ b/xen/include/asm-x86/desc.h @@ -36,6 +36,10 @@  #define LDT_ENTRY (TSS_ENTRY + 2)  #define PER_CPU_GDT_ENTRY (LDT_ENTRY + 2) +#define TSS_SELECTOR (TSS_ENTRY << 3)

[Xen-devel] [PATCH 3/2] x86/desc: Drop __HYPERVISOR_CS32

2019-08-09 Thread Andrew Cooper
Xen, being 64bit only these days, has no use for a 32bit Ring 0 code segment. Delete __HYPERVISOR_CS32 and remove it from the GDTs. Also delete __HYPERVISOR_CS64 and use __HYPERVISOR_CS uniformly. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/

Re: [Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Roger Pau Monné
On Fri, Aug 09, 2019 at 04:38:33PM +0800, Chao Gao wrote: > Hi everyone, > > I have a device which only supports secondary bus reset. After being > assigned to a VM, it would be placed under host bridge. For devices > under host bridge, secondary bus reset is not applicable. Thus, a VM > has no wa

Re: [Xen-devel] [PATCH v2 2/2] x86/desc: Build boot_{, compat_}gdt[] in C

2019-08-09 Thread Jan Beulich
On 09.08.2019 14:19, Andrew Cooper wrote: On 09/08/2019 11:40, Jan Beulich wrote: Signed-off-by: Andrew Cooper Introduce SEL2GDT(). Correct GDT indices in public header. "Correct" here is ambiguous because it implies there is a breakage. You appear to have reversed FLAT_RING3_CS64 and DS32

Re: [Xen-devel] [PATCH 2/2] tools/tests/cpu-policy: disable -Wformat-overflow

2019-08-09 Thread Andrew Cooper
On 09/08/2019 12:34, Jan Beulich wrote: > On 09.08.2019 13:05, Ian Jackson wrote: >> Jan Beulich writes ("Re: [Xen-devel] [PATCH 2/2] >> tools/tests/cpu-policy: disable -Wformat-overflow"): >>> Would you mind clarifying which 12 you mean to change to 13? >>> The one in "%.12s" would, if changed and

Re: [Xen-devel] [PATCH 3/2] x86/desc: Drop __HYPERVISOR_CS32

2019-08-09 Thread Jan Beulich
On 09.08.2019 14:39, Andrew Cooper wrote: Xen, being 64bit only these days, has no use for a 32bit Ring 0 code segment. Delete __HYPERVISOR_CS32 and remove it from the GDTs. Also delete __HYPERVISOR_CS64 and use __HYPERVISOR_CS uniformly. Long, long ago we've been considering doing this. Agre

Re: [Xen-devel] [PATCH v2 2/2] x86/desc: Build boot_{, compat_}gdt[] in C

2019-08-09 Thread Andrew Cooper
On 09/08/2019 13:43, Jan Beulich wrote: > On 09.08.2019 14:19, Andrew Cooper wrote: >> On 09/08/2019 11:40, Jan Beulich wrote: >>> Signed-off-by: Andrew Cooper >>> >>> Introduce SEL2GDT(). Correct GDT indices in public header. >> >> "Correct" here is ambiguous because it implies there is a breakag

Re: [Xen-devel] [PATCH v2 2/2] x86/desc: Build boot_{, compat_}gdt[] in C

2019-08-09 Thread Jan Beulich
On 09.08.2019 15:07, Andrew Cooper wrote: On 09/08/2019 13:43, Jan Beulich wrote: On 09.08.2019 14:19, Andrew Cooper wrote: On 09/08/2019 11:40, Jan Beulich wrote: --- /dev/null +++ b/xen/arch/x86/desc.c @@ -0,0 +1,109 @@ + +#define SEL2GDT(sel) (((sel) >> 3) - FIRST_RESERVED_GDT_ENTRY) + +__s

Re: [Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Chao Gao
On Fri, Aug 09, 2019 at 10:49:32AM +0200, Jan Beulich wrote: >On 09.08.2019 10:38, Chao Gao wrote: >>I have a device which only supports secondary bus reset. After being >>assigned to a VM, it would be placed under host bridge. For devices >>under host bridge, secondary bus reset is not applicable.

[Xen-devel] [Xen-summit-2019] Design Session Notes

2019-08-09 Thread Lars Kurth
Hi all, I collated all the design session descriptions and all the notes I could find on xen-devel@ at https://wiki.xenproject.org/wiki/Design_Sessions_2019 I may be missing a few from day 1, as we lost some of the session in the system when we improvised the schedule to pack more sessions in

Re: [Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Jan Beulich
On 09.08.2019 15:24, Chao Gao wrote: On Fri, Aug 09, 2019 at 10:49:32AM +0200, Jan Beulich wrote: On 09.08.2019 10:38, Chao Gao wrote: Alternatively, emulating FLR (Function Level Reset) capability for this device might be a feasible way and only needs relatively few changes. I am planning to e

[Xen-devel] Xen 4.12.1 released

2019-08-09 Thread Jan Beulich
All, I am pleased to announce the release of Xen 4.12.1. This is available immediately from its git repository http://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=refs/heads/stable-4.12 (tag RELEASE-4.12.1) or from the XenProject download page https://xenproject.org/downloads/xen-project-archiv

Re: [Xen-devel] [PATCH] xen/page_alloc: Keep away MFN 0 from the buddy allocator

2019-08-09 Thread Jan Beulich
On 09.08.2019 14:14, Julien Grall wrote: Combining of buddies happens only such that the resulting larger buddy is still order-aligned. To cross a zone boundary while merging, the implication is that both the buddy [0, 2^n-1] and the buddy [2^n, 2^(n+1)] are free. [2^n, 2^(n+1)-1] You may want

Re: [Xen-devel] [PATCH v4 1/2] xen/link: Introduce .bss.percpu.page_aligned

2019-08-09 Thread Andrew Cooper
On 09/08/2019 13:32, Jan Beulich wrote: > Insert explicit alignment such that the result is safe even with objects > shorter than a page in length.  The POINTER_ALIGN for __bss_end is to > cover > the lack of SMP_CACHE_BYTES alignment, as the loops which zero the BSS > use > pointer-sized stores on

[Xen-devel] [linux-4.4 test] 139846: regressions - trouble: broken/fail/pass

2019-08-09 Thread osstest service owner
flight 139846 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/139846/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-i386-xsm broken test-amd64-amd64-xl-pvshim 20 gu

Re: [Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Chao Gao
On Fri, Aug 09, 2019 at 02:42:09PM +0200, Roger Pau Monné wrote: >On Fri, Aug 09, 2019 at 04:38:33PM +0800, Chao Gao wrote: >> Hi everyone, >> >> I have a device which only supports secondary bus reset. After being >> assigned to a VM, it would be placed under host bridge. For devices >> under hos

[Xen-devel] [xen-unstable-smoke test] 139864: tolerable all pass - PUSHED

2019-08-09 Thread osstest service owner
flight 139864 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/139864/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [Xen-devel] Reset pass-thru devices in a VM

2019-08-09 Thread Chao Gao
On Fri, Aug 09, 2019 at 03:23:59PM +0200, Jan Beulich wrote: >On 09.08.2019 15:24, Chao Gao wrote: >>On Fri, Aug 09, 2019 at 10:49:32AM +0200, Jan Beulich wrote: >>>On 09.08.2019 10:38, Chao Gao wrote: Alternatively, emulating FLR (Function Level Reset) capability for this device might be a

Re: [Xen-devel] [PATCH v4 1/2] xen/link: Introduce .bss.percpu.page_aligned

2019-08-09 Thread Jan Beulich
On 09.08.2019 15:42, Andrew Cooper wrote: On 09/08/2019 13:32, Jan Beulich wrote: Insert explicit alignment such that the result is safe even with objects shorter than a page in length.  The POINTER_ALIGN for __bss_end is to cover the lack of SMP_CACHE_BYTES alignment, as the loops which zero th

[Xen-devel] [PATCH v2 37/48] xen/sched: carve out freeing sched_unit memory into dedicated function

2019-08-09 Thread Juergen Gross
We'll need a way to free a sched_unit structure without side effects in a later patch. Signed-off-by: Juergen Gross --- RFC V2: new patch, carved out from RFC V1 patch 49 --- xen/common/schedule.c | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) dif

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

2019-08-09 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. In case we are modifying the timer of the currently running

[Xen-devel] [PATCH v2 35/48] xen/sched: add fall back to idle vcpu when scheduling unit

2019-08-09 Thread Juergen Gross
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 correct schedule_unit pointer in the idle vcpu as long as it used as fallback vcpu. In

[Xen-devel] [PATCH v2 06/48] xen/sched: switch schedule_data.curr to point at sched_unit

2019-08-09 Thread Juergen Gross
In preparation of core scheduling let the percpu pointer schedule_data.curr point to a strct sched_unit instead of the related vcpu. At the same time rename the per-vcpu scheduler specific structs to per-unit ones. Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli --- xen/common/sched_ar

[Xen-devel] [PATCH v2 00/48] xen: add core scheduling support

2019-08-09 Thread Juergen Gross
Add support for core- and socket-scheduling in the Xen hypervisor. Via boot parameter sched-gran=core (or sched-gran=socket) it is possible to change the scheduling granularity from cpu (the default) to either whole cores or even sockets. All logical cpus (threads) of the core or socket are alway

[Xen-devel] [PATCH v2 10/48] xen/sched: add scheduler helpers hiding vcpu

2019-08-09 Thread Juergen Gross
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() - unit_runnable() like vcpu_runnable() - sched_set_res() to set the current processor of an unit - sched_unit_cpu() to get the current

[Xen-devel] [PATCH v2 34/48] xen/sched: add a percpu resource index

2019-08-09 Thread Juergen Gross
Add a percpu variable holding the index of the cpu in the current sched_resource structure. This index is used to get the correct vcpu of a sched_unit on a specific cpu. For now this index will be zero for all cpus, but with core scheduling it will be possible to have higher values, too. Signed-o

[Xen-devel] [PATCH v2 13/48] xen/sched: add is_running indicator to struct sched_unit

2019-08-09 Thread Juergen Gross
Add an is_running indicator to struct sched_unit which will be set whenever the unit is being scheduled. Switch scheduler code to use unit->is_running instead of vcpu->is_running for scheduling decisions. At the same time introduce a state_entry_time field in struct sched_unit being updated whenev

[Xen-devel] [PATCH v2 12/48] xen/sched: switch struct task_slice from vcpu to sched_unit

2019-08-09 Thread Juergen Gross
Let the schedulers put a sched_unit pointer into struct task_slice instead of a vcpu pointer. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 8 xen/common/sched_credit.c | 4 ++-- xen/common/sched_credit2.c | 4 ++-- xen/common/sched_null.c | 12 ++-- x

[Xen-devel] [PATCH v2 33/48] xen/sched: support allocating multiple vcpus into one sched unit

2019-08-09 Thread Juergen Gross
With a scheduling granularity greater than 1 multiple vcpus share the same struct sched_unit. Support that. Setting the initial processor must be done carefully: we can't use sched_set_res() as that relies on for_each_sched_unit_vcpu() which in turn needs the vcpu already as a member of the domain

[Xen-devel] [PATCH v2 36/48] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-08-09 Thread Juergen Gross
vcpu_wake() and vcpu_sleep() need to be made core scheduling aware: they might need to switch a single vcpu of an already scheduled unit between running and not running. Especially when vcpu_sleep() for a vcpu is being called by a vcpu of the same scheduling unit special care must be taken in orde

[Xen-devel] [PATCH v2 25/48] xen/sched: add runstate counters to struct sched_unit

2019-08-09 Thread Juergen Gross
Add counters to struct sched_unit summing up runstates of associated vcpus. Signed-off-by: Juergen Gross --- RFC V2: add counters for each possible runstate --- xen/common/schedule.c | 5 + xen/include/xen/sched.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/xen/common/schedule.c

[Xen-devel] [PATCH v2 18/48] xen/sched: make arinc653 scheduler vcpu agnostic.

2019-08-09 Thread Juergen Gross
Switch arinc653 scheduler completely from vcpu to sched_unit usage. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 208 +--- 1 file changed, 101 insertions(+), 107 deletions(-) diff --git a/xen/common/sched_arinc653.c b/xen/common/sched_ar

[Xen-devel] [PATCH v2 04/48] xen/sched: introduce struct sched_resource

2019-08-09 Thread Juergen Gross
Add a scheduling abstraction layer between physical processors and the schedulers by introducing a struct sched_resource. Each scheduler unit running is active on such a scheduler resource. For the time being there is one struct sched_resource per cpu, but in future there might be one for each core

[Xen-devel] [PATCH v2 44/48] xen/sched: support multiple cpus per scheduling resource

2019-08-09 Thread Juergen Gross
Prepare supporting multiple cpus per scheduling resource by allocating the cpumask per resource dynamically. Modify sched_res_mask to have only one bit per scheduling resource set. Signed-off-by: Juergen Gross --- V1: new patch (carved out from other patch) --- xen/common/schedule.c | 16 +

[Xen-devel] [PATCH v2 01/48] xen/sched: use new sched_unit instead of vcpu in scheduler interfaces

2019-08-09 Thread Juergen Gross
In order to prepare core- and socket-scheduling use a new struct sched_unit instead of struct vcpu for interfaces of the different schedulers. Rename the per-scheduler functions insert_vcpu and remove_vcpu to insert_unit and remove_unit to reflect the change of the parameter. In the schedulers ren

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

2019-08-09 Thread Juergen Gross
In several places there is support for multiple vcpus per sched unit missing. Add that missing support (with the exception of initial allocation) and missing helpers for that. Signed-off-by: Juergen Gross --- RFC V2: - fix vcpu_runstate_helper() V1: - add special handling for idle unit in unit_ru

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

2019-08-09 Thread Juergen Gross
Now that vcpu_migrate_start() and vcpu_migrate_finish() are used only to ensure a vcpu is running on a suitable processor they can be switched to operate on schedule units instead of vcpus. While doing that rename them accordingly and make the _start() variant static. As it is needed anyway call v

[Xen-devel] [PATCH v2 05/48] xen/sched: let pick_cpu return a scheduler resource

2019-08-09 Thread Juergen Gross
Instead of returning a physical cpu number let pick_cpu() return a scheduler resource instead. Rename pick_cpu() to pick_resource() to reflect that change. Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli --- xen/common/sched_arinc653.c | 12 ++-- xen/common/sched_credit.c|

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

2019-08-09 Thread Juergen Gross
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 schedule.c removing the need for including sched-if.h in cpuidle.h and multiple other C sources. Signed-off-by: Juergen Gross Acked-by: Jan

[Xen-devel] [PATCH v2 11/48] xen/sched: rename scheduler related perf counters

2019-08-09 Thread Juergen Gross
Rename the scheduler related perf counters from vcpu* to unit* where appropriate. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c| 32 xen/common/sched_credit2.c | 18 +- xen/common/sched_null.c | 18 +- xen/c

[Xen-devel] [PATCH v2 24/48] xen: switch from for_each_vcpu() to for_each_sched_unit()

2019-08-09 Thread Juergen Gross
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 vcpu_scheduler() use it. Signed-off-by: Juergen Gross --- V2: - handle affinity_broken correctly

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

2019-08-09 Thread Juergen Gross
sched_move_irqs() should work on a sched_unit as that is the unit moved between cpus. Rename the current function to vcpu_move_irqs() as it is still needed in schedule(). Signed-off-by: Juergen Gross --- xen/common/schedule.c | 18 +- 1 file changed, 13 insertions(+), 5 deletion

[Xen-devel] [PATCH v2 02/48] xen/sched: move per-vcpu scheduler private data pointer to sched_unit

2019-08-09 Thread Juergen Gross
This prepares making the different schedulers vcpu agnostic. Note that some scheduler specific accessor function are misnamed after this patch. This will be corrected in later patches. Signed-off-by: Juergen Gross --- xen/common/sched_arinc653.c | 4 ++-- xen/common/sched_credit.c | 6 +++--

[Xen-devel] [PATCH v2 16/48] xen/sched: make credit scheduler vcpu agnostic.

2019-08-09 Thread Juergen Gross
Switch credit scheduler completely from vcpu to sched_unit usage. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 503 +++--- 1 file changed, 250 insertions(+), 253 deletions(-) diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit

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

2019-08-09 Thread Juergen Gross
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. To make access easier for the single schedulers add the pointer of the currently running unit as a parameter of do_schedule(). Wh

[Xen-devel] [PATCH v2 19/48] xen: add sched_unit_pause_nosync() and sched_unit_unpause()

2019-08-09 Thread Juergen Gross
The credit scheduler calls vcpu_pause_nosync() and vcpu_unpause() today. Add sched_unit_pause_nosync() and sched_unit_unpause() to perform the same operations on scheduler units instead. Signed-off-by: Juergen Gross --- xen/common/sched_credit.c | 6 +++--- xen/include/xen/sched-if.h | 10

[Xen-devel] [PATCH v2 22/48] xen/sched: switch schedule() from vcpus to sched_units

2019-08-09 Thread Juergen Gross
Use sched_units instead of vcpus in schedule(). This includes the introduction of sched_unit_runstate_change() as a replacement of vcpu_runstate_change() in schedule(). Signed-off-by: Juergen Gross --- xen/common/schedule.c | 68 +-- 1 file changed

[Xen-devel] [PATCH v2 09/48] xen/sched: move some per-vcpu items to struct sched_unit

2019-08-09 Thread Juergen Gross
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 to use a pointer to sched_unit instead to vcpu as parameter. The affinity_broken fl

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

2019-08-09 Thread Juergen Gross
When switching sched units synchronize all vcpus of the new unit to be scheduled at the same time. A variable sched_granularity is added which holds the number of vcpus per schedule unit. As tasklets require to schedule the idle unit it is required to set the tasklet_work_scheduled parameter of d

[Xen-devel] [PATCH v2 41/48] xen/sched: prepare per-cpupool scheduling granularity

2019-08-09 Thread Juergen Gross
On- and offlining cpus with core scheduling is rather complicated as the cpus are taken on- or offline one by one, but scheduling wants them rather to be handled per core. As the future plan is to be able to select scheduling granularity per cpupool prepare that by storing the granularity in struc

[Xen-devel] [PATCH v2 39/48] xen/sched: move per-cpu variable cpupool to struct sched_resource

2019-08-09 Thread Juergen Gross
Having a pointer to struct cpupool in struct sched_resource instead of per cpu is enough. Signed-off-by: Juergen Gross --- V1: new patch --- xen/common/cpupool.c | 4 +--- xen/common/sched_credit.c | 2 +- xen/common/sched_rt.c | 2 +- xen/common/schedule.c | 8 xen/inc

[Xen-devel] [PATCH v2 40/48] xen/sched: reject switching smt on/off with core scheduling active

2019-08-09 Thread Juergen Gross
When core or socket scheduling are active enabling or disabling smt is not possible as that would require a major host reconfiguration. Add a bool sched_disable_smt_switching which will be set for core or socket scheduling. Signed-off-by: Juergen Gross --- V1: - new patch V2: - EBUSY as return c

[Xen-devel] [PATCH v2 14/48] xen/sched: make null scheduler vcpu agnostic.

2019-08-09 Thread Juergen Gross
Switch null scheduler completely from vcpu to sched_unit usage. Signed-off-by: Juergen Gross --- xen/common/sched_null.c | 333 1 file changed, 165 insertions(+), 168 deletions(-) diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c ind

[Xen-devel] [PATCH v2 03/48] xen/sched: build a linked list of struct sched_unit

2019-08-09 Thread Juergen Gross
In order to make it easy to iterate over sched_unit elements of a domain, build a single linked list and add an iterator for it. The new list is guarded by the same mechanisms as the vcpu linked list as it is modified only via vcpu_create() or vcpu_destroy(). For completeness add another iterator

[Xen-devel] [PATCH v2 47/48] xen/sched: disable scheduling when entering ACPI deep sleep states

2019-08-09 Thread Juergen Gross
When entering deep sleep states all domains are paused resulting in all cpus only running idle vcpus. This enables us to stop scheduling completely in order to avoid synchronization problems with core scheduling when individual cpus are offlined. Disabling the scheduler is done by replacing the so

  1   2   >