ICv2m extension support, the domain0 kernel can do GICv2m
frame setup and initialization.
This patch is based on the GICv2m patch of Suravee Suthikulpanit:
[PATCH 2/2] xen/arm: gicv2: Adding support for GICv2m in Dom0
http://lists.xen.org/archives/html/xen-devel/2015-04/msg02613.html
Signed-off-by
Hi Julien,
On 23 April 2016 at 02:29, Julien Grall wrote:
> Hi Wei,
>
>
> On 21/04/16 09:24, Wei Chen wrote:
>
>> This patch adds v2m extension support in GIC-v2 driver. The GICv2 driver
>> detects the MSI frames from device tree and creates corresponding device
>
ICv2m extension support, the domain0 kernel can do GICv2m
frame setup and initialization.
This patch is based on the GICv2m patch of Suravee Suthikulpanit:
[PATCH 2/2] xen/arm: gicv2: Adding support for GICv2m in Dom0
http://lists.xen.org/archives/html/xen-devel/2015-04/msg02613.html
Signed-off-by
Sorry, I forget to change to the plain text mode.
On 25 April 2016 at 17:45, Stefano Stabellini wrote:
> Hello Wei,
>
> could you please send email replies in plain text (rather than html)?
>
> Thanks,
>
> Stefano
>
> On Mon, 25 Apr 2016, Wei Chen wrote:
>> Hi
Hi Julien
On 23 April 2016 at 02:29, Julien Grall wrote:
> Hi Wei,
>
>
> On 21/04/16 09:24, Wei Chen wrote:
>>
>> This patch adds v2m extension support in GIC-v2 driver. The GICv2 driver
>> detects the MSI frames from device tree and creates corresponding device
Hi Julien,
On 26 April 2016 at 18:49, Julien Grall wrote:
> Hello Wei,
>
> On 25/04/2016 10:39, Wei Chen wrote:
>>
>> This patch adds v2m extension support in GIC-v2 driver. The GICv2 driver
>> detects the MSI frames from device tree and creates corresponding device
nsion support, the dom0 kernel can do GICv2m frame
setup and initialization.
This patch is based on the GICv2m patch of Suravee Suthikulpanit:
[PATCH 2/2] xen/arm: gicv2: Adding support for GICv2m in Dom0
http://lists.xen.org/archives/html/xen-devel/2015-04/msg02613.html
Signed-off-by: Wei Chen
-
Hi Julien,
On 27 April 2016 at 17:40, Julien Grall wrote:
>
>
> On 27/04/2016 07:05, Wei Chen wrote:
>>
>> Hi Julien,
>
>
> Hi Wei,
>
>> On 26 April 2016 at 18:49, Julien Grall wrote:
>>>
>>> On 25/04/2016 10:39, W
code...
(XEN) *** LOADING DOMAIN 0 ***
Tested-by: Wei Chen
Regards.
On 6 May 2016 at 00:34, Julien Grall wrote:
> Hello,
>
> Some of the processor erratum will require to modify code sequence. As those
> modifications may impact the performance, they should only be enabled on
>
Hi Julien,
This code looks good to me, and I have tested that
the deadlock is fixed by this patch.
Reviewed-and-Tested-by: Wei Chen
Original:
(XEN) smmu: /smb/smmu@e080: P2M IPA size not supported (P2M=44 SMMU=40)!
(XEN) I/O virtualisation disabled
(XEN) Request p2m Spinlock...
(XEN
Hi Julien,
This code looks good to me.
Reviewed-by: Wei Chen
On 2016/5/16 22:08, Julien Grall wrote:
Since commit 4b25423a "arch/arm: unmap partially-mapped memory regions",
Xen has been undoing the P2M mappings when an error occurred during
insertion or memory allocation.
Th
security risk?
On 2016/5/17 13:45, Wei Chen wrote:
Hi Julien,
This code looks good to me, and I have tested that
the deadlock is fixed by this patch.
Reviewed-and-Tested-by: Wei Chen
Original:
(XEN) smmu: /smb/smmu@e080: P2M IPA size not supported (P2M=44
SMMU=40)!
(XEN) I/O virtualisation
Hi Julien,
On 17 May 2016 at 00:30, Julien Grall wrote:
> Hi Wei,
>
>
> On 16/05/16 16:47, Wei Liu wrote:
>>
>> On Mon, May 16, 2016 at 05:03:54PM +0200, Edgar E. Iglesias wrote:
>>>
>>> From: "Edgar E. Iglesias"
>>>
>>> I'm sending this as a v2 considering that I previously posted a diff
>>> in
borts. So we
want to change the policy to handle data aborts for ARM32:
1. If this data abort is guest generated SError, we will handle this data
abort follow the SError handle option setting.
2. If this data abort is synchronous data abort or Xen generate SError, we
will PANIC the whole system.
Hi Stefano,
On 2017/5/4 5:56, Stefano Stabellini wrote:
> On Wed, 3 May 2017, Wei Chen wrote:
>> ARM32 doesn't have an exception similar to hyp_sync of ARM64 to catch
>> the synchronous data abort (For example, a NULL pointer has been referenced).
>> Hence the SError a
borts. So we
want to change the policy to handle data aborts for ARM32:
1. If this data abort is guest generated SError, we will handle this data
abort follow the SError handle option setting.
2. If this data abort is synchronous data abort or Xen generate SError, we
will PANIC the whole system.
erver. The platform device
can be passthrough to guest with both Legacy and Generic IOMMU bindings.
I noticed that Sameer has a iommu_fwspec series in review. It would be nice
to look at it and see if we can re-use it in this series.
Wei Chen (7):
xen/arm: SMMU: Implement the add_device callback in SMMU
eep registering legacy master in SMMU probing.
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/arm/smmu.c | 31 +++
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/xen/drivers/passthrough/arm/smmu.c
b/xen/drivers/passthrough/arm/smmu.c
index 441c296.
r all protected
devices, regardless of passthrough or not.
Signed-off-by: Wei Chen
---
xen/arch/arm/domain_build.c | 12
1 file changed, 12 insertions(+)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index c6776d7..6aea427 100644
--- a/xen/arch/arm/domain_bu
It's a error message about XEN_DOMCTL_deassign_device, but the
print message is XEN_DOMCTL_assign_device.
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/device_tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/passthrough/device_tree.c
find their master devices.
It's better to register SMMU master for generic bindings in add_device
callback. This callback will only be called while constructing Dom0.
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/arm/smmu.c | 144 -
1 file changed, 143 i
some preparation for further use. In this case, we can't
call iommu_assign_dt_device.
In previous patch, we have implement the add_device callback for SMMU,
so we can separate this work from assign_device now.
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/device_tree.c | 20 +++
main0.
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/arm/smmu.c | 34 +++---
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/xen/drivers/passthrough/arm/smmu.c
b/xen/drivers/passthrough/arm/smmu.c
index 74c09b0..2efa52d 100644
--- a/xen/dr
we have to detect the binding types while doing SMMU probing.
This detect code is based on Linux ARM SMMUv2 driver:
https://github.com/torvalds/linux/blob/master/drivers/iommu/arm-smmu.c
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/arm/smmu.c | 23 +++
1 file changed
i.c:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/of_pci.c
The commit id is: 987068fcbdb7a085bb11151b91dc6f4c956c4a1b
Signed-off-by: Wei Chen
---
xen/common/device_tree.c | 89 +++
xen/include/xen/device_tree.h | 23
s patch is based on Linux of_iommu.c:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/of_iommu.c
The commit id is:
2a0c57545a291f257cd231b1c4b18285b84608d8
Signed-off-by: Wei Chen
---
xen/drivers/passthrough/arm/smmu.c | 73 +++
The legacy IOMMU bindings will be deprecated in future. Instead, device
tree provide generic IOMMU bindings and PCI IOMMU bindings. Currently,
the PCI support hasn't been enabled on ARM Xen. So in this series, we
just add the support of parsing PCI IOMMU bindings.
Wei Chen (2):
xen: devic
Hi Stefano,
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月4日 5:58
> To: Wei Chen
> Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper
> ; Kaly Xin ; Julien Grall
> ; nd
> Subject: Re: [Xen-devel] [
Hi Stefano,
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月4日 6:03
> To: Wei Chen
> Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper
> ; Kaly Xin ; Julien Grall
> ; nd
> Subject: Re: [Xen-devel] [
Hi Stefano,
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月4日 6:30
> To: Wei Chen
> Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper
> ; Kaly Xin ; Julien Grall
> ; nd
> Subject: Re: [Xen-devel] [
Hi Stefano,
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月4日 7:00
> To: Wei Chen
> Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Steve Capper
> ; Kaly Xin ; Julien Grall
> ; nd
> Subject: Re: [Xen-devel] [
Hi Julien,
> -Original Message-
> From: Julien Grall [mailto:julien.gr...@arm.com]
> Sent: 2017年7月4日 15:27
> To: Wei Chen ; Stefano Stabellini
> Cc: xen-devel@lists.xen.org; Steve Capper ; Kaly Xin
> ; nd
> Subject: Re: [Xen-devel] [PATCH 6/7] xen/arm: SMMU:
Hi Julien,
> -Original Message-
> From: Julien Grall [mailto:julien.gr...@arm.com]
> Sent: 2017年7月4日 23:41
> To: Wei Chen ; xen-devel@lists.xen.org
> Cc: sstabell...@kernel.org; Steve Capper ; Kaly Xin
> ; nd
> Subject: Re: [PATCH 1/7] xen/arm: SMMU: Implement the a
Hi Julien,
> -Original Message-
> From: Julien Grall [mailto:julien.gr...@arm.com]
> Sent: 2017年7月5日 21:08
> To: Wei Chen ; Stefano Stabellini
> Cc: xen-devel@lists.xen.org; Steve Capper ; Kaly Xin
> ; nd ; Sameer Goel
> Subject: Re: [Xen-devel] [PATCH 6/7] x
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月6日 1:58
> To: Wei Chen
> Cc: Stefano Stabellini ; xen-devel@lists.xen.org;
> Steve Capper ; Kaly Xin ; Julien Grall
> ; nd
> Subject: RE: [Xen-devel] [PATCH 1/7] xen/
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月6日 2:02
> To: Wei Chen
> Cc: Stefano Stabellini ; Kaly Xin ;
> Julien Grall ; Steve Capper ; nd
> ; xen-devel@lists.xen.org
> Subject: Re: [Xen-devel] [PATCH 2/7] xe
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月6日 2:08
> To: Wei Chen
> Cc: Stefano Stabellini ; Kaly Xin ;
> Julien Grall ; Steve Capper ; nd
> ; xen-devel@lists.xen.org
> Subject: Re: [Xen-devel] [PATCH 4/7] xen
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月6日 2:15
> To: Wei Chen
> Cc: Julien Grall ; Stefano Stabellini
> ; Kaly Xin ; nd ;
> Steve
> Capper ; xen-devel@lists.xen.org
> Subject: Re: [Xen-devel] [PATCH
Hi Stefano,
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月7日 4:26
> To: Wei Chen
> Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Julien Grall
> ; Steve Capper ; Kaly Xin
> ; nd
> Subject: Re: [PATCH 1/2] xe
Hi Stefano,
> -Original Message-
> From: Stefano Stabellini [mailto:sstabell...@kernel.org]
> Sent: 2017年7月7日 5:05
> To: Wei Chen
> Cc: xen-devel@lists.xen.org; sstabell...@kernel.org; Julien Grall
> ; Steve Capper ; Kaly Xin
> ; nd
> Subject: Re: [PATCH 2
Hi Julien,
On 2017/3/24 3:19, Julien Grall wrote:
> Hi Wei,
>
> NIT: title: please add a space between : and alternative.
>
Ok.
> On 23/03/17 09:43, Wei Chen wrote:
>> While I was using the alternative patching in the SErrors patch series [1].
>> I used a branch
nation. Now I know :)
> Cheers,
>
> On 23/03/17 09:43, Wei Chen wrote:
>> While I was using the alternative patching in the SErrors patch series [1].
>> I used a branch instruction as alternative instruction.
>>
>> ALTE
Hi Stefano,
On 2017/3/24 8:10, Stefano Stabellini wrote:
> On Thu, 23 Mar 2017, Julien Grall wrote:
>> Hi Wei,
>>
>> On 23/03/17 03:13, Wei Chen wrote:
>>> On 2017/3/23 6:22, Stefano Stabellini wrote:
>>>> On Wed, 22 Mar 2017, Julien Grall wrote:
>&g
https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg01939.html
Signed-off-by: Wei Chen
---
Notes:
This bug will affect the staging, staging-4.8 and stable-4.8 source trees.
---
v2->v3
1. Fix typos.
2. Explain this bug only happening when booting Xen in commit message.
---
xen/arch/
Hi Julien,
On 2017/3/24 18:48, Julien Grall wrote:
> On 03/17/2017 06:35 AM, Wei Chen wrote:
>> Hi Julien,
>
> Hi Wei,
>
> Sorry for the late answer, I missed that e-mail.
>
>> On 2017/3/17 6:24, Julien Grall wrote:
>>> On 03/16/2017 09:53 AM, Wei Chen wrot
the page.h of ARM32 doesn't include alternative.h,
and we don't have the reason to include it to ARM32 page.h now. So we
have to include the alternative.h directly in livepatch.c.
Signed-off-by: Wei Chen
Reviewed-by: Konrad Rzeszutek Wilk
---
v1->v2:
1. Remove duplicate header file.
Hi Julien,
On 2017/3/29 16:40, Julien Grall wrote:
> Hi Wei,
>
> On 28/03/2017 08:23, Wei Chen wrote:
>> diff --git a/xen/include/asm-arm/arm32/insn.h
>> b/xen/include/asm-arm/arm32/insn.h
>> new file mode 100644
>> index 000..4cda69e
>> --- /dev/
Hi Julien,
On 2017/3/29 22:07, Julien Grall wrote:
>
>
> On 29/03/17 10:28, Wei Chen wrote:
>> Hi Julien,
>>
>> On 2017/3/29 16:40, Julien Grall wrote:
>>> Hi Wei,
>>>
>>> On 28/03/2017 08:23, Wei Chen wrote:
>>>> diff --git a/
the page.h of ARM32 doesn't include alternative.h,
and we don't have the reason to include it to ARM32 page.h now. So we
have to include the alternative.h directly in livepatch.c.
Signed-off-by: Wei Chen
Reviewed-by: Konrad Rzeszutek Wilk
---
v2->v3:
1. Introduce a macro to cache bl
dp to restore ELR and CPSR from stack at the same time. We have to use
ldr to restore them separately.
Signed-off-by: Wei Chen
---
v1->v2:
1. Use more accurate words in the commit message.
2. Remove pointless comment message in cpu_user_regs.
3. Explain the changes of the registers save/restore
W at every context switch.
Signed-off-by: Wei Chen
---
xen/arch/arm/arm64/domctl.c | 6 ++
xen/arch/arm/domain.c| 5 +
xen/arch/arm/domain_build.c | 7 +++
xen/arch/arm/p2m.c | 5 -
xen/include/asm-arm/domain.h | 1 +
5 files changed, 19 insertions(+), 5 delet
s
write to restore the HCR_EL2 for each vCPU. Of course, the value of each
vCPU's HCR_EL2 should be adjusted to have proper HCR_EL2.RW bit in this
function. In the later patch of this series, we will set the HCR_EL2.RW
for each vCPU while the domain is creating.
Signed-off-by: wei chen
---
v1->
in dom0's context. So checking vwfi in init_trap is pointless.
Signed-off-by: Wei Chen
---
I have tried to remove HCR_EL2 setting from init_traps, but the Xen will
hang at the place of creating domain0. The console hot key can work, so
the Xen is alive, not panic.
---
xen/arch/arm/traps.
overhead of the dsb/isb pairs.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
v1->v2:
1. Correct words and syntax in the commit message and docs.
2. Add Stefano's Reviewed-by tag.
---
docs/misc/xen-command-line.markdown | 43 +
aced in separated patchs.
Wei Chen (19):
xen/arm: Save ESR_EL2 to avoid using mismatched value in syndrome
check
xen/arm: Remove vwfi while setting HCR_EL2 in init_traps
xen/arm: Move parse_vwfi from trap.c to domain.c
xen/arm: Restore HCR_EL2 register
xen/arm: Avoid setting/clearin
cpu_hwcaps.
So, we introduce this initcall to guarantee the cpu_hwcaps can be
updated no matter the serror parameter is placed in the command line
or not.
Signed-off-by: Wei Chen
---
v1->v2:
1. Explain this initcall is to future-proof the code in commit
message.
2. Fix a coding style of
had removed the HCR_EL2 setting
from init_traps. Keep parse_vwfi in trap.c is pointless. And we will set
the HCR_EL2 for each domain individually while it's creating in the later
patch of this series. So we move parse_vwfi to domain.c for preparation.
Signed-off-by: Wei Chen
---
xen/ar
Error, that would be a bug.
In the new helpers, we have used the function "inject_vabt_exception"
which was disabled by "#if 0" before. Now, we can remove the "#if 0"
to make this function to be available.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
x
The guest generated external data/instruction aborts can be treated
as guest SErrors. We already have a handler to handle the SErrors,
so we can reuse this handler to handle guest external aborts.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
xen/arch/arm/traps.c | 14
here. This would be useful when
VM introspection will gain support of SVC32/64 trapping.
This helper will be used by the later patches in this series, we
use #if 0 to disable it in this patch temporarily to remove the
warning message of unused function from compiler.
Signed-off-by: Wei Chen
Acked-b
t in order to avoid receiving nested asynchronous abort, we don't
unmask Abort/SError bit in hyp_error and trap_data_abort.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
xen/arch/arm/arm32/entry.S | 15 ++-
xen/arch/arm/arm64/entry.S | 13 -
2 fi
introduce this helper to synchronize SErrors while
returning to guest and doing context switch.
This function should be used out of trap.c in later patch of this
series. We have to export this helper in header file.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
v1->v2:
1. Update comm
rce files.
Signed-off-by: Wei Chen
---
v1->v2:
1. Added a new flag in cpu_hwcaps to avoid using serror_op to skip
synchronizing SError in context switch.
2. Update commit message to explain why we added this cpu_hwcaps.
---
xen/arch/arm/domain.c| 14 ++
xen/arch/
return to guest.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
xen/arch/arm/traps.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 9b4546e..f3d794e 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -
ARM32 supports the alternative patching feature. We can use an
ALTERNATIVE to avoid checking option at every trap. We added a new
cpufeature named "SKIP_CHECK_PENDING_VSERROR". This feature will be
enabled when the option is not diverse.
Signed-off-by: Wei Chen
---
xen/arch/arm/arm32/en
abort_guest_exit_start and
abort_guest_exit_end. After we moved this macro to common header, we
should export these two symbols to other source files that will use
VABORT_GEN_BY_GUEST macro. So we change these two symbols to global.
Signed-off-by: Wei Chen
---
v1->v2:
1. Explain in commit message why we cha
restore
it to HCR_EL2 when context switch to this guest. This is achieved
by writing saved HCR_EL2 value in guest context back to HCR_EL2
register before return to guest. This had been done by the patch
of "Restore HCR_EL2 register".
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
ARM64 supports the alternative patching feature. We can use an
ALTERNATIVE to avoid checking option at every trap. We added a new
cpufeature named "SKIP_CHECK_PENDING_VSERROR". This feature will be
enabled when the option is not diverse.
Signed-off-by: Wei Chen
Reviewed-by: Stefano
We have introduced two helpers to handle the guest/hyp SErrors:
do_trap_guest_serror and do_trap_guest_hyp_serror. These handlers
can take the role of do_trap_guest_serror and reduce the assembly
code in the same time. So we use these two helpers to replace it
and drop it now.
Signed-off-by: Wei
Hi Julien and Stefano,
On 2017/3/31 6:03, Stefano Stabellini wrote:
> On Thu, 30 Mar 2017, Julien Grall wrote:
>> Hi Wei,
>>
>> On 30/03/17 10:13, Wei Chen wrote:
>>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>>> index de59e5f
Hi Julien,
On 2017/3/30 20:55, Julien Grall wrote:
> Hi Wei,
>
> On 30/03/17 10:02, Wei Chen wrote:
>> +/* Unconditional branch instructions */
>> +/*
>> + * From ARM DDI 0406C.c Section A8.8.25. We can see blx has a H bit.
>> + * In an ARM/Thumb instructions mi
Hi Julien
On 2017/3/30 21:31, Julien Grall wrote:
> Hi Wei,
>
> On 30/03/17 10:13, Wei Chen wrote:
>> Xen will do exception syndrome check while some types of exception
>> take place in EL2. The syndrome check code read the ESR_EL2 register
>> directly, but in some si
On 2017/3/31 1:20, Julien Grall wrote:
> Hi Wei,
>
> On 30/03/17 10:13, Wei Chen wrote:
>> When guest triggers async aborts, in most platform, such aborts
>> will be routed to hypervisor. But we don't want the hypervisor
>> to handle such aborts, so we have to
Hi Julien,
On 2017/3/31 1:39, Julien Grall wrote:
> Hi Wei,
>
> On 30/03/17 10:13, Wei Chen wrote:
>> In order to distinguish guest-generated SErrors from hypervisor-generated
>> SErrors we have to place SError checking code in every EL1 -> EL2 paths.
>> That will ca
On 2017/3/31 5:29, Stefano Stabellini wrote:
> On Thu, 30 Mar 2017, Julien Grall wrote:
>> Hi Wei,
>>
>> On 30/03/17 10:13, Wei Chen wrote:
>>> We have provided an option to administrator to determine how to
>>> handle the SErrors. In order to skip the check
On 2017/3/31 5:36, Stefano Stabellini wrote:
> On Thu, 30 Mar 2017, Wei Chen wrote:
>> We want to move part of SErrors checking code from hyp_error assembly code
>> to a function. This new function will use this macro to distinguish the
>> guest SErrors from hypervisor SError
On 2017/3/31 2:38, Julien Grall wrote:
>
>
> On 30/03/17 19:32, Julien Grall wrote:
>> On 30/03/17 19:28, Julien Grall wrote:
>>> Hi Wei,
>>>
>>> On 30/03/17 10:13, Wei Chen wrote:
>>>> +void synchronize_serror(void)
>>>
>&
On 2017/3/31 6:00, Julien Grall wrote:
>
>
> On 30/03/2017 22:49, Stefano Stabellini wrote:
>> On Thu, 30 Mar 2017, Wei Chen wrote:
>>> +/*
>>> + * If the SErrors option is "FORWARD", we have to prevent forwarding
>>> + * serror to
On 2017/3/31 6:29, Stefano Stabellini wrote:
> On Thu, 30 Mar 2017, Julien Grall wrote:
>> Hi Wei,
>>
>> On 30/03/17 10:13, Wei Chen wrote:
>>> We will set HCR_EL2 for each domain individually at the place where each
>>> domain is created. vwfi will aff
the page.h of ARM32 doesn't include alternative.h,
and we don't have the reason to include it to ARM32 page.h now. So we
have to include the alternative.h directly in livepatch.c.
Signed-off-by: Wei Chen
Reviewed-by: Konrad Rzeszutek Wilk
---
v3->v4:
1. Use open-code to replace the m
On 2017/3/31 16:39, Julien Grall wrote:
> Hi Wei,
>
> On 03/31/2017 03:10 AM, Wei Chen wrote:
>> Hi Julien and Stefano,
>>
>> On 2017/3/31 6:03, Stefano Stabellini wrote:
>>> On Thu, 30 Mar 2017, Julien Grall wrote:
>>>> Hi Wei,
>>>>
&g
Hi Julien,
On 2017/3/31 2:38, Julien Grall wrote:
>
>
> On 30/03/17 19:32, Julien Grall wrote:
>> On 30/03/17 19:28, Julien Grall wrote:
>>> Hi Wei,
>>>
>>> On 30/03/17 10:13, Wei Chen wrote:
>>>> +void synchronize_serror(void)
>>>
&
On 2017/3/31 19:06, Julien Grall wrote:
>
>
> On 31/03/17 11:55, Wei Chen wrote:
>> Hi Julien,
>
> Hi Wei,
>
>> On 2017/3/31 2:38, Julien Grall wrote:
>>>
>>>
>>> On 30/03/17 19:32, Julien Grall wrote:
>>>> On 30/03/17 19:28,
aced in separated patchs.
Wei Chen (19):
xen/arm: Save ESR_EL2 to avoid using mismatched value in syndrome
check
xen/arm: Introduce a helper to get default HCR_EL2 flags
xen/arm: Set and restore HCR_EL2 register for each vCPU separately
xen/arm: Avoid setting/clearing HCR_RW at every con
restore
it to HCR_EL2 when context switch to this guest. This is achieved
by writing saved HCR_EL2 value in guest context back to HCR_EL2
register before return to guest. This had been done by the patch
of "Restore HCR_EL2 register".
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
W at every context switch.
Signed-off-by: Wei Chen
Acked-by: Julien Grall
Reviewed-by: Stefano Stabellini
---
xen/arch/arm/arm64/domctl.c | 6 ++
xen/arch/arm/domain.c| 5 +
xen/arch/arm/domain_build.c | 7 +++
xen/arch/arm/p2m.c | 5 -
xen/include/asm-ar
dp to restore ELR and CPSR from stack at the same time. We have to use
ldr to restore them separately.
Signed-off-by: Wei Chen
---
Note:
This patch is a bug fix, this bug affects the 4.8 and 4.7 source trees
too.
v2->v3:
1. Add note to the commit message.
2. Read ESR_EL2 value from vCPU context in
We want to add HCR_EL2 register to Xen context switch. And each copy
of HCR_EL2 in vcpu structure will be initialized with the same set
of trap flags as the HCR_EL2 register. We introduce a helper here to
represent these flags to be reused easily.
Signed-off-by: Wei Chen
---
xen/arch/arm
s
write to restore the HCR_EL2 for each vCPU. Of course, the value of each
vCPU's HCR_EL2 should be adjusted to have proper HCR_EL2.RW bit in this
function. In the later patch of this series, we will set the HCR_EL2.RW
for each vCPU while the domain is creating.
Signed-off-by: wei chen
---
v2->v
, this may change in the
future. So we introduce this initcall to guarantee the cpu_hwcaps can be
updated no matter the serror parameter is placed in the command line
or not.
Signed-off-by: Wei Chen
Acked-by: Julien Grall
Reviewed-by: Stefano Stabellini
---
v2->v3
1. Rewrite the commit message to
ARM64 supports the alternative patching feature. We can use an
ALTERNATIVE to avoid checking option at every trap. We added a new
cpufeature named "SKIP_CHECK_PENDING_VSERROR". This feature will be
enabled when the option is not diverse.
Signed-off-by: Wei Chen
Reviewed-by: Stefano
We have introduced two helpers to handle the guest/hyp SErrors:
do_trap_guest_serror and do_trap_guest_hyp_serror. These handlers
can take the role of do_trap_guest_serror and reduce the assembly
code in the same time. So we use these two helpers to replace it
and drop it now.
Signed-off-by: Wei
abort_guest_exit_start
and abort_guest_exit_end. After we move this macro to a common header,
we need to make sure that the two symbols are visible to other source
files. Currently, they are declared .global in arm32/entry.S, but not
arm64/entry.S. Fix that.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
this series, we
use #if 0 to disable it in this patch temporarily to remove the
warning message of unused function from compiler.
Signed-off-by: Wei Chen
Acked-by: Stefano Stabellini
Reviewed-by: Stefano Stabellini
---
v2->v3:
1. After updating HCR_EL2.VSE bit of vCPU HCR_EL2, write
Error, that would be a bug.
In the new helpers, we have used the function "inject_vabt_exception"
which was disabled by "#if 0" before. Now, we can remove the "#if 0"
to make this function to be available.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
x
on will avoid all
overhead of the dsb/isb pairs.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
v2->v3:
1. Replace "entries" to "entries and exits" in commit message and doc.
because all options will take effect on entries and exits.
2. Fix a typo in co
t in order to avoid receiving nested asynchronous abort, we don't
unmask Abort/SError bit in hyp_error and trap_data_abort.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
xen/arch/arm/arm32/entry.S | 15 ++-
xen/arch/arm/arm64/entry.S | 13 -
2 fi
have
to disable the Abort/SError before returning to guest as we have done
for IRQ.
Signed-off-by: Wei Chen
---
v2->v3:
1. Use alternative instead of check serror_op to skip sychronizing SErrors
while option is NOT "DIVERSE".
2. Disable Abort/SError before returning to
ARM32 supports the alternative patching feature. We can use an
ALTERNATIVE to avoid checking option at every trap. We added a new
cpufeature named "SKIP_CHECK_PENDING_VSERROR". This feature will be
enabled when the option is not diverse.
Signed-off-by: Wei Chen
Reviewed-by: Julien Grall
The guest generated external data/instruction aborts can be treated
as guest SErrors. We already have a handler to handle the SErrors,
so we can reuse this handler to handle guest external aborts.
Signed-off-by: Wei Chen
Reviewed-by: Stefano Stabellini
---
xen/arch/arm/traps.c | 14
1 - 100 of 210 matches
Mail list logo