Re: [Xen-devel] Xen Backend for sound sharing for arm

2017-08-15 Thread Ajmal M Ali
Hi, Thank You for the reply. We are trying to learn virtualization done in xen. If we are doing any significant work in this, we will be happy to contribute. regards, Ajmal On Thu, Aug 10, 2017 at 5:11 PM, Oleksandr Andrushchenko wrote: > Hi, > > On 08/10/2017 12:03 PM,

[Xen-devel] [PATCH] x86/psr: fix coding style issue

2017-08-15 Thread Yi Sun
In psr.c, we defined some macros but the coding style is not good. Use '(1u << X)' to replace '(1< --- xen/arch/x86/psr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c index

[Xen-devel] [PATCH v5 4/4] xentrace: add support for HVM's PI blocking list operation

2017-08-15 Thread Chao Gao
In order to analyze PI blocking list operation frequence and obtain the list length, add some relevant events to xentrace and some associated code in xenalyze. Signed-off-by: Chao Gao --- v5: - Put pi list operation under HW events and get rid of ASYNC stuff - generate

[Xen-devel] [PATCH v5 1/4] VT-d PI: track the number of vcpus on pi blocking list

2017-08-15 Thread Chao Gao
This patch adds a field, counter, in struct vmx_pi_blocking_vcpu to track how many entries are on the pi blocking list. Signed-off-by: Chao Gao --- v5: - introduce two functions for adding or removing vcpus from pi blocking list. - check the sanity of vcpu count on pi

[Xen-devel] [PATCH v5 0/4] mitigate the per-pCPU blocking list may be too long

2017-08-15 Thread Chao Gao
Changes in v5: - In patch 1, add check the sanity of vcpus count on pi blocking list and also drop George's Reviewed-by. - In patch 3, introduce a new function to find proper pCPU to accept the blocked vcpu. - In patch 4, add support of tracking the operations on pi blocking list and

[Xen-devel] [PATCH v5 2/4] x86/vcpu: track hvm vcpu number on the system

2017-08-15 Thread Chao Gao
This number is used to calculate the average vcpus per pcpu ratio. Signed-off-by: Chao Gao Acked-by: Jan Beulich --- v4: - move the place we increase/decrease the hvm vcpu number to hvm_vcpu_{initialise, destory} --- xen/arch/x86/hvm/hvm.c| 6

[Xen-devel] [PATCH v5 3/4] VT-d PI: restrict the number of vcpus in a given pcpu's PI blocking list

2017-08-15 Thread Chao Gao
Currently, a blocked vCPU is put in its pCPU's pi blocking list. If too many vCPUs are blocked on a given pCPU, it will incur that the list grows too long. After a simple analysis, there are 32k domains and 128 vcpu per domain, thus about 4M vCPUs may be blocked in one pCPU's PI blocking list.

[Xen-devel] [PATCH v6] VT-d: fix VF of RC integrated PF matched to wrong VT-d unit

2017-08-15 Thread Chao Gao
The problem is for a VF of RC integrated PF (e.g. PF's BDF is 00:02.0), we would wrongly use 00:00.0 to search VT-d unit. If a PF is an extended function, the BDF of a traditional function within the same device should be used to search VT-d unit. Otherwise, the real BDF of PF should be used.

[Xen-devel] [xen-4.9-testing test] 112647: tolerable trouble: blocked/broken/fail/pass - PUSHED

2017-08-15 Thread osstest service owner
flight 112647 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/112647/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-libvirt-xsm 1 build-check(1) blocked n/a test-arm64-arm64-xl 1

Re: [Xen-devel] [PATCH v1 05/13] x86: implement get hw info flow for MBA

2017-08-15 Thread Chao Peng
On Wed, 2017-08-09 at 15:41 +0800, Yi Sun wrote: > This patch implements get HW info flow for MBA including its callback > function and sysctl interface. > > Signed-off-by: Yi Sun > --- > v1: > - sort 'PSR_INFO_IDX_' macros as feature. >   (suggested by Chao

[Xen-devel] [GIT PULL] (xen) stable/for-jens-4.13 for rc5

2017-08-15 Thread Konrad Rzeszutek Wilk
Hey Jens, Please git pull the following branch: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.13 which has two fixes, both of them spotted by Amazon. 1) Fix in Xen-blkfront caused by the re-write in 4.8 time-frame. 2) Fix in the xen_biovec_phys_mergeable

Re: [Xen-devel] [PATCH v1 04/13] x86: implement data structure and CPU init flow for MBA

2017-08-15 Thread Chao Peng
On Wed, 2017-08-09 at 15:41 +0800, Yi Sun wrote: > This patch implements main data structures of MBA. > > Like CAT features, MBA HW info has cos_max which means the max cos > registers number, and thrtl_max which means the max throttle value Similarly, there is no existence of 'cos register',

Re: [Xen-devel] [PATCH v1 01/13] docs: create Memory Bandwidth Allocation (MBA) feature document

2017-08-15 Thread Yi Sun
On 17-08-15 11:08:32, Wei Liu wrote: > On Wed, Aug 09, 2017 at 03:41:40PM +0800, Yi Sun wrote: > > +# Overview > > + > > +The Memory Bandwidth Allocation (MBA) feature provides indirect and > > approximate > > +control over memory bandwidth available per-core. This feature provides OS/ > >

Re: [Xen-devel] [PATCH v1 02/13] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-08-15 Thread Yi Sun
On 17-08-15 11:12:36, Wei Liu wrote: > You forgot to CC XSM maintainer. I have done that for you. > Thank you! > On Wed, Aug 09, 2017 at 03:41:41PM +0800, Yi Sun wrote: > > This patch renames PSR sysctl/domctl interfaces and related xsm policy to > > make them be general for all resource

Re: [Xen-devel] [PATCH v1 03/13] x86: rename 'cbm_type' to 'psr_val_type' to make it general

2017-08-15 Thread Chao Peng
> -enum cbm_type { > -PSR_CBM_TYPE_L3, > -PSR_CBM_TYPE_L3_CODE, > -PSR_CBM_TYPE_L3_DATA, > -PSR_CBM_TYPE_L2, > -PSR_CBM_TYPE_UNKNOWN, > +enum psr_val_type { > +PSR_VAL_TYPE_L3, > +PSR_VAL_TYPE_L3_CODE, > +PSR_VAL_TYPE_L3_DATA, > +PSR_VAL_TYPE_L2, > +

[Xen-devel] [qemu-mainline test] 112646: tolerable trouble: blocked/broken/fail/pass - PUSHED

2017-08-15 Thread osstest service owner
flight 112646 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/112646/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 17 guest-stopfail REGR. vs. 112610 Tests which did not

Re: [Xen-devel] [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-15 Thread Steven Rostedt
On Fri, 11 Aug 2017 14:07:14 +0200 Peter Zijlstra wrote: > It goes like: > > CPU0CPU1 > > unhook page > cli > traverse page tables > TLB invalidate ---> >

[Xen-devel] [ovmf baseline-only test] 71977: all pass

2017-08-15 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71977 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71977/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a6b3d753f98118ee547ae935b347f4f00fa67e7c baseline

Re: [Xen-devel] [PATCH v5] x86/hvm: Allow guest_request vm_events coming from userspace

2017-08-15 Thread Tamas K Lengyel
On Tue, Aug 15, 2017 at 2:06 AM, Jan Beulich wrote: On 14.08.17 at 17:53, wrote: >> On Tue, Aug 8, 2017 at 2:27 AM, Alexandru Isaila >> wrote: >>> --- a/xen/arch/x86/hvm/hypercall.c >>> +++ b/xen/arch/x86/hvm/hypercall.c >>>

Re: [Xen-devel] [PATCH v06 26/36] uapi xen/privcmd.h: fix compilation in userspace

2017-08-15 Thread Stefano Stabellini
On Sun, 6 Aug 2017, Mikko Rapeli wrote: > xen/interface/xen.h is not exported from kernel headers so remove the > dependency and provide needed defines for domid_t and xen_pfn_t if they > are not already defined by some other e.g. Xen specific headers. > > Suggested by Andrew Cooper

[Xen-devel] [linux-4.9 test] 112643: tolerable trouble: blocked/broken/fail/pass - PUSHED

2017-08-15 Thread osstest service owner
flight 112643 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/112643/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail in 112637 pass in 112643

Re: [Xen-devel] [PATCH v8 11/13] arm/mem_access: Add long-descriptor based gpt

2017-08-15 Thread Andrew Cooper
On 15/08/2017 23:25, Stefano Stabellini wrote: > On Tue, 15 Aug 2017, Julien Grall wrote: >> On 14/08/17 22:03, Sergej Proskurin wrote: >>> Hi Julien, >>> >>> On 08/14/2017 07:37 PM, Julien Grall wrote: Hi Sergej, On 09/08/17 09:20, Sergej Proskurin wrote: > +/* > +

Re: [Xen-devel] [PATCH v8 11/13] arm/mem_access: Add long-descriptor based gpt

2017-08-15 Thread Stefano Stabellini
On Tue, 15 Aug 2017, Julien Grall wrote: > On 14/08/17 22:03, Sergej Proskurin wrote: > > Hi Julien, > > > > On 08/14/2017 07:37 PM, Julien Grall wrote: > > > Hi Sergej, > > > > > > On 09/08/17 09:20, Sergej Proskurin wrote: > > > > +/* > > > > + * According to to ARM DDI 0487B.a

Re: [Xen-devel] [PATCH v8 07/13] arm/mem_access: Introduce GENMASK_ULL bit operation

2017-08-15 Thread Stefano Stabellini
On Wed, 9 Aug 2017, Sergej Proskurin wrote: > The current implementation of GENMASK is capable of creating bitmasks of > 32-bit values on AArch32 and 64-bit values on AArch64. As we need to > create masks for 64-bit values on AArch32 as well, in this commit we > introduce the GENMASK_ULL bit

Re: [Xen-devel] [stage1-xen PATCH v1] init: Add `glide.lock`

2017-08-15 Thread Stefano Stabellini
On Tue, 15 Aug 2017, Rajiv Ranganath wrote: > On Tue, Aug 15 2017 at 06:23:07 AM, Stefano Stabellini > wrote: > > Thank you for the patch. Usually the description that you sent in the > > previous email is written here. > > > > I like the build.sh changes and I think

[Xen-devel] [linux-3.18 test] 112642: trouble: blocked/broken/fail/pass

2017-08-15 Thread osstest service owner
flight 112642 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/112642/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 3 capture-logs broken REGR. vs. 112102

Re: [Xen-devel] [PATCH v3 12/13] xen/pvcalls: implement release command

2017-08-15 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > Send PVCALLS_RELEASE to the backend and wait for a reply. Take both > in_mutex and out_mutex to avoid concurrent accesses. Then, free the > socket. > > For passive sockets, check whether we have already pre-allocated an > active socket for the

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

2017-08-15 Thread osstest service owner
flight 112644 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/112644/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a6b3d753f98118ee547ae935b347f4f00fa67e7c baseline version: ovmf

Re: [Xen-devel] [PATCH v3 11/13] xen/pvcalls: implement poll command

2017-08-15 Thread Boris Ostrovsky
On 07/31/2017 06:57 PM, Stefano Stabellini wrote: > For active sockets, check the indexes and use the inflight_conn_req > waitqueue to wait. > > For passive sockets if an accept is outstanding > (PVCALLS_FLAG_ACCEPT_INFLIGHT), check if it has been answered by looking > at bedata->rsp[req_id]. If

[Xen-devel] [xtf test] 112645: all pass - PUSHED

2017-08-15 Thread osstest service owner
flight 112645 xtf real [real] http://logs.test-lab.xenproject.org/osstest/logs/112645/ Perfect :-) All tests in this flight passed as required version targeted for testing: xtf 24635d9265e70b2d75a17f2cfc0c2ca0fad5843b baseline version: xtf

Re: [Xen-devel] [PATCH for-2.10 v2 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-15 Thread Michael S. Tsirkin
On Tue, Aug 15, 2017 at 02:07:51PM +0200, Igor Mammedov wrote: > On Tue, 15 Aug 2017 12:15:48 +0100 > Anthony PERARD wrote: > > > To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be > > set, but this was done only when ACPI tables are built which

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

2017-08-15 Thread osstest service owner
flight 112654 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/112654/ 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 build-arm64-pvops 2

[Xen-devel] [xen-unstable test] 112641: regressions - trouble: blocked/broken/fail/pass

2017-08-15 Thread osstest service owner
flight 112641 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/112641/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-vhd 6 xen-install fail REGR. vs. 112544

Re: [Xen-devel] [PATCH v8 07/13] arm/mem_access: Introduce GENMASK_ULL bit operation

2017-08-15 Thread Sergej Proskurin
Hi all, On 08/09/2017 10:20 AM, Sergej Proskurin wrote: > The current implementation of GENMASK is capable of creating bitmasks of > 32-bit values on AArch32 and 64-bit values on AArch64. As we need to > create masks for 64-bit values on AArch32 as well, in this commit we > introduce the

Re: [Xen-devel] [PATCH v8 11/13] arm/mem_access: Add long-descriptor based gpt

2017-08-15 Thread Sergej Proskurin
Hi Julien, On 08/15/2017 12:13 PM, Julien Grall wrote: > > > On 14/08/17 22:03, Sergej Proskurin wrote: >> Hi Julien, >> >> On 08/14/2017 07:37 PM, Julien Grall wrote: >>> Hi Sergej, >>> >>> On 09/08/17 09:20, Sergej Proskurin wrote: +/* + * According to to ARM DDI 0487B.a

Re: [Xen-devel] [PATCH 8/8] gnttab: drop struct active_grant_entry's gfn field for release builds

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:42, Jan Beulich wrote: > This shrinks the size from 48 to 40 bytes bytes on 64-bit builds. > > Signed-off-by: Jan Beulich > > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -185,7 +185,12 @@ struct active_grant_entry { > grant_ref_t

Re: [Xen-devel] [PATCH 7/8] gnttab: use DIV_ROUND_UP() instead of open-coding it

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:42, Jan Beulich wrote: > Also adjust formatting of nearby code. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org

Re: [Xen-devel] [PATCH 6/8] gnttab: move GNTPIN_* out of header file

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:41, Jan Beulich wrote: > They're private to grant_table.c. > > Signed-by: Jan Beulich > > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -158,7 +158,24 @@ shared_entry_header(struct grant_table * > > /* Active grant entry - used for

Re: [Xen-devel] [PATCH 5/8] gnttab: re-arrange struct active_grant_entry

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:41, Jan Beulich wrote: > While benign to 32-bit arches, this shrinks the size from 56 to 48 > bytes on 64-bit ones (while still leaving a 16-bit hole). > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper There is some follow-on

Re: [Xen-devel] [PATCH 4/8] gnttab: drop pointless leading double underscores

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:40, Jan Beulich wrote: > They're violating name space rules, and we don't really need them. When > followed by "gnttab_", also drop that. > > Signed-by: Jan Beulich > > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -233,8 +233,9 @@ static

Re: [Xen-devel] [PATCH 3/8] gnttab: type adjustments

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:40, Jan Beulich wrote: > In particular use grant_ref_t and grant_handle_t where appropriate. > Also switch other nearby type uses to their canonical variants where > appropriate and introduce INVALID_MAPTRACK_HANDLE. > > Signed-by: Jan Beulich Reviewed-by:

Re: [Xen-devel] [PATCH RESEND 2/8] gnttab: avoid spurious maptrack handle allocation failures

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:39, Jan Beulich wrote: > @@ -422,8 +422,13 @@ get_maptrack_handle( > /* > * If we've run out of frames, try stealing an entry from another > * VCPU (in case the guest isn't mapping across its VCPUs evenly). > + * Also use this path in case we're out of memory,

[Xen-devel] [linux-linus test] 112638: regressions - trouble: blocked/broken/fail/pass

2017-08-15 Thread osstest service owner
flight 112638 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/112638/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-examine 7 reboot fail REGR. vs. 110515

Re: [Xen-devel] [PATCH RESEND 1/8] gnttab: drop useless locking

2017-08-15 Thread Andrew Cooper
On 15/08/17 15:38, Jan Beulich wrote: > Holding any lock while accessing the maptrack entry fields is > pointless, as these entries are protected by their associated active > entry lock (which is being acquired later, before re-validating the > fields read without holding the lock). > >

Re: [Xen-devel] [PATCH v2 52/52] xen: make some console related parameters settable at runtime

2017-08-15 Thread Juergen Gross
On 15/08/17 17:59, Jan Beulich wrote: On 15.08.17 at 17:52, wrote: >> On 15/08/17 17:45, Jan Beulich wrote: >> On 14.08.17 at 09:08, wrote: --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -41,6 +41,7 @@

Re: [Xen-devel] [PATCH v2 47/52] xen: add basic support for runtime parameter changing

2017-08-15 Thread Juergen Gross
On 15/08/17 17:31, Jan Beulich wrote: On 14.08.17 at 09:08, wrote: >> --- a/xen/arch/x86/xen.lds.S >> +++ b/xen/arch/x86/xen.lds.S >> @@ -226,6 +226,10 @@ SECTIONS >> __start_schedulers_array = .; >> *(.data.schedulers) >> __end_schedulers_array = .;

Re: [Xen-devel] [PATCH v2 48/52] xen: add hypercall for setting parameters at runtime

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 17:57, wrote: > On 15/08/17 17:39, Jan Beulich wrote: > On 14.08.17 at 09:08, wrote: >>> +struct xen_sysctl_set_parameter { >>> +XEN_GUEST_HANDLE_64(char) params; /* IN: pointer to parameters. >>> */ >>> +uint16_t size;

Re: [Xen-devel] [PATCH v3 2/2] gnttab: fix transitive grant handling

2017-08-15 Thread Andrew Cooper
On 15/08/17 14:49, Jan Beulich wrote: > Processing of transitive grants must not use the fast path, or else > reference counting breaks due to the skipped recursive call to > __acquire_grant_for_copy() (its __release_grant_for_copy() > counterpart occurs independent of original pin count).

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

2017-08-15 Thread osstest service owner
flight 112651 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/112651/ 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 build-arm64-pvops 2

Re: [Xen-devel] [PATCH v2 52/52] xen: make some console related parameters settable at runtime

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 17:52, wrote: > On 15/08/17 17:45, Jan Beulich wrote: > On 14.08.17 at 09:08, wrote: >>> --- a/xen/drivers/char/console.c >>> +++ b/xen/drivers/char/console.c >>> @@ -41,6 +41,7 @@ string_param("console", opt_console); >>> /*

Re: [Xen-devel] [PATCH v2 48/52] xen: add hypercall for setting parameters at runtime

2017-08-15 Thread Juergen Gross
On 15/08/17 17:39, Jan Beulich wrote: On 14.08.17 at 09:08, wrote: >> --- a/xen/include/public/sysctl.h >> +++ b/xen/include/public/sysctl.h >> @@ -1096,6 +1096,23 @@ struct xen_sysctl_livepatch_op { >> typedef struct xen_sysctl_livepatch_op xen_sysctl_livepatch_op_t; >>

Re: [Xen-devel] [PATCH 03/27] xen/x86: mm: Don't check alloc_boot_pages return

2017-08-15 Thread Jan Beulich
>>> On 14.08.17 at 16:23, wrote: > The only way alloc_boot_pages will return 0 is during the error case. > Although, Xen will panic in the error path. So the check in the caller > is pointless. > > Looking at the loop, my understanding is it will try to allocate in >

Re: [Xen-devel] [PATCH v2 52/52] xen: make some console related parameters settable at runtime

2017-08-15 Thread Juergen Gross
On 15/08/17 17:45, Jan Beulich wrote: On 14.08.17 at 09:08, wrote: >> --- a/xen/drivers/char/console.c >> +++ b/xen/drivers/char/console.c >> @@ -41,6 +41,7 @@ string_param("console", opt_console); >> /* boots. Any other value, or omitting the char, enables >>

Re: [Xen-devel] [PATCH v2 52/52] xen: make some console related parameters settable at runtime

2017-08-15 Thread Jan Beulich
>>> On 14.08.17 at 09:08, wrote: > --- a/xen/drivers/char/console.c > +++ b/xen/drivers/char/console.c > @@ -41,6 +41,7 @@ string_param("console", opt_console); > /* boots. Any other value, or omitting the char, enables auto-switch > */ > static unsigned char

Re: [Xen-devel] [PATCH v2 48/52] xen: add hypercall for setting parameters at runtime

2017-08-15 Thread Jan Beulich
>>> On 14.08.17 at 09:08, wrote: > --- a/xen/include/public/sysctl.h > +++ b/xen/include/public/sysctl.h > @@ -1096,6 +1096,23 @@ struct xen_sysctl_livepatch_op { > typedef struct xen_sysctl_livepatch_op xen_sysctl_livepatch_op_t; >

Re: [Xen-devel] [PATCH v3 1/2] gnttab: don't use possibly unbounded tail calls

2017-08-15 Thread Andrew Cooper
On 15/08/17 14:49, Jan Beulich wrote: > @@ -2608,7 +2610,7 @@ static long gnttab_copy( > { > if ( i && hypercall_preempt_check() ) > { > -rc = i; > +rc = count - i; Somewhere, probably as a comment for gnttab_copy(), we should have a comment

Re: [Xen-devel] [PATCH v2 47/52] xen: add basic support for runtime parameter changing

2017-08-15 Thread Jan Beulich
>>> On 14.08.17 at 09:08, wrote: > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@ -226,6 +226,10 @@ SECTIONS > __start_schedulers_array = .; > *(.data.schedulers) > __end_schedulers_array = .; > + . = ALIGN(POINTER_ALIGN); > +

Re: [Xen-devel] [PATCH v2 46/52] xen: carve out a generic parsing function from _cmdline_parse()

2017-08-15 Thread Jan Beulich
>>> On 14.08.17 at 09:08, wrote: > In order to support generic parameter parsing carve out the parser from > _cmdline_parse(). As this generic function might be called after boot > remove the __init annotations from all called sub-functions. > > Cc: Andrew Cooper

Re: [Xen-devel] [xen-unstable test] 112618: regressions - trouble: blocked/broken/fail/pass

2017-08-15 Thread Wei Liu
On Mon, Aug 14, 2017 at 06:58:13PM +0100, Julien Grall wrote: > Hi, > > On 14/08/17 00:20, osstest service owner wrote: > > flight 112618 xen-unstable real [real] > > http://logs.test-lab.xenproject.org/osstest/logs/112618/ > > > > Regressions :-( > > > > Tests which did not succeed and are

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

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 17:03, wrote: > I can switch x86 only back to "normal" types but then we also have this > in patch 7: > > static void check_and_stop_scrub(struct page_info *head) > { > if ( head->u.free.scrub_state == BUDDY_SCRUBBING ) > { >

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

2017-08-15 Thread Boris Ostrovsky
On 08/15/2017 10:52 AM, Julien Grall wrote: > Hi Jan, > > On 15/08/17 15:51, Jan Beulich wrote: > On 15.08.17 at 16:41, wrote: >>> On 08/15/2017 04:18 AM, Jan Beulich wrote: >>> On 14.08.17 at 16:29, wrote: > On 08/14/2017 06:37

Re: [Xen-devel] x86: PIE support and option to extend KASLR randomization

2017-08-15 Thread Thomas Garnier
On Tue, Aug 15, 2017 at 7:47 AM, Daniel Micay wrote: > On 15 August 2017 at 10:20, Thomas Garnier wrote: >> On Tue, Aug 15, 2017 at 12:56 AM, Ingo Molnar wrote: >>> >>> * Thomas Garnier wrote: >>> > Do

Re: [Xen-devel] [PATCH v2 39/52] xen: check parameter validity when parsing command line

2017-08-15 Thread Wei Liu
On Tue, Aug 15, 2017 at 02:54:07PM +0200, Juergen Gross wrote: > On 14/08/17 14:46, Jan Beulich wrote: > On 14.08.17 at 09:08, wrote: > >> --- a/xen/common/kernel.c > >> +++ b/xen/common/kernel.c > >> optval[-1] = '\0'; > >> +break; >

Re: [Xen-devel] x86: PIE support and option to extend KASLR randomization

2017-08-15 Thread Daniel Micay
On 15 August 2017 at 10:20, Thomas Garnier wrote: > On Tue, Aug 15, 2017 at 12:56 AM, Ingo Molnar wrote: >> >> * Thomas Garnier wrote: >> >>> > Do these changes get us closer to being able to build the kernel as truly >>> > position

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

2017-08-15 Thread Julien Grall
Hi Jan, On 15/08/17 15:51, Jan Beulich wrote: On 15.08.17 at 16:41, wrote: On 08/15/2017 04:18 AM, Jan Beulich wrote: On 14.08.17 at 16:29, wrote: On 08/14/2017 06:37 AM, Jan Beulich wrote: On 08.08.17 at 23:45,

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

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 16:41, wrote: > On 08/15/2017 04:18 AM, Jan Beulich wrote: > On 14.08.17 at 16:29, wrote: >>> On 08/14/2017 06:37 AM, Jan Beulich wrote: >>> On 08.08.17 at 23:45, wrote: > ---

[Xen-devel] [PATCH 8/8] gnttab: drop struct active_grant_entry's gfn field for release builds

2017-08-15 Thread Jan Beulich
This shrinks the size from 48 to 40 bytes bytes on 64-bit builds. Signed-off-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -185,7 +185,12 @@ struct active_grant_entry { grant_ref_t trans_gref; struct domain *trans_domain;

[Xen-devel] [PATCH 7/8] gnttab: use DIV_ROUND_UP() instead of open-coding it

2017-08-15 Thread Jan Beulich
Also adjust formatting of nearby code. Signed-off-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -206,11 +206,13 @@ static inline void gnttab_flush_tlb(cons static inline unsigned int num_act_frames_from_sha_frames(const unsigned int num)

[Xen-devel] [PATCH 6/8] gnttab: move GNTPIN_* out of header file

2017-08-15 Thread Jan Beulich
They're private to grant_table.c. Signed-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -158,7 +158,24 @@ shared_entry_header(struct grant_table * /* Active grant entry - used for shadowing GTF_permit_access grants. */ struct

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

2017-08-15 Thread Boris Ostrovsky
On 08/15/2017 04:18 AM, Jan Beulich wrote: On 14.08.17 at 16:29, wrote: >> On 08/14/2017 06:37 AM, Jan Beulich wrote: >> On 08.08.17 at 23:45, wrote: --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@

[Xen-devel] [PATCH 5/8] gnttab: re-arrange struct active_grant_entry

2017-08-15 Thread Jan Beulich
While benign to 32-bit arches, this shrinks the size from 56 to 48 bytes on 64-bit ones (while still leaving a 16-bit hole). Signed-off-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -160,15 +160,15 @@ shared_entry_header(struct grant_table *

[Xen-devel] [PATCH 4/8] gnttab: drop pointless leading double underscores

2017-08-15 Thread Jan Beulich
They're violating name space rules, and we don't really need them. When followed by "gnttab_", also drop that. Signed-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -233,8 +233,9 @@ static inline void active_entry_release( If rc ==

[Xen-devel] [PATCH 3/8] gnttab: type adjustments

2017-08-15 Thread Jan Beulich
In particular use grant_ref_t and grant_handle_t where appropriate. Also switch other nearby type uses to their canonical variants where appropriate and introduce INVALID_MAPTRACK_HANDLE. Signed-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@

[Xen-devel] [PATCH RESEND 2/8] gnttab: avoid spurious maptrack handle allocation failures

2017-08-15 Thread Jan Beulich
When no memory is available in the hypervisor, rather than immediately failing the request, try to steal a handle from another vCPU. Reported-by: George Dunlap Signed-off-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c

[Xen-devel] [PATCH RESEND 1/8] gnttab: drop useless locking

2017-08-15 Thread Jan Beulich
Holding any lock while accessing the maptrack entry fields is pointless, as these entries are protected by their associated active entry lock (which is being acquired later, before re-validating the fields read without holding the lock). Signed-off-by: Jan Beulich ---

Re: [Xen-devel] [PATCH v3 0/2] XSA-226

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 16:08, wrote: > On Tuesday, 15 August 2017 11:43:59 PM AEST Jan Beulich wrote: >> XSA-226 went out with just a workaround patch. The pair of patches >> here became ready too late to be reasonably included in the XSA. >> Nevertheless they aim at fixing the

Re: [Xen-devel] x86: PIE support and option to extend KASLR randomization

2017-08-15 Thread Thomas Garnier
On Tue, Aug 15, 2017 at 12:56 AM, Ingo Molnar wrote: > > * Thomas Garnier wrote: > >> > Do these changes get us closer to being able to build the kernel as truly >> > position independent, i.e. to place it anywhere in the valid x86-64 address >> > space? Or

[Xen-devel] [PATCH 0/8] gnttab: recent XSA follow-up

2017-08-15 Thread Jan Beulich
1: drop useless locking 2: avoid spurious maptrack handle allocation failures 3: type adjustments 4: drop pointless leading double underscores 5: re-arrange struct active_grant_entry 6: move GNTPIN_* out of header file 7: use DIV_ROUND_UP() instead of open-coding it 8: drop struct

Re: [Xen-devel] [PATCH v3 0/2] XSA-226

2017-08-15 Thread Steven Haigh
On Tuesday, 15 August 2017 11:43:59 PM AEST Jan Beulich wrote: > XSA-226 went out with just a workaround patch. The pair of patches > here became ready too late to be reasonably included in the XSA. > Nevertheless they aim at fixing the underlying issues, ideally making > the workaround

Re: [Xen-devel] [PATCH 5/6] common/gnttab: gnttab_query_size() cleanup

2017-08-15 Thread Andrew Cooper
On 15/08/17 14:56, Jan Beulich wrote: On 15.08.17 at 14:30, wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -1731,31 +1731,25 @@ gnttab_query_size( >> XEN_GUEST_HANDLE_PARAM(gnttab_query_size_t) uop, unsigned int count) >> {

Re: [Xen-devel] [PATCH v1 02/13] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-08-15 Thread Daniel De Graaf
On 08/09/2017 03:41 AM, Yi Sun wrote: This patch renames PSR sysctl/domctl interfaces and related xsm policy to make them be general for all resource allocation features but not only for CAT. Then, we can resuse the interfaces for all allocation features. Basically, it changes 'cat' to 'alloc'.

Re: [Xen-devel] [PATCH 6/6] common/gnttab: simplify gnttab_copy_lock_domain()

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 14:30, wrote: > Remove the opencoded rcu_lock_domain_by_any_id(). Drop the PIN_FAIL()s and > return GNTST_* values directly. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich with one optional

Re: [Xen-devel] [PATCH v2] x86: check for allocation errors in modify_xen_mappings()

2017-08-15 Thread Andrew Cooper
On 11/08/17 14:12, Jan Beulich wrote: > Reported-by: Julien Grall > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org

Re: [Xen-devel] [PATCH 5/6] common/gnttab: gnttab_query_size() cleanup

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 14:30, wrote: > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -1731,31 +1731,25 @@ gnttab_query_size( > XEN_GUEST_HANDLE_PARAM(gnttab_query_size_t) uop, unsigned int count) > { > struct gnttab_query_size op; > -

Re: [Xen-devel] [PATCH 4/6] common/gnttab: gnttab_setup_table() cleanup

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 14:30, wrote: > Drop pointless debugging messages, and reduce variable scope. ... and correct the type of an induction variable. > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

Re: [Xen-devel] [PATCH 3/6] common/gnttab: General cleanup

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 14:30, wrote: > * Drop trailing whitespace > * Style corrections > > No functional change. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

Re: [Xen-devel] [PATCH 2/6] common/gnttab: Correct __acquire_grant_for_copy() fastpath for transitive grants

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 14:30, wrote: > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -2345,6 +2345,12 @@ __acquire_grant_for_copy( > * non-zero refcount and hence a valid owner. > */ > ASSERT(td); > + > +if ( td !=

[Xen-devel] Xen Security Advisory 230 (CVE-2017-12855) - grant_table: possibly premature clearing of GTF_writing / GTF_reading

2017-08-15 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2017-12855 / XSA-230 version 3 grant_table: possibly premature clearing of GTF_writing / GTF_reading UPDATES IN VERSION 3 CVE assigned. ISSUE DESCRIPTION

[Xen-devel] [PATCH v3 2/2] gnttab: fix transitive grant handling

2017-08-15 Thread Jan Beulich
Processing of transitive grants must not use the fast path, or else reference counting breaks due to the skipped recursive call to __acquire_grant_for_copy() (its __release_grant_for_copy() counterpart occurs independent of original pin count). Furthermore after re-acquiring temporarily dropped

Re: [Xen-devel] [PATCH v2] x86/hpet: Improve handling of timer_deadline

2017-08-15 Thread Andrew Cooper
On 15/08/17 14:46, Jan Beulich wrote: On 15.08.17 at 15:13, wrote: >> timer_deadline is only ever updated via this_cpu() in timer_softirq_action(), >> so is not going to change behind the back of the currently running cpu. >> >> Update hpet_broadcast_{enter,exit}()

[Xen-devel] [PATCH v3 1/2] gnttab: don't use possibly unbounded tail calls

2017-08-15 Thread Jan Beulich
There is no guarantee that the compiler would actually translate them to branches instead of calls, so only ones with a known recursion limit are okay: - __release_grant_for_copy() can call itself only once, as __acquire_grant_for_copy() won't permit use of multi-level transitive grants, -

Re: [Xen-devel] [PATCH v2] x86/hpet: Improve handling of timer_deadline

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 15:13, wrote: > timer_deadline is only ever updated via this_cpu() in timer_softirq_action(), > so is not going to change behind the back of the currently running cpu. > > Update hpet_broadcast_{enter,exit}() to cache the value in a local variable to

[Xen-devel] [PATCH v3 0/2] XSA-226

2017-08-15 Thread Jan Beulich
XSA-226 went out with just a workaround patch. The pair of patches here became ready too late to be reasonably included in the XSA. Nevertheless they aim at fixing the underlying issues, ideally making the workaround unnecessary. 1: gnttab: don't use possibly unbounded tail calls 2: gnttab: fix

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

2017-08-15 Thread osstest service owner
flight 112639 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/112639/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd64 18 guest-start/win.repeat fail REGR. vs. 112610

[Xen-devel] [PATCH v2] x86/hpet: Improve handling of timer_deadline

2017-08-15 Thread Andrew Cooper
timer_deadline is only ever updated via this_cpu() in timer_softirq_action(), so is not going to change behind the back of the currently running cpu. Update hpet_broadcast_{enter,exit}() to cache the value in a local variable to avoid the repeated RELOC_HIDE() penalty. handle_hpet_broadcast()

Re: [Xen-devel] [PATCH v2 39/52] xen: check parameter validity when parsing command line

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 14:54, wrote: > On 14/08/17 14:46, Jan Beulich wrote: > On 14.08.17 at 09:08, wrote: >>> --- a/xen/common/kernel.c >>> +++ b/xen/common/kernel.c >>> optval[-1] = '\0'; >>> +break; >> >> Why?

Re: [Xen-devel] [PATCH] x86_64/mm: remove extraneous breaks in m2p_mapped

2017-08-15 Thread Jan Beulich
>>> On 15.08.17 at 12:21, wrote: > Signed-off-by: Wei Liu Reviewed-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 39/52] xen: check parameter validity when parsing command line

2017-08-15 Thread Juergen Gross
On 14/08/17 14:46, Jan Beulich wrote: On 14.08.17 at 09:08, wrote: >> --- a/xen/common/kernel.c >> +++ b/xen/common/kernel.c >> optval[-1] = '\0'; >> +break; > > Why? Applies to further break-s you add: At least in the past we > had

[Xen-devel] [libvirt test] 112640: tolerable trouble: blocked/broken/pass - PUSHED

2017-08-15 Thread osstest service owner
flight 112640 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/112640/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-libvirt-xsm 1 build-check(1) blocked n/a build-arm64-libvirt 1

Re: [Xen-devel] [RFC PATCH v2 13/22] ARM: vITS: remove no longer needed lpi_priority wrapper

2017-08-15 Thread Julien Grall
Hi Andre, On 21/07/17 21:00, Andre Przywara wrote: For LPIs we stored the priority value in struct pending_irq, but all other type of IRQs were using the irq_rank structure for that. Now that every IRQ using pending_irq, we can remove the special handling we had in place for LPIs and just use

  1   2   >