[Xen-devel] [PATCH v2 24/25] arm/altp2m: Extend xen-access for altp2m on ARM.

2016-08-01 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin Acked-by: Razvan Cojocaru --- Cc: Razvan Cojocaru Cc: Tamas K Lengyel Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xen-access/xen-access.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tools/tests/xen-access

Re: [Xen-devel] [PATCH v2 02/25] arm/altp2m: Add HVMOP_altp2m_get_domain_state.

2016-08-01 Thread Sergej Proskurin
Hi Andrew, On 08/01/2016 07:21 PM, Andrew Cooper wrote: > On 01/08/16 18:10, Sergej Proskurin wrote: >> diff --git a/xen/include/asm-arm/altp2m.h b/xen/include/asm-arm/altp2m.h >> index 0711796..d47b249 100644 >> --- a/xen/include/asm-arm/altp2m.h >> +++ b/xen/include/a

Re: [Xen-devel] [PATCH v2 00/25] arm/altp2m: Introducing altp2m to ARM.

2016-08-01 Thread Sergej Proskurin
Hi Julien, On 08/01/2016 09:55 PM, Julien Grall wrote: > > > On 01/08/2016 20:20, Tamas K Lengyel wrote: >> On Mon, Aug 1, 2016 at 12:15 PM, Julien Grall >> wrote: >>> On 01/08/16 18:10, Sergej Proskurin wrote: >>>> >>>> >>>>

Re: [Xen-devel] [PATCH v2 25/25] arm/altp2m: Add test of xc_altp2m_change_gfn.

2016-08-02 Thread Sergej Proskurin
Hi Razvan, On 08/02/2016 11:14 AM, Razvan Cojocaru wrote: > On 08/01/2016 08:10 PM, Sergej Proskurin wrote: >> This commit extends xen-access by a simple test of the functionality >> provided by "xc_altp2m_change_gfn". The idea is to dynamically remap a >> tra

Re: [Xen-devel] [PATCH v2 23/25] arm/altp2m: Extend libxl to activate altp2m on ARM.

2016-08-02 Thread Sergej Proskurin
Hi Wei, On 08/02/2016 01:59 PM, Wei Liu wrote: > On Mon, Aug 01, 2016 at 07:10:26PM +0200, Sergej Proskurin wrote: >> The current implementation allows to set the parameter HVM_PARAM_ALTP2M. >> This parameter allows further usage of altp2m on ARM. For this, we >> define

Re: [Xen-devel] [PATCH v2 00/25] arm/altp2m: Introducing altp2m to ARM.

2016-08-03 Thread Sergej Proskurin
2/08/16 08:34, Julien Grall wrote: >>>>>> Hi Andrew, >>>>>> >>>>>> On 02/08/2016 00:14, Andrew Cooper wrote: >>>>>>> On 01/08/2016 19:15, Julien Grall wrote: >>>>>>>> On 01/08/16 18:10, Sergej Proskurin

Re: [Xen-devel] [PATCH v2 00/25] arm/altp2m: Introducing altp2m to ARM.

2016-08-03 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 04:08 PM, Julien Grall wrote: > Hello Sergej, > > Please try to reply to all when answering on the ML. Otherwise the > answer may be delayed/lost. > Right, sorry. > On 03/08/16 13:45, Sergej Proskurin wrote: >> The interesting part about #VE is

Re: [Xen-devel] [PATCH v2 01/25] arm/altp2m: Add first altp2m HVMOP stubs.

2016-08-04 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 06:54 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit moves the altp2m-related code from x86 to ARM. Functions >> that are no yet supported notify the caller or print a BUG message >> statin

Re: [Xen-devel] [PATCH v2 03/25] arm/altp2m: Add struct vttbr.

2016-08-04 Thread Sergej Proskurin
Hi Julien, >> Hello Sergej, >> >> Title: s/altp2m/p2m/ I will adapt the titles of all patches, thank you. >> >> On 01/08/16 18:10, Sergej Proskurin wrote: >>> The struct vttbr introduces a simple way to precisely access the >>> individual fields o

Re: [Xen-devel] [PATCH v2 01/25] arm/altp2m: Add first altp2m HVMOP stubs.

2016-08-04 Thread Sergej Proskurin
On 08/04/2016 06:04 PM, Julien Grall wrote: > > > On 04/08/16 17:01, Sergej Proskurin wrote: >> Hi Julien, >> >> >> On 08/03/2016 06:54 PM, Julien Grall wrote: >>> Hello Sergej, >>> >>> On 01/08/16 18:10, Sergej Proskurin wrote: &g

Re: [Xen-devel] [PATCH v2 07/25] arm/altp2m: Add altp2m init/teardown routines.

2016-08-04 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 08:12 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> The p2m initialization now invokes initialization routines responsible >> for the allocation and initialization of altp2m structures. The same >> a

Re: [Xen-devel] [PATCH v2 01/25] arm/altp2m: Add first altp2m HVMOP stubs.

2016-08-04 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 06:51 PM, Julien Grall wrote: > > > On 04/08/16 17:22, Sergej Proskurin wrote: >> >> On 08/04/2016 06:04 PM, Julien Grall wrote: >>> >>> >>> On 04/08/16 17:01, Sergej Proskurin wrote: >>>> Hi Julien, >>&g

Re: [Xen-devel] [PATCH v2 04/25] arm/altp2m: Move hostp2m init/teardown to individual functions.

2016-08-05 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 07:40 PM, Julien Grall wrote: > Hello Sergej, > > Title: s/altp2m/p2m/ and please drop the full stop. Ok. > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit pulls out generic init/teardown functionality out of >> p2m_init and p2m

Re: [Xen-devel] [PATCH v2 07/25] arm/altp2m: Add altp2m init/teardown routines.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/05/2016 11:20 AM, Julien Grall wrote: > On 05/08/16 07:53, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/03/2016 08:12 PM, Julien Grall wrote: >>> On 01/08/16 18:10, Sergej Proskurin wrote: >>>> +int altp2m_init

Re: [Xen-devel] [PATCH v2 04/25] arm/altp2m: Move hostp2m init/teardown to individual functions.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/05/2016 11:16 AM, Julien Grall wrote: > > > On 05/08/16 08:26, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> >> On 08/03/2016 07:40 PM, Julien Grall wrote: > > [...] > >>>> +{ >>>> +

Re: [Xen-devel] [PATCH v2 03/25] arm/altp2m: Add struct vttbr.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 06:15 PM, Julien Grall wrote: > > > On 04/08/16 17:11, Sergej Proskurin wrote: >>>>> diff --git a/xen/include/asm-arm/processor.h >>>>> b/xen/include/asm-arm/processor.h >>>>> index 15bf890..f8ca18c 100644 >&

Re: [Xen-devel] [PATCH v2 05/25] arm/altp2m: Rename and extend p2m_alloc_table.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 07:57 PM, Julien Grall wrote: > Hello Sergej, > > Title: s/altp2m/p2m/ > > On 01/08/16 18:10, Sergej Proskurin wrote: >> The initially named function "p2m_alloc_table" allocated pages solely >> required for the host's p2m. The n

Re: [Xen-devel] [PATCH v2 06/25] arm/altp2m: Cosmetic fixes - function prototypes.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 08:02 PM, Julien Grall wrote: > Hello Sergej, > > Title: s/altp2m/p2m/ and please remove the full stop. > > Also this is not really a cosmetic change. Ok, thank you. > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit changes the

Re: [Xen-devel] [PATCH v2 08/25] arm/altp2m: Add HVMOP_altp2m_set_domain_state.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 08:41 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> The HVMOP_altp2m_set_domain_state allows to activate altp2m on a >> specific domain. This commit adopts the x86 >> HVMOP_altp2m_set_domain_state im

Re: [Xen-devel] [PATCH v2 08/25] arm/altp2m: Add HVMOP_altp2m_set_domain_state.

2016-08-06 Thread Sergej Proskurin
(I did not finish answering all questions in the previous mail) Hi Julien, On 08/03/2016 08:41 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> The HVMOP_altp2m_set_domain_state allows to activate altp2m on a >> specific domain. T

Re: [Xen-devel] [PATCH v2 09/25] arm/altp2m: Add altp2m table flushing routine.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 08:44 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> The current implementation differentiates between flushing and >> destroying altp2m views. This commit adds the function altp2m_flush, >> w

Re: [Xen-devel] [PATCH v2 10/25] arm/altp2m: Add HVMOP_altp2m_create_p2m.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/03/2016 08:48 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> Signed-off-by: Sergej Proskurin >> --- >> Cc: Stefano Stabellini >> Cc: Julien Grall >> --- >> v2: Cosmetic fixes.

Re: [Xen-devel] [PATCH v2 11/25] arm/altp2m: Add HVMOP_altp2m_destroy_p2m.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 01:46 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> Signed-off-by: Sergej Proskurin >> --- >> Cc: Stefano Stabellini >> Cc: Julien Grall >> --- >> v2: Substituted the call t

Re: [Xen-devel] [PATCH v2 12/25] arm/altp2m: Add HVMOP_altp2m_switch_p2m.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 01:51 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> Signed-off-by: Sergej Proskurin >> --- >> Cc: Stefano Stabellini >> Cc: Julien Grall >> --- >> xen/arch/arm/altp2m.c

Re: [Xen-devel] [PATCH v2 13/25] arm/altp2m: Make p2m_restore_state ready for altp2m.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 01:55 PM, Julien Grall wrote: > Hello, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit adapts the function "p2m_restore_state" in a way that the >> currently active altp2m table is considered during state restoration. >&g

Re: [Xen-devel] [PATCH v2 14/25] arm/altp2m: Make get_page_from_gva ready for altp2m.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 01:59 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> The function get_page_from_gva uses ARM's hardware support to translate >> gva's to machine addresses. This function is used, among others, fo

Re: [Xen-devel] [PATCH v2 15/25] arm/altp2m: Extend __p2m_lookup.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 02:04 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit extends the functionality of the function "__p2m_lookup". >> The function "__p2m_lookup" performs the necessary steps g

Re: [Xen-devel] [PATCH v2 17/25] arm/altp2m: Cosmetic fixes - function prototypes.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 02:06 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit changes the prototype of the following functions: >> - apply_p2m_changes >> - apply_one_level >> - p2m_insert_mapping >> -

Re: [Xen-devel] [PATCH v2 18/25] arm/altp2m: Add HVMOP_altp2m_set_mem_access.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 04:19 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> int p2m_alloc_table(struct p2m_domain *p2m) >> { >> unsigned int i; >> @@ -1920,7 +1948,7 @@ long p2m_set_mem_access(struct dom

Re: [Xen-devel] [PATCH v2 19/25] arm/altp2m: Add altp2m_propagate_change.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 04:50 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit introduces the function "altp2m_propagate_change" that is >> responsible to propagate changes applied to the host's p2m to a

Re: [Xen-devel] [PATCH v2 20/25] arm/altp2m: Add altp2m paging mechanism.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 03:50 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> This commit adds the function "altp2m_lazy_copy" implementing the altp2m >> paging mechanism. The function "altp2m_lazy_copy" lazily

Re: [Xen-devel] [PATCH v2 20/25] arm/altp2m: Add altp2m paging mechanism.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 06:59 PM, Julien Grall wrote: > Hi Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c >> index 12be7c9..628abd7 100644 >> --- a/xen/arch/arm/traps.c >> +++ b/xen/arch/arm/t

Re: [Xen-devel] [PATCH v2 21/25] arm/altp2m: Add HVMOP_altp2m_change_gfn.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/04/2016 04:04 PM, Julien Grall wrote: > Hello Sergej, > > On 01/08/16 18:10, Sergej Proskurin wrote: >> 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

Re: [Xen-devel] [PATCH v2 03/25] arm/altp2m: Add struct vttbr.

2016-08-06 Thread Sergej Proskurin
On 08/06/2016 03:20 PM, Julien Grall wrote: > > > On 06/08/2016 09:54, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/04/2016 06:15 PM, Julien Grall wrote: >>> >>> >>> On 04/08/16 17:11, Sergej Proskurin wrote: >&

Re: [Xen-devel] [PATCH v2 04/25] arm/altp2m: Move hostp2m init/teardown to individual functions.

2016-08-06 Thread Sergej Proskurin
On 08/06/2016 03:26 PM, Julien Grall wrote: > On 06/08/2016 09:43, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/05/2016 11:16 AM, Julien Grall wrote: >>> On 05/08/16 08:26, Sergej Proskurin wrote: >>>> On 08/03/2016 07:40 PM, Ju

Re: [Xen-devel] [PATCH v2 11/25] arm/altp2m: Add HVMOP_altp2m_destroy_p2m.

2016-08-06 Thread Sergej Proskurin
On 08/06/2016 03:36 PM, Julien Grall wrote: > > > On 06/08/2016 10:54, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/04/2016 01:46 PM, Julien Grall wrote: >>> Hello Sergej, >>> >>> On 01/08/16 18:10, Ser

Re: [Xen-devel] [PATCH v2 14/25] arm/altp2m: Make get_page_from_gva ready for altp2m.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/06/2016 03:45 PM, Julien Grall wrote: > > > On 06/08/2016 11:38, Sergej Proskurin wrote: >> Hi Julien, > > Hello Serge, > >> On 08/04/2016 01:59 PM, Julien Grall wrote: >>> Hello Sergej, >>> >>> On 01/08/16 18:10, Sergej

Re: [Xen-devel] [PATCH v2 19/25] arm/altp2m: Add altp2m_propagate_change.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/06/2016 03:52 PM, Julien Grall wrote: > > > On 06/08/2016 12:26, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/04/2016 04:50 PM, Julien Grall wrote: >>> On 01/08/16 18:10, Sergej Proskurin wrote: >>>> +

Re: [Xen-devel] [PATCH v2 20/25] arm/altp2m: Add altp2m paging mechanism.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/06/2016 04:14 PM, Julien Grall wrote: > On 06/08/2016 13:51, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/04/2016 03:50 PM, Julien Grall wrote: >>> Hello Sergej, >>> >>> On 01/08/16 18:10, Sergej

Re: [Xen-devel] [PATCH v2 20/25] arm/altp2m: Add altp2m paging mechanism.

2016-08-06 Thread Sergej Proskurin
Hi Julien, I just wanted to indicate that this email did not have any contents from your side. On 08/06/2016 04:21 PM, Julien Grall wrote: > > > On 06/08/2016 13:57, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > > >> On 08/04/2016 06:59 PM,

Re: [Xen-devel] [PATCH v2 21/25] arm/altp2m: Add HVMOP_altp2m_change_gfn.

2016-08-06 Thread Sergej Proskurin
Hi Julien, On 08/06/2016 04:34 PM, Julien Grall wrote: > > > On 06/08/2016 14:45, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >> On 08/04/2016 04:04 PM, Julien Grall wrote: >>> On 01/08/16 18:10, Sergej Proskurin wrote: >>

Re: [Xen-devel] [PATCH v2 07/25] arm/altp2m: Add altp2m init/teardown routines.

2016-08-09 Thread Sergej Proskurin
Hi Julien, >>> @@ -1460,7 +1469,16 @@ static int p2m_init_hostp2m(struct domain *d) >>> >>> int p2m_init(struct domain *d) >>> { >>> -return p2m_init_hostp2m(d); >>> +int rc; >>> + >>> +rc = p2m_init_hostp2m(d); >>> +if ( rc ) >>> +return rc; >>> + >>> +if ( altp2m_e

Re: [Xen-devel] [PATCH v2 20/25] arm/altp2m: Add altp2m paging mechanism.

2016-08-10 Thread Sergej Proskurin
Hi Julien, >>> [...] >>> switch ( fsc ) { +case FSC_FLT_TRANS: +{ +if ( altp2m_active(d) ) +{ +const struct npfec npfec = { +.insn_fetch = 1, +.gla_valid = 1, +

Re: [Xen-devel] [PATCH v2 20/25] arm/altp2m: Add altp2m paging mechanism.

2016-08-11 Thread Sergej Proskurin
Hi Julien, On 08/11/2016 10:47 AM, Julien Grall wrote: > > > On 10/08/2016 11:32, Sergej Proskurin wrote: >> Hi Julien, > > Hello Sergej, > >>>>> [...] >>>>> >>>>>> switch ( fsc ) >>>>>>

Re: [Xen-devel] [RFC 18/22] xen/arm: p2m: Introduce p2m_set_entry and __p2m_set_entry

2016-08-15 Thread Sergej Proskurin
Hi Julien, [...] > +static int p2m_set_entry(struct p2m_domain *p2m, > + gfn_t sgfn, > + unsigned long todo, > + mfn_t smfn, > + p2m_type_t t, > + p2m_access_t a) > +{ > +in

Re: [Xen-devel] [PATCH v2 23/25] arm/altp2m: Extend libxl to activate altp2m on ARM.

2016-08-15 Thread Sergej Proskurin
Hi Wei, On 08/11/2016 06:00 PM, Wei Liu wrote: > Sorry for the late reply. > No worries, it's all good :) Thanks for your reply. [...] ("smbios_firmware", string), ("acpi_firmware",string),

[Xen-devel] [PATCH v3 18/38] arm/p2m: Add HVMOP_altp2m_destroy_p2m

2016-08-16 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Substituted the call to tlb_flush for p2m_flush_table. Added comments. Cosmetic fixes. v3: Changed the locking mechanism to "p2m_write_lock" inside the function "altp2m_destroy_by_i

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

2016-08-16 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Dump p2m information of the hostp2m and all altp2m views. --- xen/arch/arm/p2m.c | 20 1 file changed, 20 insertions(+) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index dea3038

[Xen-devel] [PATCH v3 16/38] arm/p2m: Add HVMOP_altp2m_set_domain_state

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Dynamically allocate memory for altp2m views only when

[Xen-devel] [PATCH v3 19/38] arm/p2m: Add HVMOP_altp2m_switch_p2m

2016-08-16 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Extended the function "altp2m_switch_domain_altp2m_by_id" so that if the guest domain indirectly calles this function, the current vcpu also changes the altp2m view without performing an explic

[Xen-devel] [PATCH v3 34/38] arm/p2m: Add HVMOP_altp2m_change_gfn

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Moved the altp2m

[Xen-devel] [PATCH v3 14/38] arm/p2m: Add altp2m init/teardown routines

2016-08-16 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 --- Cc: Stefano

[Xen-devel] [PATCH v3 38/38] arm/p2m: Add test of xc_altp2m_change_gfn

2016-08-16 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 --- Cc: Razvan Cojocaru Cc: Tamas K Lengyel Cc: Ian Jackson

[Xen-devel] [PATCH v3 09/38] arm/p2m: Add backpointer to the domain in p2m_domain

2016-08-16 Thread Sergej Proskurin
ut losing the accessibility of the "struct domain". The need for this pointer is shown in the following commits. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c| 1 + xen/include/asm-arm/p2m.h | 3 +++ 2 files changed, 4 insertio

[Xen-devel] [PATCH v3 32/38] arm/p2m: Code movement in instr/data abort handlers

2016-08-16 Thread Sergej Proskurin
enting the altp2m paging mechanism. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/traps.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index da56cc

[Xen-devel] [PATCH v3 20/38] arm/p2m: Add p2m_get_active_p2m macro

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c | 3 +++ 1 file

[Xen-devel] [PATCH v3 08/38] arm/p2m: Free p2m entries only in the hostp2m

2016-08-16 Thread Sergej Proskurin
f entries were freed in the host's p2m, but still reside in one or more of the alternate p2m's, the change will be propagated to these functions as will be shown in the following commits. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m

[Xen-devel] [PATCH v3 22/38] arm/p2m: Make get_page_from_gva ready for altp2m

2016-08-16 Thread Sergej Proskurin
s p2m table 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 -

[Xen-devel] [PATCH v3 21/38] arm/p2m: Make p2m_restore_state ready for altp2m

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Moved declaration of "altp2m_switch_domain_altp2m_by_

[Xen-devel] [PATCH v3 36/38] altp2m: Allow specifying external-only use-case

2016-08-16 Thread Sergej Proskurin
-off-by: Sergej Proskurin --- Cc: Ian Jackson Cc: Wei Liu Cc: Jan Beulich Cc: Andrew Cooper Cc: Daniel De Graaf v2: Rename HVMALTP2M_* to XEN_ALTP2M_* Relax xsm check to XSM_DM_PRIV for external-only mode v3: Introduce macro LIBXL_HAVE_ARM_ALTP2M in parallel to the former

[Xen-devel] [PATCH v3 13/38] arm/p2m: Change func prototype and impl of p2m_(alloc|free)_vmid

2016-08-16 Thread Sergej Proskurin
kes only the vmid that is to be freed as argument. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Changed function prototypes and implementation of the functions "p2m_alloc_vmid" and "p2m_free_vmid". Changes in "p2m_alloc_vmid

[Xen-devel] [PATCH v3 11/38] arm/p2m: Cosmetic fix - function prototype of p2m_alloc_table

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Removed altp2m table initialization from &

[Xen-devel] [PATCH v3 07/38] arm/p2m: Introduce p2m_is_(hostp2m|altp2m)

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/inclu

[Xen-devel] [PATCH v3 28/38] arm/p2m: Modify reference count only if hostp2m active

2016-08-16 Thread Sergej Proskurin
This commit makes sure that the page reference count is updated through the function "p2m_put_l3_page" only the entries have been freed from the hosts's p2m. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c | 2 +- 1 file chang

[Xen-devel] [PATCH v3 26/38] arm/p2m: Introduce helpers managing altp2m entries

2016-08-16 Thread Sergej Proskurin
This commit introduces the following functions: * remove_altp2m_entry * modify_altp2m_entry These functions are responsible to manage an altp2m view's entries and their attributes. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Changed the fun

[Xen-devel] [PATCH v3 30/38] arm/p2m: Add altp2m_propagate_change

2016-08-16 Thread Sergej Proskurin
lled/invalid entries. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Cosmetic fixes. Changed the locking mechanism to "p2m_write_lock" inside the function "altp2m_reset". Removed TLB flushing and resetting of the max_mapped_gfn

[Xen-devel] [PATCH v3 12/38] arm/p2m: Rename parameter in p2m_alloc_vmid

2016-08-16 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/

[Xen-devel] [PATCH v3 01/38] arm/p2m: Cosmetic fixes - apply p2m_get_hostp2m

2016-08-16 Thread Sergej Proskurin
This commit substitutes the direct access of the host's p2m (&d->arch.p2m) for the macro "p2m_get_hostp2m". This macro simplifies the differentiation between the host's p2m and introduced alternative p2m's, in the following commits. Signed-off-by: Sergej Proskurin

[Xen-devel] [PATCH v3 10/38] arm/p2m: Move hostp2m init/teardown to individual functions

2016-08-16 Thread Sergej Proskurin
alization/teardown of altp2m views. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Added the function p2m_flush_table to the previous version. v3: Removed struct vttbr. Moved define INVALID_VTTBR to p2m.h. Exported function prototypes of "p2m_flus

[Xen-devel] [PATCH v3 31/38] altp2m: Introduce altp2m_switch_vcpu_altp2m_by_id

2016-08-16 Thread Sergej Proskurin
ed to "altp2m_check" and moved from p2m.c to altp2m.c for the x86 architecuture. This change was perfomed in order to move altp2m related functions to one spot (which is altp2m.c). The reason for modifying the function's name is due the association of the function with the associated .c f

[Xen-devel] [PATCH v3 03/38] arm/p2m: Introduce p2m_(switch|restore)_vttbr_and_(g|s)et_flags

2016-08-16 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 the file ./xen/arch/arm/p2m.c. Signed-off-by: Sergej Proskurin --- Cc

[Xen-devel] [PATCH v3 02/38] arm/p2m: Expose p2m_*lock helpers

2016-08-16 Thread Sergej Proskurin
This commit exposes the "p2m_*lock" helpers, as they will be used within the file ./xen/arch/arm/altp2m.c, as will be shown in the following commits. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c| 12 ++-- xen/i

[Xen-devel] [PATCH v3 33/38] arm/p2m: Add altp2m paging mechanism

2016-08-16 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

[Xen-devel] [PATCH v3 06/38] arm/p2m: Add HVMOP_altp2m_get_domain_state

2016-08-16 Thread Sergej Proskurin
This commit adopts the x86 HVMOP_altp2m_get_domain_state implementation. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Removed the "altp2m_enabled" check in HVMOP_altp2m_get_domain_state case as it has been moved in front of the switch st

[Xen-devel] [PATCH v3 04/38] arm/p2m: Add first altp2m HVMOP stubs

2016-08-16 Thread Sergej Proskurin
domain. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Removed altp2m command-line option: Guard through HVM_PARAM_ALTP2M. Removed not used altp2m helper stubs in altp2m.h. v3: Cosmetic fixes. Added domain lock in "do_altp2m_op" to avoid

[Xen-devel] [PATCH v3 17/38] arm/p2m: Add HVMOP_altp2m_create_p2m

2016-08-16 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Cosmetic fixes. v3: Cosmetic fixes. Renamed the function "altp2m_init_next" to "altp2m_init_next_available". Exchanged the check "altp2m_vttbr[idx] == INVALID_VTTBR

[Xen-devel] [PATCH v3 23/38] arm/p2m: Cosmetic fixes -- __p2m_get_mem_access

2016-08-16 Thread Sergej Proskurin
's p2m and different altp2m views. While doing so, we needed to extend the function's prototype of "p2m_mem_access_check_and_get_page" to hold an argument of type "struct vcpu*". Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini

[Xen-devel] [PATCH v3 15/38] arm/p2m: Add altp2m table flushing routine

2016-08-16 Thread Sergej Proskurin
The current implementation differentiates between flushing and destroying altp2m views. This commit adds the function altp2m_flush, which allows to release all of the alternate p2m views. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v2: Pages in p2m->pa

[Xen-devel] [PATCH v3 05/38] arm/p2m: Add hvm_allow_(set|get)_param

2016-08-16 Thread Sergej Proskurin
domains. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/hvm.c | 65 ++ 1 file changed, 56 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c index 45d51c6..ce6a436

[Xen-devel] [PATCH v3 25/38] arm/p2m: Cosmetic fixes - function prototypes

2016-08-16 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 --- Cc: Stefano Stabellin

[Xen-devel] [PATCH v3 37/38] arm/p2m: Extend xen-access for altp2m on ARM

2016-08-16 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin Acked-by: Razvan Cojocaru --- Cc: Razvan Cojocaru Cc: Tamas K Lengyel Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xen-access/xen-access.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tools/tests/xen-access

[Xen-devel] [PATCH v3 00/38] arm/altp2m: Introducing altp2m to ARM

2016-08-16 Thread Sergej Proskurin
rgej [0] https://github.com/sergej-proskurin/xen (branch arm-altp2m-v3) [1] https://summerofcode.withgoogle.com/projects/#4970052843470848 [2] git://xenbits.xen.org/people/julieng/xen-unstable.git (branch p2m-rfc) [3] https://lists.xenproject.org/archives/html/xen-devel/2016-08/msg01870.html Serg

[Xen-devel] [PATCH v3 24/38] arm/p2m: Make p2m_mem_access_check ready for altp2m

2016-08-16 Thread Sergej Proskurin
currently 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 --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Extended the function "p2m_mem_access_ch

[Xen-devel] [PATCH v3 27/38] arm/p2m: Introduce p2m_lookup_attr

2016-08-16 Thread Sergej Proskurin
The function "p2m_lookup_attr" allows to lookup the mfn, memory type, access rights, and page order corresponding to a domain's gfn. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- v3: Change function prototype of "p2m_lookup_attr" by

[Xen-devel] [PATCH v3 29/38] arm/p2m: Add HVMOP_altp2m_set_mem_access

2016-08-16 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 Pros

Re: [Xen-devel] [PATCH v3 31/38] altp2m: Introduce altp2m_switch_vcpu_altp2m_by_id

2016-08-17 Thread Sergej Proskurin
Hi Jan, On 08/17/2016 12:05 PM, Jan Beulich wrote: On 17.08.16 at 00:17, wrote: >> xen/arch/arm/altp2m.c| 32 >> xen/arch/x86/mm/altp2m.c | 6 ++ >> xen/arch/x86/mm/p2m.c| 6 -- >> xen/common/vm_event.c| 3 ++- >> xen/

[Xen-devel] [PATCH 12/18] arm/altp2m: Cosmetic fixes - function prototypes.

2016-07-04 Thread Sergej Proskurin
t p2m domain. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c | 80 +- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 019f10e..9c

[Xen-devel] [PATCH 10/18] arm/altp2m: Renamed and extended p2m_alloc_table.

2016-07-04 Thread Sergej Proskurin
one in the x86 implementation. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/domain.c | 2 +- xen/arch/arm/p2m.c| 53 +-- xen/include/asm-arm/p2m.h | 2 +- 3 files changed, 44 insertions(+

[Xen-devel] [PATCH 18/18] arm/altp2m: Extend xen-access for altp2m on ARM.

2016-07-04 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Razvan Cojocaru Cc: Tamas K Lengyel Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xen-access/xen-access.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen

[Xen-devel] [PATCH 05/18] arm/altp2m: Add HVMOP_altp2m_set_domain_state.

2016-07-04 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. The function p2m_flush_altp2m is currently implemented in form of a stub. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc

[Xen-devel] [PATCH 10/18] arm/altp2m: Renamed and extended p2m_alloc_table.

2016-07-04 Thread Sergej Proskurin
one in the x86 implementation. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/domain.c | 2 +- xen/arch/arm/p2m.c| 53 +-- xen/include/asm-arm/p2m.h | 2 +- 3 files changed, 44 insertions(+

[Xen-devel] [PATCH 13/18] arm/altp2m: Make get_page_from_gva ready for altp2m.

2016-07-04 Thread Sergej Proskurin
his function. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/guestcopy.c | 6 +++--- xen/arch/arm/p2m.c | 19 +-- xen/arch/arm/traps.c | 2 +- xen/include/asm-arm/mm.h | 2 +- 4 files changed, 18 insertions(+), 11 delet

[Xen-devel] [PATCH 14/18] arm/altp2m: Add HVMOP_altp2m_set_mem_access.

2016-07-04 Thread Sergej Proskurin
The HVMOP 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 hostp2m table and then modified as requested. Signed-off-by: Sergej Proskurin

[Xen-devel] [PATCH 12/18] arm/altp2m: Cosmetic fixes - function prototypes.

2016-07-04 Thread Sergej Proskurin
t p2m domain. Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c | 80 +- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 019f10e..9c

[Xen-devel] [PATCH 17/18] arm/altp2m: Adjust debug information to altp2m.

2016-07-04 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/p2m.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 96892a5..de97a12 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c

[Xen-devel] [PATCH 06/18] arm/altp2m: Add a(p2m) table flushing routines.

2016-07-04 Thread Sergej Proskurin
point in time. In addition, the implementation clears all altp2m entries during the process of flushing. The same applies to hostp2m entries, when it is destroyed. In this way, further domain and p2m allocations will not unintentionally reuse old p2m mappings. Signed-off-by: Sergej Proskurin

[Xen-devel] [PATCH 14/18] arm/altp2m: Add HVMOP_altp2m_set_mem_access.

2016-07-04 Thread Sergej Proskurin
The HVMOP 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 hostp2m table and then modified as requested. Signed-off-by: Sergej Proskurin

[Xen-devel] [PATCH 09/18] arm/altp2m: Add HVMOP_altp2m_switch_p2m.

2016-07-04 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/hvm.c| 2 +- xen/arch/arm/p2m.c| 32 xen/include/asm-arm/p2m.h | 3 +++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm

[Xen-devel] [PATCH 08/18] arm/altp2m: Add HVMOP_altp2m_destroy_p2m.

2016-07-04 Thread Sergej Proskurin
Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/hvm.c| 2 +- xen/arch/arm/p2m.c| 32 xen/include/asm-arm/p2m.h | 3 +++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm

[Xen-devel] [PATCH 01/18] arm/altp2m: Add cmd-line support for altp2m on ARM.

2016-07-04 Thread Sergej Proskurin
ommit, Xen is now able to activate altp2m support on ARM by means of the command-line argument 'altp2m' (bool). Signed-off-by: Sergej Proskurin --- Cc: Stefano Stabellini Cc: Julien Grall --- xen/arch/arm/hvm.c| 22 xen/include/asm-arm

<    1   2   3   4   5   >