Re: [Xen-devel] [PATCHv2 for-4.10] xen/arm: guest_walk: Fix check again the IPS

2017-10-11 Thread Sergej Proskurin
Hi Julien, On 10/11/2017 04:57 PM, Julien Grall wrote: > > > On 11/10/17 15:51, Sergej Proskurin wrote: >> Hi Julien, > > Hi, > >> On 10/11/2017 04:29 PM, Julien Grall wrote: >>> The function get_ipa_output_size is check whether the input si

Re: [Xen-devel] [PATCHv2 for-4.10] xen/arm: guest_walk: Fix check again the IPS

2017-10-11 Thread Sergej Proskurin
457707 > Signed-off-by: Julien Grall <julien.gr...@linaro.org> > > --- > > Cc: Sergej Proskurin <prosku...@sec.in.tum.de> > > Changes in v2: > - Fix compilation on Arm32 > --- > xen/arch/arm/guest_walk.c | 8 +--- > 1 file changed, 5 insertions(+)

Re: [Xen-devel] [PATCH FOR-4.10] xen/arm: guest_walk: Fix check again the IPS

2017-10-10 Thread Sergej Proskurin
oduced software page-table walk for stage-1. > > Coverity-ID: 1457707 > Signed-off-by: Julien Grall <julien.gr...@linaro.org> > > --- > > Cc: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Sergej Proskurin <prosku...@sec.in.tum.de> Thanks, ~Sergej > --- &g

Re: [Xen-devel] [PATCH v4 00/39] arm/altp2m: Introducing altp2m to ARM

2017-10-07 Thread Sergej Proskurin
Hi Julien, On 10/07/2017 12:29 PM, Julien Grall wrote: > > > On 07/10/2017 11:18, Sergej Proskurin wrote: >> Hi all, > > Hello Sergej, > >> >> just wanted to friendly remind you about the next altp2m on ARM patch >> series, since it has been submitte

Re: [Xen-devel] [PATCH v4 00/39] arm/altp2m: Introducing altp2m to ARM

2017-10-07 Thread Sergej Proskurin
let me know if I should wait for reviews until the end of the extended code freeze deadline. Thanks, ~Sergej On 08/30/2017 08:32 PM, Sergej Proskurin wrote: > Hi all, > > The following patch series can be found on Github[0] and is part of my > contribution to last year's Google Su

[Xen-devel] [RFC PATCH 0/4] Introduce Single-Stepping to ARMv8

2017-09-05 Thread Sergej Proskurin
. It would be of great help if we would discuss the upper issue and hopefully even find a solution to the presented issue. Thank you very much in advance. Cheers, ~Sergej [0] https://lists.xen.org/archives/html/xen-devel/2017-08/msg00661.html Sergej Proskurin (4): arm/monitor: Introduce monitoring

[Xen-devel] [RFC PATCH 4/4] vm_event: Move vm_event_toggle_singlestep to

2017-09-05 Thread Sergej Proskurin
In this commit we move the declaration of the function vm_event_toggle_singlestep from to and implement the associated functionality on ARM. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> Cc: Tamas K Lengyel <ta...@tk

[Xen-devel] [RFC PATCH 3/4] arm/traps: Allow trapping on single-step events

2017-09-05 Thread Sergej Proskurin
This commit concludes the single-stepping functionality on ARM by adding trapping on and setting up single-stepping events of the architecture. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julie

[Xen-devel] [RFC PATCH 2/4] arm/domctl: Add XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_{ON|OFF}

2017-09-05 Thread Sergej Proskurin
This commit adds the domctl that is required to enable single-stepping on ARM. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- xen/arch/arm/do

[Xen-devel] [RFC PATCH 1/4] arm/monitor: Introduce monitoring of single-step events

2017-09-05 Thread Sergej Proskurin
In this commit, we extend the capabilities of the monitor to allow tracing of single-step events on ARM. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> Cc: Tamas K Lengyel <ta...@tklengyel.com> Cc: Stefano St

Re: [Xen-devel] [PATCH v4 10/11] public: add XENFEAT_ARM_SMCCC_supported feature

2017-09-04 Thread Sergej Proskurin
Hi Julien, On 09/04/2017 08:07 AM, Julien Grall wrote: > Hello, > > Sorry for the formatting, writing from my phone. Ki > > On Thu, 31 Aug 2017, 22:18 Sergej Proskurin <prosku...@sec.in.tum.de> wrote: > [...] > > On your first mail, you started with "s

Re: [Xen-devel] [PATCH v4 10/11] public: add XENFEAT_ARM_SMCCC_supported feature

2017-08-31 Thread Sergej Proskurin
Hi Volodymyr, On 08/31/2017 04:58 PM, Volodymyr Babchuk wrote: > Hi Sergej > > On 31.08.17 16:51, Sergej Proskurin wrote: >> Hi Volodymyr, >> >> >> On 08/31/2017 02:44 PM, Volodymyr Babchuk wrote: >>> Hello Sergej, >>> >>> On 31.08.17

Re: [Xen-devel] [PATCH v4 11/39] altp2m: Move (MAX|INVALID)_ALTP2M to xen/p2m-common.h

2017-08-31 Thread Sergej Proskurin
Hi Jan, On 08/31/2017 12:19 PM, Jan Beulich wrote: On 31.08.17 at 11:49, wrote: >> On 08/31/2017 10:04 AM, Jan Beulich wrote: >> On 30.08.17 at 20:32, wrote: We move the macros (MAX|INVALID)_ALTP2M out of x86-related code to

Re: [Xen-devel] [PATCH v4 10/11] public: add XENFEAT_ARM_SMCCC_supported feature

2017-08-31 Thread Sergej Proskurin
Hi Volodymyr, On 08/31/2017 02:44 PM, Volodymyr Babchuk wrote: > Hello Sergej, > > On 31.08.17 15:20, Sergej Proskurin wrote: >> Hi Volodymyr, hi Julien, >> >> >> On 08/24/2017 07:25 PM, Julien Grall wrote: >>> >>> >>> On 21/08/17

Re: [Xen-devel] [PATCH v4 10/11] public: add XENFEAT_ARM_SMCCC_supported feature

2017-08-31 Thread Sergej Proskurin
Hi Volodymyr, hi Julien, On 08/24/2017 07:25 PM, Julien Grall wrote: > > > On 21/08/17 21:27, Volodymyr Babchuk wrote: >> This feature indicates that hypervisor is compatible with ARM >> SMC calling convention. Hypervisor will not inject an undefined >> instruction exception if an invalid SMC

Re: [Xen-devel] [PATCH v4 11/39] altp2m: Move (MAX|INVALID)_ALTP2M to xen/p2m-common.h

2017-08-31 Thread Sergej Proskurin
Hi Jan, On 08/31/2017 10:04 AM, Jan Beulich wrote: On 30.08.17 at 20:32, wrote: >> We move the macros (MAX|INVALID)_ALTP2M out of x86-related code to >> common code, as the following patches will make use of them on ARM. > But both seem not impossible to be require

Re: [Xen-devel] [PATCH v4 39/39] arm/xen-access: Add test of xc_altp2m_change_gfn

2017-08-30 Thread Sergej Proskurin
Hi Razvan, [...] >> + >> +*gfn_new = ++(xenaccess->max_gpfn); > Unnecessary parentheses. > Thanks. >> +rc = xc_domain_populate_physmap_exact(xenaccess->xc_handle, domain_id, >> 1, 0, 0, gfn_new); >> +if ( rc < 0 ) >> +goto err; >> + >> +/* Copy content of the old gfn

Re: [Xen-devel] [PATCH v4 29/39] x86/altp2m: Move altp2m_check to altp2m.c

2017-08-30 Thread Sergej Proskurin
Hi Razvan, On 08/30/2017 08:42 PM, Razvan Cojocaru wrote: > On 08/30/2017 09:32 PM, Sergej Proskurin wrote: >> diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c >> index 42e6f09029..66f1d83d84 100644 >> --- a/xen/common/vm_event.c >> +++ b/xen/common/v

[Xen-devel] [PATCH v4 04/39] arm/p2m: Add HVMOP_altp2m_get_domain_state

2017-08-30 Thread Sergej Proskurin
This commit adopts the x86 HVMOP_altp2m_get_domain_state implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v3: Removed the &quo

[Xen-devel] [PATCH v4 22/39] arm/p2m: Make p2m_mem_access_check ready for altp2m

2017-08-30 Thread Sergej Proskurin
ently active altp2m view might not have the required gva mapping yet. Also, the new implementation fills the request buffer to hold altp2m-related information. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Gra

[Xen-devel] [PATCH v4 39/39] arm/xen-access: Add test of xc_altp2m_change_gfn

2017-08-30 Thread Sergej Proskurin
violations will trap into Xen and be forced by xen-access to switch to the default view (altp2m[0]) as before. The introduced test can be invoked by providing the argument "altp2m_remap". Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Razvan Cojocaru <rcojoc...

[Xen-devel] [PATCH v4 07/39] arm/p2m: Move hostp2m init/teardown to individual functions

2017-08-30 Thread Sergej Proskurin
itialization/teardown of altp2m views. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Added the function p2m_flush_table to the previous version. v3: Removed struct vtt

[Xen-devel] [PATCH v4 27/39] arm/p2m: Add altp2m_propagate_change

2017-08-30 Thread Sergej Proskurin
id entries. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v3: Cosmetic fixes. Changed the locking mechanism to "p2m_write_lock" inside the function &qu

[Xen-devel] [PATCH v4 17/39] arm/p2m: Add HVMOP_altp2m_switch_p2m

2017-08-30 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v3: Extended the function "altp2m_switch_domain_altp2m_by_id" so that if the guest domain indirectly calles thi

[Xen-devel] [PATCH v4 28/39] altp2m: Rename p2m_altp2m_check to altp2m_check

2017-08-30 Thread Sergej Proskurin
which is altp2m.c). The reason for modifying the function's name is due the association of the function with the associated .c file. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Jan Beulich <jbeul...@suse.com> Cc: Andrew Cooper <andrew.coop...@citrix.com> Cc

[Xen-devel] [PATCH v4 30/39] arm/altp2m: Move altp2m_check to altp2m.h

2017-08-30 Thread Sergej Proskurin
In this commit, we move the function "altp2m_check" from p2m.h to altp2m.h in order to group all altp2m-related functions in one point, namely in altp2m.{c|h}. This commit moves solely the arm code. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stab

[Xen-devel] [PATCH v4 25/39] arm/p2m: Modify reference count only if hostp2m active

2017-08-30 Thread Sergej Proskurin
This commit makes sure that the page reference count is updated through the function "p2m_put_l3_page" only when the entries have been freed from the host's p2m. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.or

[Xen-devel] [PATCH v4 08/39] arm/p2m: Cosmetic fix - function prototype of p2m_alloc_table

2017-08-30 Thread Sergej Proskurin
The function "p2m_alloc_table" should be able to allocate 2nd stage translation tables not only for the host's p2m but also for alternate p2m's. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefan

[Xen-devel] [PATCH v4 10/39] arm/p2m: Change func prototype and impl of p2m_(alloc|free)_vmid

2017-08-30 Thread Sergej Proskurin
takes only the vmid that is to be freed as argument. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v3: Changed function prototypes and implementation of the functi

[Xen-devel] [PATCH v4 35/39] arm/p2m: Adjust debug information to altp2m

2017-08-30 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Dump p2m information of the hostp2m and all altp2m views. v4: Adjust printk format. --- xen/arch/arm/p2m.c | 20 +

[Xen-devel] [PATCH v4 32/39] arm/altp2m: Make altp2m_vcpu_idx ready for altp2m

2017-08-30 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- xen/include/asm-arm/altp2m.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/include/asm-arm/altp

[Xen-devel] [PATCH v4 11/39] altp2m: Move (MAX|INVALID)_ALTP2M to xen/p2m-common.h

2017-08-30 Thread Sergej Proskurin
We move the macros (MAX|INVALID)_ALTP2M out of x86-related code to common code, as the following patches will make use of them on ARM. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Andrew Cooper <andrew.coop...@citrix.com> Cc: George Dunlap <george.dun...@eu

[Xen-devel] [PATCH v4 20/39] arm/p2m: Make get_page_from_gva ready for altp2m

2017-08-30 Thread Sergej Proskurin
for the associated gva to ma translation. This is required at this point, as altp2m lazily copies pages from the host's p2m and even might be flushed because of changes to the host's p2m (as it is done within the context of memory ballooning). Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum

[Xen-devel] [PATCH v4 16/39] arm/p2m: Add HVMOP_altp2m_destroy_p2m

2017-08-30 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Substituted the call to tlb_flush for p2m_flush_table. Added comments. Cosmetic fixes. v3: Changed the

[Xen-devel] [PATCH v4 19/39] arm/p2m: Make p2m_restore_state ready for altp2m

2017-08-30 Thread Sergej Proskurin
This commit adapts the function "p2m_restore_state" in a way that the currently active altp2m table is considered during state restoration. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini &

[Xen-devel] [PATCH v4 29/39] x86/altp2m: Move altp2m_check to altp2m.c

2017-08-30 Thread Sergej Proskurin
In this commit, we move the function "altp2m_check" from p2m.c to altp2m.c in order to group all altp2m-related functions in one point, namely in altp2m.{c|h}. This commit moves solely the x86 code. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: George Du

[Xen-devel] [PATCH v4 26/39] arm/p2m: Add HVMOP_altp2m_set_mem_access

2017-08-30 Thread Sergej Proskurin
The HVMOP_altp2m_set_mem_access allows to set gfn permissions of (currently one page at a time) of a specific altp2m view. In case the view does not hold the requested gfn entry, it will be first copied from the host's p2m table and then modified as requested. Signed-off-by: Sergej Proskurin

[Xen-devel] [PATCH v4 13/39] arm/p2m: Add altp2m table flushing routine

2017-08-30 Thread Sergej Proskurin
that tracks the vCPUs that are currently using the particular p2m. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Pages in p2m->pages are not cleared in p2m_flush_ta

[Xen-devel] [PATCH v4 01/39] arm/p2m: Introduce p2m_(switch|restore)_vttbr_and_(g|s)et_flags

2017-08-30 Thread Sergej Proskurin
This commit introduces macros for switching and restoring the vttbr considering the currently set irq flags. We define these macros, as the following commits will use the associated functionality multiple times throughout different files. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum

[Xen-devel] [PATCH v4 12/39] arm/p2m: Add altp2m init/teardown routines

2017-08-30 Thread Sergej Proskurin
The p2m initialization now invokes initialization routines responsible for the allocation and initialization of altp2m structures. The same applies to teardown routines. The functionality has been adopted from the x86 altp2m implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum

[Xen-devel] [PATCH v4 15/39] arm/p2m: Add HVMOP_altp2m_create_p2m

2017-08-30 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Cosmetic fixes. v3: Cosmetic fixes. Renamed the fu

[Xen-devel] [PATCH v4 14/39] arm/p2m: Add HVMOP_altp2m_set_domain_state

2017-08-30 Thread Sergej Proskurin
The HVMOP_altp2m_set_domain_state allows to activate altp2m on a specific domain. This commit adopts the x86 HVMOP_altp2m_set_domain_state implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Gral

[Xen-devel] [PATCH v4 02/39] arm/p2m: Add first altp2m HVMOP stubs

2017-08-30 Thread Sergej Proskurin
statement, future implementation should determine, which HVMOPs can be executed concurrently. Also, the struct arch_domain is extended with the altp2m_active attribute, representing the current altp2m activity configuration of the domain. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum

[Xen-devel] [PATCH v4 18/39] arm/p2m: Add p2m_get_active_p2m macro

2017-08-30 Thread Sergej Proskurin
This commit introduces the macro "p2m_get_active_p2m" returning the currently active (alt)p2m. The need for this macro will be shown in the following commits. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> ---

[Xen-devel] [PATCH v4 21/39] arm/p2m: Cosmetic fix - __p2m_get_mem_access

2017-08-30 Thread Sergej Proskurin
In this commit, we extend the function prototype of "__p2m_get_mem_access" to hold an argument of type "struct p2m_domain*", as we need to distinguish between the host's p2m and different altp2m views. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: St

[Xen-devel] [PATCH v4 38/39] arm/xen-access: Extend xen-access for altp2m on ARM

2017-08-30 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Razvan Cojocaru <rcojoc...@bitdefender.com> --- Cc: Razvan Cojocaru <rcojoc...@bitdefender.com> Cc: Tamas K Lengyel <ta...@tklengyel.com> Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Wei Liu &l

[Xen-devel] [PATCH v4 09/39] arm/p2m: Rename parameter in p2m_alloc_vmid

2017-08-30 Thread Sergej Proskurin
This commit does not change or introduce any additional functionality but rather is a part of the following commit that alters the functionality of the function "p2m_alloc_vmid". Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabel

[Xen-devel] [PATCH v4 34/39] arm/p2m: Add HVMOP_altp2m_change_gfn

2017-08-30 Thread Sergej Proskurin
This commit adds the functionality to change mfn mappings for specified gfn's in altp2m views. This mechanism can be used within the context of VMI, e.g., to establish stealthy debugging. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@k

[Xen-devel] [PATCH v4 24/39] arm/p2m: Make p2m_put_l3_page ready for altp2m

2017-08-30 Thread Sergej Proskurin
m being modified is the hostp2m. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- xen/arch/arm/p2m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Xen-devel] [PATCH v4 37/39] altp2m: Allow activating altp2m on ARM domains

2017-08-30 Thread Sergej Proskurin
and and altp2m for ARM architectures. We also extend the documentation of the option "altp2m" in ./docs/man/xl.cfg.pod.5.in. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Wei Liu <wei.l...@citrix.com&

[Xen-devel] [PATCH v4 36/39] altp2m: Document external-only use on ARM

2017-08-30 Thread Sergej Proskurin
modes XEN_ALTP2M_external and XEN_ALTP2M_disabled are also valid for the ARM architecture. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Signed-off-by: Tamas K Lengyel <tamas.leng...@zentific.com> --- Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Wei Liu <wei.l...@c

[Xen-devel] [PATCH v4 03/39] arm/p2m: Add hvm_allow_(set|get)_param

2017-08-30 Thread Sergej Proskurin
domains. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- xen/arch/arm/hvm.c | 65 ++ 1 file changed, 56 insertions(+), 9

[Xen-devel] [PATCH v4 05/39] arm/p2m: Introduce p2m_is_(hostp2m|altp2m)

2017-08-30 Thread Sergej Proskurin
This commit adds a p2m class to the struct p2m_domain to distinguish between the host's original p2m and alternate p2m's. The need for this functionality will be shown in the following commits. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <

[Xen-devel] [PATCH v4 00/39] arm/altp2m: Introducing altp2m to ARM

2017-08-30 Thread Sergej Proskurin
re stated inside the individual commits. Best regards, ~Sergej [0] https://github.com/sergej-proskurin/xen (branch arm-altp2m-v4) [1] https://summerofcode.withgoogle.com/projects/#4970052843470848 Sergej Proskurin (38): arm/p2m: Introduce p2m_(switch|restore)_vttbr_and_(g|s)et_flags arm/p2m: Add first al

[Xen-devel] [PATCH v4 33/39] arm/p2m: Add altp2m paging mechanism

2017-08-30 Thread Sergej Proskurin
This commit adds the function "altp2m_lazy_copy" implementing the altp2m paging mechanism. The function "altp2m_lazy_copy" lazily copies the hostp2m's mapping into the currently active altp2m view on 2nd stage translation faults on instruction or data access. Signed-off-

[Xen-devel] [PATCH v4 06/39] arm/p2m: Cosmetic fix - substitute _gfn(ULONG_MAX) for INVALID_GFN

2017-08-30 Thread Sergej Proskurin
In ./xen/arch/arm/p2m.c, we compare the gfn's with INVALID_GFN throughout the code. Thus it makes sense to use the macro INVALID_GFN instead of a hard coded value to initialize "p2m->lowest_mapped_gfn". Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano S

[Xen-devel] [PATCH v4 23/39] arm/p2m: Cosmetic fix - function prototypes

2017-08-30 Thread Sergej Proskurin
prototypes have been extended to hold another argument (of type struct p2m_domain *). This allows to specify the p2m/altp2m domain that should be processed by the individual function -- instead of accessing the host's default p2m domain. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de>

[Xen-devel] [PATCH v4 31/39] arm/altp2m: Introduce altp2m_switch_vcpu_altp2m_by_id

2017-08-30 Thread Sergej Proskurin
This commit adds the function "altp2m_switch_vcpu_altp2m_by_id" that is executed after checking whether the vcpu should be switched to a different altp2m within the function "altp2m_check". Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: St

[Xen-devel] [PATCH] xen-access: Correct default value of write-to-CR4 switch

2017-08-30 Thread Sergej Proskurin
The current implementation configures the test environment to always trap on writes to the CR4 control register, even on ARM. This leads to issues as calling xc_monitor_write_ctrlreg on ARM with VM_EVENT_X86_CR4 will always fail. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de>

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

2017-08-16 Thread Sergej Proskurin
0487B.a J1-5922, J1-5999, and ARM DDI 0406C.b B3-1510. Note that the current implementation lacks support for Large VA/PA on ARMv8.2 architectures (LVA/LPA, 52-bit virtual and physical address sizes). The associated location in the code is marked appropriately. Signed-off-by: Sergej Proskurin <pro

[Xen-devel] [PATCH v9 13/13] arm/mem_access: Walk the guest's pt in software

2017-08-16 Thread Sergej Proskurin
potential translation errors in the function p2m_mem_access_check_and_get_page due to restricted memory (e.g. to the guest's page tables themselves), we walk the guest's page tables in software. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Tamas K Lengyel <ta...@tklengyel.co

[Xen-devel] [PATCH v9 09/13] arm/guest_access: Rename vgic_access_guest_memory

2017-08-16 Thread Sergej Proskurin
and to eliminate artefacts of the function's previous location. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v6: We added

[Xen-devel] [PATCH v9 04/13] arm/mem_access: Add short-descriptor pte typedefs and macros

2017-08-16 Thread Sergej Proskurin
The current implementation does not provide appropriate types for short-descriptor translation table entries. As such, this commit adds new types, which simplify managing the respective translation table entries. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien

[Xen-devel] [PATCH v9 02/13] arm/mem_access: Add defines supporting PTs with varying page sizes

2017-08-16 Thread Sergej Proskurin
AArch64 supports pages with different (4K, 16K, and 64K) sizes. To enable guest page table walks for various configurations, this commit extends the defines and helpers of the current implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Julien Grall <

[Xen-devel] [PATCH v9 01/13] arm/mem_access: Add and cleanup (TCR_|TTBCR_)* defines

2017-08-16 Thread Sergej Proskurin
This commit adds (TCR_|TTBCR_)* defines to simplify access to the respective register contents. At the same time, we adjust the macros TCR_T0SZ and TCR_TG0_* by using the newly introduced TCR_T0SZ_SHIFT and TCR_TG0_SHIFT instead of the hardcoded values. Signed-off-by: Sergej Proskurin <pro

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

2017-08-16 Thread Sergej Proskurin
implementation has been lifted from the linux kernel source code. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Stefano Stabellini <sstabell...@kernel.org> --- Cc: Andrew Cooper <andrew.coop...@citrix.com> Cc: George Dunlap <george.dun...@eu.citrix.com> C

[Xen-devel] [PATCH v9 08/13] arm/guest_access: Move vgic_access_guest_memory to guest_access.h

2017-08-16 Thread Sergej Proskurin
This commit moves the function vgic_access_guest_memory to guestcopy.c and the header asm/guest_access.h. No functional changes are made. Please note that the function will be renamed in the following commit. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien

[Xen-devel] [PATCH v9 03/13] arm/lpae: Introduce lpae_is_page helper

2017-08-16 Thread Sergej Proskurin
This commit introduces a new helper that checks whether the target PTE holds a page mapping or not. This helper will be used as part of the following commits. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefan

[Xen-devel] [PATCH v9 10/13] arm/mem_access: Add software guest-page-table walk

2017-08-16 Thread Sergej Proskurin
, TTBR1_EL1, and SCTLR_EL1. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Rename p2m_gva_to_ipa to p2m_walk_gpt and mov

[Xen-devel] [PATCH v9 06/13] arm/mem_access: Introduce BIT_ULL bit operation

2017-08-16 Thread Sergej Proskurin
commits. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v4: We reused the previous commit with the msg "arm/mem_ac

[Xen-devel] [PATCH v9 00/13] arm/mem_access: Walk guest page tables in SW

2017-08-16 Thread Sergej Proskurin
discussed with the associated maintainers and accordingly stated in the individual patches. The following patch series can be found on Github[0]. Cheers, ~Sergej [0] https://github.com/sergej-proskurin/xen (branch arm-gpt-walk-v9) Sergej Proskurin (13): arm/mem_access: Add and cleanup (TCR_|TTBCR_

[Xen-devel] [PATCH v9 05/13] arm/mem_access: Introduce GV2M_EXEC permission

2017-08-16 Thread Sergej Proskurin
We extend the current implementation by an additional permission, GV2M_EXEC, which will be used to describe execute permissions of PTE's as part of our guest translation table walk implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <

[Xen-devel] [PATCH v9 12/13] arm/mem_access: Add short-descriptor based gpt

2017-08-16 Thread Sergej Proskurin
This commit adds functionality to walk the guest's page tables using the short-descriptor translation table format for both ARMv7 and ARMv8. The implementation is based on ARM DDI 0487B-a J1-6002 and ARM DDI 0406C-b B3-1506. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de>

Re: [Xen-devel] [PATCH v8 08/13] arm/guest_access: Move vgic_access_guest_memory to guest_access.h

2017-08-16 Thread Sergej Proskurin
On 08/16/2017 12:11 PM, Julien Grall wrote: > > > On 16/08/17 10:58, Sergej Proskurin wrote: >> Hi Julien, >> >> >> On 08/09/2017 10:20 AM, Sergej Proskurin wrote: >>> This commit moves the function vgic_access_guest_memory to guestcopy.c >>&g

Re: [Xen-devel] [PATCH v8 08/13] arm/guest_access: Move vgic_access_guest_memory to guest_access.h

2017-08-16 Thread Sergej Proskurin
Hi Julien, On 08/09/2017 10:20 AM, Sergej Proskurin wrote: > This commit moves the function vgic_access_guest_memory to guestcopy.c > and the header asm/guest_access.h. No functional changes are made. > Please note that the function will be renamed in the following commit. >

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

2017-08-16 Thread Sergej Proskurin
Hi all, On 08/16/2017 12:28 AM, Andrew Cooper wrote: > On 15/08/2017 23:25, Stefano Stabellini wrote: >> On Tue, 15 Aug 2017, Julien Grall wrote: >>> On 14/08/17 22:03, Sergej Proskurin wrote: >>>> Hi Julien, >>>> >>>> On 08/14/2017 07:37 PM,

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

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

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

2017-08-15 Thread Sergej Proskurin
Hi Julien, On 08/15/2017 12:13 PM, Julien Grall wrote: > > > On 14/08/17 22:03, Sergej Proskurin wrote: >> Hi Julien, >> >> On 08/14/2017 07:37 PM, Julien Grall wrote: >>> Hi Sergej, >>> >>> On 09/08/17 09:20, Sergej Proskurin wrote: >&g

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

2017-08-14 Thread Sergej Proskurin
Hi Julien, On 08/14/2017 07:37 PM, Julien Grall wrote: > Hi Sergej, > > On 09/08/17 09:20, Sergej Proskurin wrote: >> +/* >> + * According to to ARM DDI 0487B.a J1-5927, we return an error if >> the found > > Please drop one of the 'to'. The rest looks

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

2017-08-09 Thread Sergej Proskurin
0487B.a J1-5922, J1-5999, and ARM DDI 0406C.b B3-1510. Note that the current implementation lacks support for Large VA/PA on ARMv8.2 architectures (LVA/LPA, 52-bit virtual and physical address sizes). The associated location in the code is marked appropriately. Signed-off-by: Sergej Proskurin <pro

[Xen-devel] [PATCH v8 12/13] arm/mem_access: Add short-descriptor based gpt

2017-08-09 Thread Sergej Proskurin
This commit adds functionality to walk the guest's page tables using the short-descriptor translation table format for both ARMv7 and ARMv8. The implementation is based on ARM DDI 0487B-a J1-6002 and ARM DDI 0406C-b B3-1506. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de>

[Xen-devel] [PATCH v8 05/13] arm/mem_access: Introduce GV2M_EXEC permission

2017-08-09 Thread Sergej Proskurin
We extend the current implementation by an additional permission, GV2M_EXEC, which will be used to describe execute permissions of PTE's as part of our guest translation table walk implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <

[Xen-devel] [PATCH v8 06/13] arm/mem_access: Introduce BIT_ULL bit operation

2017-08-09 Thread Sergej Proskurin
commits. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v4: We reused the previous commit with the msg "arm/mem_ac

[Xen-devel] [PATCH v8 13/13] arm/mem_access: Walk the guest's pt in software

2017-08-09 Thread Sergej Proskurin
potential translation errors in the function p2m_mem_access_check_and_get_page due to restricted memory (e.g. to the guest's page tables themselves), we walk the guest's page tables in software. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Tamas K Lengyel <ta...@tklengyel.co

[Xen-devel] [PATCH v8 10/13] arm/mem_access: Add software guest-page-table walk

2017-08-09 Thread Sergej Proskurin
, TTBR1_EL1, and SCTLR_EL1. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v2: Rename p2m_gva_to_ipa to p2m_walk_gpt and mov

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

2017-08-09 Thread Sergej Proskurin
implementation has been lifted from the linux kernel source code. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Andrew Cooper <andrew.coop...@citrix.com> Cc: George Dunlap <george.dun...@eu.citrix.com> Cc: Ian Jackson <ian.jack...@eu.citrix.com> Cc: Jan Beulich <jb

[Xen-devel] [PATCH v8 04/13] arm/mem_access: Add short-descriptor pte typedefs and macros

2017-08-09 Thread Sergej Proskurin
The current implementation does not provide appropriate types for short-descriptor translation table entries. As such, this commit adds new types, which simplify managing the respective translation table entries. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien

[Xen-devel] [PATCH v8 03/13] arm/lpae: Introduce lpae_is_page helper

2017-08-09 Thread Sergej Proskurin
This commit introduces a new helper that checks whether the target PTE holds a page mapping or not. This helper will be used as part of the following commits. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Julien Grall <julien.gr...@arm.com> --- Cc: Stefan

[Xen-devel] [PATCH v8 08/13] arm/guest_access: Move vgic_access_guest_memory to guest_access.h

2017-08-09 Thread Sergej Proskurin
This commit moves the function vgic_access_guest_memory to guestcopy.c and the header asm/guest_access.h. No functional changes are made. Please note that the function will be renamed in the following commit. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Acked-by: Julien

[Xen-devel] [PATCH v8 01/13] arm/mem_access: Add and cleanup (TCR_|TTBCR_)* defines

2017-08-09 Thread Sergej Proskurin
This commit adds (TCR_|TTBCR_)* defines to simplify access to the respective register contents. At the same time, we adjust the macros TCR_T0SZ and TCR_TG0_* by using the newly introduced TCR_T0SZ_SHIFT and TCR_TG0_SHIFT instead of the hardcoded values. Signed-off-by: Sergej Proskurin <pro

[Xen-devel] [PATCH v8 09/13] arm/guest_access: Rename vgic_access_guest_memory

2017-08-09 Thread Sergej Proskurin
and to eliminate artefacts of the function's previous location. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> --- Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Julien Grall <julien.gr...@arm.com> --- v6: We added this patch to our patch series. v7: Renamed the funct

[Xen-devel] [PATCH v8 02/13] arm/mem_access: Add defines supporting PTs with varying page sizes

2017-08-09 Thread Sergej Proskurin
AArch64 supports pages with different (4K, 16K, and 64K) sizes. To enable guest page table walks for various configurations, this commit extends the defines and helpers of the current implementation. Signed-off-by: Sergej Proskurin <prosku...@sec.in.tum.de> Reviewed-by: Julien Grall <

[Xen-devel] [PATCH v8 00/13] arm/mem_access: Walk guest page tables in SW if mem_access is active

2017-08-09 Thread Sergej Proskurin
and position where we recursively rely on the p2m->lock. We also add casts to fields of the struct short_desc_t in guest_walk_sd as to cope with incorrect values due to the C type promotion. The following patch series can be found on Github[0]. Cheers, ~Sergej [0] https://github.com/sergej-proskurin/

Re: [Xen-devel] [PATCH v7 13/14] arm/mem_access: Add short-descriptor based gpt

2017-08-09 Thread Sergej Proskurin
Hi Andrew, >>> diff --git a/xen/arch/arm/guest_walk.c b/xen/arch/arm/guest_walk.c >>> index b258248322..7f34a2b1d3 100644 >>> --- a/xen/arch/arm/guest_walk.c >>> +++ b/xen/arch/arm/guest_walk.c >>> @@ -112,7 +112,12 @@ static int guest_walk_sd(const struct vcpu *v, >>> * level

Re: [Xen-devel] [PATCH v7 13/14] arm/mem_access: Add short-descriptor based gpt

2017-08-08 Thread Sergej Proskurin
On 08/08/2017 06:20 PM, Andrew Cooper wrote: > On 08/08/17 16:28, Sergej Proskurin wrote: >> On 08/08/2017 05:18 PM, Julien Grall wrote: >>> On 08/08/17 16:17, Sergej Proskurin wrote: >>>> Hi Julien, >>>> >>>> >>>> On 0

Re: [Xen-devel] [PATCH v7 13/14] arm/mem_access: Add short-descriptor based gpt

2017-08-08 Thread Sergej Proskurin
On 08/08/2017 05:18 PM, Julien Grall wrote: > > > On 08/08/17 16:17, Sergej Proskurin wrote: >> Hi Julien, >> >> >> On 07/18/2017 02:25 PM, Sergej Proskurin wrote: >>> This commit adds functionality to walk the guest's page tables using >>>

Re: [Xen-devel] [PATCH v7 13/14] arm/mem_access: Add short-descriptor based gpt

2017-08-08 Thread Sergej Proskurin
Hi Julien, On 07/18/2017 02:25 PM, Sergej Proskurin wrote: > This commit adds functionality to walk the guest's page tables using the > short-descriptor translation table format for both ARMv7 and ARMv8. The > implementation is based on ARM DDI 0487B-a J1-6002 and ARM DDI 0406C-b

Re: [Xen-devel] [PATCH v7 00/14] arm/mem_access: Walk guest page tables in SW if mem_access is active

2017-08-08 Thread Sergej Proskurin
On 08/08/2017 04:58 PM, Andrew Cooper wrote: > On 08/08/17 15:47, Sergej Proskurin wrote: >> Hi Julien, >> >>> The patch belows solve my problem: >>> >>> diff --git a/xen/arch/arm/guest_walk.c b/xen/arch/arm/guest_walk.c >>> index b258248322..6c

Re: [Xen-devel] [PATCH v7 00/14] arm/mem_access: Walk guest page tables in SW if mem_access is active

2017-08-08 Thread Sergej Proskurin
Hi Julien, > The patch belows solve my problem: > > diff --git a/xen/arch/arm/guest_walk.c b/xen/arch/arm/guest_walk.c > index b258248322..6ca994e438 100644 > --- a/xen/arch/arm/guest_walk.c > +++ b/xen/arch/arm/guest_walk.c > @@ -112,7 +112,7 @@ static int guest_walk_sd(const struct vcpu *v, >

Re: [Xen-devel] [PATCH v7 00/14] arm/mem_access: Walk guest page tables in SW if mem_access is active

2017-08-08 Thread Sergej Proskurin
Hi Julien, On 08/04/2017 11:15 AM, Sergej Proskurin wrote: > Hi Julien, > > Sorry for the late reply. > > On 07/31/2017 04:38 PM, Julien Grall wrote: >> >> On 18/07/17 13:24, Sergej Proskurin wrote: >>> Hi all, >> Hi, >> >>> The

  1   2   3   4   5   >