[Xen-devel] [PATCH] VT-d: Chop down the DMAR_OPERATION_TIMEOUT to a low number of milliseconds.

2016-03-14 Thread Quan Xu
We confirmed with VT-d hardware team that 1ms is large enough for IOMMU internal flush. So We can change the DMAR_OPERATION_TIMEOUT from 1000 ms to 1 ms. Signed-off-by: Quan Xu CC: Jan Beulich CC: Andrew Cooper CC: Feng Wu CC: Kevin Tian --- xen/drivers/passthrough/vtd/dmar.h | 2 +- 1 file

[Xen-devel] [linux-4.1 test] 86144: regressions - FAIL

2016-03-14 Thread osstest service owner
flight 86144 linux-4.1 real [real] http://logs.test-lab.xenproject.org/osstest/logs/86144/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-rumpuserxen 6 xen-build fail REGR. vs. 66399 build-i386-rumpuserxen

Re: [Xen-devel] [PATCH] xen/arm64: Fix incorrect memory region size in TCR2_EL2

2016-03-14 Thread Julien Grall
Hi Shanker, On 11/03/2016 04:28, Shanker Donthineni wrote: The maximum and minimum values for T0SZ depend on level of translation as per AArch64 Virtual Memory System Architecture. The current code sets T0SZ to zero in TCR2_EL2 which is not s/TCR2_EL2/TCR_EL2/ valid and also might see unexpe

Re: [Xen-devel] [PATCH] xen: arm: zero EL2 pagetable pages before use

2016-03-14 Thread Julien Grall
Hi, On 11/03/2016 20:24, Andrew Cooper wrote: On 11/03/16 13:13, Jan Beulich wrote: On 11.03.16 at 13:56, wrote: On 11/03/16 11:29, Jan Beulich wrote: On 10.03.16 at 23:00, wrote: @@ -771,6 +772,7 @@ void __init setup_frametable_mappings(paddr_t ps, paddr_t pe) nr_second = frametabl

Re: [Xen-devel] [PATCH] xen: arm: zero EL2 pagetable pages before use

2016-03-14 Thread Julien Grall
Hi, On 11/03/2016 18:29, Jan Beulich wrote: On 10.03.16 at 23:00, wrote: --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -730,6 +730,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn, else { unsigned long first_mfn = alloc_boot_pages(1, 1); +

Re: [Xen-devel] [PATCH] xen: arm: zero EL2 pagetable pages before use

2016-03-14 Thread Julien Grall
Hi Shanker, On 11/03/2016 05:00, Shanker Donthineni wrote: From: Vikram Sethi arch/arm/mm.c has 2 uses of alloc_boot_pages which are used for pagetables, but the allocated pages are not zeroed. This can cause crashes on CPUs with aggressive prefetching when they find 'valid' entries in the pag

[Xen-devel] [PATCH] x86emul: fix 32-bit test build

2016-03-14 Thread Jan Beulich
Commit 5644ce0142 ("x86emul: relax asm() constraints") introduced a 64-bit only instruction suffix, which breaks running the emulator test on a 32-bit system. Mirror __OS (and _OP for completeness) to the test wrapper source file. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/x86_emu

[Xen-devel] [distros-debian-sid test] 44246: trouble: blocked/broken

2016-03-14 Thread Platform Team regression test user
flight 44246 distros-debian-sid real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/44246/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i3863 host-install(3) broken REGR.

Re: [Xen-devel] [PATCH] x86emul: fix 32-bit test build

2016-03-14 Thread Andrew Cooper
On 14/03/2016 07:50, Jan Beulich wrote: > Commit 5644ce0142 ("x86emul: relax asm() constraints") introduced a > 64-bit only instruction suffix, which breaks running the emulator test > on a 32-bit system. Mirror __OS (and _OP for completeness) to the test > wrapper source file. > > Signed-off-by: J

Re: [Xen-devel] [PATCH 2/3] x86emul: check host features alongside guest ones where needed

2016-03-14 Thread Jan Beulich
>>> On 11.03.16 at 18:41, wrote: > On 11/03/16 17:34, Jan Beulich wrote: >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >> @@ -1093,6 +1093,22 @@ static bool_t vcpu_has( >> #define vcpu_must_have_cx16() vcpu_must_h

Re: [Xen-devel] Patching error while setting up COLO

2016-03-14 Thread Changlong Xie
On 03/09/2016 06:57 AM, Yu-An(Victor) Chen wrote: Sorry for the duplicated email Congyang, I forgot to replied all: Hi Congyang, Thank you for the hint, after building xen, your script works for qemu-xen! so now I am trying to set up the secondary node with the script provided by Changlong in

Re: [Xen-devel] [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler

2016-03-14 Thread Jan Beulich
>>> On 13.03.16 at 18:05, wrote: > So I still keep my design here? > > Dario, Jan and Wei, Afaic: > I almost finished a new version, but since this part is critical for > the whole patch, let me summarize the feedbacks here. Please correct > me if my understanding is wrong. > > 1) We don't nee

Re: [Xen-devel] [PATCH 2/3] x86emul: check host features alongside guest ones where needed

2016-03-14 Thread Andrew Cooper
On 14/03/2016 08:29, Jan Beulich wrote: On 11.03.16 at 18:41, wrote: >> On 11/03/16 17:34, Jan Beulich wrote: >>> Signed-off-by: Jan Beulich >>> >>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c >>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c >>> @@ -1093,6 +1093,22 @@ static bool_t vcpu_has

Re: [Xen-devel] [PATCH v2] vmx: Restore debug registers when injecting #DB traps

2016-03-14 Thread Jan Beulich
>>> On 11.03.16 at 17:23, wrote: > Commit a929bee0e652 ("x86/vmx: Fix injection of #DB traps following > XSA-156") prevents an infinite loop in certain #DB traps. However, it > changed the behavior to not call hvm_hw_inject_trap() for #DB and #AC > traps which which means that the debug registers

Re: [Xen-devel] [PATCH v11 01/27] tools/libxl: introduction of libxl__qmp_restore to load qemu state

2016-03-14 Thread Changlong Xie
On 03/05/2016 12:30 AM, Ian Jackson wrote: Changlong Xie writes ("[PATCH v11 01/27] tools/libxl: introduction of libxl__qmp_restore to load qemu state"): From: Wen Congyang In normal migration, the qemu state is passed to qemu as a parameter. With COLO, secondary vm is running. So we will do

Re: [Xen-devel] [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values

2016-03-14 Thread Jan Beulich
>>> On 12.03.16 at 12:34, wrote: > --- a/xen/common/sched_rt.c > +++ b/xen/common/sched_rt.c > @@ -361,17 +361,14 @@ rt_update_deadline(s_time_t now, struct rt_vcpu *svc) > > /* TRACE */ > { > -struct { > +struct __packed { > unsigned vcpu:16, dom:16; > -

Re: [Xen-devel] [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler

2016-03-14 Thread Dario Faggioli
On Thu, 2016-03-10 at 22:50 +, Wei Liu wrote: > On Thu, Mar 10, 2016 at 04:35:30PM -0600, Chong Li wrote: > > On Tue, Mar 8, 2016 at 1:09 PM, Wei Liu > > wrote: > > > > @@ -1163,6 +1173,96 @@ rt_dom_cntl( > > > >  > > > > +/* > > > > + * We accept period/budget less tha

Re: [Xen-devel] [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 02:37 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 13.03.16 at 18:05, wrote: > > So I still keep my design here? > > > > Dario, Jan and Wei, > Afaic: > I agree almost on everything too. About this: > > 3) Use printk(XENLOG_G_WARNING ...) here, because of its

[Xen-devel] [PATCH] block/xen-blkback: Deinline shrink_free_pagepool, save 204 bytes

2016-03-14 Thread Denys Vlasenko
This function compiles to 201 bytes of machine code. 2 callsites. This function has a spinlocked code section, which is significantly more expensive than call/return overhead. Signed-off-by: Denys Vlasenko CC: Konrad Rzeszutek Wilk CC: Roger Pau Monné CC: xen-de...@lists.xenproject.org CC: lin

[Xen-devel] [PATCH] block/xen-blkback: Deinline put_free_pages, save 645 bytes

2016-03-14 Thread Denys Vlasenko
This function compiles to 170 bytes of machine code. 7 callsites. This function has a spinlocked code section, which is significantly more expensive than call/return overhead. Signed-off-by: Denys Vlasenko CC: Konrad Rzeszutek Wilk CC: Roger Pau Monné CC: xen-de...@lists.xenproject.org CC: lin

Re: [Xen-devel] [PATCH v10 26/31] COLO proxy: implement setup/teardown of COLO proxy module

2016-03-14 Thread Wen Congyang
On 03/12/2016 06:25 AM, Konrad Rzeszutek Wilk wrote: >> +extern int colo_proxy_setup(libxl__colo_proxy_state *cps); >> +extern void colo_proxy_teardown(libxl__colo_proxy_state *cps); >> #endif >> diff --git a/tools/libxl/libxl_colo_proxy.c b/tools/libxl/libxl_colo_proxy.c >> new file mode 100644 >

Re: [Xen-devel] [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler

2016-03-14 Thread Jan Beulich
>>> On 14.03.16 at 10:10, wrote: > On Mon, 2016-03-14 at 02:37 -0600, Jan Beulich wrote: >> > > > On 13.03.16 at 18:05, wrote: > About this: > >> > 3) Use printk(XENLOG_G_WARNING ...) here, because of its rate limit >> > feature. >> I'd say XENLOG_G_DEBUG, and even that only if you really think

Re: [Xen-devel] Running Xen on Nvidia Jetson-TK1

2016-03-14 Thread Dushyant Behl
Hi Meng, On Sun, Mar 13, 2016 at 7:40 AM, Meng Xu wrote: > On Sat, Mar 12, 2016 at 3:23 PM, Dushyant Behl > wrote: > > Hi Meng, > > > > On Sat, Mar 12, 2016 at 8:57 PM, Meng Xu wrote: > >> > >> On Sat, Mar 12, 2016 at 9:20 AM, Dushyant Behl > >> wrote: > >> > Hi Julien, > >> > > >> > Thanks f

[Xen-devel] [xen-4.3-testing test] 86149: regressions - trouble: blocked/broken/fail/pass

2016-03-14 Thread osstest service owner
flight 86149 xen-4.3-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/86149/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 3 host-install(3) broken REGR. vs. 83004 build-armhf-pvops

Re: [Xen-devel] [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 03:15 -0600, Jan Beulich wrote: > > > > On 14.03.16 at 10:10, wrote: > >  > > I think it has some value to have this in the logs. In fact, > > someone > > that ended up with small values --either by bug/chance, or in > > general > > without a specific need for them-- and is s

[Xen-devel] [xen-4.4-testing test] 86174: regressions - FAIL

2016-03-14 Thread osstest service owner
flight 86174 xen-4.4-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/86174/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-multivcpu 16 guest-start.2 fail in 86050 REGR. vs. 85031 Tests which are f

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-14 Thread Daniel Kiper
On Fri, Mar 11, 2016 at 05:13:19PM +0100, Vladimir 'phcoder' Serbinenko wrote: > > > > + if (relocatable) > > > > +{ > > > > + if (base_addr > min_addr) > > > > + grub_multiboot_payload_eip += base_addr - min_addr; > > > > + else > > > > + grub_multiboot_payload_eip -= mi

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Sun, 2016-03-13 at 11:43 -0400, Meng Xu wrote: > On Sat, Mar 12, 2016 at 5:21 PM, Chen, Tianyang > wrote: > > On 03/11/2016 11:54 PM, Meng Xu wrote: > > > One more thing we should think about is: > > > How can we "prove/test" the correctness of the scheduler? > > > Can we use xentrace to record

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Fri, 2016-03-11 at 23:54 -0500, Meng Xu wrote: >  > > @@ -1150,6 +1300,101 @@ rt_dom_cntl( > >  return rc; > >  } > > > > +/* > > + * The replenishment timer handler picks vcpus > > + * from the replq and does the actual replenishment. > > + */ > > +static void repl_handler(void *data){ > >

Re: [Xen-devel] [PATCH v4 1/5] x86/paravirt: Add _safe to the read_msr and write_msr PV hooks

2016-03-14 Thread Borislav Petkov
On Sat, Mar 12, 2016 at 10:08:48AM -0800, Andy Lutomirski wrote: > These hooks match the _safe variants, so name them accordingly. > This will make room for unsafe PV hooks. > > Signed-off-by: Andy Lutomirski > --- > arch/x86/include/asm/paravirt.h | 33 + >

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Borislav Petkov
On Sat, Mar 12, 2016 at 10:08:49AM -0800, Andy Lutomirski wrote: > This demotes an OOPS and likely panic due to a failed non-"safe" MSR > access to a WARN_ONCE and, for RDMSR, a return value of zero. If > panic_on_oops is set, then failed unsafe MSR accesses will still > oops and panic. > > To be

Re: [Xen-devel] [patch 1/4] hotplug: Prevent alloc/free of irq descriptors during cpu up/down

2016-03-14 Thread Boris Ostrovsky
On 03/12/2016 04:19 AM, Thomas Gleixner wrote: Boris, On Tue, 14 Jul 2015, Boris Ostrovsky wrote: On 07/14/2015 04:15 PM, Thomas Gleixner wrote: The issue here is that all architectures need that protection and just Xen does irq allocations in cpu_up. So moving that protection into architectu

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
On Mon, Mar 14, 2016 at 7:48 AM, Dario Faggioli wrote: > On Sun, 2016-03-13 at 11:43 -0400, Meng Xu wrote: >> On Sat, Mar 12, 2016 at 5:21 PM, Chen, Tianyang > > wrote: >> > On 03/11/2016 11:54 PM, Meng Xu wrote: >> > > One more thing we should think about is: >> > > How can we "prove/test" the co

Re: [Xen-devel] [PATCH v3 3/5] x86/paravirt: Add paravirt_{read, write}_msr

2016-03-14 Thread Paolo Bonzini
On 11/03/2016 20:06, Andy Lutomirski wrote: > This adds paravirt hooks for unsafe MSR access. On native, they > call native_{read,write}_msr. On Xen, they use > xen_{read,write}_msr_safe. > > Nothing uses them yet for ease of bisection. The next patch will > use them in rdmsrl, wrmsrl, etc. >

Re: [Xen-devel] [PATCH 2/2] xsm: move FLASK_AVC_STATS to Kconfig

2016-03-14 Thread Doug Goldstein
On 3/8/16 12:01 PM, Daniel De Graaf wrote: > On 03/08/2016 11:51 AM, Jan Beulich wrote: > On 08.03.16 at 17:22, wrote: >>> On 03/08/2016 04:46 AM, Jan Beulich wrote: >>> On 07.03.16 at 19:42, wrote: > Have Kconfig set CONFIG_FLASK_AVC_STATS and prefix all uses with > CONFIG_ >

Re: [Xen-devel] [PATCH 1/3] xenalyze: handle DOM0 operaions events

2016-03-14 Thread Konrad Rzeszutek Wilk
On Sat, Mar 12, 2016 at 12:33:57PM +0100, Dario Faggioli wrote: > (i.e., domain creation and destruction) so the > trace will show properly decoded info, rather > than just a bunch of hex codes. Weirdly you also lost your SoB. > --- > Cc: George Dunlap > Cc: Ian Jackson > Cc: Wei Liu > Cc: Kon

Re: [Xen-devel] [PATCH 1/3] xenalyze: handle DOM0 operaions events

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 10:06 -0400, Konrad Rzeszutek Wilk wrote: > On Sat, Mar 12, 2016 at 12:33:57PM +0100, Dario Faggioli wrote: > > > > (i.e., domain creation and destruction) so the > > trace will show properly decoded info, rather > > than just a bunch of hex codes. > Weirdly you also lost you

Re: [Xen-devel] Running Xen on Nvidia Jetson-TK1

2016-03-14 Thread Konrad Rzeszutek Wilk
> After changing the console name to hvc0 the only thing which I noticed > differently is > that after the last line where Xen frees some init memory, I am able to see > the linux > kernel decompression message - > > "(XEN) DOM0: Uncompressing Linux... done, booting the kernel. > > But after that

Re: [Xen-devel] Running Xen on Nvidia Jetson-TK1

2016-03-14 Thread Dushyant Behl
Hi Konrad, On Mon, Mar 14, 2016 at 7:42 PM, Konrad Rzeszutek Wilk wrote: >> After changing the console name to hvc0 the only thing which I noticed >> differently is >> that after the last line where Xen frees some init memory, I am able to see >> the linux >> kernel decompression message - >> >>

Re: [Xen-devel] [PATCH v4 0/5] [PATCH v3 0/5] Improve non-"safe" MSR access failure handling

2016-03-14 Thread Boris Ostrovsky
On 03/12/2016 01:08 PM, Andy Lutomirski wrote: Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently turns all rdmsr and wrmsr operations into the safe variants without any checks that the operations actually succeed. With CONFIG_PARAVIRT=n, unchecked MSR failures OOPS and probabl

Re: [Xen-devel] [PATCH] xen/arm64: Fix incorrect memory region size in TCR2_EL2

2016-03-14 Thread Shanker Donthineni
HI Jullen, On 03/12/2016 07:13 AM, Julien Grall wrote: > Hi Shanker, > > On 11/03/2016 04:28, Shanker Donthineni wrote: >> The maximum and minimum values for T0SZ depend on level of >> translation as per AArch64 Virtual Memory System Architecture. >> The current code sets T0SZ to zero in TCR2_EL2

Re: [Xen-devel] [PATCH] xen/arm64: Fix incorrect memory region size in TCR2_EL2

2016-03-14 Thread Julien Grall
On 14/03/16 14:37, Shanker Donthineni wrote: HI Jullen, Hi Shanker, On 03/12/2016 07:13 AM, Julien Grall wrote: Hi Shanker, On 11/03/2016 04:28, Shanker Donthineni wrote: The maximum and minimum values for T0SZ depend on level of translation as per AArch64 Virtual Memory System Architect

[Xen-devel] [xen-unstable test] 86183: tolerable FAIL

2016-03-14 Thread osstest service owner
flight 86183 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/86183/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-freebsd10-i386 6 xen-boot fail in 86132 pass in 86183 test-armhf-armhf-xl-rtds 11 gu

[Xen-devel] [PATCH] x86: partially revert use of 2M mappings for hypervisor image

2016-03-14 Thread Jan Beulich
As explained by Andrew in http://lists.xenproject.org/archives/html/xen-devel/2016-03/msg01380.html that change makes the uncompressed xen.gz image too large for certain boot environments. As a result this change makes some of the effects of commits cf393624ee ("x86: use 2M superpages for text/dat

[Xen-devel] [PATCH] x86: move both exception tables into .rodata

2016-03-14 Thread Jan Beulich
While they are being written during early boot (when sorting them), that writing takes place before we actually start fiddling with page table permissions, so these tables can benefit from getting write protected just like ordinary r/o data does (for now only when using 2M mappings). Signed-off-by

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

2016-03-14 Thread osstest service owner
flight 86218 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/86218/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 12 migrate-support-checkfail never pass test-armhf-armhf-xl 12

Re: [Xen-devel] [PATCH v2 3/3] xl: new "loglvl" command

2016-03-14 Thread Jan Beulich
>>> On 08.03.16 at 17:20, wrote: > On Fri, Mar 04, 2016 at 09:48:16AM -0700, Jan Beulich wrote: >> This is pretty simplistic for now, but I'd rather have someone better >> friends with the tools improve it (if desired). >> >> Signed-off-by: Jan Beulich >> >> --- a/tools/libxl/libxl.c >> +++ b/t

Re: [Xen-devel] [PATCH] x86: move both exception tables into .rodata

2016-03-14 Thread Andrew Cooper
On 14/03/16 15:15, Jan Beulich wrote: > While they are being written during early boot (when sorting them), > that writing takes place before we actually start fiddling with page > table permissions, so these tables can benefit from getting write > protected just like ordinary r/o data does (for no

Re: [Xen-devel] [PATCH] x86: partially revert use of 2M mappings for hypervisor image

2016-03-14 Thread Andrew Cooper
On 14/03/16 15:12, Jan Beulich wrote: > As explained by Andrew in > http://lists.xenproject.org/archives/html/xen-devel/2016-03/msg01380.html > that change makes the uncompressed xen.gz image too large for certain > boot environments. As a result this change makes some of the effects of > commits

Re: [Xen-devel] [PATCH v2 3/3] xl: new "loglvl" command

2016-03-14 Thread Wei Liu
On Mon, Mar 14, 2016 at 09:23:35AM -0600, Jan Beulich wrote: > >>> On 08.03.16 at 17:20, wrote: > > On Fri, Mar 04, 2016 at 09:48:16AM -0700, Jan Beulich wrote: > >> This is pretty simplistic for now, but I'd rather have someone better > >> friends with the tools improve it (if desired). > >> > >

Re: [Xen-devel] [PATCH] x86: partially revert use of 2M mappings for hypervisor image

2016-03-14 Thread Jan Beulich
>>> On 14.03.16 at 16:23, wrote: > On 14/03/16 15:12, Jan Beulich wrote: >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -497,6 +497,17 @@ static void __init kexec_reserve_area(st >> #endif >> } >> >> +static inline bool_t using_2M_mapping(void) >> +{ >> +return !l1_table

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
Hi Dario, On Mon, Mar 14, 2016 at 7:58 AM, Dario Faggioli wrote: > On Fri, 2016-03-11 at 23:54 -0500, Meng Xu wrote: >> >> > @@ -1150,6 +1300,101 @@ rt_dom_cntl( >> > return rc; >> > } >> > >> > +/* >> > + * The replenishment timer handler picks vcpus >> > + * from the replq and does the ac

Re: [Xen-devel] [PATCH v2 3/3] xl: new "loglvl" command

2016-03-14 Thread Jan Beulich
>>> On 14.03.16 at 16:36, wrote: > On Mon, Mar 14, 2016 at 09:23:35AM -0600, Jan Beulich wrote: >> >>> On 08.03.16 at 17:20, wrote: >> > On Fri, Mar 04, 2016 at 09:48:16AM -0700, Jan Beulich wrote: >> >> --- a/tools/libxl/xl_cmdimpl.c >> >> +++ b/tools/libxl/xl_cmdimpl.c >> >> @@ -6469,6 +6469,84

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
On Mon, Mar 14, 2016 at 11:38 AM, Meng Xu wrote: > Hi Dario, > > On Mon, Mar 14, 2016 at 7:58 AM, Dario Faggioli > wrote: >> On Fri, 2016-03-11 at 23:54 -0500, Meng Xu wrote: >>> >>> > @@ -1150,6 +1300,101 @@ rt_dom_cntl( >>> > return rc; >>> > } >>> > >>> > +/* >>> > + * The replenishment

Re: [Xen-devel] [PATCH v2 3/3] xl: new "loglvl" command

2016-03-14 Thread Wei Liu
On Mon, Mar 14, 2016 at 09:49:11AM -0600, Jan Beulich wrote: > >>> On 14.03.16 at 16:36, wrote: > > On Mon, Mar 14, 2016 at 09:23:35AM -0600, Jan Beulich wrote: > >> >>> On 08.03.16 at 17:20, wrote: > >> > On Fri, Mar 04, 2016 at 09:48:16AM -0700, Jan Beulich wrote: > >> >> --- a/tools/libxl/xl_c

Re: [Xen-devel] [PATCH] x86: partially revert use of 2M mappings for hypervisor image

2016-03-14 Thread Andrew Cooper
On 14/03/16 15:41, Jan Beulich wrote: On 14.03.16 at 16:23, wrote: >> On 14/03/16 15:12, Jan Beulich wrote: >>> --- a/xen/arch/x86/setup.c >>> +++ b/xen/arch/x86/setup.c >>> @@ -497,6 +497,17 @@ static void __init kexec_reserve_area(st >>> #endif >>> } >>> >>> +static inline bool_t using_

[Xen-devel] [PATCH v2] xen/arm64: Fix incorrect memory region size in TCR_EL2

2016-03-14 Thread Shanker Donthineni
The maximum and minimum values for TxSZ depend on level of translation as per AArch64 Virtual Memory System Architecture. According to ARM specification DDI0487A_h (sec D4.2.2, page 1752), the minimum TxSZ value is 16. If TxSZ is programmed to a value smaller than 16 then it is IMPLEMENTATION DEFIN

[Xen-devel] [PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc

2016-03-14 Thread Wei Liu
Coverity points out that using LOG macro dereferences gc which is NULL at that point. Use LIBXL__LOG instead. CID: 1343291 Signed-off-by: Wei Liu --- Cc: Ian Jackson --- tools/libxl/libxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/li

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 11:38 -0400, Meng Xu wrote: > Hi Dario, > Hi, > On Mon, Mar 14, 2016 at 7:58 AM, Dario Faggioli > wrote: > > I recommend looking at what happens inside init_timer(), i.e., > > where a > > pointer to this function is stashed. Then, still in > > xen/common/timer.c, > > check

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Dario Faggioli
On Mon, 2016-03-14 at 12:03 -0400, Meng Xu wrote: > On Mon, Mar 14, 2016 at 11:38 AM, Meng Xu > wrote: > >  > > I'm ok that we keep using spin_lock_irqsave() for now. But maybe > > later, it will be a better idea to explore if spin_lock_irq() can > > replace all spin_lock_irqsave() in the RTDS sch

Re: [Xen-devel] [PATCH v3 3/5] x86/paravirt: Add paravirt_{read, write}_msr

2016-03-14 Thread Andy Lutomirski
On Mar 14, 2016 7:03 AM, "Paolo Bonzini" wrote: > > > > On 11/03/2016 20:06, Andy Lutomirski wrote: > > This adds paravirt hooks for unsafe MSR access. On native, they > > call native_{read,write}_msr. On Xen, they use > > xen_{read,write}_msr_safe. > > > > Nothing uses them yet for ease of bise

Re: [Xen-devel] [PATCH v3 3/5] x86/paravirt: Add paravirt_{read, write}_msr

2016-03-14 Thread Linus Torvalds
On Mar 14, 2016 9:53 AM, "Andy Lutomirski" wrote: > > Can you clarify? KVM uses the native version, and the native version > only oopses with this series applied if panic_on_oops is set. Can we please remove that idiocy? There is no reason to panic whatsoever. Seriously. What's the upside of th

Re: [Xen-devel] [PATCH v2 3/3] xl: new "loglvl" command

2016-03-14 Thread Jan Beulich
>>> On 14.03.16 at 17:01, wrote: > On Mon, Mar 14, 2016 at 09:49:11AM -0600, Jan Beulich wrote: >> >>> On 14.03.16 at 16:36, wrote: >> > On Mon, Mar 14, 2016 at 09:23:35AM -0600, Jan Beulich wrote: >> >> >>> On 08.03.16 at 17:20, wrote: >> >> > On Fri, Mar 04, 2016 at 09:48:16AM -0700, Jan Beuli

Re: [Xen-devel] [PATCH v3 3/5] x86/paravirt: Add paravirt_{read, write}_msr

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 9:58 AM, Linus Torvalds wrote: > > On Mar 14, 2016 9:53 AM, "Andy Lutomirski" wrote: >> >> Can you clarify? KVM uses the native version, and the native version >> only oopses with this series applied if panic_on_oops is set. > > Can we please remove that idiocy? > > There

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 5:02 AM, Borislav Petkov wrote: > On Sat, Mar 12, 2016 at 10:08:49AM -0800, Andy Lutomirski wrote: >> This demotes an OOPS and likely panic due to a failed non-"safe" MSR >> access to a WARN_ONCE and, for RDMSR, a return value of zero. If >> panic_on_oops is set, then fail

Re: [Xen-devel] [PATCH v2 3/3] xl: new "loglvl" command

2016-03-14 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v2 3/3] xl: new "loglvl" command"): > They could become more fine grained (for example, Linux has a > few more than we have now). And the string/number correlation > is an implementation detail anyway. Could we solve that problem by multiplying the numbers by 10 ?

Re: [Xen-devel] [PATCH v4 1/5] x86/paravirt: Add _safe to the read_msr and write_msr PV hooks

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 4:57 AM, Borislav Petkov wrote: > On Sat, Mar 12, 2016 at 10:08:48AM -0800, Andy Lutomirski wrote: >> These hooks match the _safe variants, so name them accordingly. >> This will make room for unsafe PV hooks. >> >> Signed-off-by: Andy Lutomirski >> --- >> arch/x86/includ

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Linus Torvalds
On Mar 14, 2016 10:05 AM, "Andy Lutomirski" wrote: > > We could probably remove that check and let custom fixups run early. > I don't see any compelling reason to keep them disabled. That should > probably be a separate change, though. Or we could just use the existing wrmsr_safe() code and not

Re: [Xen-devel] [PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc

2016-03-14 Thread Ian Jackson
Wei Liu writes ("[PATCH] libxl: use LIBXL__LOG in libxl_ctx_alloc"): > Coverity points out that using LOG macro dereferences gc which is NULL > at that point. Use LIBXL__LOG instead. > > CID: 1343291 > > Signed-off-by: Wei Liu Acked-by: Ian Jackson Committed-by: Ian Jackson _

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 10:11 AM, Linus Torvalds wrote: > > On Mar 14, 2016 10:05 AM, "Andy Lutomirski" wrote: >> >> We could probably remove that check and let custom fixups run early. >> I don't see any compelling reason to keep them disabled. That should >> probably be a separate change, thou

Re: [Xen-devel] [PATCH] xen: arm: zero EL2 pagetable pages before use

2016-03-14 Thread Shanker Donthineni
Hi Julien, On 03/12/2016 10:03 AM, Julien Grall wrote: > Hi, > > On 11/03/2016 20:24, Andrew Cooper wrote: >> On 11/03/16 13:13, Jan Beulich wrote: >> On 11.03.16 at 13:56, wrote: On 11/03/16 11:29, Jan Beulich wrote: On 10.03.16 at 23:00, wrote: >> @@ -771,6 +772,7 @@ voi

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
> >> So IMHO, the replenishment handler will be called in interrupt >> handler >> *and* with interrupt enabled. >> The only difference between lock_irq() and lock_irqsave() is that >> lock_irq() can only be called with interrupt enabled. (lock_irq will >> check if the interrupt is enabled before it

Re: [Xen-devel] [PATCH v8]xen: sched: convert RTDS from time to event driven model

2016-03-14 Thread Meng Xu
On Mon, Mar 14, 2016 at 12:35 PM, Dario Faggioli wrote: > On Mon, 2016-03-14 at 12:03 -0400, Meng Xu wrote: >> On Mon, Mar 14, 2016 at 11:38 AM, Meng Xu >> wrote: >> > >> > I'm ok that we keep using spin_lock_irqsave() for now. But maybe >> > later, it will be a better idea to explore if spin_loc

[Xen-devel] [PATCHv1] hvmloader: add high memory e820 region if needed

2016-03-14 Thread David Vrabel
If the MMIO hole is large and hvmloader needs to relocate memory to immediately above the 4 GiB boundary, the e820 presented to the guest will not have a RAM region above 4 GiB. e.g., a guest with 3 GiB of memory and a 2 GiB MMIO hole will only see 2 GiB. The required e820 memory region above 4 G

[Xen-devel] [PATCH v4 01/14] libxc: Rework extra module initialisation

2016-03-14 Thread Anthony PERARD
This patch use xc_dom_alloc_segment() to allocate the memory space for the ACPI modules and the SMBIOS modules. This is to replace the arbitrary placement of 1MB after the hvmloader image. In later patches, while trying to load a firmware such as OVMF, the later could easily be loaded past the add

[Xen-devel] [PATCH v4 06/14] xen: Move the hvm_start_info C representation from libxc to public/xen.h

2016-03-14 Thread Anthony PERARD
Instead of having several representation of hvm_start_info in C, define it in public/xen.h so both libxc and hvmloader can use it. Signed-off-by: Anthony PERARD --- New in V4. --- tools/libxc/include/xc_dom.h | 31 --- xen/include/public/xen.h | 31 +++

[Xen-devel] [PATCH v4 02/14] libxc: Prepare a start info structure for hvmloader

2016-03-14 Thread Anthony PERARD
... and load BIOS into guest memory. This adds a new firmware module, bios_module. It is loaded in the guest memory and final location is provided to hvmloader via the hvm_start_info struct. This patch create the hvm_start_info struct for HVM guest that have a device model, so this is now common

[Xen-devel] [PATCH v4 07/14] hvmloader: Grab the hvm_start_info pointer

2016-03-14 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Change in V4: - remove struct hvm_info_start redefinition, as it's moved to public/xen.h in a previous patch. Change in V3: - remove cmdline parser - load hvm_start_info pointer earlier, before calling main(). - Add struct hvm_start_info definition to hvmloade

[Xen-devel] [PATCH v4 03/14] configure: #define SEABIOS_PATH and OVMF_PATH

2016-03-14 Thread Anthony PERARD
Those paths are to be used by libxl, in order to load the firmware in memory. If a system path is not define via --with-system-seabios or --with-system-ovmf, then this default to the Xen firmware directory. Signed-off-by: Anthony PERARD --- Please, run ./autogen.sh on this patch. --- tools/conf

[Xen-devel] [PATCH v4 09/14] hvmloader: Check modules whereabouts in perform_tests

2016-03-14 Thread Anthony PERARD
As perform_tests() is going to clear memory past 4MB, we check that the memory can be use or we skip the tests. Signed-off-by: Anthony PERARD --- Changes in v4: - move the check into the perform_test() function. - skip tests instead of using BUG. New in V3 --- tools/firmware/hvmloader/tests.c |

[Xen-devel] [PATCH v4 04/14] firmware/makefile: install BIOS blob ...

2016-03-14 Thread Anthony PERARD
... into the firmware directory, along with hvmloader. Signed-off-by: Anthony PERARD --- Change in V4: - remove install of acpi dsdt table Change in V3: - do not check if ROMs file exist before installing, they should exist - change rules for dsdt_anycpu_qemu_xen.c in oder to generate both .c an

Re: [Xen-devel] [PATCHv1] hvmloader: add high memory e820 region if needed

2016-03-14 Thread Andrew Cooper
On 14/03/16 17:53, David Vrabel wrote: > If the MMIO hole is large and hvmloader needs to relocate memory to > immediately above the 4 GiB boundary, the e820 presented to the guest > will not have a RAM region above 4 GiB. > > e.g., a guest with 3 GiB of memory and a 2 GiB MMIO hole will only see >

[Xen-devel] [PATCH v4 08/14] hvmloader: Locate the BIOS blob

2016-03-14 Thread Anthony PERARD
The BIOS can be found an entry called "bios" of the modlist of the hvm_start_info struct. The found BIOS blob is not loaded by this patch, but only passed as argument to bios_load() function. It is going to be used by the next few patches. Signed-off-by: Anthony PERARD --- Changes in V4: - add

[Xen-devel] [PATCH v4 05/14] libxl: Load guest BIOS from file

2016-03-14 Thread Anthony PERARD
The path to the BIOS blob can be override by the xl's bios_override option, or provided by u.hvm.bios_firmware in the domain_build_info struct by other libxl user. Signed-off-by: Anthony PERARD --- Change in V4: - updating man page to have bios_override described. - return ERROR_INVAL in libxl__

[Xen-devel] [PATCH v4 00/14] Load BIOS via toolstack instead of been embedded in hvmloader.

2016-03-14 Thread Anthony PERARD
Hi all, Few changes in V4: I leave the ACPI alone and only load the BIOS via libxl now. Detail of changes in each patches. I've look at loading the BIOS via the toolstack instead of having them embedded in the hvmloader binary. After this patch series, hvmloader compilation would be indenpen

[Xen-devel] [PATCH v4 13/14] hvmloader: Always build-in SeaBIOS and OVMF loader

2016-03-14 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- tools/firmware/hvmloader/Makefile| 11 +-- tools/firmware/hvmloader/hvmloader.c | 4 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile ind

[Xen-devel] [PATCH v4 11/14] hvmloader: Load OVMF from modules

2016-03-14 Thread Anthony PERARD
... and do not include the OVMF ROM into hvmloader anymore. Signed-off-by: Anthony PERARD --- Change in V4: - check if source and dest of ovmf binary does not overlaps Change in V3: - change makefile to not include ovmf rom into roms.inc. - update the struct bios_config with bios destination ---

[Xen-devel] [PATCH v4 14/14] configure: do not depend on SEABIOS_PATH or OVMF_PATH ...

2016-03-14 Thread Anthony PERARD
... to compile SeaBIOS and OVMF. Only depends on CONFIG_*. If --with-system-* configure option is used, then set *_CONFIG=n to not compile SEABIOS and OVMF. Signed-off-by: Anthony PERARD --- Change in V4: - change subject prefix Please, run ./autogen.sh on this patch. --- tools/configure.ac

[Xen-devel] [PATCH v4 12/14] hvmloader: Specific bios_load function required

2016-03-14 Thread Anthony PERARD
All BIOS but ROMBIOS needs to be loaded via modules. ROMBIOS is handled as a special case. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- No change in V4. Change in V3: - reprint Main BIOS in bios map with now available information from bios modules. - handle rombios, and keep its b

[Xen-devel] [PATCH v4 10/14] hvmloader: Load SeaBIOS from hvm_start_info modules

2016-03-14 Thread Anthony PERARD
... and do not include the SeaBIOS ROM into hvmloader anymore. This also fix the dependency on roms.inc, hvmloader.o does not include it. Signed-off-by: Anthony PERARD --- Change in V4: - check that seabios_config.bios_address have a probably good value instead of checking only if it's set. C

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Linus Torvalds
On Mon, Mar 14, 2016 at 10:17 AM, Andy Lutomirski wrote: > > So yes, let's please warn. I'm okay with removing the panic_on_oops > thing though. (But if anyone suggests that we should stop OOPSing on > bad kernel page faults, I *will* fight back.) Bad kernel page faults are something completely

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Linus Torvalds
On Mon, Mar 14, 2016 at 11:04 AM, Linus Torvalds wrote: > > None of this insane complicated crap that buys us exactly *nothing*, > and depends on fancy new exception handling support etc etc. Actually, the one _new_ thing we could do is to instead of removing the old crappy rdmsr()/wrmsr() implem

Re: [Xen-devel] [PATCH] xen: Restore p2m_access_t enum order to allow bitmask semantics

2016-03-14 Thread George Dunlap
On Fri, Mar 11, 2016 at 8:53 AM, Malcolm Crossley wrote: > On 10/03/16 20:48, Tamas K Lengyel wrote: >> >> >> On Wed, Mar 9, 2016 at 5:30 PM, George Dunlap > > wrote: >> >> On 08/03/16 15:30, Malcolm Crossley wrote: >> > Nested hap code assumed implict bitm

[Xen-devel] [linux-mingo-tip-master test] 86186: regressions - FAIL

2016-03-14 Thread osstest service owner
flight 86186 linux-mingo-tip-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/86186/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-rumpuserxen6 xen-build fail REGR. vs. 60684 test-amd64

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Linus Torvalds
On Mon, Mar 14, 2016 at 11:10 AM, Andy Lutomirski wrote: > > A couple of the wrmsr users actually care about performance. These > are the ones involved in context switching and, to a lesser extent, in > switching in and out of guest mode. .. ok, see the crossed emails. I'd *much* rather special

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 11:04 AM, Linus Torvalds wrote: > On Mon, Mar 14, 2016 at 10:17 AM, Andy Lutomirski wrote: >> >> So yes, let's please warn. I'm okay with removing the panic_on_oops >> thing though. (But if anyone suggests that we should stop OOPSing on >> bad kernel page faults, I *will

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 11:15 AM, Linus Torvalds wrote: > On Mon, Mar 14, 2016 at 11:10 AM, Andy Lutomirski wrote: >> >> A couple of the wrmsr users actually care about performance. These >> are the ones involved in context switching and, to a lesser extent, in >> switching in and out of guest m

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Linus Torvalds
On Mon, Mar 14, 2016 at 11:24 AM, Andy Lutomirski wrote: > > The code in my queue is, literally: > > bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup, > struct pt_regs *regs, int trapnr) > { > WARN_ONCE(1, "unchecked MSR access error: RDMSR from 0x%x", >

Re: [Xen-devel] [PATCH v4 2/5] x86/msr: Carry on after a non-"safe" MSR access fails without !panic_on_oops

2016-03-14 Thread Andy Lutomirski
On Mon, Mar 14, 2016 at 11:40 AM, Linus Torvalds wrote: > On Mon, Mar 14, 2016 at 11:24 AM, Andy Lutomirski wrote: >> >> The code in my queue is, literally: >> >> bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup, >> struct pt_regs *regs, int trapnr) >> { >>

Re: [Xen-devel] [RFC] tools: don't use qemu default config

2016-03-14 Thread Jim Fehlig
On 03/11/2016 03:28 PM, Konrad Rzeszutek Wilk wrote: > On Fri, Mar 11, 2016 at 03:08:30PM -0700, Jim Fehlig wrote: >> I recently changed SUSE's Xen package to use the distro qemu instead of >> building >> qemu-xen. This got some other eyes looking at Xen's use of qemu and it was >> noticed that li

  1   2   >