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
---
Cc: Stefano Stabellini
Cc: Julien Grall
eviewed-by because of the description
> update.
>
>Changes in v2:
> - Fix description regarding x86 page-table
>
> Changes in v3:
> - Add Stefano's reviewed-by
Reviewed-by: Sergej Proskurin
> ---
> xen/include/asm-arm/lpae.h | 49
&
3:
> - Add Stefano's reviewed-by
Reviewed-by: Sergej Proskurin
> ---
> xen/arch/arm/p2m.c | 45 +++--
> 1 file changed, 23 insertions(+), 22 deletions(-)
>
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index
prosku...@sec.in.tum.de
>
> Changes in v2:
> - Patch added
>
> Changes in v3:
> - Add Stefano's reviewed-by
Reviewed-by: Sergej Proskurin
> ---
> xen/arch/arm/p2m.c | 23 ---
> xen/include/asm-arm/lpae.h | 25 ++
Hi Jan,
On 06/27/2017 02:04 PM, Jan Beulich wrote:
>>>> Sergej Proskurin 06/27/17 1:52 PM >>>
>> The following commits introduce a software guest page table walk
>> software implementation that supports varying guest page size
>> granularities. This commi
c.in.tum.de
>
> Changes in v2:
> - Move comment after the #endif rather than before
> - Add Stefano's reviewed-by
Reviewed-by: Sergej Proskurin
> ---
> xen/include/asm-arm/lpae.h | 169
>
Hi Jan,
On 07/03/2017 10:40 AM, Sergej Proskurin wrote:
> Hi Jan,
>
>
> On 06/27/2017 02:04 PM, Jan Beulich wrote:
>>>>> Sergej Proskurin 06/27/17 1:52 PM >>>
>>> The following commits introduce a software guest page table walk
>>> softwar
Hi Jan,
On 07/03/2017 11:16 AM, Jan Beulich wrote:
On 03.07.17 at 11:03, wrote:
>> To prevent potential type width issues with ARMv7, I would reuse the
>> macro from xen/iommu.h at this point:
>>
>> PAGE_MASK_GRAN(sz) (~(u64)0 << PAGE_SHIFT_##sz)
> Seems reasonable, exce
Hi Jan,
On 07/03/2017 11:13 AM, Jan Beulich wrote:
>>>> On 03.07.17 at 10:40, wrote:
>> On 06/27/2017 02:04 PM, Jan Beulich wrote:
>>>>>> Sergej Proskurin 06/27/17 1:52 PM >>>
>>>> The following commits introduce a software guest p
will be
submitted in the future.
Signed-off-by: Sergej Proskurin
---
Razvan Cojocaru
Tamas K Lengyel
Stefano Stabellini
Julien Grall
---
v1:
This commit has been already acknowledged in the altp2m patch
series, however not yet applied to mainline. I have removed the
Acked-by: Juli
Hi Julien,
On 07/04/2017 06:58 PM, Julien Grall wrote:
> Hi Sergej,
>
> On 06/27/2017 12:52 PM, Sergej Proskurin wrote:
>> The function p2m_mem_access_check_and_get_page in mem_access.c
>> translates a gva to an ipa by means of the hardware functionality of the
>>
Hi Julien,
On 07/04/2017 06:28 PM, Julien Grall wrote:
> Hi Sergej,
>
> On 06/27/2017 12:52 PM, 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
>&
Hi Julien,
On 07/04/2017 06:15 PM, Julien Grall wrote:
> Hi Sergej,
>
[...]
>> +
>> +#define GUEST_TABLE_OFFSET(offs, gran) ((paddr_t)(offs) &
>> lpae_entry_mask(gran))
>> +#define
>> GUEST_TABLE_OFFSET_HELPERS(gran)
>>
>> \
>> +static in
Hi Julien,
On 07/04/2017 10:46 PM, Sergej Proskurin wrote:
> Hi Julien,
>
> On 07/04/2017 06:28 PM, Julien Grall wrote:
>> Hi Sergej,
>>
>> On 06/27/2017 12:52 PM, Sergej Proskurin wrote:
>>> The current implementation of GENMASK is capable of creating bitm
Hi Julien,
On 07/05/2017 01:41 PM, Julien Grall wrote:
>
>
> On 04/07/17 22:33, Sergej Proskurin wrote:
>> Hi Julien,
>
> Hi Sergej,
>
>> On 07/04/2017 06:15 PM, Julien Grall wrote:
>>> Hi Sergej,
>>>
>>
>> [...]
>>
>>&g
Hi Julien,
>
>>
>>> In this case, you need a bit more rationale to explain why setting to
>>> GV2M_READ by default is fine... If it is just a random value, then
>>> say it.
>>>
>>
>> I will add a comment in the change log stating that we set perms to
>> GV2M_READ (that equals to 0) by default to
Hi Julien,
On 07/04/2017 06:23 PM, Julien Grall wrote:
> Hi Sergej,
>
> On 06/27/2017 12:52 PM, Sergej Proskurin wrote:
>> 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
Hi Julien,
[...]
>> +/* Access the guest's memory to read only one PTE. */
>> +ret = vgic_access_guest_memory(d, paddr, &pte,
>> sizeof(lpae_t), false);
>
> It really doesn't make sense to call a function vgic_* in guest page
> table walk code. I wasn't expected that I needed to
Hi Julien,
On 07/04/2017 07:06 PM, Julien Grall wrote:
> Hi Sergej,
>
>
>> +/*
>> + * According to to ARM DDI 0487B.a J1-5927, we return an error
>> if the found
>> + * PTE is invalid or holds a reserved entry (PTE<1:0> == x0)) or
>> if the PTE
>> + * maps a memory block at level
have been adapted accordingly.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v6: We added this patch to our patch series.
---
xen/arch/arm/guestcopy.c | 8
xen/arch/arm/vgic-v3-its.c | 36 ++--
xen/in
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
Reviewed-by: Julien Grall
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v6: Change the name of the
-step 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
Acked-by: Tamas K Lengyel
---
Cc: Razvan Cojocaru
Cc: Tama
implementation has been lifted from the linux kernel source
code.
Signed-off-by: Sergej Proskurin
---
Cc: Andrew Cooper
Cc: George Dunlap
Cc: Ian Jackson
Cc: Jan Beulich
Cc: Julien Grall
Cc: Konrad Rzeszutek Wilk
Cc: Stefano Stabellini
Cc: Tim Deegan
Cc: Wei Liu
---
v6: As similar patches have been
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
Acked-by: Julien Grall
---
Cc: Stefano Stabellini
usage have been made and stated in
the individual commits.
The following patch series can be found on Github[0].
Cheers,
~Sergej
[0] https://github.com/sergej-proskurin/xen (branch arm-gpt-walk-v6)
Sergej Proskurin (14):
arm/mem_access: Add and cleanup (TCR_|TTBCR_)* defines
arm/mem_access:
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
Acked-by
commits.
Signed-off-by: Sergej Proskurin
Reviewed-by: Julien Grall
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v4: We reused the previous commit with the msg "arm/mem_access: Add
defines holding the width of 32/64bit regs" from v3, as we can reuse
the already exist
M DDI 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
-
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
---
Cc: Stefano Stabellini
Cc: J
xen/page-defs.h as
to allow the following commits to use the consolidated defines.
Signed-off-by: Sergej Proskurin
---
Cc: Jan Beulich
---
v6: Move in addition to PAGE_SHIFT_* also
PAGE_(SIZE|MASK|ALIGN)_(4K|64K) macros and introduce the
corresponding macros for 16K. Also, move the macros
The ARMv8 architecture 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
---
Cc: Stefano Stabellini
Cc: Julien Grall
TTBR0_EL1, TTBR1_EL1, and
SCTLR_EL1.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v2: Rename p2m_gva_to_ipa to p2m_walk_gpt and move it to p2m.c.
Move the functionality responsible for walking long-descriptor based
translation tables out of the function p2
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
Acked-by: Julien Grall
---
Cc: Stefano Stabellini
Cc: J
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
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v6
Hi Jan,
On 07/06/2017 02:18 PM, Jan Beulich wrote:
On 06.07.17 at 13:50, wrote:
>> --- a/xen/include/asm-arm/config.h
>> +++ b/xen/include/asm-arm/config.h
>> @@ -19,6 +19,8 @@
>> #define BITS_PER_LONG (BYTES_PER_LONG << 3)
>> #define POINTER_ALIGN BYTES_PER_LONG
>>
>> +#define BITS_PER
Hi Jan,
On 07/06/2017 02:10 PM, Jan Beulich wrote:
On 06.07.17 at 13:50, wrote:
>> --- /dev/null
>> +++ b/xen/include/xen/page-defs.h
>> @@ -0,0 +1,24 @@
>> +#ifndef __XEN_PAGE_DEFS_H__
>> +#define __XEN_PAGE_DEFS_H__
>> +
>> +/* Helpers for different page granularities. */
>> +#define PAGE
Hi Jan,
On 07/06/2017 05:24 PM, Jan Beulich wrote:
On 06.07.17 at 16:53, wrote:
>> On 07/06/2017 02:10 PM, Jan Beulich wrote:
>> On 06.07.17 at 13:50, wrote:
--- /dev/null
+++ b/xen/include/xen/page-defs.h
@@ -0,0 +1,24 @@
+#ifndef __XEN_PAGE_DEFS_H__
+#define
Hi Jan,
On 07/06/2017 05:22 PM, Jan Beulich wrote:
On 06.07.17 at 16:38, wrote:
>> On 07/06/2017 02:18 PM, Jan Beulich wrote:
>> On 06.07.17 at 13:50, wrote:
@@ -128,7 +131,7 @@ static inline int generic_fls64(__u64 x)
static __inline__ int get_bitmask_order(unsigned int cou
Hi Jan,
On 07/06/2017 06:20 PM, Jan Beulich wrote:
On 06.07.17 at 17:34, wrote:
>> On 07/06/2017 05:24 PM, Jan Beulich wrote:
>> On 06.07.17 at 16:53, wrote:
On 07/06/2017 02:10 PM, Jan Beulich wrote:
On 06.07.17 at 13:50, wrote:
>> --- /dev/null
>> +++ b/xen/incl
Hi all,
My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
(LeMaker HiKey, Linux kernel v4.9.0) development board. On both boards,
I have Xen version 4.10-unstable running with the associated tools to
manage a domu.
Currently, I am trying to get xl mem-{set|max} to work on b
Hi Julien,
On 07/17/2017 03:53 PM, Julien Grall wrote:
> (+Wei and Ian)
>
> Hi Sergej
>
> On 17/07/17 13:04, Sergej Proskurin wrote:
>> Hi all,
>>
>> My setup comprises an ARMv7 (Arndale, Linux kernel v4.11.6) and an ARMv8
>> (LeMaker HiKey, Linux kernel v4
Hi all,
> === ARM ===
>
> * Altp2m for ARM
> - Sergej Proskurin
>
We have submitted a patch-series version 3 and still waiting for
remaining reviews.
Cheers,
~Sergej
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://li
Hi Julien,
On 09/01/2016 05:51 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> This commit introduces macros for switching and restoring the vttbr
>> considering the currently set irq flags. We define these macros, as the
>>
Hi Julien,
On 09/01/2016 07:06 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> This commit adopts the x86 HVMOP_altp2m_get_domain_state implementation.
>>
>> Signed-off-by: Sergej Proskurin
>> ---
>> Cc:
Hi Julien,
On 09/01/2016 07:36 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> ---
>> xen/arch/arm/p2m.c| 71
>> +--
>> xen/include/asm-arm/p2m.h | 11
>>
Hi Julien,
On 09/01/2016 06:09 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> This commit moves the altp2m-related code from x86 to ARM. Functions
>
> s/moves/copies/
>
> However, this is not really true because the code
Hi Julien,
On 09/01/2016 07:08 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> Freeing p2m entries of arbitrary p2m's (in particular in alternate
>> p2m's) will lead to unpredicted behavior as the entries might still be
>
Hi Julien,
On 09/01/2016 05:48 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> 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
Hi Julien,
On 09/02/2016 11:57 AM, Julien Grall wrote:
>
>
> On 02/09/16 09:40, Sergej Proskurin wrote:
>> Hi Julien,
>
> Hello Sergej,
>
>> On 09/01/2016 05:51 PM, Julien Grall wrote:
>>> Hello Sergej,
>>>
>>> On 16/08/16 23:16, Serge
Hi Julien,
On 09/02/2016 12:12 PM, Julien Grall wrote:
>
>
> On 02/09/16 10:26, Sergej Proskurin wrote:
>> Hi Julien,
>
> Hello Sergej,
>
>> On 09/01/2016 06:09 PM, Julien Grall wrote:
>>> Hello Sergej,
>>>
>>> On 16/08/16 23:16,
Hi Julien,
On 09/02/2016 12:15 PM, Julien Grall wrote:
> On 02/09/16 11:12, Sergej Proskurin wrote:
>> Hi Julien,
>
> Hello Sergej,
>
>> On 09/01/2016 05:48 PM, Julien Grall wrote:
>>> Hello Sergej,
>>>
>>> On 16/08/16 23:16, Sergej Prosk
Hi Julien,
On 09/02/2016 12:51 PM, Julien Grall wrote:
>
>
> On 02/09/16 10:09, Sergej Proskurin wrote:
>> Hi Julien,
>>
>> On 09/01/2016 07:36 PM, Julien Grall wrote:
>>> Hello Sergej,
>>>
>>> On 16/08/16 23:16, Sergej Proskuri
Hi Julien,
On 09/09/2016 07:02 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> The current implementation differentiates between flushing and
>> destroying altp2m views. This commit adds the function altp2m_flush,
>> which a
Hi Julien,
On 09/09/2016 07:14 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> +static int altp2m_init_helper(struct domain *d, unsigned int idx)
>> +{
>> +int rc;
>> +struct p2m_domain *p2m = d->arch.altp
Hi Julien,
On 09/12/2016 10:41 AM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/2016 23:16, Sergej Proskurin wrote:
>> Signed-off-by: Sergej Proskurin
>> ---
>> Cc: Stefano Stabellini
>> Cc: Julien Grall
>> ---
>> v2: Substituted the call t
Hi Julien,
On 09/12/2016 10:47 AM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/2016 23:16, Sergej Proskurin wrote:
>> Signed-off-by: Sergej Proskurin
>> ---
>> Cc: Stefano Stabellini
>> Cc: Julien Grall
>> ---
>> v3: Extended the function &
Hi Julien,
On 09/12/2016 10:53 AM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/2016 23:16, Sergej Proskurin wrote:
>> This commit extends the function prototypes of the functions:
>> * __p2m_get_mem_access
>> * p2m_mem_access_check_and_get_page
>>
>&
Hi Julien,
On 09/13/2016 03:30 PM, Julien Grall wrote:
>
>
> On 13/09/16 14:27, Sergej Proskurin wrote:
>> Hi Julien,
>
> Hello Sergej,
>
>>
>> On 09/12/2016 10:53 AM, Julien Grall wrote:
>>> Hello Sergej,
>>>
>>> On 16/08/2016 23:16
Hi Julien,
On 09/12/2016 11:02 AM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/2016 23:17, Sergej Proskurin wrote:
>> This commit extends the function "p2m_mem_access_check" and
>> "p2m_mem_access_check_and_get_page" to consider altp2m. The funct
Hi Julien,
On 09/12/2016 11:17 AM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/2016 23:17, Sergej Proskurin wrote:
>> This commit makes sure that the page reference count is updated through
>> the function "p2m_put_l3_page" only the entries have bee
Hi Julien,
On 09/12/2016 04:18 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:17, Sergej Proskurin wrote:
>> This commit adds the function "altp2m_lazy_copy" implementing the altp2m
>> paging mechanism. The function "altp2m_lazy_copy" lazily
Hi Julien,
On 09/12/2016 04:29 PM, Julien Grall wrote:
> Hello Sergej,
>
> On 16/08/16 23:17, Sergej Proskurin wrote:
>> Signed-off-by: Sergej Proskurin
>> ---
>> Cc: Stefano Stabellini
>> Cc: Julien Grall
>> ---
>> v2: Dump p2m information of the
Hi Wei,
On 08/24/2016 02:27 PM, Wei Liu wrote:
> On Wed, Aug 17, 2016 at 12:17:14AM +0200, 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
>&
Hi Julien,
On 09/13/2016 05:08 PM, Julien Grall wrote:
>
>
> On 13/09/16 16:06, Sergej Proskurin wrote:
>>>> +}
>>>> +
>>>> +out:
>>>> +p2m_read_unlock(hp2m);
>>>> +
>>>> +return
Hi Julien,
On 09/09/2016 06:56 PM, Julien Grall wrote:
> Hello Sergej
>
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
>> index 23aaf52..4a7f660 100644
>> --- a/xen/arch/arm/Makefile
>> +++ b/xen/
Hi Julien,
>>> struct arch_vcpu
>>> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
>>> index 1a004ed..de0c90a 100644
>>> --- a/xen/include/asm-arm/p2m.h
>>> +++ b/xen/include/asm-arm/p2m.h
>>> @@ -9,6 +9,8 @@
>>> #include
>>> #include
>>>
>>> +#define MAX_ALTP2M 10
Hi Julien
[...]
>>> static void do_trap_instr_abort_guest(struct cpu_user_regs *regs,
>>>const union hsr hsr)
>>> {
>>> @@ -2445,6 +2465,14 @@ static void do_trap_instr_abort_guest(struct
>>> cpu_user_regs *regs,
>>> break;
>>> case FSC_FLT
Hi Julien,
On 09/12/2016 02:08 PM, Julien Grall wrote:
> Hi Sergej,
>
> On 16/08/16 23:17, Sergej Proskurin wrote:
>> 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
Hi Julien,
On 09/14/2016 12:57 PM, Julien Grall wrote:
>
>
> On 13/09/16 14:00, Sergej Proskurin wrote:
>> Hi Julien,
>
> Hello Sergej,
>
>>
>> On 09/12/2016 10:47 AM, Julien Grall wrote:
>>> Hello Sergej,
>>>
>>> On 16/08/2016 23:1
wrote:
>
> * Altp2m for ARM
> - Sergej Proskurin
>
>
> This was a GSoC project last summer that unfortunately didn't make the
> merge window. I'll probably pick it up sometime in the future and get it
> rebased but it is unli
Hi Julien,
>
> This patch moved p2m_alloc_table call into p2m_init (i.e your
> p2m_init_one). You complained that the function was not exported
> anymore, but you did not look how it was called in this patch.
>
Ok. At this point our patches indeed derailed too much from each other.
We should co
Hi Wei,
On 07/07/2016 06:27 PM, Wei Liu wrote:
> On Mon, Jul 04, 2016 at 01:45:45PM +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 an ad
Hi Wei,
On 07/25/2016 10:32 AM, Wei Liu wrote:
> On Sun, Jul 24, 2016 at 06:06:00PM +0200, Sergej Proskurin wrote:
>> Hi Wei,
>>
>> On 07/07/2016 06:27 PM, Wei Liu wrote:
>>> On Mon, Jul 04, 2016 at 01:45:45PM +0200, Sergej Proskurin wrote:
>>>> Th
On 07/25/2016 12:08 PM, Wei Liu wrote:
> On Mon, Jul 25, 2016 at 10:49:41AM +0100, Julien Grall wrote:
>> Hello,
>>
>> On 25/07/16 10:04, Sergej Proskurin wrote:
>>> On 07/25/2016 10:32 AM, Wei Liu wrote:
>>>> On Sun, Jul 24, 2016 a
Hi Julien,
On 07/27/2016 07:09 PM, Julien Grall wrote:
> Translating a VA to a IPA is expensive. Currently, Xen is assuming that
> HPFAR_EL2 is only valid when the stage-2 data/instruction abort happened
> during a translation table walk of a first stage translation (i.e S1PTW
> is set).
>
> Howe
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v2: Cosmetic fixes.
---
xen/arch/arm/altp2m.c| 23 +++
xen/arch/arm/hvm.c | 3 ++-
xen/include/asm-arm/altp2m.h | 4
3 files changed, 29 insertions(+), 1 deletion
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. Note that the function
altp2m_flush is currently implemented in form of a stub.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
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
---
xen/arch/arm/alt
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
This commit adopts the x86 HVMOP_altp2m_get_domain_state implementation.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/hvm.c | 9 -
xen/include/asm-arm/altp2m.h | 2 ++
2 files changed, 10 insertions(+), 1 deletion(-)
diff
custom XSM policy is necessary on both x86 and ARM.
The current code-base is based on Julien Grall's branch abort-handlers-v2[2].
[0] https://github.com/sergej-proskurin/xen (branch arm-altp2m-v2)
[1] https://summerofcode.withgoogle.com/projects/#4970052843470848
[2] git://xenbits.xen.org/people
This commit pulls out generic init/teardown functionality out of
p2m_init and p2m_teardown into p2m_init_one, p2m_free_one, and
p2m_flush_table functions. This allows our future implementation to
reuse existing code for the initialization/teardown of altp2m views.
Signed-off-by: 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
---
xen/arch/arm/p2m.c | 4 +++-
xen/include/asm-arm/al
ot; switch in the domain's configuration file (i.e.
set altp2m=1).
Note, that the old parameter "altp2mhvm" is still valid for x86. Since
this commit defines this old parameter as deprecated, libxl will
generate a warning during processing.
Signed-off-by: Sergej Proskurin
---
Cc:
nd
altp2m tables are allocated similarly. Since this function will be used
by the altp2m initialization routines, it is not made static. In
addition, this commit provides the overlay function "p2m_table_init"
that is used for the host's p2m allocation/initialization.
Signed-off-by: Sergej Pr
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.
---
xen/arch/arm/hvm.c | 79
-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
v2: Pages in p2m->pages are not cleared in p2m_flush_table anymore.
VMID is freed in p2m_free_one.
Cosmetic fixes.
---
xen/arch/arm/altp2m.c| 38 ++
xen/include/asm-
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/altp2m.c| 32
xen/arch/arm/hvm.c | 2 +-
xen/include/asm-arm/altp2m.h | 4
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/xen
lled/invalid entries.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/altp2m.c| 75
xen/arch/arm/p2m.c | 14 +
xen/include/asm-arm/altp2m.h | 9 ++
xen/include/asm-arm/p2m.h
so, we needed to
extend the function's prototypes of the following functions:
* __p2m_get_mem_access
* p2m_mem_access_and_get_page
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/p2m.c | 59 ---
This commit extends the function "p2m_mem_access_check" to consider
altp2m. Also, the new implementation fills the request buffer to hold
altp2m-related information.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/p2m.c | 17 ++
views. Therefore, exiting function 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: S
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
trapping gfn to another mfn, which holds the same content as the
original mfn.
Signed-off-by: Sergej Proskurin
---
Cc: Razvan Cojocaru
Cc: Tamas
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
-
The struct vttbr introduces a simple way to precisely access the
individual fields of the vttbr.
---
xen/arch/arm/p2m.c | 8
xen/arch/arm/traps.c| 2 +-
xen/include/asm-arm/p2m.h | 2 +-
xen/include/asm-arm/processor.h | 16
4 files chang
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
This commit changes the prototype of the following functions:
- p2m_alloc_vmid
- p2m_free_vmid
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/p2m.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/xen/arch/arm/p2m.c
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.
---
xen/arch/arm/altp2m.c| 50
xen/arch/arm/hvm.c
p2m
violation generates a vm_event.
Signed-off-by: Sergej Proskurin
---
Cc: Stefano Stabellini
Cc: Julien Grall
---
xen/arch/arm/altp2m.c| 86 ++
xen/arch/arm/p2m.c | 6 +++
xen/arch/arm/traps.c | 124 +++
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 2f4751b
201 - 300 of 471 matches
Mail list logo