[Xen-devel] [xen-4.5-testing baseline-only test] 71256: regressions - FAIL

2017-05-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71256 xen-4.5-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71256/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-winxpsp3 15 guest-l

Re: [Xen-devel] [PATCH v3] x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen

2017-05-04 Thread Juergen Gross
Any comments? Juergen On 27/04/17 07:01, Juergen Gross wrote: > When running as Xen pv guest X86_BUG_SYSRET_SS_ATTRS must not be set > on AMD cpus. > > This bug/feature bit is kind of special as it will be used very early > when switching threads. Setting the bit and clearing it a little bit >

Re: [Xen-devel] [PATCH 2/2] xen/input: add multi-touch support

2017-05-04 Thread Oleksandr Andrushchenko
Hi, Dmitry! On 04/21/2017 09:40 AM, Oleksandr Andrushchenko wrote: Hi, Dmitry! On 04/21/2017 05:10 AM, Dmitry Torokhov wrote: Hi Oleksandr, On Thu, Apr 13, 2017 at 02:38:04PM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Extend xen_kbdfront to provide multi-touch supp

Re: [Xen-devel] [PATCH 1/2] xen/input: use string constants from PV protocol

2017-05-04 Thread Oleksandr Andrushchenko
Hello, Dmitry! On 04/21/2017 09:42 AM, Oleksandr Andrushchenko wrote: On 04/21/2017 05:11 AM, Dmitry Torokhov wrote: On Thu, Apr 13, 2017 at 02:38:03PM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Xen input para-virtual protocol defines string constants used by both bac

Re: [Xen-devel] [dpdk-dev] [PATCH] maintainers: claim responsability for xen

2017-05-04 Thread Thomas Monjalon
Ping The Xen dom0 support in DPDK seems dead. Reminder: Last time we talked about, it was because of a severe bug which is not fixed yet: http://dpdk.org/ml/archives/dev/2016-July/044207.html http://dpdk.org/ml/archives/dev/2016-July/044376.html The request (9 months ago) was to g

Re: [Xen-devel] [RFC PATCH 09/10] ARM: vGIC: introduce vgic_get/put_pending_irq

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > > @@ -28,11 +27,20 @@ static inline int > > local_events_need_delivery_nomask(void) > > * case. > > */ > > if ( gic_events_need_delivery() ) > > -return 1; > > +{ > > +ret = 1; > > +} > > +else > > +{ > > +

Re: [Xen-devel] [PATCH for-4.9] xen/arm: efi: Avoid out-of-bounds write in meminfo_add_bank

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > Commit 2c77db77 "xen/arm: efi: Avoid duplicating the addition of a new > bank", introduced a new function meminfo_add_bank that add a new bank. > This new code fails to check correctly the size of the array which may > result to an out-of-bounds write. > >

Re: [Xen-devel] [PATCH v3 2/2][XTF] xtf/vpmu: MSR read/write tests for VPMU

2017-05-04 Thread Mohit Gambhir
Adding personal email id for future correspondence on this thread - mgamb...@outlook.com On 05/04/2017 05:13 PM, Mohit Gambhir wrote: On 05/03/2017 04:41 PM, Andrew Cooper wrote: On 25/04/17 22:45, Mohit Gambhir wrote: diff --git a/tests/vpmu/Makefile b/tests/vpmu/Makefile new file mode 100

[Xen-devel] [PATCH v5 0/2] xtf/vpmu VPMU tests

2017-05-04 Thread Mohit Gambhir
v5: Incorporated review comments - + Changed test type from utility to functional + Test is now defined only for hvm64 instead of ALL_ENVIRONMENTS + Several code styling and formatting changes + Expanded test description for doxygen + Added max_leaf check before cpuid_count + Addded PDCM bit ch

[Xen-devel] [PATCH v5 1/2] xtf/vpmu: Add Intel PMU MSR addresses

2017-05-04 Thread Mohit Gambhir
This patch adds Intel PMU MSR addresses as macros for VPMU testing Signed-off-by: Mohit Gambhir --- arch/x86/include/arch/msr-index.h | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/include/arch/msr-index.h b/arch/x86/include/arch/msr-index.h index 72373c6..911d7f9 10

[Xen-devel] [PATCH v5 2/2] xtf/vpmu: MSR read/write tests for VPMU

2017-05-04 Thread Mohit Gambhir
This patch tests VPMU functionality in the hypervisor on Intel machines. The tests write to all valid bits in the MSRs that get exposed to the guests when VPMU is enabled. The tests also write invalid values to the bits that should be masked and expect the wrmsr call to fault. The tests are curren

[Xen-devel] [PATCH v3] x86/vpmu_intel: Fix hypervisor crash by masking PC bit in MSR_P6_EVNTSEL

2017-05-04 Thread Mohit Gambhir
Setting Pin Control (PC) bit (19) in MSR_P6_EVNTSEL results in a General Protection Fault and thus results in a hypervisor crash. This behavior has been observed on two generations of Intel processors namely, Haswell and Broadwell. Other Intel processor generations were not tested. However, it does

Re: [Xen-devel] [PATCH v3 2/2][XTF] xtf/vpmu: MSR read/write tests for VPMU

2017-05-04 Thread Mohit Gambhir
On 05/03/2017 04:41 PM, Andrew Cooper wrote: On 25/04/17 22:45, Mohit Gambhir wrote: diff --git a/tests/vpmu/Makefile b/tests/vpmu/Makefile new file mode 100644 index 000..1eaf436 --- /dev/null +++ b/tests/vpmu/Makefile @@ -0,0 +1,9 @@ +include $(ROOT)/build/common.mk + +NAME := vpmu

[Xen-devel] [xen-4.7-testing test] 108212: regressions - FAIL

2017-05-04 Thread osstest service owner
flight 108212 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/108212/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 108166

Re: [Xen-devel] [PATCH 06/10 v2] xen/arm: vpl011: Add vuart ring-buf and evtchn to xenstore

2017-05-04 Thread Stefano Stabellini
On Fri, 5 May 2017, Bhupinder Thakur wrote: > Hi, > > > >> >> > It looks like you are reusing the libxl__device_console_add call for > >> >> > the > >> >> > main PV console for the domain, to also add the vuart nodes to > >> >> > xenstore. > >> >> > > >> >> > I don't think it is a good idea to

[Xen-devel] [PATCH for-4.9] xen/arm: efi: Avoid out-of-bounds write in meminfo_add_bank

2017-05-04 Thread Julien Grall
Commit 2c77db77 "xen/arm: efi: Avoid duplicating the addition of a new bank", introduced a new function meminfo_add_bank that add a new bank. This new code fails to check correctly the size of the array which may result to an out-of-bounds write. Coverity-ID: 1433183 Signed-off-by: Julien Grall

Re: [Xen-devel] [PATCH 06/10 v2] xen/arm: vpl011: Add vuart ring-buf and evtchn to xenstore

2017-05-04 Thread Bhupinder Thakur
Hi, >> >> > It looks like you are reusing the libxl__device_console_add call for the >> >> > main PV console for the domain, to also add the vuart nodes to xenstore. >> >> > >> >> > I don't think it is a good idea to mix the two. I suggest to introduce a >> >> > new libxl__device call to introduc

Re: [Xen-devel] [PATCH v2] xen/arm32: Distinguish guest SError from Xen data aborts

2017-05-04 Thread Julien Grall
Hi, On 05/04/2017 07:32 PM, Stefano Stabellini wrote: On Thu, 4 May 2017, Wei Chen wrote: ARM32 doesn't have an exception similar to hyp_sync of ARM64 to catch the synchronous data abort (For example, a NULL pointer has been referenced). Hence the SError and sync data abort will be caught by th

Re: [Xen-devel] [PATCH 3/3] xen/arm: Survive unknown traps from guests

2017-05-04 Thread Julien Grall
On 05/04/2017 08:14 PM, Stefano Stabellini wrote: On Thu, 4 May 2017, Julien Grall wrote: Currently we crash Xen if we see an ESR_EL2.EC value we don't recognise. As configurable disables/enables are added to the architecture (controlled by RES1/RESO bits respectively), with associated synchro

Re: [Xen-devel] [PATCH 3/3] xen/arm: Survive unknown traps from guests

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > Currently we crash Xen if we see an ESR_EL2.EC value we don't recognise. > As configurable disables/enables are added to the architecture > (controlled by RES1/RESO bits respectively), with associated synchronous > exceptions, it may be possible for a guest

Re: [Xen-devel] [PATCH 2/3] xen/arm: do_trap_hypervisor: Separate hypervisor and guest traps

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > The function do_trap_hypervisor is currently handling both trap coming > from the hypervisor and the guest. This makes difficult to get specific > behavior when a trap is coming from either the guest or the hypervisor. > > Split the function into two parts

Re: [Xen-devel] [PATCH 1/3] xen/arm: arm32: Rename the trap to the correct name

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Julien Grall wrote: > Per Table B1-3 in ARM DDI 0406C.c, the vector 0x8 for hyp is called > "Hypervisor Call". > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > xen/arch/arm/arm32/entry.S | 4 ++-- > xen/arch/arm/arm32/traps.c | 4 ++-- > 2 files cha

[Xen-devel] [ovmf test] 108216: regressions - FAIL

2017-05-04 Thread osstest service owner
flight 108216 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/108216/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops 5 kernel-build fail REGR. vs. 108170 Tests which did not succee

Re: [Xen-devel] [PATCH v2] xen/arm32: Distinguish guest SError from Xen data aborts

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Wei Chen wrote: > ARM32 doesn't have an exception similar to hyp_sync of ARM64 to catch > the synchronous data abort (For example, a NULL pointer has been referenced). > Hence the SError and sync data abort will be caught by the same data abort > exception. > > Since commit "3f

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

2017-05-04 Thread osstest service owner
flight 108207 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/108207/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 6 xen-boot fail REGR. vs. 107358 test-arm64-arm64-libv

Re: [Xen-devel] [PATCH 2/3] xen/arm: do_trap_hypervisor: Separate hypervisor and guest traps

2017-05-04 Thread Julien Grall
Hi Andrew, On 04/05/17 19:03, Andrew Cooper wrote: On 04/05/17 18:54, Julien Grall wrote: diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 6010c96c54..c8ce62ff96 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2805,7 +2805,7 @@ static void enter_hypervisor_head(st

Re: [Xen-devel] [PATCH 2/3] xen/arm: do_trap_hypervisor: Separate hypervisor and guest traps

2017-05-04 Thread Andrew Cooper
On 04/05/17 18:54, Julien Grall wrote: > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c > index 6010c96c54..c8ce62ff96 100644 > --- a/xen/arch/arm/traps.c > +++ b/xen/arch/arm/traps.c > @@ -2805,7 +2805,7 @@ static void enter_hypervisor_head(struct cpu_user_regs > *regs) > } > } >

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Stefano Stabellini
On Thu, 4 May 2017, Ian Jackson wrote: > Stepping back a bit: It is indeed important that our code is easy to > understand and modify, expresses its intent clearly, and helps future > programmers avoid writing bugs. But it is also important that > contributors feel valued, and feel a sense of owne

[Xen-devel] [PATCH 0/3] xen/arm: Survive unknown traps from guests

2017-05-04 Thread Julien Grall
Hi all, This small patch series ensure that Xen will not die when receiving unknown trap from the guests. I am not aware of any issue with platform we currently support, so I am not sure whether it would be Xen 4.9 material. Cheers, Julien Grall (3): xen/arm: arm32: Rename the trap to the corr

[Xen-devel] [PATCH 1/3] xen/arm: arm32: Rename the trap to the correct name

2017-05-04 Thread Julien Grall
Per Table B1-3 in ARM DDI 0406C.c, the vector 0x8 for hyp is called "Hypervisor Call". Signed-off-by: Julien Grall --- xen/arch/arm/arm32/entry.S | 4 ++-- xen/arch/arm/arm32/traps.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/arm32/entry.S b/xen/arch/ar

Re: [Xen-devel] [PATCH v2] xen/mapcache: store dma information in revmapcache entries for debugging

2017-05-04 Thread Anthony PERARD
On Wed, May 03, 2017 at 02:00:35PM -0700, Stefano Stabellini wrote: > The Xen mapcache is able to create long term mappings, they are called > "locked" mappings. The third parameter of the xen_map_cache call > specifies if a mapping is a "locked" mapping. > > > >From the QEMU point of view there

[Xen-devel] [PATCH 2/3] xen/arm: do_trap_hypervisor: Separate hypervisor and guest traps

2017-05-04 Thread Julien Grall
The function do_trap_hypervisor is currently handling both trap coming from the hypervisor and the guest. This makes difficult to get specific behavior when a trap is coming from either the guest or the hypervisor. Split the function into two parts: - do_trap_guest_sync to handle guest traps

[Xen-devel] [PATCH 3/3] xen/arm: Survive unknown traps from guests

2017-05-04 Thread Julien Grall
Currently we crash Xen if we see an ESR_EL2.EC value we don't recognise. As configurable disables/enables are added to the architecture (controlled by RES1/RESO bits respectively), with associated synchronous exceptions, it may be possible for a guest to trigger exceptions with classes that we don'

Re: [Xen-devel] [PATCH] x86: polish __{get,put}_user_{,no}check()

2017-05-04 Thread Julien Grall
Hi Andrew, On 04/05/17 18:52, Andrew Cooper wrote: On 04/05/17 09:52, Julien Grall wrote: Hi, On 02/05/17 14:23, Jan Beulich wrote: The primary purpose is correcting a latent bug in __get_user_check() (the macro has no active user at present): The access_ok() check should be before the actual

Re: [Xen-devel] [PATCH] x86: polish __{get,put}_user_{,no}check()

2017-05-04 Thread Andrew Cooper
On 04/05/17 09:52, Julien Grall wrote: > Hi, > > On 02/05/17 14:23, Jan Beulich wrote: >> The primary purpose is correcting a latent bug in __get_user_check() >> (the macro has no active user at present): The access_ok() check should >> be before the actual access, or else any PV guest could initia

[Xen-devel] [xen-unstable-smoke test] 108235: tolerable trouble: broken/pass - PUSHED

2017-05-04 Thread osstest service owner
flight 108235 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/108235/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12 mig

Re: [Xen-devel] [RFC PATCH 09/10] ARM: vGIC: introduce vgic_get/put_pending_irq

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: So far there is always a statically allocated struct pending_irq for each interrupt that we deal with. To prepare for dynamically allocated LPIs, introduce a put/get wrapper to get hold of a pending_irq pointer. So far get() just returns the sam

Re: [Xen-devel] [PATCH v3 7/9] mm: Keep pages available for allocation while scrubbing

2017-05-04 Thread Boris Ostrovsky
On 05/04/2017 12:03 PM, Jan Beulich wrote: On 14.04.17 at 17:37, wrote: >> Instead of scrubbing pages while holding heap lock we can mark >> buddy's head as being scrubbed and drop the lock temporarily. >> If someone (most likely alloc_heap_pages()) tries to access >> this chunk it will signa

Re: [Xen-devel] [RFC PATCH 08/10] ARM: vGIC: move target vcpu from irq_rank to struct pending_irq

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: So far we kept the target VCPU for SPIs in the rank structure. Move that information over into pending_irq. This changes vgic_get_target_vcpu(), which now takes only a domain and a struct pending_irq to get the target vCPU, in a way that does no

Re: [Xen-devel] [PATCH v3 5/9] mm: Do not discard already-scrubbed pages if softirqs are pending

2017-05-04 Thread Boris Ostrovsky
On 05/04/2017 11:43 AM, Jan Beulich wrote: On 14.04.17 at 17:37, wrote: >> While scrubbing from idle loop, check for softirqs every 256 pages. >> If softirq is pending, don't scrub any further and merge the >> partially-scrubbed buddy back into heap by breaking the clean portion >> into small

Re: [Xen-devel] [PATCH v3 4/9] mm: Scrub memory from idle loop

2017-05-04 Thread Boris Ostrovsky
On 05/04/2017 11:31 AM, Jan Beulich wrote: On 14.04.17 at 17:37, wrote: >> --- a/xen/common/page_alloc.c >> +++ b/xen/common/page_alloc.c >> @@ -1035,16 +1035,82 @@ merge_and_free_buddy(struct page_info *pg, unsigned >> int node, >> return pg; >> } >> >> -static void scrub_free_pages

[Xen-devel] [xen-4.8-testing baseline-only test] 71253: tolerable trouble: blocked/broken/fail/pass

2017-05-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71253 xen-4.8-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71253/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-qemuu-nested-intel 16 debian-hvm-ins

Re: [Xen-devel] [RFC PATCH 06/10] ARM: vGIC: move config from irq_rank to struct pending_irq

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: Currently we store the interrupt type configuration (level or edge triggered) in the rank structure. Move this value into struct pending_irq. We just need one bit (edge or level), so use one of the status bits. Signed-off-by: Andre Przywara --

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-04 Thread Julien Grall
On 04/05/17 16:31, Andre Przywara wrote: diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index f4ae454..44363bb 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -356,11 +356,16 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) while ( (i = find_next_bit(&mask,

Re: [Xen-devel] [RFC PATCH 05/10] ARM: vGIC: move priority from irq_rank to struct pending_irq

2017-05-04 Thread Julien Grall
On 04/05/17 17:39, Julien Grall wrote: Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: Currently we store the priority for newly triggered IRQs in the rank structure. To get eventually rid of this structure, move this value into the struct pending_irq. This one already contains a priority

Re: [Xen-devel] [RFC PATCH 05/10] ARM: vGIC: move priority from irq_rank to struct pending_irq

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: Currently we store the priority for newly triggered IRQs in the rank structure. To get eventually rid of this structure, move this value into the struct pending_irq. This one already contains a priority value, but we have to keep the two apart,

Re: [Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: Introduce the proper locking sequence for the new pending_irq lock. This takes the lock around multiple accesses to struct members, also makes sure we observe the locking order (VGIC VCPU lock first, then pending_irq lock). This locking order

Re: [Xen-devel] [RFC] scf: SCF device tree and configuration documentation

2017-05-04 Thread Andrii Anisov
Julien, On 04.05.17 15:46, Julien Grall wrote: I understand these concerns, but not sure should we be scared of attack from a domain privileged enough to run domains? Whilst the domain is privileged enough to run domains, the configuration can be provided by a user (for instance in cloud

Re: [Xen-devel] [PATCH v3 7/9] mm: Keep pages available for allocation while scrubbing

2017-05-04 Thread Jan Beulich
>>> On 14.04.17 at 17:37, wrote: > Instead of scrubbing pages while holding heap lock we can mark > buddy's head as being scrubbed and drop the lock temporarily. > If someone (most likely alloc_heap_pages()) tries to access > this chunk it will signal the scrubber to abort scrub by setting > head'

[Xen-devel] Proposal to drop Windows XP tests from Xen Project CI

2017-05-04 Thread Ian Jackson
Recently, the tests of Windows XP SP3 that are run by osstest, as part of the Xen Project's test suite, have started failing a lot more. It is not clear what has caused this. The failures are causing blockages: several of our `staging' branches are not gettting pushed to the corresponding `stable

Re: [Xen-devel] [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig

2017-05-04 Thread Daniel Kiper
Hey, On Tue, May 02, 2017 at 03:06:24PM +0800, fu@linaro.org wrote: > From: Fu Wei > > This patchset add xen_boot support into grup-mkconfig for > generating xen boot entrances automatically > > Also update the docs/grub.texi for new xen_boot commands. Slowly recovering after long weekend in

Re: [Xen-devel] [RFC PATCH 01/10] ARM: vGIC: remove rank lock from IRQ routing functions

2017-05-04 Thread Julien Grall
Hi Andre, On 04/05/17 16:31, Andre Przywara wrote: gic_route_irq_to_guest() and gic_remove_irq_from_guest() take the rank lock, however never actually access the rank structure. Avoid taking the lock in those two functions and remove some more unneeded code on the way. The rank is here to prot

[Xen-devel] [xen-unstable-smoke test] 108232: tolerable trouble: broken/pass - PUSHED

2017-05-04 Thread osstest service owner
flight 108232 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/108232/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12 mig

Re: [Xen-devel] [RFC] scf: SCF device tree and configuration documentation

2017-05-04 Thread Andrii Anisov
Julien, What I would like to understand is what are the information that the hypervisors as to know for sharing co-processor? So far I have: - MMIOs - Interrupts Anything else? IOMMU bindings. This knowledge enough to get the physical coprocessor shared. In order to spawn a virtual

Re: [Xen-devel] [PATCH v3 5/9] mm: Do not discard already-scrubbed pages if softirqs are pending

2017-05-04 Thread Jan Beulich
>>> On 14.04.17 at 17:37, wrote: > While scrubbing from idle loop, check for softirqs every 256 pages. > If softirq is pending, don't scrub any further and merge the > partially-scrubbed buddy back into heap by breaking the clean portion > into smaller power-of-2 chunks. Then repeat the same proce

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Jan Beulich
>>> On 04.05.17 at 17:17, wrote: > On 05/04/17 17:57, Tamas K Lengyel wrote: >> On Thu, May 4, 2017 at 5:22 AM, Jan Beulich wrote: >> On 04.05.17 at 11:14, wrote: On 05/04/17 12:11, Jan Beulich wrote: On 04.05.17 at 11:00, wrote: >> Created arch/x86/hvm/vm_event.c and incl

Re: [Xen-devel] [PATCH v3 3/9] mm: Scrub pages in alloc_heap_pages() if needed

2017-05-04 Thread Jan Beulich
>>> On 04.05.17 at 17:04, wrote: > On 05/04/2017 10:44 AM, Jan Beulich wrote: > On 14.04.17 at 17:37, wrote: >>> When allocating pages in alloc_heap_pages() first look for clean pages. >> As expressed before, there are cases when we don't really need >> scrubbed pages. Hence the local variabl

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Tamas K Lengyel
On Thu, May 4, 2017 at 11:17 AM, Razvan Cojocaru wrote: > On 05/04/17 17:57, Tamas K Lengyel wrote: >> On Thu, May 4, 2017 at 5:22 AM, Jan Beulich wrote: >> On 04.05.17 at 11:14, wrote: On 05/04/17 12:11, Jan Beulich wrote: On 04.05.17 at 11:00, wrote: >> Created arch/x86/

Re: [Xen-devel] [PATCH v3 4/9] mm: Scrub memory from idle loop

2017-05-04 Thread Jan Beulich
>>> On 14.04.17 at 17:37, wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -1035,16 +1035,82 @@ merge_and_free_buddy(struct page_info *pg, unsigned > int node, > return pg; > } > > -static void scrub_free_pages(unsigned int node) > +static nodemask_t node_scrubb

[Xen-devel] [RFC PATCH 02/10] ARM: vGIC: rework gic_raise_*_irq() functions

2017-05-04 Thread Andre Przywara
Currently gic_raise_inflight_irq() and gic_raise_guest_irq() are used to queue interrupts to a VCPU, for which they are given a VCPU and an interrupt number. To allow proper locking and simplify further changes, change their prototypes to take a struct pending_irq directly (since the callers have t

[Xen-devel] [RFC PATCH 08/10] ARM: vGIC: move target vcpu from irq_rank to struct pending_irq

2017-05-04 Thread Andre Przywara
So far we kept the target VCPU for SPIs in the rank structure. Move that information over into pending_irq. This changes vgic_get_target_vcpu(), which now takes only a domain and a struct pending_irq to get the target vCPU, in a way that does not necessarily require the pending_irq lock to be held.

[Xen-devel] [RFC PATCH 01/10] ARM: vGIC: remove rank lock from IRQ routing functions

2017-05-04 Thread Andre Przywara
gic_route_irq_to_guest() and gic_remove_irq_from_guest() take the rank lock, however never actually access the rank structure. Avoid taking the lock in those two functions and remove some more unneeded code on the way. Signed-off-by: Andre Przywara --- xen/arch/arm/gic.c | 28 ---

[Xen-devel] [RFC PATCH 05/10] ARM: vGIC: move priority from irq_rank to struct pending_irq

2017-05-04 Thread Andre Przywara
Currently we store the priority for newly triggered IRQs in the rank structure. To get eventually rid of this structure, move this value into the struct pending_irq. This one already contains a priority value, but we have to keep the two apart, as the priority for guest visible IRQs must not change

[Xen-devel] [RFC PATCH 10/10] ARM: vGIC: remove struct irq_rank and support functions

2017-05-04 Thread Andre Przywara
Now that every information formerly stored in the irq_rank has been transferred over to struct pending_irq, we can get rid of all dead code declaring and initializing the structure and all the support functions. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic.c | 55

[Xen-devel] [RFC PATCH 00/10] ARM VGIC rework: remove rank, introduce per-IRQ lock

2017-05-04 Thread Andre Przywara
Hi, this is a sketch of the first step of some ARM VGIC rework. While working more closely with the code during the ITS patch series, we identified some shortcomings with the existing code which should be fixed. This series addresses two, somewhat related, fields: It introduces a per-IRQ lock to p

[Xen-devel] [RFC PATCH 06/10] ARM: vGIC: move config from irq_rank to struct pending_irq

2017-05-04 Thread Andre Przywara
Currently we store the interrupt type configuration (level or edge triggered) in the rank structure. Move this value into struct pending_irq. We just need one bit (edge or level), so use one of the status bits. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic-v2.c | 29 ++-

[Xen-devel] [RFC PATCH 09/10] ARM: vGIC: introduce vgic_get/put_pending_irq

2017-05-04 Thread Andre Przywara
So far there is always a statically allocated struct pending_irq for each interrupt that we deal with. To prepare for dynamically allocated LPIs, introduce a put/get wrapper to get hold of a pending_irq pointer. So far get() just returns the same pointer and put() is empty, but this change allows t

[Xen-devel] [RFC PATCH 07/10] ARM: vGIC: move enable status from irq_rank to struct pending_irq

2017-05-04 Thread Andre Przywara
Currently we store the enable bit of an interrupt in the rank structure. Remove it from there and let the MMIO emulation use the already existing GIC_IRQ_GUEST_ENABLED in the status bits of struct pending_irq. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic-v2.c | 38

[Xen-devel] [RFC PATCH 04/10] ARM: vGIC: add struct pending_irq locking

2017-05-04 Thread Andre Przywara
Introduce the proper locking sequence for the new pending_irq lock. This takes the lock around multiple accesses to struct members, also makes sure we observe the locking order (VGIC VCPU lock first, then pending_irq lock). Signed-off-by: Andre Przywara --- xen/arch/arm/gic.c | 26 +

[Xen-devel] [RFC PATCH 03/10] ARM: vGIC: introduce and initialize pending_irq lock

2017-05-04 Thread Andre Przywara
Currently we protect the pending_irq structure with the corresponding VGIC VCPU lock. For future extensions this leads to problems (for instance if an IRQ is migrating), so let's introduce a per-IRQ lock, which protects the consistency of this structure independent from any VCPU. This patch just in

Re: [Xen-devel] [PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-04 Thread David Miller
From: Vitaly Kuznetsov Date: Thu, 4 May 2017 14:23:04 +0200 > Unavoidable crashes in netfront_resume() and netback_changed() after a > previous fail in talk_to_netback() (e.g. when we fail to read MAC from > xenstore) were discovered. The failure path in talk_to_netback() does > unregister/free

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Razvan Cojocaru
On 05/04/17 17:57, Tamas K Lengyel wrote: > On Thu, May 4, 2017 at 5:22 AM, Jan Beulich wrote: > On 04.05.17 at 11:14, wrote: >>> On 05/04/17 12:11, Jan Beulich wrote: >>> On 04.05.17 at 11:00, wrote: > Created arch/x86/hvm/vm_event.c and include/asm-x86/hvm/vm_event.h, > where H

Re: [Xen-devel] [PATCH v3 3/9] mm: Scrub pages in alloc_heap_pages() if needed

2017-05-04 Thread Boris Ostrovsky
On 05/04/2017 10:44 AM, Jan Beulich wrote: On 14.04.17 at 17:37, wrote: >> When allocating pages in alloc_heap_pages() first look for clean pages. > As expressed before, there are cases when we don't really need > scrubbed pages. Hence the local variable "use_unscrubbed" below > should really

Re: [Xen-devel] [PATCH for-4.9] libs/devicemodel: Fix dependency with libxencall

2017-05-04 Thread Wei Liu
On Thu, May 04, 2017 at 01:53:00PM +0100, Julien Grall wrote: > > > On 04/05/17 11:55, Ian Jackson wrote: > > Anthony PERARD writes ("[PATCH for-4.9] libs/devicemodel: Fix dependency > > with libxencall"): > > > libxendevicemodel.so do depends on libxencall.so but the dependency was > > > missin

Re: [Xen-devel] [PATCH v3 2/9] mm: Place unscrubbed pages at the end of pagelist

2017-05-04 Thread Jan Beulich
>>> On 04.05.17 at 16:53, wrote: > On 05/04/2017 06:17 AM, Jan Beulich wrote: > On 14.04.17 at 17:37, wrote: >>> @@ -678,6 +680,20 @@ static void check_low_mem_virq(void) >>> } >>> } >>> >>> +/* Pages that need scrub are added to tail, otherwise to head. */ >>> +static void page_list_

[Xen-devel] [distros-debian-wheezy test] 71255: tolerable trouble: broken/pass

2017-05-04 Thread Platform Team regression test user
flight 71255 distros-debian-wheezy real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71255/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: build-arm64 2 hosts-allocate broken never pass build-arm64-pvops

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Tamas K Lengyel
On Thu, May 4, 2017 at 5:22 AM, Jan Beulich wrote: On 04.05.17 at 11:14, wrote: >> On 05/04/17 12:11, Jan Beulich wrote: >> On 04.05.17 at 11:00, wrote: Created arch/x86/hvm/vm_event.c and include/asm-x86/hvm/vm_event.h, where HVM-specific vm_event-related code will live. This

Re: [Xen-devel] [PATCH v3 2/9] mm: Place unscrubbed pages at the end of pagelist

2017-05-04 Thread Boris Ostrovsky
On 05/04/2017 06:17 AM, Jan Beulich wrote: On 14.04.17 at 17:37, wrote: >> @@ -678,6 +680,20 @@ static void check_low_mem_virq(void) >> } >> } >> >> +/* Pages that need scrub are added to tail, otherwise to head. */ >> +static void page_list_add_scrub(struct page_info *pg, unsigned in

Re: [Xen-devel] [PATCH v3 3/9] mm: Scrub pages in alloc_heap_pages() if needed

2017-05-04 Thread Jan Beulich
>>> On 14.04.17 at 17:37, wrote: > When allocating pages in alloc_heap_pages() first look for clean pages. As expressed before, there are cases when we don't really need scrubbed pages. Hence the local variable "use_unscrubbed" below should really be some form of input to alloc_heap_pages(). > -

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Ian Jackson
Jan Beulich writes ("Re: differing opinions between maintainers vs patch acks"): > On 04.05.17 at 14:44, wrote: > > Well, at one level I agree with Andrew on at least the 1*1 and 0*8 > > question. These seem clearer to me as they state the programmer's > > intent as well as merely the effect. I

Re: [Xen-devel] [linux-linus test] 108160: regressions - FAIL

2017-05-04 Thread Boris Ostrovsky
On 05/03/2017 05:35 PM, osstest service owner wrote: > flight 108160 linux-linus real [real] > http://logs.test-lab.xenproject.org/osstest/logs/108160/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > test-amd64-amd64-xl-pvh-intel 6

[Xen-devel] [PATCH v2] x86: correct create_bounce_frame

2017-05-04 Thread Jan Beulich
Commit d9b7ef209a7 ("x86: drop failsafe callback invocation from assembly") didn't go quite far enough with the cleanup it did: The changed maximum frame size should also have been reflected in the early address range check (which has now been pointed out to have been wrong anyway, using 60 instead

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Andrew Cooper
On 04/05/17 13:54, Jan Beulich wrote: On 04.05.17 at 14:44, wrote: >> Andrew Cooper writes ("Re: differing opinions between maintainers vs patch >> acks"): >>> Taking this example, as you have called it out, but without going into >>> the details. >>> >>> I accept that the issues under debat

Re: [Xen-devel] [OSSTEST PATCH 3/3] make-flight: Drop Windows XP tests

2017-05-04 Thread Jan Beulich
>>> On 04.05.17 at 14:20, wrote: > XP is really quite obsolete now. > > From diffing standalone-generate-dump-flight-runvars output, > the tests that are dropped are: > test-amd64-amd64-xl-qemut-winxpsp3 > test-amd64-amd64-xl-qemuu-winxpsp3 > test-amd64-i386-xl-qemut-winxpsp3 > test-amd64

Re: [Xen-devel] Security support scope (apropos of Xen and CNA)

2017-05-04 Thread Jan Beulich
>>> On 04.05.17 at 14:53, wrote: > To become a CNA (CVE Numbering Authority), which we would like to do, > we need to provide MITRE's CNA programme with a definition of the > scope of our CNA. That should be the scope of our general security > support, clearly. > > At the moment we don't seem to

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Jan Beulich
>>> On 04.05.17 at 14:44, wrote: > Andrew Cooper writes ("Re: differing opinions between maintainers vs patch > acks"): >> Taking this example, as you have called it out, but without going into >> the details. >> >> I accept that the issues under debate do not have any impact on the >> technical

[Xen-devel] Security support scope (apropos of Xen and CNA)

2017-05-04 Thread Ian Jackson
To become a CNA (CVE Numbering Authority), which we would like to do, we need to provide MITRE's CNA programme with a definition of the scope of our CNA. That should be the scope of our general security support, clearly. At the moment we don't seem to have this written down in a single clear docu

Re: [Xen-devel] [PATCH for-4.9] libs/devicemodel: Fix dependency with libxencall

2017-05-04 Thread Julien Grall
On 04/05/17 11:55, Ian Jackson wrote: Anthony PERARD writes ("[PATCH for-4.9] libs/devicemodel: Fix dependency with libxencall"): libxendevicemodel.so do depends on libxencall.so but the dependency was missing at link time. Acked-by: Ian Jackson IMO this should indeed go into 4.9. Relea

Re: [Xen-devel] [PATCH] VMX: constrain vmx_intr_assist() debugging code to debug builds

2017-05-04 Thread Julien Grall
Hi Jan, On 04/05/17 13:02, Jan Beulich wrote: This is because that code, added by commit 997382b771 ("y86/vmx: dump PIR and vIRR before ASSERT()"), was meant to be removed by the time we finalize 4.9, but the root cause of the ASSERT() wrongly(?) triggering still wasn't found. Take the opportun

Re: [Xen-devel] [RFC for 4.9] [PATCH 0/7] XSAs 213-315 followups

2017-05-04 Thread Julien Grall
Hi Andrew, On 04/05/17 12:11, Andrew Cooper wrote: On 02/05/17 19:05, Andrew Cooper wrote: Various improvements based on observations while investigating and fixing the aformentioned XSAs. All are candidate patches for 4.9 at this point, with patches 2, 3 and 7 being the important ones from an

Re: [Xen-devel] [PATCH] x86/mm: add temporary debugging code to get_page_from_gfn_p2m()

2017-05-04 Thread Julien Grall
Hi Jan, On 04/05/17 13:07, Jan Beulich wrote: On 04.05.17 at 11:42, wrote: On 04/05/17 10:39, Andrew Cooper wrote: On 04/05/17 10:09, Jan Beulich wrote: See the code comment. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Release-acked-by: Julien Grall Thanks, but what about th

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Lars Kurth
On 04/05/2017 13:44, "Ian Jackson" wrote: >Andrew Cooper writes ("Re: differing opinions between maintainers vs >patch acks"): >> Taking this example, as you have called it out, but without going into >> the details. >> >> I accept that the issues under debate do not have any impact on the >>

Re: [Xen-devel] [RFC] scf: SCF device tree and configuration documentation

2017-05-04 Thread Julien Grall
On 04/05/17 13:35, Andrii Anisov wrote: Hello Julien, Hi Andrii, Thank you for your comments. As you may have seen in the description of the option "device_tree", it is complex to verify the partial device tree because of the libfdt design. So without fully auditing libfdt and fixing the

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Ian Jackson
Andrew Cooper writes ("Re: differing opinions between maintainers vs patch acks"): > Taking this example, as you have called it out, but without going into > the details. > > I accept that the issues under debate do not have any impact on the > technical correctness of the fix. Once compiled/ass

Re: [Xen-devel] [RFC] scf: SCF device tree and configuration documentation

2017-05-04 Thread Andrii Anisov
Hello Julien, Thank you for your comments. As you may have seen in the description of the option "device_tree", it is complex to verify the partial device tree because of the libfdt design. So without fully auditing libfdt and fixing the holes, this suggestion would be a vector attack to the

[Xen-devel] [PATCH] xen-netfront: avoid crashing on resume after a failure in talk_to_netback()

2017-05-04 Thread Vitaly Kuznetsov
Unavoidable crashes in netfront_resume() and netback_changed() after a previous fail in talk_to_netback() (e.g. when we fail to read MAC from xenstore) were discovered. The failure path in talk_to_netback() does unregister/free for netdev but we don't reset drvdata and we try accessing it again aft

[Xen-devel] [OSSTEST PATCH 1/3] make-flight: Factor out do_hvm_win_test_one

2017-05-04 Thread Ian Jackson
No functional change. (Verified with standalone-generate-dump-flight-runvars.) Don't bother messing with do_hvm_winxp_tests as 1. that uses testids without the guest arch, so isn't compatible with this unless we make it more general 2. we intend to abolish that for most branches shortly. Signed-

[Xen-devel] [OSSTEST PATCH 2/3] make-flight: Add tests for some more recent Windows versions

2017-05-04 Thread Ian Jackson
We call this function `do_hvm_win_2017_tests' because 2017 is the year in which we are adding these tests and there isn't otherwise a good common name. This is in the expectation we might want to retire them at a similar point. Do these new tests for all branches. If they fail on some old branch

Re: [Xen-devel] differing opinions between maintainers vs patch acks

2017-05-04 Thread Andrew Cooper
On 04/05/17 08:59, Jan Beulich wrote: > All, > > it's been a (not very often, but anyway) recurring situation that in > order to get an ack on some patch I had to make adjustments which > I didn't agree with. Since all maintainers opinions are supposed to be > equal, it is not really clear to me wh

[Xen-devel] [OSSTEST PATCH 3/3] make-flight: Drop Windows XP tests

2017-05-04 Thread Ian Jackson
XP is really quite obsolete now. From diffing standalone-generate-dump-flight-runvars output, the tests that are dropped are: test-amd64-amd64-xl-qemut-winxpsp3 test-amd64-amd64-xl-qemuu-winxpsp3 test-amd64-i386-xl-qemut-winxpsp3 test-amd64-i386-xl-qemut-winxpsp3-vcpus1 test-amd64-i386-x

  1   2   >