Re: [Xen-devel] [PATCH 1/3] x86/PoD: correctly handle non-order-0 decrease-reservation requests

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 16:58, wrote: > On 04/12/17 11:06, Jan Beulich wrote: >> --- a/xen/common/memory.c >> +++ b/xen/common/memory.c >> @@ -284,13 +284,15 @@ int guest_remove_page(struct domain *d, >> >> #ifdef CONFIG_X86 >> mfn = get_gfn_query(d, gmfn, &p2mt); >> +if ( unlikely(p2mt ==

[Xen-devel] [xen-4.6-testing baseline-only test] 72517: regressions - FAIL

2017-12-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72517 xen-4.6-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72517/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-421 xtf/test-hvm32-

Re: [Xen-devel] [Xen-users] Starting xenstored in a driver domain

2017-12-04 Thread Michael Collins
While your patch did work, it removed some default functionality from the script while running in dom0.  I wrote up the following and have patched it into my scripts on both my dom0 and driver domu. It just checks to see if /proc/xen/capabilities exists and is empty, if so it only creates the

[Xen-devel] [RFC v3 0/4] SMMUv3 Driver

2017-12-04 Thread Sameer Goel
This RFC addresses the review comments from the last RFC [1]. All the IORT realted changes have been droped in this version as these will be covered by [2]. The IORT implementation had to provide a Linux like API to the SMMUv3 driver. List of changes: - Addition of a linux_compat header. - Additi

[Xen-devel] [RFC v3 2/4] xen/linux_compat: Add a Linux compat header

2017-12-04 Thread Sameer Goel
For porting files from Linux it is useful to have a Linux API to Xen API mapping header at a common location. This file adds common API functions and other defines that are needed for porting arm SMMU drivers. --- xen/include/xen/linux_compat.h | 106 + 1 f

[Xen-devel] [RFC v3 1/4] Port WARN_ON_ONCE() from Linux

2017-12-04 Thread Sameer Goel
Port WARN_ON_ONCE macro from Linux. A return value is expected from this macro, so the implementation does not follow the Xen convention of wrapping macros in a do..while. --- xen/include/xen/lib.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/include/xen/lib.h b/xen/includ

[Xen-devel] [RFC v3 4/4] xen/iommu: smmu-v3: Add Xen specific code to enable the ported driver

2017-12-04 Thread Sameer Goel
This driver follows an approach similar to smmu driver. The intent here is to reuse as much Linux code as possible. - Glue code has been introduced in headers to bridge the API calls. - Called Linux functions from the Xen IOMMU function calls. - Xen modifications are preceded by /*Xen: comment */ -

[Xen-devel] [RFC v3 3/4] Add verbatim copy of arm-smmu-v3.c from Linux

2017-12-04 Thread Sameer Goel
Based on commit 7aa8619a66aea52b145e04cbab4f8d6a4e5f3f3b This is a verbatim snapshot of arm-smmu-v3.c from Linux kernel source code. No Xen code has been added and the file is not built. --- xen/drivers/passthrough/arm/smmu-v3.c | 2885 + 1 file changed, 2885 insert

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

2017-12-04 Thread Yi Sun
Hi, This patch set has got all Acked-by/Reviewed-by months ago. So, I am wondering when it can be integrated? Any plan? Thanks! BRs, Sun Yi > --- > Acked and Reviewed list before V9: > > a - Acked-by > r - Reviewed-by > > r patch 1 - docs: create Memory Bandwidth Allocation (MBA) feature

Re: [Xen-devel] [RFC PATCH 16/31] arm: add SMC wrapper that is compatible with SMCCC

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > From: Volodymyr Babchuk > > Existing SMC wrapper call_smc() allows only 4 parameters and > returns only one value. This is enough for existing > use in PSCI code, but TEE mediator will need a call that is > fully compatible with ARM SMCCC. > This

Re: [Xen-devel] [PATCH 3/3] x86/p2m: force return value checking of p2m_set_entry()

2017-12-04 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Monday, December 4, 2017 7:07 PM > > As XSAs 246 and 247 have shown, not doing so is rather dangerous. > > Signed-off-by: Jan Beulich > Reviewed-by: Kevin Tian ___ Xen-devel mailing list Xen-de

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

2017-12-04 Thread osstest service owner
. commit 495566ec38817e6625294e6909cffb4de040c8e7 Merge: c11d612 768a20f Author: Peter Maydell Date: Mon Dec 4 11:27:53 2017 + Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171204' into staging ppc patch queue 2017-12-04

Re: [Xen-devel] [PATCH v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset

2017-12-04 Thread Boqun Feng
On Mon, Dec 04, 2017 at 07:13:52AM -0700, Jan Beulich wrote: > >>> On 04.12.17 at 14:10, wrote: > > On Mon, Dec 04, 2017 at 11:13:45AM +, Julien Grall wrote: > >> I am not sure to understand why I am being CCed. But it looks like you CC > >> everyone on each patch... Please CC only relevant pe

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

2017-12-04 Thread osstest service owner
flight 116824 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/116824/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 7 xen-boot fail REGR. vs. 116775 test-amd64-amd64-xl-

Re: [Xen-devel] [RFC PATCH 13/31] xen/arm: Add driver_data field to struct device

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Signed-off-by: Oleksandr Tyshchenko > CC: Stefano Stabellini > CC: Julien Grall Acked-by: Stefano Stabellini > --- > xen/include/asm-arm/device.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/i

Re: [Xen-devel] [RFC PATCH 11/31] xen/device-tree: Add dt_property_count_elems_of_size helper

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This is a port from Linux. > > Signed-off-by: Oleksandr Tyshchenko > CC: Stefano Stabellini > CC: Julien Grall Same here > --- > xen/common/device_tree.c | 20 > xen/include/xen/devic

Re: [Xen-devel] [RFC PATCH 12/31] xen/device-tree: Add dt_property_read_string_helper and friends

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This is a port from Linux. > > Signed-off-by: Oleksandr Tyshchenko > CC: Stefano Stabellini > CC: Julien Grall Same here > --- > xen/common/device_tree.c | 27 +++ > xen/include/xen/device_tr

Re: [Xen-devel] [RFC PATCH 10/31] xen/device-tree: Add dt_property_read_u32_index helper

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This is a port from Linux. > > Signed-off-by: Oleksandr Tyshchenko > CC: Stefano Stabellini > CC: Julien Grall Same here: please original signed-off-bys and also name of the property in Linux. > --- > xen/comm

Re: [Xen-devel] [RFC PATCH 09/31] xen/device-tree: Add dt_property_for_each_string macros

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This is a port from Linux. When you port stuff from Linux you have to retain the original copyright. Please add the original Signed-off-by lines (you actually have to use git log and git blame to narrow them down fo

[Xen-devel] [xen-4.6-testing test] 116825: tolerable FAIL - PUSHED

2017-12-04 Thread osstest service owner
flight 116825 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/116825/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-rtds 12 guest-start fail in 116799 pass in 116825 test-amd64-amd64-xl-qemuu-win

Re: [Xen-devel] [RFC PATCH 06/31] cpufreq: make cpufreq driver more generalizable

2017-12-04 Thread Stefano Stabellini
On Mon, 4 Dec 2017, Oleksandr Tyshchenko wrote: > Hi, Stefano > > On Sat, Dec 2, 2017 at 3:37 AM, Stefano Stabellini > wrote: > > On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > >> From: Oleksandr Dmytryshyn > >> > >> First implementation of the cpufreq driver has been > >> written with x86 in

Re: [Xen-devel] [RFC PATCH 05/31] pmstat: make pmstat functions more generalizable

2017-12-04 Thread Stefano Stabellini
On Mon, 4 Dec 2017, Oleksandr Tyshchenko wrote: > Hi Stefano > > On Sat, Dec 2, 2017 at 3:21 AM, Stefano Stabellini > wrote: > > On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > >> From: Oleksandr Dmytryshyn > >> > >> ACPI-specific parts are moved under appropriate ifdefs. > >> Now pmstat funct

Re: [Xen-devel] [RFC PATCH 04/31] cpufreq: make turbo settings to be configurable

2017-12-04 Thread Stefano Stabellini
On Sat, 2 Dec 2017, Oleksandr Tyshchenko wrote: > On Sat, Dec 2, 2017 at 3:06 AM, Stefano Stabellini > wrote: > > On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: > >> From: Oleksandr Dmytryshyn > >> > >> This settings is not needed for some architectures. > >> So make it to be configurable and us

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Stefano Stabellini
On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: > > = Xen command forwarding = > > > > In the code below, it looks like Xen is forwarding everything to OP-TEE. > > Are there some commands Xen should avoid forwarding? Should we have a > > whitelist or a blacklist? > My code implements whitelists (at l

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Stefano Stabellini
On Mon, 4 Dec 2017, Volodymyr Babchuk wrote: > Hi Julien, > > > On Mon, Dec 04, 2017 at 04:27:14PM +, Julien Grall wrote: > > [...] > > >>= Error checking / DOS protection = > > >> > > >>We need powerful checks on arguments passed by the caller and evaluated > > >>by the mediator. > > >> > >

[Xen-devel] [linux-linus test] 116810: regressions - FAIL

2017-12-04 Thread osstest service owner
flight 116810 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/116810/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 7 xen-boot fail REGR. vs. 115643 test-amd64-am

[Xen-devel] [PATCH RFC v3 02/12] Migration with Local Disks Mirroring: Added QMP commands used for mirroring disks

2017-12-04 Thread Bruno Alvisio
Migration with local disks mirroring uses the embedded NBD server in QEMU. A NBD server is added in libxl during instance creation time in the destination (QMP command: nbd_server_add). The drive mirror command (QMP: driver_mirror) is executed on the source during 'instance save' to replicate the d

[Xen-devel] [PATCH RFC v3 09/12] Migration with Local Disks Mirroring: New stream phase type for libxc streams

2017-12-04 Thread Bruno Alvisio
Adapted libxc restore stream. Defined libxc stream phase types: 0. XC_STREAM_PHASE_DEFAULT: This is the stream phase when no local disks are being mirrored as part of the domain save or restore (=0) 1. XC_STREAM_PHASE_POST_MIRROR_DISKS: This stream phase transfers the virtual RAM from source to d

[Xen-devel] [PATCH RFC v3 12/12] Migration with Local Disks Mirroring: Introduce pre_mirror_disks_stream_phase op to xc_sr_save_ops

2017-12-04 Thread Bruno Alvisio
A new op pre_mirror_stream_phase is introduced as part of the xc_sr_save_ops. This op sends all pfns and params that need to be transferred before the disks mirroring jobs can be started. Note that no new libxc record type is created. The save flow is modified such that: if the stream_phase == XC_

[Xen-devel] [PATCH RFC v3 06/12] Migration with Local Disks Mirroring: Added 'mirror_disks' field to domain_create_state

2017-12-04 Thread Bruno Alvisio
A new field 'mirror_disks' is added to the libxl struct libxl__domain_create_state to record if QEMU drives should be mirrored during migration. This variable is used to setup the sequence of calls and streams in libxl and libxc. Signed-off-by: Bruno Alvisio --- tools/libxl/libxl.h

[Xen-devel] [PATCH RFC v3 10/12] Migration with Local Disks Mirroring: libxl save flow support

2017-12-04 Thread Bruno Alvisio
The domain save state contains a new 'mirror_disks' field. It determines the flow of the domain save. If false, the save flow will invoke the DEFAULT phase libxl/libxc stream type. If true, the save flow invokes the PRE_MIRROR_DISKS phase stream type first. Upon reception of the signal from the sou

[Xen-devel] [PATCH RFC v3 07/12] Migration with Local Disks Mirroring: Added new libxl_read_stream and callbacks in restore flow

2017-12-04 Thread Bruno Alvisio
For migration with local disks mirroring a QEMU NBD server is started while restoring the domain. This server will be responsible for receiving the disks sent from the source node: The disks transfer will be triggered during the domain save on the source using the QMP drive-mirror command. A secon

[Xen-devel] [PATCH RFC v3 08/12] Migration with Local Disks Mirroring: New stream phase type for libxl streams

2017-12-04 Thread Bruno Alvisio
The libxl streams are classified by a stream phase parameter (stream_phase): 0. DEFAULT: This is the stream phase when no local disks are being mirrored as part of the domain save or restore flow. (=0) 1. POST_MIRROR_DISKS: This stream phase happens during the migration flow after the disks have

[Xen-devel] [PATCH RFC v3 0/12] Live migration for VMs with QEMU backed local storage

2017-12-04 Thread Bruno Alvisio
Hi all, I have worked on a solution to be able to migrate domains that use QEMU as the backend disk driver. I have adapted the migration flow and piggybacked on the "drive-mirroring" capability already provided by QEMU. Overview 1. The "xl migrate" command has an additional "-q" flag. When provi

[Xen-devel] [PATCH RFC v3 11/12] Migration with Local Disks Mirroring: libxl write stream support for stream phase type

2017-12-04 Thread Bruno Alvisio
The libxl stream write receives stream phase type (DEFAULT, PRE_MIRROR_DISKS or POST_MIRROR_DISKS) and registers the appropiate callback to the libxl_save_helper. If the stream phase == PRE_MIRROR_DISKS the stream skips writing the context record since it is written at a later time by the POST_MIRR

[Xen-devel] [PATCH RFC v3 01/12] Migration with Local Disks Mirroring: Added support in libxl to handle QMP events

2017-12-04 Thread Bruno Alvisio
Migration with Local Disk Mirroring uses the QEMU embedded NBD server. To migrate the disk, a 'disk mirror job' is started from the source so that the block devices emulated by QEMU are mirrored to the destination node. Once the mirroring job is ready, QEMU sends an asynchronous QMP event. This cod

[Xen-devel] [PATCH RFC v3 03/12] Migration with Local Disks Mirroring: Refactored migrate_read_fixedmessage

2017-12-04 Thread Bruno Alvisio
The function migrate_fixed_message is going to be used in the libxl create and save flow for event synchronization during migration. It needs to be accessible from libxl_create and libxl_dom_save and thus it is moved to libxl_utils. Signed-off-by: Bruno Alvisio --- tools/libxl/libxl_utils.c | 21

[Xen-devel] [PATCH RFC v3 05/12] Migration with Local Disks Mirroring: QEMU process is started with '-incoming defer' option

2017-12-04 Thread Bruno Alvisio
For the migration with local disks mirroring scenario, the QEMU process is started before the virtual RAM is transferred to the destination node so that the QEMU embedded NBD server and disks mirroring jobs can be started. After the virtual RAM and QEMU state are transferred, the QEMU process will

[Xen-devel] [PATCH RFC v3 04/12] Migration with Local Disks Mirroring: Added a new '-q' flag to xl migrate for disk mirorring

2017-12-04 Thread Bruno Alvisio
When the '-q' flag is provided to the 'xl migrate' command all the block devices that are local should be mirrored to the destination node. If the flag is not present migration flow will be equivalent to current migration flow. A new 'mirror_disks' field is added to the xl domain_create struct to i

Re: [Xen-devel] [RFC PATCH 06/31] cpufreq: make cpufreq driver more generalizable

2017-12-04 Thread Oleksandr Tyshchenko
Hi, Stefano On Sat, Dec 2, 2017 at 3:37 AM, Stefano Stabellini wrote: > On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: >> From: Oleksandr Dmytryshyn >> >> First implementation of the cpufreq driver has been >> written with x86 in mind. This patch makes possible >> the cpufreq driver be working

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Volodymyr Babchuk
Hi Julien, On Mon, Dec 04, 2017 at 04:27:14PM +, Julien Grall wrote: [...] > >>= Error checking / DOS protection = > >> > >>We need powerful checks on arguments passed by the caller and evaluated > >>by the mediator. > >> > >>For example, we cannot expect the guest to actually pass arguments

Re: [Xen-devel] [PATCH 1/2] gnttab: correct GNTTABOP_cache_flush empty batch handling

2017-12-04 Thread Andre Przywara
Hi, On 04/12/17 09:00, Jan Beulich wrote: On 01.12.17 at 16:31, wrote: >> On 30/11/17 14:31, Jan Beulich wrote: >>> Jann validly points out that with a caller bogusly requesting a zero- >>> element batch with non-zero high command bits (the ones used for >>> continuation encoding), the asser

[Xen-devel] [distros-debian-sid test] 72515: tolerable FAIL

2017-12-04 Thread Platform Team regression test user
flight 72515 distros-debian-sid real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72515/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-i386-sid-netboot-pvgrub 11 guest-start fail blocked in 72496 test-amd64-amd64-amd64-sid-n

Re: [Xen-devel] Ping#2: Re: [PATCH 2/2] x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 16:11, wrote: > On 04/12/17 10:15, Jan Beulich wrote: > On 03.07.17 at 16:56, wrote: >> On 31.05.17 at 13:54, wrote: >>> On 31.05.17 at 13:08, wrote: > On 31/05/17 08:15, Jan Beulich wrote: >> The flag is really only meant for those, both HVM and 32-bit PV

Re: [Xen-devel] [PATCH 1/3] x86/IRQ: conditionally preserve access permission on map error paths

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 17:07, wrote: > On 04/12/17 10:32, Jan Beulich wrote: >> Permissions that had been granted before should not be revoked when >> handling unrelated errors. >> >> Reported-by: HW42 >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/irq.c >> +++ b/xen/arch/x86/irq.c >> @@ -19

Re: [Xen-devel] [PATCH 3/5] x86: improve _put_page_type() readability

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 16:28, wrote: > On 04/12/17 10:45, Jan Beulich wrote: >> @@ -2477,10 +2478,9 @@ static int _put_page_type(struct page_in >> continue; >> /* We cleared the 'valid bit' so we do the clean up. */ >> rc = _put_final_page_type(pa

[Xen-devel] [patch 01/60] x86/entry/64/paravirt: Use paravirt-safe macro to access eflags

2017-12-04 Thread Thomas Gleixner
From: Boris Ostrovsky Commit 1d3e53e8624a ("x86/entry/64: Refactor IRQ stacks and make them NMI-safe") added DEBUG_ENTRY_ASSERT_IRQS_OFF macro that acceses eflags using 'pushfq' instruction when testing for IF bit. On PV Xen guests looking at IF flag directly will always see it set, resulting in

Re: [Xen-devel] [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-04 Thread Roger Pau Monné
On Tue, Nov 21, 2017 at 12:06:06PM +0100, Juergen Gross wrote: > The "special pages" for PVH guests include the frames for console and > Xenstore ring buffers. Those have to be marked as "Reserved" in the > guest's E820 map, as otherwise conflicts might arise later e.g. when > hotplugging memory in

Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 17:16, wrote: > Do you have any further comments on the current version of this patch?. No. I'm not fully understanding your most recent slot related comments, but I'll trust you and Konrad to get this into suitable shape. Jan ___

Re: [Xen-devel] Ping#3: [PATCH v3] x86/HVM: don't #GP/#SS on wrapping virt->linear translations

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:16, Jan Beulich wrote: On 25.08.17 at 16:59, wrote: > On 10.08.17 at 09:19, wrote: >> On 10.07.17 at 12:39, wrote: Real hardware wraps silently in most cases, so we should behave the same. Also split real and VM86 mode handling, as the latter really oug

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
On 04/12/17 16:24, Volodymyr Babchuk wrote: On Mon, Dec 04, 2017 at 02:30:32PM +, Julien Grall wrote: On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: = Page pinning = Guest pages passed to OP-TEE need to be pinned (otherwise Xen doesn't guarante

Re: [Xen-devel] [PATCH 4/3] x86: don't ignore foreigndom on L2/L3/L4 page table updates

2017-12-04 Thread Andrew Cooper
On 12/10/17 13:24, Jan Beulich wrote: > Silently assuming DOMID_SELF is unlikely to be a good idea for page > table updates. For PGT_writable pages, though, it seems better to allow > the writes, so the same check isn't being applied there. > > Also add blank lines between the individual case block

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
On 04/12/17 16:15, Volodymyr Babchuk wrote: Hi Stefano, On Fri, Dec 01, 2017 at 02:58:57PM -0800, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: This is follow-up to our conversation during community call. You asked me to send OP-TEE mediator as a patch, so we can di

Re: [Xen-devel] [PATCH 3/3] x86: tighten MMU_*PT_UPDATE* check and combine error paths

2017-12-04 Thread Andrew Cooper
On 12/10/17 13:14, Jan Beulich wrote: On 12.10.17 at 13:31, wrote: >> On 12/10/17 11:01, Jan Beulich wrote: >>> Don't accept anything other than r/w RAM pages and move the paged-out >>> check into the (unlikely) error path following that check. >>> >>> Signed-off-by: Jan Beulich >> How does

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Volodymyr Babchuk
Hi Julien, On Mon, Dec 04, 2017 at 02:30:32PM +, Julien Grall wrote: > Hi, > > I am going to answer both e-mails (Stefano and Volodymyr) at once. > > On 01/12/17 22:58, Stefano Stabellini wrote: > >On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: > >>This is follow-up to our conversation during

Re: [Xen-devel] [RFC PATCH 05/31] pmstat: make pmstat functions more generalizable

2017-12-04 Thread Oleksandr Tyshchenko
Hi Stefano On Sat, Dec 2, 2017 at 3:21 AM, Stefano Stabellini wrote: > On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote: >> From: Oleksandr Dmytryshyn >> >> ACPI-specific parts are moved under appropriate ifdefs. >> Now pmstat functions can be used in ARM platform. >> >> This is a rebased version

Re: [Xen-devel] [PATCH V2] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-12-04 Thread Govinda Tatti
Jan, Do you have any further comments on the current version of this patch?. Otherwise, I will work on the review comments and publish next version of this patch later this week. Please let me know. Thanks. Cheers GOVINDA On 12/1/2017 10:16 AM, Govinda Tatti wrote: On 11/30/2017 8:46 AM, Ja

Re: [Xen-devel] [PATCH 2/3] x86/MSI: leverage local variables

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:33, Jan Beulich wrote: > ... instead of using redundant calculations. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Now that pci_sbdf_t has been introduced, I should dust off my patch for %pP ~Andrew ___ Xen-devel mailing

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Volodymyr Babchuk
Hi Stefano, On Fri, Dec 01, 2017 at 02:58:57PM -0800, Stefano Stabellini wrote: > On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: > > This is follow-up to our conversation during community call. > > You asked me to send OP-TEE mediator as a patch, so we can > > discuss it in the mailing list. So, th

[Xen-devel] [qemu-upstream-4.8-testing baseline-only test] 72514: regressions - FAIL

2017-12-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72514 qemu-upstream-4.8-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72514/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhv

Re: [Xen-devel] [PATCH 1/3] x86/IRQ: conditionally preserve access permission on map error paths

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:32, Jan Beulich wrote: > Permissions that had been granted before should not be revoked when > handling unrelated errors. > > Reported-by: HW42 > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/irq.c > +++ b/xen/arch/x86/irq.c > @@ -1918,6 +1918,7 @@ int map_domain_pirq( > s

Re: [Xen-devel] [PATCH 3/3] x86/p2m: force return value checking of p2m_set_entry()

2017-12-04 Thread Andrew Cooper
On 04/12/17 11:07, Jan Beulich wrote: > As XSAs 246 and 247 have shown, not doing so is rather dangerous. > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mai

Re: [Xen-devel] [PATCH 2/3] x86/mm: drop yet another relic of translated PV domains from new_guest_cr3()

2017-12-04 Thread Andrew Cooper
On 04/12/17 11:06, Jan Beulich wrote: > The function can be called for PV domains only, which commit 5a0b9fba92 > ("x86/mm: drop further relics of translated PV domains") sort of > realized, but not fully. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___

Re: [Xen-devel] [PATCH 1/3] x86/PoD: correctly handle non-order-0 decrease-reservation requests

2017-12-04 Thread Andrew Cooper
On 04/12/17 11:06, Jan Beulich wrote: > p2m_pod_decrease_reservation() returning just (not) all-done is not This would be easier to parse as "returning only all-done is not" > sufficient for the caller: If some pages were processed, > guest_remove_page() returning an error for those pages is the

Re: [Xen-devel] [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-04 Thread Juergen Gross
On 21/11/17 12:06, Juergen Gross wrote: > The "special pages" for PVH guests include the frames for console and > Xenstore ring buffers. Those have to be marked as "Reserved" in the > guest's E820 map, as otherwise conflicts might arise later e.g. when > hotplugging memory into the guest. > > Sign

[Xen-devel] [seabios test] 116816: regressions - FAIL

2017-12-04 Thread osstest service owner
flight 116816 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/116816/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 17 guest-stop fail REGR. vs. 115539 build-i386

Re: [Xen-devel] [PATCH v2] x86/hvm: Add MSR old value

2017-12-04 Thread Razvan Cojocaru
> On Fri, Oct 13, 2017 at 03:50:57PM +0300, Alexandru Isaila wrote: >> This patch adds the old value param and the onchangeonly option >> to the VM_EVENT_REASON_MOV_TO_MSR event. >> >> The param was added to the vm_event_mov_to_msr struct and to the >> hvm_monitor_msr function. Finally I've changed

Re: [Xen-devel] [PATCH 5/5] x86: make _get_page_type() a proper counterpart of _put_page_type() again

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:46, Jan Beulich wrote: > @@ -2709,7 +2710,7 @@ int put_page_type_preemptible(struct pag > int get_page_type_preemptible(struct page_info *page, unsigned long type) > { > ASSERT(!current->arch.old_guest_table); Newline.  Otherwise, Reviewed-by: Andrew Cooper > -return __

Re: [Xen-devel] [PATCH 4/5] x86: use switch() in _put_page_type()

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:46, Jan Beulich wrote: > Use this to cheaply add another assertion. > > Signed-off-by: Jan Beulich > --- > TBD: Would it perhaps be better to return after the assertion? Yes, otherwise we risk falling into an infinite continue loop. With a suitable return value, Reviewed-by: Andre

Re: [Xen-devel] [PATCH 3/3] XSM/flask: constification of IRQ mapping interfaces

2017-12-04 Thread Daniel De Graaf
On 12/04/2017 05:34 AM, Jan Beulich wrote: This clarifies that the involved structures are read-only. Signed-off-by: Jan Beulich Acked-by: Daniel De Graaf ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailm

Re: [Xen-devel] [PATCH 3/5] x86: improve _put_page_type() readability

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:45, Jan Beulich wrote: > @@ -2477,10 +2478,9 @@ static int _put_page_type(struct page_in > continue; > /* We cleared the 'valid bit' so we do the clean up. */ > rc = _put_final_page_type(page, x, preemptible, ptpg); > -

Re: [Xen-devel] [PATCH 2/5] x86: remove _PAGE_PSE check from get_page_from_l2e()

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:44, Jan Beulich wrote: > With L2_DISALLOW_MASK containing _PAGE_PSE unconditionally as of commit > 56fff3e5e9 ("x86: nuke PV superpage option and code") there's no point > anymore in separately checking for the bit. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/mm.c > +++ b/

Re: [Xen-devel] [PATCH 1/5] x86: make get_page_from_mfn() return struct page_info *

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:44, Jan Beulich wrote: > Almost all users of it want it, and it calculates it anyway. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailm

Re: [Xen-devel] Ping#2: Re: [PATCH 2/2] x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV

2017-12-04 Thread Andrew Cooper
On 04/12/17 10:15, Jan Beulich wrote: On 03.07.17 at 16:56, wrote: > On 31.05.17 at 13:54, wrote: >> On 31.05.17 at 13:08, wrote: On 31/05/17 08:15, Jan Beulich wrote: > The flag is really only meant for those, both HVM and 32-bit PV tell > kernel from user mode based o

Re: [Xen-devel] [Xen-users] Starting xenstored in a driver domain

2017-12-04 Thread George Dunlap
On Mon, Dec 4, 2017 at 3:40 AM, m...@ark-net.org wrote: > So I figured out that I don't need a running instance of xenstored on the > driver domain, since xenstore-read works for the driver domains own trees in > xenstore. Are the xenstore-read errors in vif-openvswitch because that > script is w

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Andrew Cooper
On 01/12/17 22:58, Stefano Stabellini wrote: > > = Xen command forwarding = > > In the code below, it looks like Xen is forwarding everything to OP-TEE. > Are there some commands Xen should avoid forwarding? Should we have a > whitelist or a blacklist? Whitelist everything. At the very minimum, i

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-04 Thread Julien Grall
Hi, I am going to answer both e-mails (Stefano and Volodymyr) at once. On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: This is follow-up to our conversation during community call. You asked me to send OP-TEE mediator as a patch, so we can discuss it i

Re: [Xen-devel] [PATCH v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 14:10, wrote: > On Mon, Dec 04, 2017 at 11:13:45AM +, Julien Grall wrote: >> I am not sure to understand why I am being CCed. But it looks like you CC >> everyone on each patch... Please CC only relevant person on each patch. >> > > Apologies... I thought the whole pathse

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

2017-12-04 Thread osstest service owner
flight 116809 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/116809/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-win7-amd64 10 windows-install fail REGR. vs. 116744 Tests which are fa

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

2017-12-04 Thread osstest service owner
flight 116828 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/116828/ 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 v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset

2017-12-04 Thread Boqun Feng
On Mon, Dec 04, 2017 at 11:13:45AM +, Julien Grall wrote: > Hello, > Hi Julien, > I am not sure to understand why I am being CCed. But it looks like you CC > everyone on each patch... Please CC only relevant person on each patch. > Apologies... I thought the whole pathset will provide mor

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

2017-12-04 Thread Jan Beulich
At least Linux kernels have been able to work with gzip-ed initrd for quite some time; initrd compressed with other methods aren't even being attempted to unpack. Furthermore the unzip-ing routine used here isn't capable of dealing with various forms of concatenated files, each of which was gzip-ed

Re: [Xen-devel] [RFC PATCH 04/31] cpufreq: make turbo settings to be configurable

2017-12-04 Thread Andre Przywara
Hi, > And the most important question is how to recognize in Xen on ARM > (using SCPI protocol) which frequencies are turbo-frequencies > actually? I couldn't find any information regarding that in protocol > description. So traditionally on ARM there is no notion of a "turbo" frequency. Th

[Xen-devel] [linux-linus bisection] complete test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm

2017-12-04 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm testid xen-boot Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/qemu-xe

[Xen-devel] [qemu-upstream-4.9-testing baseline-only test] 72513: regressions - FAIL

2017-12-04 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72513 qemu-upstream-4.9-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72513/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd6

Re: [Xen-devel] [PATCH 2/2] gnttab: improve GNTTABOP_cache_flush locking

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 12:31, wrote: > On 12/04/2017 09:02 AM, Jan Beulich wrote: > On 01.12.17 at 16:31, wrote: >>> On 30/11/17 14:32, Jan Beulich wrote: Dropping the lock before returning from grant_map_exists() means handing possibly stale information back to the caller. Return back

Re: [Xen-devel] [PATCH 2/2] gnttab: improve GNTTABOP_cache_flush locking

2017-12-04 Thread George Dunlap
On 12/04/2017 09:02 AM, Jan Beulich wrote: On 01.12.17 at 16:31, wrote: >> On 30/11/17 14:32, Jan Beulich wrote: >>> Dropping the lock before returning from grant_map_exists() means handing >>> possibly stale information back to the caller. Return back the pointer >>> to the active entry inst

Re: [Xen-devel] [PATCH 1/2] gnttab: correct GNTTABOP_cache_flush empty batch handling

2017-12-04 Thread Jan Beulich
>>> On 04.12.17 at 12:12, wrote: > On 11/30/2017 02:31 PM, Jan Beulich wrote: >> Jann validly points out that with a caller bogusly requesting a zero- >> element batch with non-zero high command bits (the ones used for >> continuation encoding), the assertion right before the call to >> hypercall_

Re: [Xen-devel] [PATCH v2 01/17] xen: x86: expose SGX to HVM domain in CPU featureset

2017-12-04 Thread Julien Grall
Hello, I am not sure to understand why I am being CCed. But it looks like you CC everyone on each patch... Please CC only relevant person on each patch. Cheers, On 04/12/17 00:15, Boqun Feng wrote: From: Kai Huang Expose SGX in CPU featureset for HVM domain. SGX will not be supported for P

Re: [Xen-devel] [PATCH 1/2] gnttab: correct GNTTABOP_cache_flush empty batch handling

2017-12-04 Thread George Dunlap
On 11/30/2017 02:31 PM, Jan Beulich wrote: > Jann validly points out that with a caller bogusly requesting a zero- > element batch with non-zero high command bits (the ones used for > continuation encoding), the assertion right before the call to > hypercall_create_continuation() would trigger. A s

[Xen-devel] [PATCH 3/3] x86/p2m: force return value checking of p2m_set_entry()

2017-12-04 Thread Jan Beulich
As XSAs 246 and 247 have shown, not doing so is rather dangerous. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1550,9 +1550,11 @@ void p2m_mem_paging_populate(struct doma if ( p2mt == p2m_ram_paging_out ) req.u.mem_paging.flags |= M

[Xen-devel] [PATCH 2/3] x86/mm: drop yet another relic of translated PV domains from new_guest_cr3()

2017-12-04 Thread Jan Beulich
The function can be called for PV domains only, which commit 5a0b9fba92 ("x86/mm: drop further relics of translated PV domains") sort of realized, but not fully. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2846,9 +2846,7 @@ int new_guest_cr3(mfn_t mfn)

[Xen-devel] [PATCH 1/3] x86/PoD: correctly handle non-order-0 decrease-reservation requests

2017-12-04 Thread Jan Beulich
p2m_pod_decrease_reservation() returning just (not) all-done is not sufficient for the caller: If some pages were processed, guest_remove_page() returning an error for those pages is the expected result rather than an indication of a problem. Make guest_remove_page() return a distinct error code fo

[Xen-devel] [PATCH 0/3] x86: XSA-246 / -247 follow-up

2017-12-04 Thread Jan Beulich
1: PoD: correctly handle non-order-0 decrease-reservation requests 2: mm: drop yet another relic of translated PV domains from new_guest_cr3() 3: p2m: force return value checking of p2m_set_entry() Signed-off-by: Jan Beulich ___ Xen-devel mailing list

[Xen-devel] [PATCH 5/5] x86: make _get_page_type() a proper counterpart of _put_page_type() again

2017-12-04 Thread Jan Beulich
Drop one of the leading underscores and use bool for its "preemptible" parameter. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2531,8 +2531,8 @@ static int _put_page_type(struct page_in } -static int __get_page_type(struct page_info *page, unsigned long typ

[Xen-devel] [PATCH 4/5] x86: use switch() in _put_page_type()

2017-12-04 Thread Jan Beulich
Use this to cheaply add another assertion. Signed-off-by: Jan Beulich --- TBD: Would it perhaps be better to return after the assertion? --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2460,8 +2460,9 @@ static int _put_page_type(struct page_in ASSERT((x & PGT_count_mask) != 0);

[Xen-devel] [PATCH 2/5] x86: remove _PAGE_PSE check from get_page_from_l2e()

2017-12-04 Thread Jan Beulich
With L2_DISALLOW_MASK containing _PAGE_PSE unconditionally as of commit 56fff3e5e9 ("x86: nuke PV superpage option and code") there's no point anymore in separately checking for the bit. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1106,15 +1106,10 @@ get_page_f

[Xen-devel] [PATCH 3/5] x86: improve _put_page_type() readability

2017-12-04 Thread Jan Beulich
By limiting the scope of rc it is more obvious that failure can be reported only if _put_final_page_type() failed. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2452,7 +2452,6 @@ static int _put_page_type(struct page_in struct page_info

[Xen-devel] [PATCH 1/5] x86: make get_page_from_mfn() return struct page_info *

2017-12-04 Thread Jan Beulich
Almost all users of it want it, and it calculates it anyway. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -704,7 +704,6 @@ get_##level##_linear_pagetable( level##_pgentry_t pde, unsigned long pde_pfn, struct domain *d) \ {

[Xen-devel] Ping: [PATCH 3/3] x86: tighten MMU_*PT_UPDATE* check and combine error paths

2017-12-04 Thread Jan Beulich
>>> On 12.10.17 at 12:01, wrote: > Don't accept anything other than r/w RAM pages and move the paged-out > check into the (unlikely) error path following that check. > > Signed-off-by: Jan Beulich Ping? > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -3507,18 +3507,18 @@ long do_mmu_u

  1   2   >