[Xen-devel] [GIT PULL] xen: features and fixes for 4.13-rc1

2017-07-05 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.13-rc1-tag xen: features and fixes for 4.13-rc1 Other than fixes and cleanups it contains: - Support > 32 VCPUs at domain restore - Support for new sysfs nodes related to Xen - Some

Re: [Xen-devel] OOPS new Xen 4.9.0_08 / kernel 4.12.0 Dom0 crash @ domain_crash_sync called from entry.S: fault at ffff82d080342328 entry.o#create_bounce_frame+0x135/0x14d

2017-07-05 Thread Jan Beulich
>>> On 05.07.17 at 19:27, wrote: > On 7/5/17 12:58 AM, Jan Beulich wrote: >> So there are two problems here: One is the fact that the kernel >> really should put an Invalid Opcode exception handler in place >> before intentionally raising any such exceptions (which WARN() >> and WARN_ON() do). The

Re: [Xen-devel] [PATCH v6 06/11] x86/vmce: emulate MSR_IA32_MCG_EXT_CTL

2017-07-05 Thread Jan Beulich
>>> On 06.07.17 at 04:03, wrote: > How is about generalize above two else cases by > > else if ( evc->size >= offsetof(typeof(*evc), mcg_cap) + >sizeof(evc->mcg_cap) ) > { > struct hvm_vmce_vcpu vmce = { }; > >

Re: [Xen-devel] [PATCH v2] x86emul/fuzz: add rudimentary limit checking

2017-07-05 Thread Jan Beulich
>>> On 05.07.17 at 17:22, wrote: > fuzz_insn_fetch() is the only data access helper where it is possible > to see offsets larger than 4Gb in 16- or 32-bit modes, as we leave the > incoming rIP untouched in the emulator itself. The check is needed here > as otherwise, after successfully fetching in

Re: [Xen-devel] [PATCH 5/25] Xen/doc: Add Xen virtual IOMMU doc

2017-07-05 Thread Lan Tianyu
On 2017年07月05日 21:25, Julien Grall wrote: > Furthermore, on ARM we would be able to create the vIOMMU but it would > be unusable. Indeed, IOMMU are only used to protect devices. But you > don't see any way to say "This device is protected by the IOMMU". Did I > miss anything? The "device protectio

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

2017-07-05 Thread osstest service owner
flight 111453 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/111453/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 111384 build-i386-xsm

Re: [Xen-devel] make tools error

2017-07-05 Thread Chen, Farrah
Yes, but I didn't configure proxy settings, I cannot git clone git://git.ipxe.org/ipxe.git. The problem has been solved now. Thanks. Thanks, Fan -Original Message- From: Wei Liu [mailto:wei.l...@citrix.com] Sent: Wednesday, July 5, 2017 5:35 PM To: Chen, Farrah Cc: xen-devel@lists.x

[Xen-devel] [linux-next test] 111396: regressions - FAIL

2017-07-05 Thread osstest service owner
flight 111396 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/111396/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pair10 xen-boot/src_hostfail REGR. vs. 111374 test-amd64-amd64-pai

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

2017-07-05 Thread osstest service owner
flight 111446 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/111446/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 111384 build-i386-xsm

Re: [Xen-devel] [PATCH 5/25] Xen/doc: Add Xen virtual IOMMU doc

2017-07-05 Thread Lan Tianyu
On 2017年07月05日 21:25, Julien Grall wrote: > > > On 05/07/17 04:15, Lan Tianyu wrote: >> Hi Julien: > > Hi Tianyu Lan, > >> Thanks for your review. >> >> On 2017年07月04日 18:39, Julien Grall wrote: +vIOMMU hypercall + +Introduce new domctl hypercall "xen_domctl_v

Re: [Xen-devel] [PATCH 6/7] xen/arm: SMMU: Support generic IOMMU bindings

2017-07-05 Thread Wei Chen
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 2017年7月6日 2:15 > To: Wei Chen > Cc: Julien Grall ; Stefano Stabellini > ; Kaly Xin ; nd ; > Steve > Capper ; xen-devel@lists.xen.org > Subject: Re: [Xen-devel] [PATCH 6/7] xen/arm: SMMU: Support gene

Re: [Xen-devel] [PATCH 4/7] xen/arm: SMMU: Detect types of device tree binding

2017-07-05 Thread Wei Chen
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 2017年7月6日 2:08 > To: Wei Chen > Cc: Stefano Stabellini ; Kaly Xin ; > Julien Grall ; Steve Capper ; nd > ; xen-devel@lists.xen.org > Subject: Re: [Xen-devel] [PATCH 4/7] xen/arm: SMMU: Detect types of

Re: [Xen-devel] [PATCH 2/7] xen/arm: SMMU: Introduce a helper to add DT device to SMMU

2017-07-05 Thread Wei Chen
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 2017年7月6日 2:02 > To: Wei Chen > Cc: Stefano Stabellini ; Kaly Xin ; > Julien Grall ; Steve Capper ; nd > ; xen-devel@lists.xen.org > Subject: Re: [Xen-devel] [PATCH 2/7] xen/arm: SMMU: Introduce a hel

Re: [Xen-devel] [PATCH 1/7] xen/arm: SMMU: Implement the add_device callback in SMMU

2017-07-05 Thread Wei Chen
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 2017年7月6日 1:58 > To: Wei Chen > Cc: Stefano Stabellini ; xen-devel@lists.xen.org; > Steve Capper ; Kaly Xin ; Julien Grall > ; nd > Subject: RE: [Xen-devel] [PATCH 1/7] xen/arm: SMMU: Implement the a

[Xen-devel] [PATCH v13 19/23] x86: L2 CAT: implement set value flow.

2017-07-05 Thread Yi Sun
This patch implements L2 CAT set value related callback function and domctl interface. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- v11: - remove 'domctl->u.psr_cat_op.data' check because it has been moved into 'psr_set_val'. (suggested by Jan Beulich) - move 'feat->cos

[Xen-devel] [PATCH v13 03/23] x86: refactor psr: remove L3 CAT/CDP codes.

2017-07-05 Thread Yi Sun
The current cache allocation codes in psr.c do not consider future features addition and are not friendly to extend. To make psr.c be more flexible to add new features and fulfill the program principle, open for extension but closed for modification, we have to refactor the psr.c: 1. Analyze cache

[Xen-devel] [PATCH v13 17/23] x86: L2 CAT: implement get hw info flow.

2017-07-05 Thread Yi Sun
This patch implements L2 CAT get HW info flow and interface in sysctl. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- v10: - modify macro name according to previous patch change. (suggested by Jan Beulich) - modify commit message. v9: - reuse 'cat_get_feat_info' for L2 CAT

[Xen-devel] [PATCH v13 04/23] x86: refactor psr: L3 CAT: implement main data structures, CPU init and free flows.

2017-07-05 Thread Yi Sun
To construct an extendible framework, we need analyze PSR features and abstract the common things and feature specific things. Then, encapsulate them into different data structures. By analyzing PSR features, we can get below map. +--+--+--+ ->| Dom0 | Dom

Re: [Xen-devel] [PATCH 6/7] xen/arm: SMMU: Support generic IOMMU bindings

2017-07-05 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall [mailto:julien.gr...@arm.com] > Sent: 2017年7月5日 21:08 > To: Wei Chen ; Stefano Stabellini > Cc: xen-devel@lists.xen.org; Steve Capper ; Kaly Xin > ; nd ; Sameer Goel > Subject: Re: [Xen-devel] [PATCH 6/7] xen/arm: SMMU: Support generic

[Xen-devel] [PATCH v13 07/23] x86: refactor psr: L3 CAT: implement get value flow.

2017-07-05 Thread Yi Sun
There is an interface in user space to show feature value of domains. This patch implements get value flow in hypervisor. It also changes domctl interface to make it more general. With this patch, 'psr-cat-show' can work for L3 CAT but not for L3 code/data which is implemented in CDP related pat

[Xen-devel] [PATCH v13 00/23] Enable L2 Cache Allocation Technology & Refactor psr.c

2017-07-05 Thread Yi Sun
Hi all, We plan to bring a new PSR (Platform Shared Resource) feature called Intel L2 Cache Allocation Technology (L2 CAT) to Xen. It has been enabled in Linux Kernel. Besides the L2 CAT implementaion, we refactor the psr.c to make it more flexible and easily to extend to add new features. We abs

[Xen-devel] [PATCH v13 09/23] x86: refactor psr: L3 CAT: set value: assemble features value array.

2017-07-05 Thread Yi Sun
Only can one COS ID be used by one domain at one time. That means all enabled features' COS registers at this COS ID are valid for this domain at that time. When user updates a feature's value, we need make sure all other features' values are not affected. So, we firstly need gather an array which

[Xen-devel] [PATCH v13 11/23] x86: refactor psr: L3 CAT: set value: implement cos id picking flow.

2017-07-05 Thread Yi Sun
Continue from previous patch: 'x86: refactor psr: L3 CAT: set value: implement cos finding flow.' If fail to find a COS ID, we need pick a new COS ID for domain. Only COS ID that ref[COS_ID] is 1 or 0 can be picked to input a new set feature values. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich

[Xen-devel] [PATCH v13 10/23] x86: refactor psr: L3 CAT: set value: implement cos finding flow.

2017-07-05 Thread Yi Sun
Continue from patch: 'x86: refactor psr: L3 CAT: set value: assemble features value array' We can try to find if there is a COS ID on which all features' COS registers values are same as the array assembled before. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- v13: - remove unnecessary

[Xen-devel] [PATCH v13 13/23] x86: refactor psr: CDP: implement CPU init flow.

2017-07-05 Thread Yi Sun
This patch implements the CPU init flow for CDP. The flow is almost same as L3 CAT. Note: CDP does NOT work until you apply the later patches of CDP. "x86: refactor psr: CDP: implement get hw info flow." "x86: refactor psr: CDP: implement set value callback function." Signed-off-by: Yi Sun --- v

[Xen-devel] [PATCH v13 23/23] docs: add L2 CAT description in docs.

2017-07-05 Thread Yi Sun
This patch adds L2 CAT description in related documents. Signed-off-by: He Chen Signed-off-by: Yi Sun Acked-by: Wei Liu --- v13: - rebase the patch on latest code. --- docs/man/xl.pod.1.in | 27 +++ docs/misc/xl-psr.markdown | 18 -- 2 files cha

[Xen-devel] [PATCH v13 22/23] tools: L2 CAT: support set cbm for L2 CAT.

2017-07-05 Thread Yi Sun
This patch implements the xl/xc changes to support set CBM for L2 CAT. The new level option is introduced to original CAT setting command in order to set CBM for specified level CAT. - 'xl psr-cat-set' is updated to set cache capacity bitmasks(CBM) for a domain according to input cache level. r

[Xen-devel] [PATCH v13 18/23] x86: L2 CAT: implement get value flow.

2017-07-05 Thread Yi Sun
This patch implements L2 CAT get value interface in domctl. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- v11: - remove "get_val' assignment because it has been replaced by generic codes. (suggested by Jan Beulich) v10: - remove cast in domctl. (suggested by Jan Be

[Xen-devel] [PATCH v13 20/23] tools: L2 CAT: support get HW info for L2 CAT.

2017-07-05 Thread Yi Sun
This patch implements xl/xc changes to support get HW info for L2 CAT. 'xl psr-hwinfo' is updated to show both L3 CAT and L2 CAT info. Example(on machine which only supports L2 CAT): Cache Monitoring Technology (CMT): Enabled : 0 Cache Allocation Technology (CAT): L2 Socket ID : 0 M

[Xen-devel] [PATCH v13 21/23] tools: L2 CAT: support show cbm for L2 CAT.

2017-07-05 Thread Yi Sun
This patch implements changes in xl/xc changes to support showing CBM of L2 CAT. The new level option is introduced to original CAT showing command in order to show CBM for specified level CAT. - 'xl psr-cat-show' is updated to show CBM of a domain according to input cache level. Examples: root

[Xen-devel] [PATCH v13 15/23] x86: refactor psr: CDP: implement set value callback function.

2017-07-05 Thread Yi Sun
This patch implements L3 CDP set value related callback function. With this patch, 'psr-cat-cbm-set' command can work for L3 CDP. Signed-off-by: Yi Sun --- v13: - remove 'strict' from 'psr_cbm_type_to_feat_type' because we use 'alt_type' to check if we need set both DATA and CODE now.

[Xen-devel] [PATCH v13 16/23] x86: L2 CAT: implement CPU init flow.

2017-07-05 Thread Yi Sun
This patch implements the CPU init flow for L2 CAT. Note: L2 CAT does NOT work until you apply the later patches of L2 CAT. "x86: L2 CAT: implement get hw info flow." "x86: L2 CAT: implement get value flow." "x86: L2 CAT: implement set value flow." Signed-off-by: Yi Sun --- v13: - add commit

[Xen-devel] [PATCH v13 12/23] x86: refactor psr: L3 CAT: set value: implement write msr flow.

2017-07-05 Thread Yi Sun
Continue from previous patch: 'x86: refactor psr: L3 CAT: set value: implement cos id picking flow.' We have got the feature value and COS ID to set. Then, we write MSRs of the designated feature. Till now, set value process is completed. Signed-off-by: Yi Sun --- v13: - use 'skip_prior_fea

[Xen-devel] [PATCH v13 14/23] x86: refactor psr: CDP: implement get hw info flow.

2017-07-05 Thread Yi Sun
This patch implements get HW info flow for CDP including L3 CDP callback function. The flow is almost same as L3 CAT. With this patch, 'psr-hwinfo' can work for L3 CDP. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- v12: - remove input parameter 'info' in 'psr_cbm_type_to_feat_type'. Us

[Xen-devel] [PATCH v13 02/23] x86: move cpuid_count_leaf from cpuid.c to processor.h.

2017-07-05 Thread Yi Sun
This patch moves 'cpuid_count_leaf' from cpuid.c to processor.h to make it available to external codes. Signed-off-by: Yi Sun Acked-by: Jan Beulich --- v9: - create this patch alone to move 'cpuid_count_leaf'. (suggested by Wei Liu) v6: - use 'struct cpuid_leaf' in psr.c. So we hav

[Xen-devel] [PATCH v13 06/23] x86: refactor psr: L3 CAT: implement get hw info flow.

2017-07-05 Thread Yi Sun
This patch implements get HW info flow including L3 CAT callback function. It also changes sysctl interface to make it more general. With this patch, 'psr-hwinfo' can work for L3 CAT. Signed-off-by: Yi Sun Reviewed-by: Jan Beulich --- v12: - use 'ASSERT_UNREACHABLE()' to record bug.

[Xen-devel] [PATCH v13 01/23] docs: create Cache Allocation Technology (CAT) and Code and Data Prioritization (CDP) feature document

2017-07-05 Thread Yi Sun
This patch creates CAT and CDP feature document in doc/features/. It describes key points to implement L3 CAT/CDP and L2 CAT which is described in details in Intel SDM "INTEL® RESOURCE DIRECTOR TECHNOLOGY (INTEL® RDT) ALLOCATION FEATURES". Signed-off-by: Yi Sun Reviewed-by: Konrad Rzeszutek Wilk

[Xen-devel] [PATCH v13 08/23] x86: refactor psr: L3 CAT: set value: implement framework.

2017-07-05 Thread Yi Sun
As set value flow is the most complicated one in psr, it will be divided to some patches to make things clearer. This patch implements the set value framework to show a whole picture firstly. It also changes domctl interface to make it more general. To make the set value flow be general and can s

[Xen-devel] [PATCH v13 05/23] x86: refactor psr: L3 CAT: implement Domain init/free and schedule flows.

2017-07-05 Thread Yi Sun
This patch implements the Domain init/free and schedule flows. - When domain init, its psr resource should be allocated. - When domain free, its psr resource should be freed too. - When domain is scheduled, its COS ID on the socket should be set into ASSOC register to make corresponding COS MSR v

Re: [Xen-devel] [PATCH v6 06/11] x86/vmce: emulate MSR_IA32_MCG_EXT_CTL

2017-07-05 Thread Haozhong Zhang
On 07/05/17 04:36 -0600, Jan Beulich wrote: > >>> On 05.07.17 at 05:12, wrote: > > @@ -878,6 +879,8 @@ long arch_do_domctl( [..] > > @@ -917,9 +920,21 @@ long arch_do_domctl( > > offsetof(struct xen_domctl_ext_vcpucontext, > >vmce.caps

[Xen-devel] [ovmf baseline-only test] 71645: tolerable FAIL

2017-07-05 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 71645 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71645/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): build-i386-libvirt5 libvirt-buildfai

Re: [Xen-devel] [PATCH 2/2 v2] xenfb: Allow vkbd to connect without a DisplayState

2017-07-05 Thread Stefano Stabellini
On Mon, 3 Jul 2017, Owen Smith wrote: > If the vkbd device model is registered and the vfb device model > is not registered, the backend will not transition to connected. > If there is no DisplayState, then the absolute coordinates cannot > be scaled, and will remain in the range [0, 0x7fff]. > Bac

Re: [Xen-devel] [PATCH 1/2 v2] xenfb: Use qemu_input_handler_* calls directly

2017-07-05 Thread Stefano Stabellini
On Mon, 3 Jul 2017, Owen Smith wrote: > The xenvkbd input device uses functions from input-legacy.c > Use the appropriate qemu_input_handler_* functions instead > of calling functions in input-legacy.c that in turn call > the correct functions. > The bulk of this patch removes the extra layer of ca

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

2017-07-05 Thread osstest service owner
flight 111424 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/111424/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 111384 build-i386-xsm

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

2017-07-05 Thread osstest service owner
flight 111389 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/111389/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 111368 Tests which

Re: [Xen-devel] Optimising the DevSummit schedule on July 11

2017-07-05 Thread Daniel Kiper
On Tue, Jul 04, 2017 at 09:01:27AM +0100, Roger Pau Monne wrote: > On Mon, Jul 03, 2017 at 11:37:29AM +0100, Lars Kurth wrote: > > Folks, (committers and speakers/moderators CC'ed) > > > > I have a few extra sessions from Jan which came in today. Most of Tuesday > > in x86 stuff, so there is no sp

Re: [Xen-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-05 Thread Stefano Stabellini
On Wed, 5 Jul 2017, Paul Durrant wrote: > > -Original Message- > > From: Igor Druzhinin > > Sent: 04 July 2017 17:47 > > To: Paul Durrant ; xen-de...@lists.xenproject.org; > > qemu-de...@nongnu.org > > Cc: sstabell...@kernel.org; Anthony Perard ; > > pbonz...@redhat.com > > Subject: Re: [PA

Re: [Xen-devel] [PATCH v2 3/4] xen/mapcache: introduce xen_replace_cache_entry()

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > This new call is trying to update a requested map cache entry > according to the changes in the physmap. The call is searching > for the entry, unmaps it and maps again at the same place using > a new guest address. If the mapping is dummy this call will

Re: [Xen-devel] [PATCH v2 4/4] xen: don't use xenstore to save/restore physmap anymore

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > If we have a system with xenforeignmemory_map2() implemented > we don't need to save/restore physmap on suspend/restore > anymore. In case we resume a VM without physmap - try to > recreate the physmap during memory region restore phase and > remap map ca

Re: [Xen-devel] [PATCH v2 2/4] xen/mapcache: add an ability to create dummy mappings

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > Dummys are simple anonymous mappings that are placed instead > of regular foreign mappings in certain situations when we need > to postpone the actual mapping but still have to give a > memory region to QEMU to play with. > > This is planned to be used f

Re: [Xen-devel] [PATCH v2 1/4] xen: move physmap saving into a separate function

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Igor Druzhinin wrote: > Non-functional change. > > Signed-off-by: Igor Druzhinin Unless you change something from a previous version, please retain the acked-by and reviewed-by that were given (see alpine.DEB.2.10.1706301629170.2919@sstabellini-ThinkPad-X260). > --- > hw/i

Re: [Xen-devel] OOPS new Xen 4.9.0_08 / kernel 4.12.0 Dom0 crash @ domain_crash_sync called from entry.S: fault at ffff82d080342328 entry.o#create_bounce_frame+0x135/0x14d

2017-07-05 Thread PGNet Dev
Daniel On 7/5/17 3:02 PM, Daniel Kiper wrote: -- wait for in-the-pipeline @kernel fixes to simply propagate Or backport 6c64447 (x86/xen/efi: Initialize only the EFI struct members used by Xen) and 457ea3f (efi: Process the MEMATTR table only if EFI_MEMMAP is enabled). Latter is an extra fix i

[Xen-devel] [ovmf bisection] complete build-amd64

2017-07-05 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-amd64 testid xen-build Tree: ovmf https://github.com/tianocore/edk2.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: xen git://xenbits.xen.org/xen.git *** Found and reproduced pr

Re: [Xen-devel] OOPS new Xen 4.9.0_08 / kernel 4.12.0 Dom0 crash @ domain_crash_sync called from entry.S: fault at ffff82d080342328 entry.o#create_bounce_frame+0x135/0x14d

2017-07-05 Thread Daniel Kiper
On Wed, Jul 05, 2017 at 10:27:19AM -0700, PGNet Dev wrote: > On 7/5/17 12:58 AM, Jan Beulich wrote: > >So there are two problems here: One is the fact that the kernel > >really should put an Invalid Opcode exception handler in place > >before intentionally raising any such exceptions (which WARN()

[Xen-devel] [PATCH v7 15/18] xen/pvcalls: implement the ioworker functions

2017-07-05 Thread Stefano Stabellini
We have one ioworker per socket. Each ioworker goes through the list of outstanding read/write requests. Once all requests have been dealt with, it returns. We use one atomic counter per socket for "read" operations and one for "write" operations to keep track of the reads/writes to do. We also u

[Xen-devel] [PATCH v7 13/18] xen/pvcalls: implement release command

2017-07-05 Thread Stefano Stabellini
Release both active and passive sockets. For active sockets, make sure to avoid possible conflicts with the ioworker reading/writing to those sockets concurrently. Set map->release to let the ioworker know atomically that the socket will be released soon, then wait until the ioworker finishes (flus

[Xen-devel] [PATCH v7 08/18] xen/pvcalls: implement connect command

2017-07-05 Thread Stefano Stabellini
Allocate a socket. Keep track of socket <-> ring mappings with a new data structure, called sock_mapping. Implement the connect command by calling inet_stream_connect, and mapping the new indexes page and data ring. Allocate a workqueue and a work_struct, called ioworker, to perform reads and write

[Xen-devel] [PATCH v7 03/18] xen/pvcalls: initialize the module and register the xenbus backend

2017-07-05 Thread Stefano Stabellini
Keep a list of connected frontends. Use a semaphore to protect list accesses. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-back.c | 22 ++ 1 file changed,

[Xen-devel] [PATCH v7 04/18] xen/pvcalls: xenbus state handling

2017-07-05 Thread Stefano Stabellini
Introduce the code to handle xenbus state changes. Implement the probe function for the pvcalls backend. Write the supported versions, max-page-order and function-calls nodes to xenstore, as required by the protocol. Introduce stub functions for disconnecting/connecting to a frontend. Signed-off

[Xen-devel] [PATCH v7 00/18] introduce the Xen PV Calls backend

2017-07-05 Thread Stefano Stabellini
Hi all, this series introduces the backend for the newly introduced PV Calls procotol. PV Calls is a paravirtualized protocol that allows the implementation of a set of POSIX functions in a different domain. The PV Calls frontend sends POSIX function calls to the backend, which implements them an

[Xen-devel] [PATCH v7 07/18] xen/pvcalls: implement socket command

2017-07-05 Thread Stefano Stabellini
Just reply with success to the other end for now. Delay the allocation of the actual socket to bind and/or connect. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-back.c | 27 +

[Xen-devel] [PATCH v7 12/18] xen/pvcalls: implement poll command

2017-07-05 Thread Stefano Stabellini
Implement poll on passive sockets by requesting a delayed response with mappass->reqcopy, and reply back when there is data on the passive socket. Poll on active socket is unimplemented as by the spec, as the frontend should just wait for events and check the indexes on the indexes page. Only sup

[Xen-devel] [PATCH v7 18/18] xen: introduce a Kconfig option to enable the pvcalls backend

2017-07-05 Thread Stefano Stabellini
Also add pvcalls-back to the Makefile. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/Kconfig | 12 drivers/xen/Makefile | 1 + 2 files changed, 13 insertions(+) diff --git a/drivers/xen/Kconfig b/d

[Xen-devel] [PATCH v7 14/18] xen/pvcalls: disconnect and module_exit

2017-07-05 Thread Stefano Stabellini
Implement backend_disconnect. Call pvcalls_back_release_active on active sockets and pvcalls_back_release_passive on passive sockets. Implement module_exit by calling backend_disconnect on frontend connections. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com

[Xen-devel] [PATCH v7 05/18] xen/pvcalls: connect to a frontend

2017-07-05 Thread Stefano Stabellini
Introduce a per-frontend data structure named pvcalls_fedata. It contains pointers to the command ring, its event channel, a list of active sockets and a tree of passive sockets (passing sockets need to be looked up from the id on listen, accept and poll commands, while active sockets only on relea

[Xen-devel] [PATCH v7 10/18] xen/pvcalls: implement listen command

2017-07-05 Thread Stefano Stabellini
Call inet_listen to implement the listen command. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-back.c | 21 + 1 file changed, 21 insertions(+) diff --git

[Xen-devel] [PATCH v7 16/18] xen/pvcalls: implement read

2017-07-05 Thread Stefano Stabellini
When an active socket has data available, increment the io and read counters, and schedule the ioworker. Implement the read function by reading from the socket, writing the data to the data ring. Set in_error on error. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross CC: boris.ostr

[Xen-devel] [PATCH v7 02/18] xen/pvcalls: introduce the pvcalls xenbus backend

2017-07-05 Thread Stefano Stabellini
Introduce a xenbus backend for the pvcalls protocol, as defined by https://xenbits.xen.org/docs/unstable/misc/pvcalls.html. This patch only adds the stubs, the code will be added by the following patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross

[Xen-devel] [PATCH v7 11/18] xen/pvcalls: implement accept command

2017-07-05 Thread Stefano Stabellini
Implement the accept command by calling inet_accept. To avoid blocking in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get scheduled on sk_data_ready (for a passive socket, it means that there are connections to accept). Use the reqcopy field to store the request. Accept the ne

[Xen-devel] [PATCH v7 06/18] xen/pvcalls: handle commands from the frontend

2017-07-05 Thread Stefano Stabellini
When the other end notifies us that there are commands to be read (pvcalls_back_event), wake up the backend thread to parse the command. The command ring works like most other Xen rings, so use the usual ring macros to read and write to it. The functions implementing the commands are empty stubs f

[Xen-devel] [PATCH v7 01/18] xen: introduce the pvcalls interface header

2017-07-05 Thread Stefano Stabellini
Introduce the C header file which defines the PV Calls interface. It is imported from xen/include/public/io/pvcalls.h. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross CC: konrad.w...@oracle.com CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- inc

[Xen-devel] [PATCH v7 17/18] xen/pvcalls: implement write

2017-07-05 Thread Stefano Stabellini
When the other end notifies us that there is data to be written (pvcalls_back_conn_event), increment the io and write counters, and schedule the ioworker. Implement the write function called by ioworker by reading the data from the data ring, writing it to the socket by calling inet_sendmsg. Set

[Xen-devel] [PATCH v7 09/18] xen/pvcalls: implement bind command

2017-07-05 Thread Stefano Stabellini
Allocate a socket. Track the allocated passive sockets with a new data structure named sockpass_mapping. It contains an unbound workqueue to schedule delayed work for the accept and poll commands. It also has a reqcopy field to be used to store a copy of a request for delayed work. Reads/writes to

Re: [Xen-devel] [PATCH v6 15/18] xen/pvcalls: implement the ioworker functions

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > We have one ioworker per socket. Each ioworker goes through the list of > > outstanding read/write requests. Once all requests have been dealt with, > > it returns. > > > > We use one atomic counter per soc

Re: [Xen-devel] [PATCH v6 14/18] xen/pvcalls: disconnect and module_exit

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > Implement backend_disconnect. Call pvcalls_back_release_active on active > > sockets and pvcalls_back_release_passive on passive sockets. > > > > Implement module_exit by calling backend_disconnect on front

Re: [Xen-devel] [PATCH v6 09/18] xen/pvcalls: implement bind command

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > Allocate a socket. Track the allocated passive sockets with a new data > > structure named sockpass_mapping. It contains an unbound workqueue to > > schedule delayed work for the accept and poll commands. It

Re: [Xen-devel] [PATCH v6 08/18] xen/pvcalls: implement connect command

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > Allocate a socket. Keep track of socket <-> ring mappings with a new data > > structure, called sock_mapping. Implement the connect command by calling > > inet_stream_connect, and mapping the new indexes pag

Re: [Xen-devel] [PATCH 1/6] xen: Add support for hiding and unhiding pcie passthrough devices

2017-07-05 Thread Konrad Rzeszutek Wilk
> > > --- a/xen/include/public/domctl.h > > > +++ b/xen/include/public/domctl.h > > > @@ -1222,6 +1222,9 @@ struct xen_domctl { > > > #define XEN_DOMCTL_gdbsx_pausevcpu 1001 > > > #define XEN_DOMCTL_gdbsx_unpausevcpu 1002 > > > #define XEN_DOMCTL_gdbsx_domstatus

Re: [Xen-devel] [PATCH v6 06/18] xen/pvcalls: handle commands from the frontend

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > When the other end notifies us that there are commands to be read > > (pvcalls_back_event), wake up the backend thread to parse the command. > > > > The command ring works like most other Xen rings, so use

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-05 Thread Julien Grall
Hi, On 05/07/2017 19:35, Stefano Stabellini wrote: On Tue, 4 Jul 2017, Jan Beulich wrote: On 03.07.17 at 19:58, wrote: On Mon, 3 Jul 2017, Zhongze Liu wrote: 2017-07-03 22:25 GMT+08:00 Jan Beulich : On 30.06.17 at 22:15, wrote: /* flags for XEN_DOMCTL_MEMATTRS_OP_SET_PERMISSIONS */ #defin

Re: [Xen-devel] [PATCH v6 05/18] xen/pvcalls: connect to a frontend

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > Introduce a per-frontend data structure named pvcalls_fedata. It > > contains pointers to the command ring, its event channel, a list of > > active sockets and a tree of passive sockets (passing sockets need

Re: [Xen-devel] [PATCH v6 04/18] xen/pvcalls: xenbus state handling

2017-07-05 Thread Stefano Stabellini
Many thanks for all the reviews! On Tue, 4 Jul 2017, Juergen Gross wrote: > On 03/07/17 23:08, Stefano Stabellini wrote: > > Introduce the code to handle xenbus state changes. > > > > Implement the probe function for the pvcalls backend. Write the > > supported versions, max-page-order and functi

Re: [Xen-devel] [PATCH 00/17 v5] SBSA UART emulation support in Xen

2017-07-05 Thread Julien Grall
On 05/07/2017 21:05, Stefano Stabellini wrote: On Wed, 5 Jul 2017, Julien Grall wrote: On 05/07/2017 20:06, Stefano Stabellini wrote: On Wed, 5 Jul 2017, Julien Grall wrote: On 07/04/2017 08:31 AM, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder, Thank you for the summary! [...] Curre

Re: [Xen-devel] [PATCH 4/6] libxl: Add wrappers for new commands and add AER error handler

2017-07-05 Thread Venu Busireddy
On 2017-06-30 11:18:15 +0100, Wei Liu wrote: > On Tue, Jun 27, 2017 at 12:14:56PM -0500, Venu Busireddy wrote: > > libxl: Add wrappers for new commands and add AER error handler > > Extraneous line. My mistake. Will remove it. > > > > Add wrappers for the newly introduced commands "pci-assignab

Re: [Xen-devel] [PATCH 00/17 v5] SBSA UART emulation support in Xen

2017-07-05 Thread Stefano Stabellini
On Wed, 5 Jul 2017, Julien Grall wrote: > On 05/07/2017 20:06, Stefano Stabellini wrote: > > On Wed, 5 Jul 2017, Julien Grall wrote: > > > On 07/04/2017 08:31 AM, Bhupinder Thakur wrote: > > > > Hi Julien, > > > > > > Hi Bhupinder, > > > > > > Thank you for the summary! > > > > > > [...] > > > >

Re: [Xen-devel] [PATCH 2/6] xl: Add commands for hiding and unhiding pcie passthrough devices

2017-07-05 Thread Venu Busireddy
On 2017-06-30 11:18:10 +0100, Wei Liu wrote: > I haven't reviewed the code in detail, but I have some questions > regarding the design. See the end of this email. > > On Tue, Jun 27, 2017 at 12:14:54PM -0500, Venu Busireddy wrote: > > > > +static void pciassignable_list_hidden(void) > > +{ > >

Re: [Xen-devel] [PATCH 00/17 v5] SBSA UART emulation support in Xen

2017-07-05 Thread Julien Grall
On 05/07/2017 20:43, Julien Grall wrote: On 05/07/2017 20:06, Stefano Stabellini wrote: On Wed, 5 Jul 2017, Julien Grall wrote: On 07/04/2017 08:31 AM, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder, Thank you for the summary! [...] Currently, UEFI firmware uses hvc as the console for

Re: [Xen-devel] [PATCH 00/17 v5] SBSA UART emulation support in Xen

2017-07-05 Thread Julien Grall
On 05/07/2017 20:06, Stefano Stabellini wrote: On Wed, 5 Jul 2017, Julien Grall wrote: On 07/04/2017 08:31 AM, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder, Thank you for the summary! [...] Currently, UEFI firmware uses hvc as the console for input/output. Now with the support of SBS

Re: [Xen-devel] [PATCH 1/6] xen: Add support for hiding and unhiding pcie passthrough devices

2017-07-05 Thread Venu Busireddy
On 2017-07-04 09:46:58 -0600, Jan Beulich wrote: > >>> On 27.06.17 at 19:14, wrote: > > First of all, please Cc all maintainers of code you modify. I was using the names spit out by the scripts/get_maintainer.pl script for the patch file. I didn't know that the script had a "-f" option, and with

Re: [Xen-devel] [PATCH 00/17 v5] SBSA UART emulation support in Xen

2017-07-05 Thread Stefano Stabellini
On Wed, 5 Jul 2017, Julien Grall wrote: > On 07/04/2017 08:31 AM, Bhupinder Thakur wrote: > > Hi Julien, > > Hi Bhupinder, > > Thank you for the summary! > > [...] > > > > Currently, UEFI firmware uses hvc as the console for input/output. Now > > with the support > > of SBSA UART in Xen, it is

[Xen-devel] [linux-3.18 test] 111391: regressions - FAIL

2017-07-05 Thread osstest service owner
flight 111391 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/111391/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-win7-amd64 18 guest-start/win.repeat fail in 111255 REGR. vs. 110441 Tes

Re: [Xen-devel] [RFC] DOMCTL_memattrs_op : a new DOMCTL to play with stage-2 page attributes

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Jan Beulich wrote: > >>> On 03.07.17 at 19:58, wrote: > > On Mon, 3 Jul 2017, Zhongze Liu wrote: > >> 2017-07-03 22:25 GMT+08:00 Jan Beulich : > >> On 30.06.17 at 22:15, wrote: > >> >> /* flags for XEN_DOMCTL_MEMATTRS_OP_SET_PERMISSIONS */ > >> >> #define XEN_DOMCTL_MEMAT

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

2017-07-05 Thread osstest service owner
flight 111414 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/111414/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 111384 build-i386-xsm

Re: [Xen-devel] [PATCH 6/7] xen/arm: SMMU: Support generic IOMMU bindings

2017-07-05 Thread Stefano Stabellini
On Wed, 5 Jul 2017, Wei Chen wrote: > > >> > +static int arm_smmu_of_xlate(struct device *dev, struct > > >> > of_phandle_args > > >> *args) > > >> > +{ > > >> > + struct arm_smmu_device *smmu; > > >> > + u32 mask = 0, fwid = 0; > > >> > + > > >> > + smmu = find_smmu(dt_to_dev(args->np)); >

Re: [Xen-devel] [PATCH 4/7] xen/arm: SMMU: Detect types of device tree binding

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Wei Chen wrote: > Hi Stefano, > > > -Original Message- > > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > > Sent: 2017年7月4日 6:30 > > To: Wei Chen > > Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper > > ; Kaly Xin ; Julien Grall > > ; nd >

Re: [Xen-devel] [PATCH 2/7] xen/arm: SMMU: Introduce a helper to add DT device to SMMU

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Wei Chen wrote: > Hi Stefano, > > > -Original Message- > > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > > Sent: 2017年7月4日 6:03 > > To: Wei Chen > > Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper > > ; Kaly Xin ; Julien Grall > > ; nd >

Re: [Xen-devel] [PATCH 1/7] xen/arm: SMMU: Implement the add_device callback in SMMU

2017-07-05 Thread Stefano Stabellini
On Tue, 4 Jul 2017, Wei Chen wrote: > Hi Stefano, > > > -Original Message- > > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > > Sent: 2017年7月4日 5:58 > > To: Wei Chen > > Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper > > ; Kaly Xin ; Julien Grall > > ; nd >

Re: [Xen-devel] OOPS new Xen 4.9.0_08 / kernel 4.12.0 Dom0 crash @ domain_crash_sync called from entry.S: fault at ffff82d080342328 entry.o#create_bounce_frame+0x135/0x14d

2017-07-05 Thread PGNet Dev
On 7/5/17 12:58 AM, Jan Beulich wrote: So there are two problems here: One is the fact that the kernel really should put an Invalid Opcode exception handler in place before intentionally raising any such exceptions (which WARN() and WARN_ON() do). The other is that Linux commit 636259880a ("efi:

[Xen-devel] [libvirt test] 111385: tolerable all pass - PUSHED

2017-07-05 Thread osstest service owner
flight 111385 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/111385/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-raw 13 saverestore-support-checkfail like 111258 test-armhf-armhf-libvirt 14 saveresto

Re: [Xen-devel] Renesas R-Car Gen3 SoCs earlyprintk support.

2017-07-05 Thread Julien Grall
Hi Andrii, On 05/07/17 18:00, Andrii Anisov wrote: On 05.07.17 19:50, Julien Grall wrote: Yocto aside, I think updating the wiki pages don't take too long. It is just adding: * Make sure Salvator-X webpage is accurate and doesn't contain non-upstream pointer (i.e dropping this yocto link co

  1   2   >