Re: [Xen-devel] [PATCH V3 13/29] x86/vvtd: Set Interrupt Remapping Table Pointer through GCMD

2017-10-19 Thread Jan Beulich
>>> On 20.10.17 at 06:08, wrote: > On Thu, Oct 19, 2017 at 12:56:45PM +0100, Roger Pau Monné wrote: >>On Thu, Sep 21, 2017 at 11:01:54PM -0400, Lan Tianyu wrote: >>> @@ -148,6 +205,18 @@ static int vvtd_write(struct vcpu *v, unsigned long >>> addr, >>> break; >>> } >>>

Re: [Xen-devel] [PATCH V3 11/29] x86/hvm: Introduce a emulated VTD for HVM

2017-10-19 Thread Jan Beulich
>>> On 20.10.17 at 04:46, wrote: > On Thu, Oct 19, 2017 at 12:20:35PM +0100, Roger Pau Monné wrote: >>On Thu, Sep 21, 2017 at 11:01:52PM -0400, Lan Tianyu wrote: >>> From: Chao Gao >>> >>> This patch adds create/destroy function for the emulated VTD >>> and adapts it to the common VIOMMU abstrac

Re: [Xen-devel] [PATCH V3 26/29] x86/vvtd: Handle interrupt translation faults

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 05:31:37PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:02:07PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> Interrupt translation faults are non-recoverable fault. When faults >> are triggered, it needs to populate fault info to Fault Recording >> Registe

Re: [Xen-devel] [PATCH V3 25/29] x86/vmsi: Hook delivering remapping format msi to guest

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 18:07, wrote: > On Thu, Sep 21, 2017 at 11:02:06PM -0400, Lan Tianyu wrote: >> diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c >> index 6196334..349a8cf 100644 >> --- a/xen/drivers/passthrough/io.c >> +++ b/xen/drivers/passthrough/io.c >> @@ -942,21 +942

Re: [Xen-devel] [PATCH V3 24/29] tools/libxc: Add a new interface to bind remapping format msi with pirq

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 05:03:26PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:02:05PM -0400, Lan Tianyu wrote: >> From: Chao Gao > >The title for this patch it's wrong, it modifies both the hypervisor >and libxc. Please fix it. > >> When exposing vIOMMU (vvtd) to guest, guest can co

Re: [Xen-devel] [RFC v2 5/7] acpi:arm64: Add support for parsing IORT table

2017-10-19 Thread Manish Jaggi
On 10/19/2017 8:30 PM, Goel, Sameer wrote: On 10/10/2017 6:36 AM, Manish Jaggi wrote: Hi Sameer, On 9/21/2017 6:07 AM, Sameer Goel wrote: Add support for parsing IORT table to initialize SMMU devices. * The code for creating an SMMU device has been modified, so that the SMMU device can be ini

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 18:21, wrote: > Looking a bit more at the resource you can acquire from this hypercall. > Some of them are allocated using alloc_xenheap_page() so not assigned to > a domain. > > So I am not sure how you can expect a function set_foreign_p2m_entry to > take reference in that

Re: [Xen-devel] [PATCH V3 16/29] x86/vvtd: decode interrupt attribute from IRTE

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 03:39:44PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:57PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> Without interrupt remapping, interrupt attributes can be extracted from >> msi message or IOAPIC RTE. However, with interrupt remapping enabled, >>

Re: [Xen-devel] [PATCH V3 15/29] x86/vvtd: Process interrupt remapping request

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 03:26:30PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:56PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> When a remapping interrupt request arrives, remapping hardware computes the >> interrupt_index per the algorithm described in VTD spec >> "Interrup

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 18:06, wrote: > On 19/10/17 16:47, Jan Beulich wrote: >> I don't understand: The refcounting is to be done by ARM-specific >> code anyway, i.e. by the implementation of set_foreign_p2m_entry(), >> not its caller. At least that's what I would have expected. > > I thought I said

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 19:36, wrote: > On 10/19/2017 07:58 AM, Jan Beulich wrote: > On 19.10.17 at 04:36, wrote: >>> --- a/xen/include/xsm/dummy.h >>> +++ b/xen/include/xsm/dummy.h >>> @@ -516,7 +516,8 @@ static XSM_INLINE int > xsm_remove_from_physmap(XSM_DEFAULT_ARG struct domain *d1, >>> st

Re: [Xen-devel] [PATCH 1/1] xen/time: do not decrease steal time after live migration on xen

2017-10-19 Thread Dongli Zhang
Hi Boris, - boris.ostrov...@oracle.com wrote: > On 10/19/2017 04:02 AM, Dongli Zhang wrote: > > After guest live migration on xen, steal time in /proc/stat > > (cpustat[CPUTIME_STEAL]) might decrease because steal returned by > > xen_steal_lock() might be less than this_rq()->prev_steal_time

Re: [Xen-devel] [PATCH V3 13/29] x86/vvtd: Set Interrupt Remapping Table Pointer through GCMD

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 12:56:45PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:54PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> Software sets this field to set/update the interrupt remapping table pointer >> used by hardware. The interrupt remapping table pointer is specifie

[Xen-devel] [qemu-mainline test] 114703: regressions - FAIL

2017-10-19 Thread osstest service owner
flight 114703 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/114703/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i3866 xen-buildfail REGR. vs. 114507 build-i386-xsm

[Xen-devel] [xen-4.8-testing test] 114689: tolerable FAIL - PUSHED

2017-10-19 Thread osstest service owner
flight 114689 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114689/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-xtf-amd64-amd64-4 48 xtf/test-hvm64-lbr-tsx-vmentry fail in 114661 pass in 114689 test-amd64-i386-xl-q

Re: [Xen-devel] [PATCH V3 12/29] x86/vvtd: Add MMIO handler for VVTD

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 12:34:54PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:53PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> This patch adds VVTD MMIO handler to deal with MMIO access. >> >> Signed-off-by: Chao Gao >> Signed-off-by: Lan Tianyu >> --- >> xen/drivers/pa

Re: [Xen-devel] [PATCH V3 11/29] x86/hvm: Introduce a emulated VTD for HVM

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 12:20:35PM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:52PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> This patch adds create/destroy function for the emulated VTD >> and adapts it to the common VIOMMU abstraction. >> >> Signed-off-by: Chao Gao >>

[Xen-devel] [linux-3.18 baseline-only test] 72332: regressions - trouble: blocked/broken/fail/pass

2017-10-19 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72332 linux-3.18 real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72332/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-nested-intel 13 xen-instal

Re: [Xen-devel] [PATCH V3 10/29] vtd: add and align register definitions

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 11:21:35AM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:51PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> No functional changes. >> >> Signed-off-by: Chao Gao >> Signed-off-by: Lan Tianyu > >Reviewed-by: Roger Pau Monné Thanks > >Would have been n

Re: [Xen-devel] [PATCH V3 7/29] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 11:00:27AM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:48PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> A new logic is added to build ACPI DMAR table in tool stack for a guest >> with one virtual VTD and pass through it to guest via existing mechanism

Re: [Xen-devel] [PATCH V3 6/29] tools/libxl: Add a user configurable parameter to control vIOMMU attributes

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 10:49:22AM +0100, Roger Pau Monné wrote: >On Thu, Sep 21, 2017 at 11:01:47PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> A field, viommu_info, is added to struct libxl_domain_build_info. Several >> attributes can be specified by guest config file for virtual IOMMU. Th

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

2017-10-19 Thread osstest service owner
flight 114780 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114780/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH V3 22/29] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-10-19 Thread Chao Gao
On Thu, Oct 19, 2017 at 09:56:34AM -0600, Jan Beulich wrote: On 19.10.17 at 17:49, wrote: >> On Thu, Sep 21, 2017 at 11:02:03PM -0400, Lan Tianyu wrote: >>> --- a/xen/arch/x86/hvm/vioapic.c >>> +++ b/xen/arch/x86/hvm/vioapic.c >>> @@ -561,11 +561,25 @@ int vioapic_get_vector(const struct doma

Re: [Xen-devel] [PATCH v8 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-19 Thread Yi Sun
On 17-10-20 09:20:00, Yi Sun wrote: > On 17-10-19 16:08:09, Konrad Rzeszutek Wilk wrote: > > On Mon, Oct 16, 2017 at 11:04:05AM +0800, Yi Sun wrote: > > > a - Acked-by > > > r - Reviewed-by > > > > > > r patch 1 - docs: create Memory Bandwidth Allocation (MBA) feature > > > document > > > a

Re: [Xen-devel] [PATCH v5 09/13] xen/pvcalls: implement sendmsg

2017-10-19 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > > +static int __write_ring(struct pvcalls_data_intf *intf, > > + struct pvcalls_data *data, > > + struct iov_iter *msg_iter, > > + int len) > > +{ > > + RING_IDX cons, prod, size, masked_prod, mask

Re: [Xen-devel] [PATCH v5 10/13] xen/pvcalls: implement recvmsg

2017-10-19 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > > + > > +int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t > > len, > > +int flags) > > +{ > > + struct pvcalls_bedata *bedata; > > + int ret; > > + struct sock_mapping *map; > > + > > + if (flags & (MSG_

Re: [Xen-devel] [PATCH v5 06/13] xen/pvcalls: implement bind command

2017-10-19 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > On 10/06/2017 08:30 PM, Stefano Stabellini wrote: > > Send PVCALLS_BIND to the backend. Introduce a new structure, part of > > struct sock_mapping, to store information specific to passive sockets. > > > > Introduce a status field to keep track of the s

Re: [Xen-devel] [PATCH v5 04/13] xen/pvcalls: implement socket command and handle events

2017-10-19 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > On 10/06/2017 08:30 PM, Stefano Stabellini wrote: > > Send a PVCALLS_SOCKET command to the backend, use the masked > > req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 > > and PVCALLS_NR_REQ_PER_RING. We already have a slot in the

Re: [Xen-devel] [PATCH v8 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-19 Thread Yi Sun
On 17-10-19 16:08:09, Konrad Rzeszutek Wilk wrote: > On Mon, Oct 16, 2017 at 11:04:05AM +0800, Yi Sun wrote: > > Hi, all, > > > > We plan to bring a new PSR (Platform Shared Resource) feature called > > Intel Memory Bandwidth Allocation (MBA) to Xen. > > > > Besides the MBA enabling, we change so

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Zhongze Liu
2017-10-20 8:34 GMT+08:00 Zhongze Liu : > Hi Daniel, > > 2017-10-20 1:36 GMT+08:00 Daniel De Graaf : >> On 10/18/2017 10:36 PM, Zhongze Liu wrote: >>> >>> The original dummy xsm_map_gmfn_foregin checks if source domain has the >>> proper >>> privileges over the target domain. Under this policy, it'

[Xen-devel] [linux-linus test] 114682: tolerable FAIL - PUSHED

2017-10-19 Thread osstest service owner
flight 114682 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/114682/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-win7-amd64 15 guest-saverestore.2 fail in 114658 pass in 114682 test-amd64-i386-xl-qem

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Zhongze Liu
Hi Daniel, 2017-10-20 1:36 GMT+08:00 Daniel De Graaf : > On 10/18/2017 10:36 PM, Zhongze Liu wrote: >> >> The original dummy xsm_map_gmfn_foregin checks if source domain has the >> proper >> privileges over the target domain. Under this policy, it's not allowed if >> a Dom0 >> wants to map pages f

[Xen-devel] [linux-next test] 114679: regressions - trouble: blocked/broken/fail/pass

2017-10-19 Thread osstest service owner
flight 114679 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/114679/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64-xsmbroken test-amd64-i386-xl-qemut-debianh

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

2017-10-19 Thread osstest service owner
flight 114776 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114776/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH for-4.10] xen/arm: gic-v3: Make sure ICC_SRE_EL1 is restored before ICH_VMCR_EL2

2017-10-19 Thread Stefano Stabellini
On Thu, 19 Oct 2017, Julien Grall wrote: > Per 8.4.8 in ARM IHI 0069D, ICH_VMCR_EL2.VFIQEn is RES1 when > ICC_SRE_EL1.SRE is 1. This causes a Group 0 interrupt (as generated in > GICv2 mode) to be delivered as a FIQ to the guest, with potentially > consequence. So we must make sure that ICC_SRE_EL1

Re: [Xen-devel] [PATCH for-4.10] xen/arm: gic-v3: Make sure ICC_SRE_EL1 is restored before ICH_VMCR_EL2

2017-10-19 Thread Stefano Stabellini
On Thu, 19 Oct 2017, Stefano Stabellini wrote: > On Thu, 19 Oct 2017, Julien Grall wrote: > > Per 8.4.8 in ARM IHI 0069D, ICH_VMCR_EL2.VFIQEn is RES1 when > > ICC_SRE_EL1.SRE is 1. This causes a Group 0 interrupt (as generated in > > GICv2 mode) to be delivered as a FIQ to the guest, with potential

[Xen-devel] [linux-3.18 test] 114677: tolerable FAIL - PUSHED

2017-10-19 Thread osstest service owner
flight 114677 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/114677/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 114446 test-amd64-i386-xl-qemuu-win7-amd64 17

Re: [Xen-devel] [PATCH v8 00/16] Enable Memory Bandwidth Allocation in Xen

2017-10-19 Thread Konrad Rzeszutek Wilk
On Mon, Oct 16, 2017 at 11:04:05AM +0800, Yi Sun wrote: > Hi, all, > > We plan to bring a new PSR (Platform Shared Resource) feature called > Intel Memory Bandwidth Allocation (MBA) to Xen. > > Besides the MBA enabling, we change some interfaces to make them more > general but not only for CAT. >

Re: [Xen-devel] [PATCH v1 15/27] compiler: Option to default to hidden symbols

2017-10-19 Thread Luis R. Rodriguez
On Wed, Oct 18, 2017 at 04:15:10PM -0700, Thomas Garnier wrote: > On Thu, Oct 12, 2017 at 1:02 PM, Luis R. Rodriguez wrote: > > On Wed, Oct 11, 2017 at 01:30:15PM -0700, Thomas Garnier wrote: > >> diff --git a/include/linux/compiler.h b/include/linux/compiler.h > >> index e95a2631e545..6997716f73b

Re: [Xen-devel] [dpdk-dev] Can xenvirt pmd work in xen guest (aka DomU) without xen-vhost in Dom0 ?

2017-10-19 Thread Konrad Rzeszutek Wilk
On Mon, Oct 09, 2017 at 12:13:47AM +0800, Tan, Jianfeng wrote: > Hi, > > > On 10/8/2017 12:54 PM, Bill Bonaparte wrote: > > Thanks Jianfeng for taking time to reply. > > > > please allow me to briefly explain why I want to run dpdk on xen. > > our system is based on dpdk, which means we use dpdk

Re: [Xen-devel] [Qemu-devel] [PATCH v5 0/8] xen: xen-domid-restrict improvements

2017-10-19 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1508431916-9412-1-git-send-email-ian.jack...@eu.citrix.com Subject: [Qemu-devel] [PATCH v5 0/8] xen: xen-domid-restrict improvements === TEST SCRIPT BEGIN === #!/bin/bash BA

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Andrew Cooper
On 19/10/17 19:24, Kyle Huey wrote: > On Thu, Oct 19, 2017 at 11:20 AM, Meng Xu wrote: >> On Thu, Oct 19, 2017 at 11:40 AM, Andrew Cooper >> wrote: >>> On 19/10/17 16:09, Kyle Huey wrote: On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky wrote: > On 10/10/2017 12:54 PM, Kyle Huey wr

Re: [Xen-devel] [PATCH RFC 09/14] xen: vmx: Introduce a Hyper call to set subpage

2017-10-19 Thread Tamas K Lengyel
On Thu, Oct 19, 2017 at 2:13 AM, Zhang Yi wrote: > From: Zhang Yi Z > > The Hypercall is defined as HVMOP_set_subpage Are there any expected use-cases where a HVM guest would need access to this hypercall? Is spp compatible with #VE? If not, I think it would be better to integrate this with the

Re: [Xen-devel] [PATCH RFC 08/14] xen: vmx: Added setup spp page structure.

2017-10-19 Thread Tamas K Lengyel
On Thu, Oct 19, 2017 at 2:12 AM, Zhang Yi wrote: > From: Zhang Yi Z > > The hardware uses the guest-physical address and bits 11:7 of the > address accessed to lookup the SPPT to fetch a write permission bit for > the 128 byte wide sub-page region being accessed within the 4K > guest-physical pag

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Kyle Huey
On Thu, Oct 19, 2017 at 11:20 AM, Meng Xu wrote: > On Thu, Oct 19, 2017 at 11:40 AM, Andrew Cooper > wrote: >> >> On 19/10/17 16:09, Kyle Huey wrote: >> > On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky >> > wrote: >> >> On 10/10/2017 12:54 PM, Kyle Huey wrote: >> >>> On Mon, Jul 24, 2017 at 9:

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Meng Xu
On Thu, Oct 19, 2017 at 11:40 AM, Andrew Cooper wrote: > > On 19/10/17 16:09, Kyle Huey wrote: > > On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky > > wrote: > >> On 10/10/2017 12:54 PM, Kyle Huey wrote: > >>> On Mon, Jul 24, 2017 at 9:54 AM, Kyle Huey wrote: > On Mon, Jul 24, 2017 at 8:07

Re: [Xen-devel] [PATCH RFC 05/14] xen: vmx: Disable the 2M/1G superpage when SPP enabled

2017-10-19 Thread Tamas K Lengyel
On Thu, Oct 19, 2017 at 2:11 AM, Zhang Yi wrote: > From: Zhang Yi Z > > Current we only support Sub-page Protection on the 4k > page table. > > Signed-off-by: Zhang Yi Z > --- > xen/arch/x86/hvm/vmx/vmx.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/xen/arch/x86/hvm/vmx/vmx.c

Re: [Xen-devel] [PATCH] x86/xen: support priv-mapping in an HVM tools domain

2017-10-19 Thread Boris Ostrovsky
On 10/19/2017 11:26 AM, Paul Durrant wrote: > If the domain has XENFEAT_auto_translated_physmap then use of the PV- > specific HYPERVISOR_mmu_update hypercall is clearly incorrect. > > This patch adds checks in xen_remap_domain_gfn_array() and > xen_unmap_domain_gfn_array() which call through to th

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Daniel De Graaf
On 10/19/2017 07:58 AM, Jan Beulich wrote: On 19.10.17 at 04:36, wrote: --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -516,7 +516,8 @@ static XSM_INLINE int xsm_remove_from_physmap(XSM_DEFAULT_ARG struct domain *d1, static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Daniel De Graaf
On 10/18/2017 10:36 PM, Zhongze Liu wrote: The original dummy xsm_map_gmfn_foregin checks if source domain has the proper privileges over the target domain. Under this policy, it's not allowed if a Dom0 wants to map pages from one DomU to another, which restricts some useful yet not dangerous use

Re: [Xen-devel] runstatedir matters when using debhelper tools in Artful

2017-10-19 Thread Wei Liu
CC Ian who know debhelper better. On Thu, Oct 19, 2017 at 02:49:06PM +, Mark Pryor wrote: > Hello, > When finishing a debianised build of xen-4.10~rc1 in Artful I had no extra > patches, so I left outthis patch below that I used to build xen-4.9 in Artful: > > https://lists.xen.org/archives/

[Xen-devel] [PATCH for-4.10] xen/arm: gic-v3: Make sure ICC_SRE_EL1 is restored before ICH_VMCR_EL2

2017-10-19 Thread Julien Grall
Per 8.4.8 in ARM IHI 0069D, ICH_VMCR_EL2.VFIQEn is RES1 when ICC_SRE_EL1.SRE is 1. This causes a Group 0 interrupt (as generated in GICv2 mode) to be delivered as a FIQ to the guest, with potentially consequence. So we must make sure that ICC_SRE_EL1 has been actually programmed before at ICH_VMCR_

Re: [Xen-devel] Block device hang after migration

2017-10-19 Thread Wei Liu
On Thu, Oct 19, 2017 at 03:30:28PM +0100, Roger Pau Monné wrote: > On Thu, Oct 19, 2017 at 11:53:11AM +0100, Wei Liu wrote: > > Hi > > > > In the process of upgrading osstest to Stretch, I discovered an issue > > with the block device. This happens after a local migration. > > > > [ 127.216232]

Re: [Xen-devel] [RFC 4/4] arm: tee: add basic OP-TEE mediator

2017-10-19 Thread Julien Grall
Hi, On 19/10/17 17:37, Volodymyr Babchuk wrote: On Thu, Oct 19, 2017 at 05:12:17PM +0100, Julien Grall wrote: Hi Julien, +if ( rc < 0 ) +{ +gprintk(XENLOG_INFO, "OP-TEE: Can't map static shm for Dom0: %d", rc); gprintk already dump the domid. So no need to say Dom0. I just

[Xen-devel] [PATCH 3/8] xen: defer call to xen_restrict until just before os_setup_post

2017-10-19 Thread Ian Jackson
We need to restrict *all* the control fds that qemu opens. Looking in /proc/PID/fd shows there are many; their allocation seems scattered throughout Xen support code in qemu. We must postpone the restrict call until roughly the same time as qemu changes its uid, chroots (if applicable), and so on

[Xen-devel] [PATCH 5/8] xen: move xc_interface compatibility fallback further up the file

2017-10-19 Thread Ian Jackson
We are going to want to use the dummy xendevicemodel_handle type in new stub functions in the CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000 section. So we need to provide that definition, or (as applicable) include the appropriate header, earlier in the file. (Ideally the newer compatibility layers w

[Xen-devel] [PATCH 1/8] xen: link against xentoolcore

2017-10-19 Thread Ian Jackson
From: Anthony PERARD Xen libraries 4.10 will include a new xentoolcore library, without which xendevicemodel et al will not work. Signed-off-by: Ian Jackson --- configure | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure b/configure index fd7e3a5..6f691df 10

[Xen-devel] [PATCH 2/8] xen: restrict: use xentoolcore_restrict_all

2017-10-19 Thread Ian Jackson
And insist that it works. Drop individual use of xendevicemodel_restrict and xenforeignmemory_restrict. These are not actually effective in this version of qemu, because qemu has a large number of fds open onto various Xen control devices. The restriction arrangements are still not right, becaus

[Xen-devel] [PATCH 7/8] os-posix: Provide new -runas . facility

2017-10-19 Thread Ian Jackson
This allows the caller to specify a uid and gid to use, even if there is no corresponding password entry. This will be useful in certain Xen configurations. We don't support just -runas because: (i) deprivileging without calling setgroups would be ineffective (ii) given only a uid we don't know

[Xen-devel] [PATCH 8/8] configure: do_compiler: Dump some extra info under bash

2017-10-19 Thread Ian Jackson
This makes it much easier to find a particular thing in config.log. The information may be lacking in other shells, resulting in harmless empty output. (This is why we don't use the proper ${FUNCNAME[*]} array syntax - other shells will choke on that.) The extra output is only printed if configu

[Xen-devel] [PATCH 4/8] xen: destroy_hvm_domain: Move reason into a variable

2017-10-19 Thread Ian Jackson
We are going to want to reuse this. No functional change. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 7b60ec6..83420cd 100644 --- a/

[Xen-devel] [PATCH 6/8] xen: destroy_hvm_domain: Try xendevicemodel_shutdown

2017-10-19 Thread Ian Jackson
xc_interface_open etc. is not going to work if we have dropped privilege, but xendevicemodel_shutdown will if everything is new enough. xendevicemodel_shutdown is only availabe in Xen 4.10 and later, so provide a stub for earlier versions. Signed-off-by: Ian Jackson --- v2: Add compatibility stu

[Xen-devel] [PATCH v5 0/8] xen: xen-domid-restrict improvements

2017-10-19 Thread Ian Jackson
I have been working on trying to get qemu, when running as a Xen device model, to _actually_ not have power equivalent to root. I think I have achieved this, with some limitations (which are discussed in my series against xen.git. However, there are changes to qemu needed. In particular * The

Re: [Xen-devel] [PATCH 1/8] xen: link against xentoolcore

2017-10-19 Thread Anthony PERARD
On Thu, Oct 19, 2017 at 05:38:10PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("Re: [PATCH 1/8] xen: link against xentoolcore"): > > I don't think it is necessary to do anything in qemu. The linker should > > find on its own the new libxentoolcore as long as an option > > -Wl,-rpath-link= pr

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

2017-10-19 Thread osstest service owner
flight 114756 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/114756/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [RFC 4/4] arm: tee: add basic OP-TEE mediator

2017-10-19 Thread Volodymyr Babchuk
On Thu, Oct 19, 2017 at 05:12:17PM +0100, Julien Grall wrote: Hi Julien, > >>>+if ( rc < 0 ) > >>>+{ > >>>+gprintk(XENLOG_INFO, "OP-TEE: Can't map static shm for Dom0: > >>>%d", rc); > >> > >>gprintk already dump the domid. So no need to say Dom0. > >I

Re: [Xen-devel] [PATCH 1/8] xen: link against xentoolcore

2017-10-19 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 1/8] xen: link against xentoolcore"): > I don't think it is necessary to do anything in qemu. The linker should > find on its own the new libxentoolcore as long as an option > -Wl,-rpath-link= provide the right path to xentoolcore when building > qemu from xen.git

Re: [Xen-devel] [PATCH V3 26/29] x86/vvtd: Handle interrupt translation faults

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:07PM -0400, Lan Tianyu wrote: > From: Chao Gao > > Interrupt translation faults are non-recoverable fault. When faults > are triggered, it needs to populate fault info to Fault Recording > Registers and inject vIOMMU msi interrupt to notify guest IOMMU driver > to de

[Xen-devel] [PATCH for-4.10 v2] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
DMA-ing to the stack is generally considered bad practice. In this case, if a timeout occurs because of a sluggish device which is processing the request, the completion notification will corrupt the stack of a subsequent deeper call tree. Place the poll_slot in a percpu area and DMA to that inst

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Julien Grall
Hi, On 19/10/17 17:06, Julien Grall wrote: On 19/10/17 16:47, Jan Beulich wrote: On 19.10.17 at 17:37, wrote: Hi, On 19/10/17 16:11, Jan Beulich wrote: On 19.10.17 at 16:49, wrote: I'd prefer to make the whole thing x86-only since that's the only platform on which I can test it, and inde

Re: [Xen-devel] [RFC 4/4] arm: tee: add basic OP-TEE mediator

2017-10-19 Thread Julien Grall
Hi Volodymyr, On 19/10/17 16:33, Volodymyr Babchuk wrote: On Thu, Oct 19, 2017 at 03:01:28PM +0100, Julien Grall wrote: My request is to move the set_user_reg(...) calls outside of call_forward. So this would make clear the mediator needs to examine the result values. Ah, I see. You suggest to

Re: [Xen-devel] [PATCH V3 25/29] x86/vmsi: Hook delivering remapping format msi to guest

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:06PM -0400, Lan Tianyu wrote: > diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c > index 6196334..349a8cf 100644 > --- a/xen/drivers/passthrough/io.c > +++ b/xen/drivers/passthrough/io.c > @@ -942,21 +942,20 @@ static void __msi_pirq_eoi(struct

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Julien Grall
Hi, On 19/10/17 16:47, Jan Beulich wrote: On 19.10.17 at 17:37, wrote: Hi, On 19/10/17 16:11, Jan Beulich wrote: On 19.10.17 at 16:49, wrote: I'd prefer to make the whole thing x86-only since that's the only platform on which I can test it, and indeed the code used to be x86-only. Jan obj

Re: [Xen-devel] [PATCH V3 24/29] tools/libxc: Add a new interface to bind remapping format msi with pirq

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:05PM -0400, Lan Tianyu wrote: > From: Chao Gao The title for this patch it's wrong, it modifies both the hypervisor and libxc. Please fix it. > When exposing vIOMMU (vvtd) to guest, guest can configure the msi to > remapping format. For pass-through device, the phys

Re: [Xen-devel] [PATCH V3 22/29] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 17:49, wrote: > On Thu, Sep 21, 2017 at 11:02:03PM -0400, Lan Tianyu wrote: >> --- a/xen/arch/x86/hvm/vioapic.c >> +++ b/xen/arch/x86/hvm/vioapic.c >> @@ -561,11 +561,25 @@ int vioapic_get_vector(const struct domain *d, >> unsigned int gsi) >> { >> unsigned int pin; >>

Re: [Xen-devel] [PATCH] watchdog: xen: use time64_t for timeouts

2017-10-19 Thread Guenter Roeck
On Thu, Oct 19, 2017 at 05:05:48PM +0200, Arnd Bergmann wrote: > The Xen watchdog driver uses __kernel_time_t and ktime_to_timespec() > internally for managing its timeouts. Both are deprecated because of > y2038 problems. The driver itself is fine, since it only uses monotonic > times, but convert

Re: [Xen-devel] [PATCH V3 22/29] x86/vioapic: extend vioapic_get_vector() to support remapping format RTE

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:03PM -0400, Lan Tianyu wrote: > From: Chao Gao > > When IOAPIC RTE is in remapping format, it doesn't contain the vector of > interrupt. For this case, the RTE contains an index of interrupt remapping > table where the vector of interrupt is stored. This patchs gets

[Xen-devel] [PATCH for-next 2/3] x86/pv: Use DIV_ROUND_UP() when converting between GDT entries and frames

2017-10-19 Thread Andrew Cooper
Also consistently use use nr_frames, rather than mixing nr_pages with a frames[] array. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/domain.c | 8 +--- xen/arch/x86/pv/descriptor-tables.c | 17 - 2 files

[Xen-devel] [PATCH for-next 1/3] x86/pv: Move compat_set_gdt() to be beside do_set_gdt()

2017-10-19 Thread Andrew Cooper
This also makes the do_update_descriptor() pair of functions adjacent. Purely code motion; no functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/pv/descriptor-tables.c | 69 +++-- 1 file changed, 36 insertions(+), 3

[Xen-devel] [PATCH for-next 3/3] x86/pv: Misc improvements to pv_destroy_gdt()

2017-10-19 Thread Andrew Cooper
Hoist the l1e_from_pfn(zero_pfn, __PAGE_HYPERVISOR_RO) calculation out of the loop, and switch the code over to using mfn_t. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu --- xen/arch/x86/pv/descriptor-tables.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletion

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 17:37, wrote: > Hi, > > On 19/10/17 16:11, Jan Beulich wrote: > On 19.10.17 at 16:49, wrote: > I'd prefer to make the whole thing x86-only since that's the only platform on which I can test it, and indeed the code used to be x86-only. Jan > objected to this

Re: [Xen-devel] [PATCH V3 21/29] VIOMMU: Introduce callback of checking irq remapping mode

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:02PM -0400, Lan Tianyu wrote: > This patch is to add callback for vIOAPIC and vMSI to check whether interrupt > remapping is enabled. > > Signed-off-by: Lan Tianyu > --- > xen/common/viommu.c | 15 +++ > xen/include/xen/viommu.h | 10 ++ > 2

Re: [Xen-devel] [PATCH V3 20/29] VIOMMU: Add get irq info callback to convert irq remapping request

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:01PM -0400, Lan Tianyu wrote: > This patch is to add get_irq_info callback for platform implementation > to convert irq remapping request to irq info (E,G vector, dest, dest_mode > and so on). > > Signed-off-by: Lan Tianyu > --- > xen/common/viommu.c | 16 +

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Andrew Cooper
On 19/10/17 16:09, Kyle Huey wrote: > On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky > wrote: >> On 10/10/2017 12:54 PM, Kyle Huey wrote: >>> On Mon, Jul 24, 2017 at 9:54 AM, Kyle Huey wrote: On Mon, Jul 24, 2017 at 8:07 AM, Boris Ostrovsky wrote: >>> One thing I noticed is that

Re: [Xen-devel] [PATCH 00/12] ARM: VGIC/GIC separation cleanups

2017-10-19 Thread Andre Przywara
Hi, On 19/10/17 13:48, Andre Przywara wrote: > By the original VGIC design, Xen differentiates between the actual VGIC > emulation on one hand and the GIC hardware accesses on the other. > It seems there were some deviations from that scheme (over time?), so at > the moment we end up happily acces

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Julien Grall
Hi, On 19/10/17 16:11, Jan Beulich wrote: On 19.10.17 at 16:49, wrote: I'd prefer to make the whole thing x86-only since that's the only platform on which I can test it, and indeed the code used to be x86-only. Jan objected to this so all I'm trying to achieve is that it builds for ARM. Please

Re: [Xen-devel] [PATCH V3 19/29] x86/vioapic: Hook interrupt delivery of vIOAPIC

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:02:00PM -0400, Lan Tianyu wrote: > From: Chao Gao > > When irq remapping is enabled, IOAPIC Redirection Entry may be in remapping > format. If that, generate an irq_remapping_request and call the common > VIOMMU abstraction's callback to handle this interrupt request. D

Re: [Xen-devel] [RFC 4/4] arm: tee: add basic OP-TEE mediator

2017-10-19 Thread Volodymyr Babchuk
On Thu, Oct 19, 2017 at 03:01:28PM +0100, Julien Grall wrote: > Hi Volodymyr, Hi Julien, [...] >>+} >>+ >>+static bool forward_call(struct cpu_user_regs *regs) >>+{ >>+register_t resp[4]; >>+ >>+call_smccc_smc(get_user_reg(regs, 0), >>+ ge

[Xen-devel] [PATCH] x86/xen: support priv-mapping in an HVM tools domain

2017-10-19 Thread Paul Durrant
If the domain has XENFEAT_auto_translated_physmap then use of the PV- specific HYPERVISOR_mmu_update hypercall is clearly incorrect. This patch adds checks in xen_remap_domain_gfn_array() and xen_unmap_domain_gfn_array() which call through to the approprate xlate_mmu function if the feature is pre

[Xen-devel] [PATCH] x86/xen: support priv-mapping in an HVM tools domain

2017-10-19 Thread Paul Durrant
If the domain has XENFEAT_auto_translated_physmap then use of the PV- specific HYPERVISOR_mmu_update hypercall is clearly incorrect. This patch adds checks in xen_remap_domain_gfn_array() and xen_unmap_domain_gfn_array() which call through to the approprate xlate_mmu function if the feature is pre

Re: [Xen-devel] [PATCH] x86/xen: support priv-mapping in an HVM tools domain

2017-10-19 Thread Paul Durrant
Apologies... I misformatted this. I will re-send. Paul > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 19 October 2017 16:24 > To: x...@kernel.org; xen-de...@lists.xenproject.org; linux- > ker...@vger.kernel.org > Cc: Paul Durrant > Subject: [PATCH] x8

Re: [Xen-devel] [PATCH] tools/Makefile: unset MAKELEVEL before building QEMU

2017-10-19 Thread Ian Jackson
Anthony PERARD writes ("[PATCH] tools/Makefile: unset MAKELEVEL before building QEMU"): > Since QEMU commits aef45d51d1204f3335fb99de6658e0c5612c2b67 > "build: automatically handle GIT submodule checkout for dtc" > the QEMU makefiles rely on the variable MAKELEVEL to make a decision on > whether t

Re: [Xen-devel] [RFC v2 5/7] acpi:arm64: Add support for parsing IORT table

2017-10-19 Thread Goel, Sameer
On 10/12/2017 8:06 AM, Julien Grall wrote: > Hi Sameer, > > On 21/09/17 01:37, Sameer Goel wrote: >> Add support for parsing IORT table to initialize SMMU devices. >> * The code for creating an SMMU device has been modified, so that the SMMU >> device can be initialized. >> * The NAMED NODE code

Re: [Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-19 Thread Ian Jackson
Andrew Cooper writes ("Re: [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value"): > On 16/10/17 16:07, Ian Jackson wrote: > > This statement is true only if you think "the precopy callback" refers > > to the stub generated by libxl_save_msgs_gen. > > The commit

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 16:49, wrote: >> > I'd prefer to make the whole thing x86-only since that's the only platform >> on which I can test it, and indeed the code used to be x86-only. Jan objected >> to this so all I'm trying to achieve is that it builds for ARM. Please can >> you and >> Jan reach a

Re: [Xen-devel] VPMU interrupt unreliability

2017-10-19 Thread Kyle Huey
On Wed, Oct 11, 2017 at 7:09 AM, Boris Ostrovsky wrote: > On 10/10/2017 12:54 PM, Kyle Huey wrote: >> On Mon, Jul 24, 2017 at 9:54 AM, Kyle Huey wrote: >>> On Mon, Jul 24, 2017 at 8:07 AM, Boris Ostrovsky >>> wrote: >> One thing I noticed is that the workaround doesn't appear to be >> co

Re: [Xen-devel] [PATCH 1/1] xen/time: do not decrease steal time after live migration on xen

2017-10-19 Thread Boris Ostrovsky
On 10/19/2017 04:02 AM, Dongli Zhang wrote: > After guest live migration on xen, steal time in /proc/stat > (cpustat[CPUTIME_STEAL]) might decrease because steal returned by > xen_steal_lock() might be less than this_rq()->prev_steal_time which is > derived from previous return value of xen_steal_c

Re: [Xen-devel] [PATCH] libxc: don't fail domain creation when unpacking initrd fails

2017-10-19 Thread Ian Jackson
Jan: > [...] As quite often when changing code I'm not very > familiar with, I had tried to minimize the amount of changes needed. E.g. > I did consider dropping xc_dom_ramdisk_check_size() altogether in favor > of some other function (or even doing what is needed in its only caller), > but that wo

Re: [Xen-devel] [PATCH] MAINTAINERS: Make Christian Lindig maintainer for ocaml tools

2017-10-19 Thread Christian Lindig
Thanks for the trust. I’d be happy to do it in the formal role of maintainer but would also be happy to help maintaining ocaml tools otherwise. — Christian > On 17. Oct 2017, at 17:44, Ian Jackson wrote: > > oxenstored is our default implementation of xenstore, for platforms > that have ocam

[Xen-devel] [PATCH] watchdog: xen: use time64_t for timeouts

2017-10-19 Thread Arnd Bergmann
The Xen watchdog driver uses __kernel_time_t and ktime_to_timespec() internally for managing its timeouts. Both are deprecated because of y2038 problems. The driver itself is fine, since it only uses monotonic times, but converting it to use ktime_get_seconds() avoids the deprecated interfaces and

  1   2   3   >