Re: [Xen-devel] [PATCH v2 5/6] xen/arm: read cacheline size when needed

2018-02-21 Thread Julien Grall
On 20/02/2018 23:28, Stefano Stabellini wrote: On Tue, 20 Feb 2018, Julien Grall wrote: On 20/02/2018 21:16, Julien Grall wrote: Hi, On 20/02/2018 21:03, Stefano Stabellini wrote: On Tue, 20 Feb 2018, Julien Grall wrote: On 19/02/18 21:58, Stefano Stabellini wrote: +    mrc   CP32(r6,

[Xen-devel] [PATCH 0/9] drm/xen-front: Add support for Xen PV display frontend

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Hello! This patch series adds support for Xen [1] para-virtualized frontend display driver. It implements the protocol from include/xen/interface/io/displif.h [2]. Accompanying backend [3] is implemented as a user-space application and its helper library [4], capabl

[Xen-devel] [PATCH 4/9] drm/xen-front: Implement Xen event channel handling

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Handle Xen event channels: - create for all configured connectors and publish corresponding ring references and event channels in Xen store, so backend can connect - implement event channels interrupt handlers - create and destroy event channels with re

[Xen-devel] [PATCH 2/9] drm/xen-front: Implement Xen bus state handling

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Initial handling for Xen bus states: implement Xen bus state machine for the frontend driver according to the state diagram and recovery flow from display para-virtualized protocol: xen/interface/io/displif.h. Signed-off-by: Oleksandr Andrushchenko --- drivers/gpu

[Xen-devel] [PATCH 5/9] drm/xen-front: Implement handling of shared display buffers

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Implement shared buffer handling according to the para-virtualized display device protocol at xen/interface/io/displif.h: - handle page directories according to displif protocol: - allocate and share page directories - grant references to the required set o

[Xen-devel] [PATCH 8/9] drm/xen-front: Implement GEM operations

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Implement GEM handling depending on driver mode of operation: depending on the requirements for the para-virtualized environment, namely requirements dictated by the accompanying DRM/(v)GPU drivers running in both host and guest environments, number of operating mode

[Xen-devel] [PATCH 9/9] drm/xen-front: Implement communication with backend

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Handle communication with the backend: - send requests and wait for the responses according to the displif protocol - serialize access to the communication channel - time-out used for backend communication is set to 3000 ms - manage display buffers shared with

[Xen-devel] [PATCH 3/9] drm/xen-front: Read driver configuration from Xen store

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Read configuration values from Xen store according to xen/interface/io/displif.h protocol: - read connector(s) configuration - read buffer allocation mode (backend/frontend) Signed-off-by: Oleksandr Andrushchenko --- drivers/gpu/drm/xen/Makefile|

[Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Introduce skeleton of the para-virtualized Xen display frontend driver. This patch only adds required essential stubs. Signed-off-by: Oleksandr Andrushchenko --- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/dr

[Xen-devel] [PATCH 6/9] drm/xen-front: Introduce DRM/KMS virtual display driver

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Implement essential initialization of the display driver: - introduce required data structures - handle DRM/KMS driver registration - perform basic DRM driver initialization - register driver on backend connection - remove driver on backend disconnect - i

[Xen-devel] [PATCH 7/9] drm/xen-front: Implement KMS/connector handling

2018-02-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Implement kernel modesetiing/connector handling using DRM simple KMS helper pipeline: - implement KMS part of the driver with the help of DRM simple pipepline helper which is possible due to the fact that the para-virtualized driver only supports a single (pri

Re: [Xen-devel] [PATCH v3 01/17] xen/arm: vpsci: Add support for PSCI 1.1

2018-02-21 Thread Julien Grall
Hi Stefano, On 21/02/2018 00:37, Stefano Stabellini wrote: On Thu, 15 Feb 2018, Julien Grall wrote: At the moment, Xen provides virtual PSCI interface compliant with 0.1 and 0.2. Since them, the specification has been updated and the latest version is 1.1 (see ARM DEN 0022D). >From an implemen

Re: [Xen-devel] [PATCH v3 10/17] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-21 Thread Julien Grall
Hi Stefano, On 21/02/2018 00:35, Stefano Stabellini wrote: On Thu, 15 Feb 2018, Julien Grall wrote: Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. Signed-off-by: Julien Grall --- Changes in v3: - Add the missing call to smc #0. Changes in v2:

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Juergen Gross
On 21/02/18 09:03, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Introduce skeleton of the para-virtualized Xen display > frontend driver. This patch only adds required > essential stubs. > > Signed-off-by: Oleksandr Andrushchenko > --- > drivers/gpu/drm/Kconfig

Re: [Xen-devel] [PATCH 2/9] drm/xen-front: Implement Xen bus state handling

2018-02-21 Thread Juergen Gross
On 21/02/18 09:03, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Initial handling for Xen bus states: implement > Xen bus state machine for the frontend driver according to > the state diagram and recovery flow from display para-virtualized > protocol: xen/interface/io/displi

Re: [Xen-devel] [PATCH v3 1/2] x86/hvm: introduce cr{0, 4}_host_mask to store trapped bits of CR accesses

2018-02-21 Thread Roger Pau Monné
On Tue, Feb 20, 2018 at 07:23:44PM -0500, Boris Ostrovsky wrote: > On 02/20/2018 03:56 AM, Roger Pau Monne wrote: > > At the moment this is currently set at VMC{S/B} creation and not changed, > > but further patches are going to change the CR4 mask at runtime. > > > > Signed-off-by: Roger Pau Monné

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Oleksandr Andrushchenko
On 02/21/2018 10:19 AM, Juergen Gross wrote: On 21/02/18 09:03, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Introduce skeleton of the para-virtualized Xen display frontend driver. This patch only adds required essential stubs. Signed-off-by: Oleksandr Andrushchenko --- dri

Re: [Xen-devel] [PATCH 2/9] drm/xen-front: Implement Xen bus state handling

2018-02-21 Thread Oleksandr Andrushchenko
On 02/21/2018 10:23 AM, Juergen Gross wrote: On 21/02/18 09:03, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Initial handling for Xen bus states: implement Xen bus state machine for the frontend driver according to the state diagram and recovery flow from display para-virtualiz

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Juergen Gross
On 21/02/18 09:47, Oleksandr Andrushchenko wrote: > On 02/21/2018 10:19 AM, Juergen Gross wrote: >> On 21/02/18 09:03, Oleksandr Andrushchenko wrote: >>> From: Oleksandr Andrushchenko >>> >>> Introduce skeleton of the para-virtualized Xen display >>> frontend driver. This patch only adds required

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Oleksandr Andrushchenko
On 02/21/2018 11:09 AM, Juergen Gross wrote: On 21/02/18 09:47, Oleksandr Andrushchenko wrote: On 02/21/2018 10:19 AM, Juergen Gross wrote: On 21/02/18 09:03, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Introduce skeleton of the para-virtualized Xen display frontend driver.

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Roger Pau Monné
On Wed, Feb 21, 2018 at 10:03:34AM +0200, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Introduce skeleton of the para-virtualized Xen display > frontend driver. This patch only adds required > essential stubs. > > Signed-off-by: Oleksandr Andrushchenko > --- > drivers/gpu

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Oleksandr Andrushchenko
On 02/21/2018 11:17 AM, Roger Pau Monné wrote: On Wed, Feb 21, 2018 at 10:03:34AM +0200, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Introduce skeleton of the para-virtualized Xen display frontend driver. This patch only adds required essential stubs. Signed-off-by: Oleksandr

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Roger Pau Monné
On Tue, Feb 20, 2018 at 06:28:15PM +, Andrew Cooper wrote: > On 20/02/18 17:35, Roger Pau Monné wrote: > > On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: > >> There are many problems with MSR_TSC_AUX handling. > >> > >> To being with, the RDPID instruction reads MSR_TSC_AUX, but

[Xen-devel] [PATCH v2] hvm/svm: Implement CPUID events

2018-02-21 Thread Alexandru Isaila
At this moment the CPUID events for the AMD architecture are not forwarded to the monitor layer. This patch adds the CPUID event to the common capabilities and then forwards the event to the monitor layer. --- Changes since V1: - Made function svm_vmexit_do_cpuid return int to handle

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Roger Pau Monné
On Wed, Feb 21, 2018 at 11:42:23AM +0200, Oleksandr Andrushchenko wrote: > On 02/21/2018 11:17 AM, Roger Pau Monné wrote: > > On Wed, Feb 21, 2018 at 10:03:34AM +0200, Oleksandr Andrushchenko wrote: > > > --- /dev/null > > > +++ b/drivers/gpu/drm/xen/xen_drm_front.c > > > @@ -0,0 +1,83 @@ > > > +/*

Re: [Xen-devel] [PATCH 1/9] drm/xen-front: Introduce Xen para-virtualized frontend driver

2018-02-21 Thread Oleksandr Andrushchenko
On 02/21/2018 12:19 PM, Roger Pau Monné wrote: On Wed, Feb 21, 2018 at 11:42:23AM +0200, Oleksandr Andrushchenko wrote: On 02/21/2018 11:17 AM, Roger Pau Monné wrote: On Wed, Feb 21, 2018 at 10:03:34AM +0200, Oleksandr Andrushchenko wrote: --- /dev/null +++ b/drivers/gpu/drm/xen/xen_drm_front.

[Xen-devel] [xen-unstable-coverity test] 119806: regressions - ALL FAIL

2018-02-21 Thread osstest service owner
flight 119806 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/119806/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: coverity-amd647 coverity-upload fail REGR. vs. 119558 version t

Re: [Xen-devel] [PATCH 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Wei Liu
On Tue, Feb 20, 2018 at 05:42:06PM +, Andrew Cooper wrote: > On 20/02/18 17:03, Wei Liu wrote: > > On Tue, Feb 20, 2018 at 11:58:43AM +, Andrew Cooper wrote: > >> There are many problems with MSR_TSC_AUX handling. > >> > >> To being with, the RDPID instruction reads MSR_TSC_AUX, but it is o

[Xen-devel] [PATCH RFC] x86: slightly reduce RSB overwrite overhead

2018-02-21 Thread Jan Beulich
Avoiding the PAUSE/LFENCE pair on the first of the two unrolled iterations not only reduces code size, but also improves performance according to my (limited) measurements (by 15-20 cycles on my Westmere; granted I can't really explain why that is). Now that the two iterations are sufficiently diff

[Xen-devel] [PATCH v2 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Andrew Cooper
There are many problems with MSR_TSC_AUX handling. To begin with, the RDPID instruction reads MSR_TSC_AUX, but it is only the RDTSCP feature which enumerates the MSR. Therefore, RDPID functionally depends on RDTSCP. For PV guests, we hide RDTSCP but advertise RDPID. We also silently drop writes

Re: [Xen-devel] [PATCH v2 1/4] asm-x86/monitor: Enable svm monitor events

2018-02-21 Thread George Dunlap
On Fri, Feb 9, 2018 at 4:21 PM, Tamas K Lengyel wrote: > On Fri, Feb 9, 2018 at 3:28 AM, George Dunlap wrote: >> On Thu, Feb 8, 2018 at 3:25 PM, Alexandru Isaila >> wrote: >>> This commit separates the svm caps from the vmx caps. >> >> I can see how the patch relates to the description here, but

Re: [Xen-devel] [PATCH v2 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Wei Liu
On Wed, Feb 21, 2018 at 11:36:15AM +, Andrew Cooper wrote: > There are many problems with MSR_TSC_AUX handling. > > To begin with, the RDPID instruction reads MSR_TSC_AUX, but it is only the > RDTSCP feature which enumerates the MSR. Therefore, RDPID functionally > depends on RDTSCP. > > For

[Xen-devel] [PATCH v3] build: remove shim related targets

2018-02-21 Thread Roger Pau Monne
There's no need to have shim specific targets, so just use the regular xen makefile targets in order to build the shim binary. When the shim is build as part of the firmware directory install the stripped Xen binary to the firmware directory and place a binary with symbols in the debug directory.

Re: [Xen-devel] [PATCH v3] build: remove shim related targets

2018-02-21 Thread Wei Liu
On Wed, Feb 21, 2018 at 12:22:18PM +, Roger Pau Monne wrote: > There's no need to have shim specific targets, so just use the regular > xen makefile targets in order to build the shim binary. > > When the shim is build as part of the firmware directory install the > stripped Xen binary to the

Re: [Xen-devel] [PATCH v3] build: remove shim related targets

2018-02-21 Thread Andrew Cooper
On 21/02/18 12:22, Roger Pau Monne wrote: > There's no need to have shim specific targets, so just use the regular > xen makefile targets in order to build the shim binary. > > When the shim is build as part of the firmware directory install the > stripped Xen binary to the firmware directory and p

Re: [Xen-devel] [PATCH v2 5/5] x86: Rework MSR_TSC_AUX handling from scratch.

2018-02-21 Thread Roger Pau Monné
On Wed, Feb 21, 2018 at 11:36:15AM +, Andrew Cooper wrote: > There are many problems with MSR_TSC_AUX handling. > > To begin with, the RDPID instruction reads MSR_TSC_AUX, but it is only the > RDTSCP feature which enumerates the MSR. Therefore, RDPID functionally > depends on RDTSCP. > > For

Re: [Xen-devel] [PATCH v3] build: remove shim related targets

2018-02-21 Thread Jan Beulich
>>> On 21.02.18 at 13:22, wrote: > --- a/tools/firmware/xen-dir/Makefile > +++ b/tools/firmware/xen-dir/Makefile > @@ -48,13 +48,14 @@ shim-%config: $(D) FORCE > KCONFIG_CONFIG=$(CURDIR)/shim.config > > xen-shim: $(D) shim-olddefconfig > - $(MAKE) -C $(D)/xen install-shim \ >

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

2018-02-21 Thread osstest service owner
flight 119751 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/119751/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt 7 xen-boot fail REGR. vs. 118324 test-amd64-i386-xl-

[Xen-devel] [PATCH] sysctl: correct comment in xen_sysctl_pcitopoinfo

2018-02-21 Thread Olaf Hering
Refer to correct member of struct xen_sysctl_pcitopoinfo in comment. Fixes: commit 61319fbfd9 ("sysctl: add sysctl interface for querying PCI topology") Signed-off-by: Olaf Hering --- xen/include/public/sysctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/pu

Re: [Xen-devel] [PATCH v3 1/2] x86/hvm: introduce cr{0, 4}_host_mask to store trapped bits of CR accesses

2018-02-21 Thread Boris Ostrovsky
On 02/21/2018 03:27 AM, Roger Pau Monné wrote: > On Tue, Feb 20, 2018 at 07:23:44PM -0500, Boris Ostrovsky wrote: >> On 02/20/2018 03:56 AM, Roger Pau Monne wrote: >>> At the moment this is currently set at VMC{S/B} creation and not changed, >>> but further patches are going to change the CR4 mask

[Xen-devel] [PATCH v4 02/16] xen/arm: setup: use maddr_to_mfn rather than _mfn(paddr_to_pfn(...))

2018-02-21 Thread Julien Grall
The construction _mfn(paddr_to_pfn(...)) can be simplified by using maddr_to_mfn. Signed-off-by: Julien Grall --- Cc: Stefano Stabellini Changes in v4: - Patch added --- xen/arch/arm/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/setup

[Xen-devel] [PATCH v4 03/16] xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...))

2018-02-21 Thread Julien Grall
The construction _gfn(paddr_to_pfn(...)) can be simplified by using gaddr_to_gfn. Signed-off-by: Julien Grall --- Cc: Stefano Stabellini Changes in v4: - Patch added --- xen/arch/arm/mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/mm.c b/x

[Xen-devel] [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range

2018-02-21 Thread Julien Grall
The function populate_pt_range is used to populate in advance the page-table but it will not do the actual mapping. So passing the MFN in parameter is pointless. Note that the only caller pass 0... At the same time replace 0 by INVALID_MFN to make clear the MFN is invalid. Signed-off-by: Julien G

[Xen-devel] [PATCH v4 07/16] xen/x86: mm: Switch x86/mm.c to use typesafe for virt_to_mfn

2018-02-21 Thread Julien Grall
No functional change intended. Signed-off Julien Grall --- Cc: Jan Beulich Cc: Andrew Cooper Changes in v4: - Patch added --- xen/arch/x86/mm.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index e1f089

[Xen-devel] [PATCH v4 10/16] xen/mm: Switch map_pages_to_xen to use MFN typesafe

2018-02-21 Thread Julien Grall
The current prototype is slightly confusing because it takes a virtual address and a physical frame (not address!). Switching to MFN will improve safety and reduce the chance to mistakenly invert the 2 parameters. Signed-off-by: Julien Grall --- Cc: Stefano Stabellini Cc: Julien Grall Cc: And

[Xen-devel] [PATCH v4 12/16] xen/mm: Switch common/memory.c to use typesafe MFN

2018-02-21 Thread Julien Grall
A new helper copy_mfn_to_guest is introduced to easily to copy a MFN to the guest memory. Not functional change intended Signed-off-by: Julien Grall --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc:

[Xen-devel] [PATCH v4 14/16] xen/grant: Switch common/grant_table.c to use typesafe MFN

2018-02-21 Thread Julien Grall
No functional change intended. Signed-off-by: Julien Grall --- Cc: Stefano Stabellini Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Tim Deegan Cc: Wei Liu Changes in v4: - Patch added --- xen/arch/arm/mm

[Xen-devel] [PATCH v4 01/16] xen/tmem: Convert the file common/tmem_xen.c to use typesafe MFN

2018-02-21 Thread Julien Grall
The file common/tmem_xen.c is now converted to use typesafe. This is requiring to override the macro page_to_mfn to make it work with mfn_t. Note that all variables converted to mfn_t havem there initial value, when set, switch from 0 to INVALID_MFN. This is fine because the initial values was alw

[Xen-devel] [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-21 Thread Julien Grall
Most of the users of page_to_mfn and mfn_to_page are either overriding the macros to make them work with mfn_t or use mfn_x/_mfn because the rest of the function use mfn_t. So make page_to_mfn and mfn_to_page return mfn_t by default. The __* version are now dropped as this patch will convert all t

[Xen-devel] [PATCH v4 11/16] xen/mm: Switch page_alloc.c to typesafe MFN

2018-02-21 Thread Julien Grall
No functional change intended. Signed-off-by: Julien Grall --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall Changes in v4: - Patch added --- xen/common/page_

[Xen-devel] [PATCH v4 00/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-21 Thread Julien Grall
Hi all, This series is a rework of "xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN" sent a couple of months ago (see [1]). In this new approach, the macros __page_to_mfn and __mfn_to_page are completely dropped. To avoid the last patch (#16) to be a huge patch some files are con

[Xen-devel] [PATCH v4 06/16] xen/x86: Remove unused override of page_to_mfn/mfn_to_page

2018-02-21 Thread Julien Grall
A few files override page_to_mfn/mfn_to_page but actually never use those macros. So drop them. Signed-off-by: Julien Grall --- Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Changes in v4: - Patch added --- xen/arch/x86/mm/hap/nested_hap.c | 3 --- xen/arch/x86/mm/p2m-pt.c

[Xen-devel] [PATCH v4 13/16] xen/grant: Switch {create, replace}_grant_p2m_mapping to typesafe MFN

2018-02-21 Thread Julien Grall
The current prototype is slightly confusing because it takes a guest physical address and a machine physical frame (not address!). Switching to MFN will improve safety and reduce the chance to mistakenly invert the 2 parameters. Signed-off-by: Julien grall --- Cc: Stefano Stabellini Cc: Julien

[Xen-devel] [PATCH v4 15/16] xen/x86: Switch mfn_to_page in x86_64/mm.c to use typesafe MFN

2018-02-21 Thread Julien Grall
No functional change intendend. Signed-off-by: Julien Grall --- Cc: Jan Beulich Cc: Andrew Cooper Changes in v4: - Patch added --- xen/arch/x86/x86_64/mm.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/xen/arc

[Xen-devel] [PATCH v4 05/16] xen/arm: mm: Remove unused relinquish_shared_pages

2018-02-21 Thread Julien Grall
relinquish_shared_pages is never called on Arm. Signed-off-by: Julien Grall --- Cc: Stefano Stabellini Changes in v4: - Patch added --- xen/include/asm-arm/mm.h | 4 1 file changed, 4 deletions(-) diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index c03f4a

[Xen-devel] [PATCH v4 09/16] xen/pdx: Introduce helper to convert MFN <-> PDX

2018-02-21 Thread Julien Grall
This will avoid use of pfn_to_pdx(mfn_x(mfn)) over the code base. Signed-off-by: Julien Grall --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Changes in v4: - Patch added ---

[Xen-devel] [PATCH v4 04/16] xen/arm: mm: Remove unused M2P code

2018-02-21 Thread Julien Grall
Arm does not have an M2P and very unlikely to get one in the future, therefore don't keep defines that are not necessary in the common code. At the same time move the remaining M2P define just above just above set_gpfn_from_mfn to keep all the dummy helpers for M2P together. Signed-off-by: Julien

[Xen-devel] Modifying domain creation interface

2018-02-21 Thread Juergen Gross
Creating a new domain currently is a sequence of hypercalls with many of those being mandatory and needed in a specific sequence. Its has been discussed before to build a new interface for domain creation with _all_ the mandatory information passed to the hypervisor in one hypercall. I'd like to s

[Xen-devel] Ability to crash a HVM guest by accessing /dev/hpet

2018-02-21 Thread Stefan Bader
This seems to have been found by us[1] and Citrix[2] recently. To trigger this one needs to be root in the guest, so it is not super critical but still it seems to be a bit harsh that purely opening /dev/hpet read-only is leading to a domain crash via xen/arch/x86/hvm/hpet.c@375(hpet_write): c

Re: [Xen-devel] [PATCH v3 1/2] x86/hvm: introduce cr{0, 4}_host_mask to store trapped bits of CR accesses

2018-02-21 Thread Roger Pau Monné
On Wed, Feb 21, 2018 at 08:48:20AM -0500, Boris Ostrovsky wrote: > On 02/21/2018 03:27 AM, Roger Pau Monné wrote: > > On Tue, Feb 20, 2018 at 07:23:44PM -0500, Boris Ostrovsky wrote: > >> On 02/20/2018 03:56 AM, Roger Pau Monne wrote: > >>> At the moment this is currently set at VMC{S/B} creation a

Re: [Xen-devel] [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-21 Thread Razvan Cojocaru
On 02/21/2018 04:02 PM, Julien Grall wrote: > Most of the users of page_to_mfn and mfn_to_page are either overriding > the macros to make them work with mfn_t or use mfn_x/_mfn because the > rest of the function use mfn_t. > > So make page_to_mfn and mfn_to_page return mfn_t by default. The __* >

Re: [Xen-devel] [PATCH v3 05/17] xen/arm64: Implement a fast path for handling SMCCC_ARCH_WORKAROUND_1

2018-02-21 Thread Andre Przywara
Hi, On 15/02/18 15:02, Julien Grall wrote: > The function SMCCC_ARCH_WORKAROUND_1 will be called by the guest for > hardening the branch predictor. So we want the handling to be as fast as > possible. > > As the mitigation is applied on every guest exit, we can check for the > call before saving

Re: [Xen-devel] Ability to crash a HVM guest by accessing /dev/hpet

2018-02-21 Thread Roger Pau Monné
On Wed, Feb 21, 2018 at 03:12:15PM +0100, Stefan Bader wrote: > This seems to have been found by us[1] and Citrix[2] recently. To trigger this > one needs to be root in the guest, so it is not super critical but still it > seems to be a bit harsh that purely opening /dev/hpet read-only is leading t

Re: [Xen-devel] [PATCH v3 08/17] xen/arm: psci: Detect SMCCC version

2018-02-21 Thread Andre Przywara
Hi, On 15/02/18 15:02, Julien Grall wrote: > PSCI 1.0 and later allows the SMCCC version to be (indirectly) probed > via PSCI_FEATURES. If the PSCI_FEATURES does not exist (PSCI 0.2 or > earlier) and the function return an error, then we considered SMCCC 1.0 returns

Re: [Xen-devel] Ability to crash a HVM guest by accessing /dev/hpet

2018-02-21 Thread Stefan Bader
On 21.02.2018 15:40, Roger Pau Monné wrote: > On Wed, Feb 21, 2018 at 03:12:15PM +0100, Stefan Bader wrote: >> This seems to have been found by us[1] and Citrix[2] recently. To trigger >> this >> one needs to be root in the guest, so it is not super critical but still it >> seems to be a bit harsh

Re: [Xen-devel] [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-21 Thread Paul Durrant
> -Original Message- > From: Julien Grall [mailto:julien.gr...@arm.com] > Sent: 21 February 2018 14:03 > To: xen-de...@lists.xen.org > Cc: Julien Grall ; Stefano Stabellini > ; Andrew Cooper ; > George Dunlap ; Ian Jackson > ; Jan Beulich ; Konrad > Rzeszutek Wilk ; Tim (Xen.org) ; > Wei Li

Re: [Xen-devel] [PATCH] x86/PV: avoid indirect call/thunk in I/O emulation

2018-02-21 Thread George Dunlap
On Fri, Feb 16, 2018 at 5:02 PM, Andrew Cooper wrote: > On 16/02/18 16:21, Jan Beulich wrote: > On 16.02.18 at 16:50, wrote: >>> On 16/02/18 08:00, Jan Beulich wrote: >>> On 15.02.18 at 17:53, wrote: > On 15/02/18 16:03, Jan Beulich wrote: >> --- a/xen/arch/x86/pv/emul-priv-op.c

Re: [Xen-devel] [RFC PATCH 01/10] Add CONFIG_VGIC_ERRATA

2018-02-21 Thread Manish Jaggi
Hi Julien, On 01/25/2018 07:18 PM, Julien Grall wrote: Hi Manish, On 16/01/18 15:42, mja...@caviumnetworks.com wrote: From: Manish Jaggi Add a config option to enable VGIC Errata Code in Xen. Platforms which do not have this errta can compile out this feature. s/errta/errata/ Signed-

[Xen-devel] [xen-4.6-testing test] 119782: regressions - FAIL

2018-02-21 Thread osstest service owner
flight 119782 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/119782/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ws16-amd64 7 xen-boot fail REGR. vs. 119227 test-armhf-armh

Re: [Xen-devel] [PATCH RFC] CODING_STYLE: document intended usage of types

2018-02-21 Thread George Dunlap
On Mon, Feb 19, 2018 at 8:44 AM, Jan Beulich wrote: > Signed-off-by: Jan Beulich > > --- a/CODING_STYLE > +++ b/CODING_STYLE > @@ -88,6 +88,26 @@ Braces should be omitted for blocks with > if ( condition ) > single_statement(); > > +Types > +- > + > +Use basic C types and C standard man

Re: [Xen-devel] Excited for Xen Project in Outreachy

2018-02-21 Thread KANIKA SAINI
Hi Lars, I'm already on #unikraft with the registered username - kanik. My timezone is UTC+5:30h and I can be available for a chat at any time of the day post noon usually. I have subscribed to the mailing lists and gone through the documentation at https://wiki.xenproject.org/wiki/Submitting_Xen

Re: [Xen-devel] [PATCH RFC] CODING_STYLE: document intended usage of types

2018-02-21 Thread Andrew Cooper
On 19/02/18 13:30, Jan Beulich wrote: On 19.02.18 at 14:12, wrote: >> On 19/02/18 08:44, Jan Beulich wrote: >>> --- a/CODING_STYLE >>> +++ b/CODING_STYLE >>> @@ -88,6 +88,26 @@ Braces should be omitted for blocks with >>> if ( condition ) >>> single_statement(); >>> >>> +Types >>> +--

Re: [Xen-devel] [RFC PATCH 01/10] Add CONFIG_VGIC_ERRATA

2018-02-21 Thread Julien Grall
On 21/02/18 15:17, Manish Jaggi wrote: Hi Julien, On 01/25/2018 07:18 PM, Julien Grall wrote: Hi Manish, On 16/01/18 15:42, mja...@caviumnetworks.com wrote: From: Manish Jaggi Add a config option to enable VGIC Errata Code in Xen. Platforms which do not have this errta can compile out

Re: [Xen-devel] [PATCH v3 17/17] xen/arm: vpsci: Rework the logic to start AArch32 vCPU in Thumb mode

2018-02-21 Thread Andre Przywara
Hi, On 15/02/18 15:02, Julien Grall wrote: > 32-bit domain is able to select the instruction (ARM vs Thumb) to use > when boot a new vCPU via CPU_ON. This is indicated via bit[0] of the > entry point address (see "T32 support" in PSCI v1.1 DEN0022D). bit[0] > must be cleared when setting the PC. >

Re: [Xen-devel] [PATCH v3 10/17] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-21 Thread Andre Przywara
Hi, On 15/02/18 15:02, Julien Grall wrote: > Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. > > Signed-off-by: Julien Grall > > --- > Changes in v3: > - Add the missing call to smc #0. > > Changes in v2: > - Patch added > --- > xen/arch/arm/arm64/b

Re: [Xen-devel] [PATCH v5 1/5] build: do not hardcode AFLAGS for as-insn tests

2018-02-21 Thread Andrew Cooper
On 20/02/18 14:10, Roger Pau Monne wrote: > Hardcoding as-insn to use AFLAGS is not correct. For once the test is > performed using a C file with inline assembly, and secondly the flags > used can be passed by the caller together with the CC. > > Fix as-insn-check to pass the flags given as paramet

Re: [Xen-devel] [PATCH] sysctl: correct comment in xen_sysctl_pcitopoinfo

2018-02-21 Thread Stefano Stabellini
On Wed, 21 Feb 2018, Olaf Hering wrote: > Refer to correct member of struct xen_sysctl_pcitopoinfo in comment. > > Fixes: commit 61319fbfd9 ("sysctl: add sysctl interface for querying PCI > topology") > > Signed-off-by: Olaf Hering Reviewed-by: Stefano Stabellini > --- > xen/include/public/

Re: [Xen-devel] [PATCH v3 12/17] xen/arm: vpsci: Remove parameter 'ver' from do_common_cpu

2018-02-21 Thread Andre Przywara
Hi, On 15/02/18 15:02, Julien Grall wrote: > Currently, the behavior of do_common_cpu will slightly change depending > on the PSCI version passed in parameter. Looking at the code, more the > specific 0.2 behavior could move out of the function or adapted for 0.1: > > - x0/r0 can be updated o

Re: [Xen-devel] [PATCH v5 2/5] build: filter out command line assembler arguments

2018-02-21 Thread Andrew Cooper
On 20/02/18 14:10, Roger Pau Monne wrote: > If the assembler is not used. This happens when using cc -E or cc -S > for example. GCC will just ignore the -Wa,... when the assembler is > not called, but clang will complain loudly and fail. > > Also enable passing -Wa,-I$(BASEDIR)/include to clang now

Re: [Xen-devel] [PATCH v3 03/17] xen/arm: vsmc: Implement SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-21 Thread Andre Przywara
Hi, On 15/02/18 15:02, Julien Grall wrote: > SMCCC 1.1 offers firmware-based CPU workarounds. In particular, > SMCCC_ARCH_WORKAROUND_1 provides BP hardening for variant 2 of XSA-254 > (CVE-2017-5715). > > If the hypervisor has some mitigation for this issue, report that we > deal with it using SM

Re: [Xen-devel] [PATCH v3 12/17] xen/arm: vpsci: Remove parameter 'ver' from do_common_cpu

2018-02-21 Thread Julien Grall
On 21/02/18 16:27, Andre Przywara wrote: Hi, Hi, On 15/02/18 15:02, Julien Grall wrote: Currently, the behavior of do_common_cpu will slightly change depending on the PSCI version passed in parameter. Looking at the code, more the specific 0.2 behavior could move out of the function or ada

Re: [Xen-devel] [PATCH v3 03/17] xen/arm: vsmc: Implement SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-21 Thread Julien Grall
On 21/02/18 16:34, Andre Przywara wrote: Hi, Hi, On 15/02/18 15:02, Julien Grall wrote: SMCCC 1.1 offers firmware-based CPU workarounds. In particular, SMCCC_ARCH_WORKAROUND_1 provides BP hardening for variant 2 of XSA-254 (CVE-2017-5715). If the hypervisor has some mitigation for this is

Re: [Xen-devel] [PATCH v3 03/17] xen/arm: vsmc: Implement SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-21 Thread Andre Przywara
Hi, On 21/02/18 16:41, Julien Grall wrote: > > > On 21/02/18 16:34, Andre Przywara wrote: >> Hi, > > Hi, > >> On 15/02/18 15:02, Julien Grall wrote: >>> SMCCC 1.1 offers firmware-based CPU workarounds. In particular, >>> SMCCC_ARCH_WORKAROUND_1 provides BP hardening for variant 2 of XSA-254 >>

Re: [Xen-devel] [PATCH v5 3/5] x86/clang: restore integrated assembler usage with indirect thunks

2018-02-21 Thread Andrew Cooper
On 20/02/18 14:10, Roger Pau Monne wrote: > If the required features are met by the integrated clang assembler > (support for .includes and propagation of .macro-s between asm()-s) > do not disable it. > > Only disable the integrated assembler for assembly files, like it was > done prior to "x86: S

Re: [Xen-devel] [PATCH RFC] CODING_STYLE: document intended usage of types

2018-02-21 Thread George Dunlap
On 02/21/2018 03:55 PM, Andrew Cooper wrote: > On 19/02/18 13:30, Jan Beulich wrote: > On 19.02.18 at 14:12, wrote: >>> On 19/02/18 08:44, Jan Beulich wrote: --- a/CODING_STYLE +++ b/CODING_STYLE @@ -88,6 +88,26 @@ Braces should be omitted for blocks with if ( condition )

[Xen-devel] [PATCH] domctl: revert double increment of domctl version

2018-02-21 Thread Olaf Hering
Xen 4.10 has XEN_DOMCTL_INTERFACE_VERSION 0xe, staging should be fine with 0xf until the next release is prepared. Signed-off-by: Olaf Hering --- xen/include/public/domctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/public/domctl.h b/xen/include/public/domct

Re: [Xen-devel] [PATCH v3 10/17] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-21 Thread Stefano Stabellini
On Wed, 21 Feb 2018, Julien Grall wrote: > Hi Stefano, > > On 21/02/2018 00:35, Stefano Stabellini wrote: > > On Thu, 15 Feb 2018, Julien Grall wrote: > > > Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. > > > > > > Signed-off-by: Julien Grall > > > > > > --- > > > Cha

Re: [Xen-devel] [PATCH] domctl: revert double increment of domctl version

2018-02-21 Thread Wei Liu
On Wed, Feb 21, 2018 at 06:34:22PM +0100, Olaf Hering wrote: > Xen 4.10 has XEN_DOMCTL_INTERFACE_VERSION 0xe, staging should be fine > with 0xf until the next release is prepared. > > Signed-off-by: Olaf Hering > --- > xen/include/public/domctl.h | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [Xen-devel] [PATCH 1/2] x86/svm: add support for pause filtering threshold

2018-02-21 Thread Moger, Babu
Looks good. Reviewed-by: Babu Moger > -Original Message- > From: Woods, Brian > Sent: Tuesday, February 20, 2018 6:13 PM > To: xen-de...@lists.xen.org > Cc: Boris Ostrovsky ; Suthikulpanit, Suravee > ; Jan Beulich ; > Andrew Cooper ; Woods, Brian > > Subject: [PATCH 1/2] x86/svm: add su

Re: [Xen-devel] [PATCH 2/2] x86/svm: enable pause filtering threshold

2018-02-21 Thread Moger, Babu
Looks good. Reviewed-by: Babu Moger > -Original Message- > From: Woods, Brian > Sent: Tuesday, February 20, 2018 6:13 PM > To: xen-de...@lists.xen.org > Cc: Boris Ostrovsky ; Suthikulpanit, Suravee > ; Jan Beulich ; > Andrew Cooper ; Woods, Brian > > Subject: [PATCH 2/2] x86/svm: enable

Re: [Xen-devel] [PATCH] domctl: revert double increment of domctl version

2018-02-21 Thread Olaf Hering
Am Wed, 21 Feb 2018 17:38:03 + schrieb Wei Liu : > The reason we bumped the number twice is because we want a dedicated > number to denote the recent security fix. Thanks, that was no clear from the commit messages. Olaf pgptLjyZ2XhXq.pgp Description: Digitale Signatur von OpenPGP

Re: [Xen-devel] [PATCH] domctl: revert double increment of domctl version

2018-02-21 Thread Andrew Cooper
On 21/02/18 17:38, Wei Liu wrote: > On Wed, Feb 21, 2018 at 06:34:22PM +0100, Olaf Hering wrote: >> Xen 4.10 has XEN_DOMCTL_INTERFACE_VERSION 0xe, staging should be fine >> with 0xf until the next release is prepared. >> >> Signed-off-by: Olaf Hering >> --- >> xen/include/public/domctl.h | 2 +- >

Re: [Xen-devel] [PATCH] domctl: revert double increment of domctl version

2018-02-21 Thread Olaf Hering
Am Wed, 21 Feb 2018 17:53:54 + schrieb Andrew Cooper : > I continue to think that this is a mistake (which is backed up by > everyone else being confused about what is going on), and demonstrates > the ineffectiveness of the *_INTERFACE_VERSIONS in general. Well, my change was cosmetic anyway

Re: [Xen-devel] [RFC PATCH v2 0/9] hyper_dmabuf: Hyper_DMABUF driver

2018-02-21 Thread Dongwon Kim
On Mon, Feb 19, 2018 at 06:01:29PM +0100, Daniel Vetter wrote: > On Tue, Feb 13, 2018 at 05:49:59PM -0800, Dongwon Kim wrote: > > This patch series contains the implementation of a new device driver, > > hyper_DMABUF driver, which provides a way to expand the boundary of > > Linux DMA-BUF sharing t

Re: [Xen-devel] [PATCH RFC v2] x86/domctl: Don't pause the whole domain if only getting vcpu state

2018-02-21 Thread George Dunlap
On Fri, Oct 6, 2017 at 11:02 AM, Alexandru Isaila wrote: > This patch adds the hvm_save_one_cpu_ctxt() function. > It optimizes by only pausing the vcpu on all HVMSR_PER_VCPU save > callbacks where only data for one VCPU is required. Sorry it's taken so long to get back to you on this one. So fi

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

2018-02-21 Thread osstest service owner
flight 119834 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/119834/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

[Xen-devel] [xen-4.9-testing test] 119776: regressions - FAIL

2018-02-21 Thread osstest service owner
flight 119776 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/119776/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-arndale 7 xen-boot fail REGR. vs. 118784 Regressions whi

Re: [Xen-devel] [PATCH 2/7] x86/alt: Clean up struct alt_instr and its users

2018-02-21 Thread Konrad Rzeszutek Wilk
On Mon, Feb 12, 2018 at 11:23:02AM +, Andrew Cooper wrote: > * Rename some fields for consistency and clarity, and use standard types. > * Don't opencode the use of ALT_{ORIG,REPL}_PTR(). > > No functional change. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Konrad Rzesz

[Xen-devel] [PATCH RFC 09/10] passthrough/intel: put some code under CONFIG_HVM

2018-02-21 Thread Wei Liu
The code which references code under arch/x86/hvm/ is surrounded by CONFIG_HVM now. The basic idea is that in !CONFIG_HVM && CONFIG_PV case we still want to retain the host side IOMMU code so that PV guests can use it if necessary. Signed-off-by: Wei Liu --- Cc: Kevin Tian --- xen/drivers/pass

[Xen-devel] [PATCH RFC 08/10] passthrough/amd: make clear_iommu_pte_present static

2018-02-21 Thread Wei Liu
There is only one user in the same file. Signed-off-by: Wei Liu --- Cc: Suravee Suthikulpanit --- xen/drivers/passthrough/x86/amd/iommu_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/x86/amd/iommu_map.c b/xen/drivers/passthrough/x86/amd/iommu_

  1   2   >