When user space do memory recovery, it will check whether KVM and
guest support the error recovery, only when both of them support,
user space will do the error recovery. This patch exports this
capability of KVM to user space.
Cc: Peter Maydell
Signed-off-by: Dongjiu Geng
---
v1->v2:
1. ch
When user space do memory recovery, it will check whether KVM and
guest support the error recovery, only when both of them support,
user space will do the error recovery. This patch exports this
capability of KVM to user space.
Cc: Peter Maydell
Signed-off-by: Dongjiu Geng
---
User space needs
When user space do memory recovery, it will check whether KVM and
guest support the error recovery, only when both of them support,
user space will do the error recovery. This patch exports this
capability of KVM to user space.
Cc: Peter Maydell
Signed-off-by: Dongjiu Geng
---
User space needs
user space, otherwise returns false.
Signed-off-by: Dongjiu Geng
Reviewed-by: James Morse
Change from V11:
1. Change the commit message
2. Update the Documentation/virtual/kvm/api.tx
---
Documentation/virtual/kvm/api.txt | 11 +++
arch/arm64/kvm/reset.c| 3 +++
include
Add a helper to handle the NOTIFY_SEI notification, when kernel
gets the NOTIFY_SEI notification, call this helper and let APEI
driver to handle this notification.
Signed-off-by: Dongjiu Geng
---
arch/arm64/include/asm/system_misc.h | 1 +
arch/arm64/kernel/traps.c| 4
arch
, user space can get/set
the SError exception state to do migrate/snapshot/suspend.
Signed-off-by: Dongjiu Geng
Change since V11:
Address James's comments, thanks James
1. Align the struct of kvm_vcpu_events to 64 bytes
2. Avoid exposing the stale ESR value in the kvm_arm_vcpu_get_events()
3. C
Initialise kvm_vcpu_events to 0 so that padding transferred to user-space
doesn't
contain kernel stack.
Dongjiu Geng (4):
arm64: KVM: export the capability to set guest SError syndrome
arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS
ACPI / APEI: Add SEI notification type supp
ACPI 6.x adds support for NOTIFY_SEI as a GHES notification
mechanism, so add new GHES notification handling functions.
Expose API ghes_notify_sei() to arch code, arch code will call
this API when it gets this NOTIFY_SEI.
Signed-off-by: Dongjiu Geng
Note:
Firmware will follow the SError mask
Make kvm_vcpu_events struct align to 4 bytes
4. Add something check in the kvm_arm_vcpu_set_events()
5. Check kvm_arm_vcpu_get/set_events()'s return value.
6. Initialise kvm_vcpu_events to 0 so that padding transferred to user-space
doesn't
contain kernel stack.
Dongjiu Geng (4):
arm64:
Add a helper to handle the NOTIFY_SEI notification, when kernel
gets the NOTIFY_SEI notification, call this helper and let APEI
driver to handle this notification.
Signed-off-by: Dongjiu Geng
---
arch/arm64/include/asm/system_misc.h | 1 +
arch/arm64/kernel/traps.c| 4
arch
This new IOCTL exports user-invisible states related to SError.
Together with appropriate user space changes, it can inject
SError with specified syndrome to guest by setup kvm_vcpu_events
value. Also it can support live migration.
Signed-off-by: Dongjiu Geng
Change since V10:
Address James
ACPI 6.x adds support for NOTIFY_SEI as a GHES notification
mechanism, so add new GHES notification handling functions.
Expose API ghes_notify_sei() to arch code, arch code will call
this API when it gets this NOTIFY_SEI.
Signed-off-by: Dongjiu Geng
---
drivers/acpi/apei/Kconfig | 15
Before user space injects a SError, it needs to know whether it can
specify the guest Exception Syndrome, so KVM should tell user space
whether it has such capability.
Signed-off-by: Dongjiu Geng
---
Documentation/virtual/kvm/api.txt | 11 +++
arch/arm64/kvm/reset.c| 3
Export one API to specify virtual SEI syndrome value
for guest, and add a helper to get the VSESR_EL2 value.
Signed-off-by: Dongjiu Geng
---
arch/arm64/include/asm/kvm_emulate.h | 5 +
arch/arm64/include/asm/kvm_host.h| 2 ++
arch/arm64/kvm/inject_fault.c| 5 +
3 files
Add a helper to handle the NOTIFY_SEI notification, when kernel
gets the NOTIFY_SEI notification, call this helper and let APEI
driver to handle this notification.
Signed-off-by: Dongjiu Geng
---
arch/arm64/include/asm/system_misc.h | 1 +
arch/arm64/kernel/traps.c| 4
arch
Before user space injects a SError, it needs to know whether it can
specify the guest Exception Syndrome, so KVM should tell user space
whether it has such capability.
Signed-off-by: Dongjiu Geng
---
Documentation/virtual/kvm/api.txt | 11 +++
arch/arm64/kvm/reset.c| 3
ACPI 6.x adds support for NOTIFY_SEI as a GHES notification
mechanism, so add new GHES notification handling functions.
Expose API ghes_notify_sei() to arch code, arch code will call
this API when it gets this NOTIFY_SEI.
Signed-off-by: Dongjiu Geng
---
drivers/acpi/apei/Kconfig | 15
notification in software, KVM or kernel ARCH code call handle_guest_sei() to
let ACP driver
to handle this notification.
Dongjiu Geng (5):
arm64: KVM: Prepare set virtual SEI syndrome value
arm64: KVM: export the capability to set guest SError syndrome
arm/arm64: KVM: Introduce set and get per-vcpu
: Dongjiu Geng
---
Documentation/virtual/kvm/api.txt | 26 --
arch/arm/include/asm/kvm_host.h | 6 ++
arch/arm/kvm/guest.c | 12
arch/arm64/include/asm/kvm_host.h | 5 +
arch/arm64/include/uapi/asm/kvm.h | 10 ++
arch/arm64/kvm
ned-off-by: James Morse
Signed-off-by: Dongjiu Geng
Reviewed-by: Catalin Marinas
---
arch/arm64/Kconfig | 16
arch/arm64/include/asm/cpucaps.h | 3 ++-
arch/arm64/include/asm/sysreg.h | 2 ++
arch/arm64/kernel/cpufeature.c | 13 +
4 files changed, 33
st/host world switch, restore this value to VSESR_EL2
only when HCR_EL2.VSE is set. This value no need to be saved
because it is stale vale when guest exit.
Signed-off-by: Dongjiu Geng
[Set an impdef ESR for Virtual-SError]
Signed-off-by: James Morse
---
arch/arm64/include/asm/kvm_emulate.h |
users. External
modules can call this exposed API to parse APEI table and
handle the SEI notification.
Signed-off-by: Dongjiu Geng
---
drivers/acpi/apei/Kconfig | 15 ++
drivers/acpi/apei/ghes.c | 53 +++
include/acpi/ghes.h | 1 +
3
has, will set it. Otherwise, nothing to do.
For this ESR specifying, Only support for AArch64, not support AArch32.
Signed-off-by: Dongjiu Geng
---
change the name to KVM_CAP_ARM_INJECT_SERROR_ESR instead of
X_ARM_RAS_EXTENSION, suggested here
https://patchwork.kernel.org/patch/9925203
raps attempts to access the physical
error registers.
ERRIDR_EL1 advertises the number of error records, we return
zero meaning we can treat all the other registers as RAZ/WI too.
Signed-off-by: Dongjiu Geng
[removed specific emulation, use trap_raz_wi() directly for everything,
rephrased parts of
From: James Morse
When we exit a guest due to an SError the vcpu fault info isn't updated
with the ESR. Today this is only done for traps.
The v8.2 RAS Extensions define ISS values for SError. Update the vcpu's
fault_info with the ESR on SError so that handle_exit() can determine
if this was a R
and has not (yet) been architecturally consumed
by the PE, the exception is precise. In order to make it
simple, we temporarily shut down the VM to isolate the error.
Signed-off-by: Dongjiu Geng
---
change since v8:
1. Check handle_guest_sei()'s return value
2. Temporarily shut down the
to isolate the error for recoverable error (UER)
4. update some patch's commit messages and clean some patches
Dongjiu Geng (5):
acpi: apei: Add SEI notification type support for ARMv8
KVM: arm64: Trap RAS error registers and set HCR_EL2's TERR & TEA
arm64: kvm: Introduce KVM_ARM
detects this feature and let the userspace know about it via a
HWCAP bit and MRS emulation.
Cc: Dave Martin
Cc: Suzuki K Poulose
Signed-off-by: Dongjiu Geng
Reviewed-by: Dave Martin
---
Change since v2:
1. Change the HWCAP_FHM to HWCAP_ASIMDFHM
Change since v1:
1. Address Dave and Suzuki
detects this feature and let the userspace know about it via a
HWCAP bit and MRS emulation.
Cc: Dave Martin
Cc: Suzuki K Poulose
Signed-off-by: Dongjiu Geng
---
Change since v1:
1. Address Dave and Suzuki's comments to update the commit message.
2. Address Dave's comments to update Doc
ARM v8.4 extensions include support for new floating point
multiplication variant instructions to the AArch64 SIMD
instructions set. Let the userspace know about it via a
HWCAP bit and MRS emulation.
Cc: Suzuki K Poulose
Signed-off-by: Dongjiu Geng
---
My platform supports this feature, so I
ARM v8.4 extensions include support for new floating point
multiplication variant instructions to the AArch64 SIMD
instructions set. Let the userspace know about it via a
HWCAP bit and MRS emulation.
Cc: Suzuki K Poulose
Signed-off-by: Dongjiu Geng
---
My platform supports this feature, so I
this was a RAS SError and decode its severity.
Signed-off-by: James Morse
Signed-off-by: Dongjiu Geng
---
arch/arm64/kvm/hyp/switch.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
index 945e79c..c6f1
27;no valid ISS', so set
this ESR to IMPLEMENTATION DEFINED by default if user space does not specify
it.
Dongjiu Geng (5):
acpi: apei: Add SEI notification type support for ARMv8
KVM: arm64: Trap RAS error registers and set HCR_EL2's TERR & TEA
arm64: kvm: Introduce KVM_ARM
users. External
modules can call this exposed API to parse APEI table and
handle the SEI notification.
Signed-off-by: Dongjiu Geng
---
drivers/acpi/apei/Kconfig | 15 ++
drivers/acpi/apei/ghes.c | 53 +++
include/acpi/ghes.h | 1 +
3
raps attempts to access the physical
error registers.
ERRIDR_EL1 advertises the number of error records, we return
zero meaning we can treat all the other registers as RAZ/WI too.
Signed-off-by: Dongjiu Geng
[removed specific emulation, use trap_raz_wi() directly for everything,
rephrased parts of
Signed-off-by: James Morse
Signed-off-by: Dongjiu Geng
Reviewed-by: Catalin Marinas
---
arch/arm64/Kconfig | 16
arch/arm64/include/asm/barrier.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 ++-
arch/arm64/include/asm/sysreg.h | 2 ++
arch/arm64/kernel/cp
the guest/host world switch, restore this value to VSESR_EL2
only when HCR_EL2.VSE is set. This value no need to be saved
because it is stale vale when guest exit.
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
[Set an impdef ESR for Virtual-SError]
Signed-off-by: James Morse
---
ar
has, will set it. Otherwise, nothing to do.
For this ESR specifying, Only support for AArch64, not support AArch32.
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
change the name to KVM_CAP_ARM_INJECT_SERROR_ESR instead of
X_ARM_RAS_EXTENSION, suggested here
https
valid ESR and inject virtual
SError, guest can just kill the current application if the
non-consumed error coming from guest application.
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
---
arch/arm64/include/asm/esr.h | 15
arch/arm64/include/asm/kvm_asm.h | 3
the guest/host world switch, restore this value to VSESR_EL2
only when HCR_EL2.VSE is set. This value no need to be saved
because it is stale vale when guest exit.
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
[Set an impdef ESR for Virtual-SError]
Signed-off-by: James Morse
---
ar
address recorded by APEI table is not
accurate, so can not identify the address to hwpoison memory and
can not notify guest to do the recovery, so at the same time, let
user space specify a valid ESR and inject virtual SError.
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
---
arch/arm64
software on taking a virtual
SError interrupt exception. By default specify this syndrome value
to IMPLEMENTATION DEFINED, because all-zero means 'RAS error: Uncategorized'
instead of 'no valid ISS'.
Dongjiu Geng (4):
arm64: kvm: route synchronous external abort exceptions
s
for a generic API for all KVM architectures that will allow us to
do something like this.
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
---
Documentation/virtual/kvm/api.txt | 11 +++
arch/arm/include/asm/kvm_host.h | 1 +
arch/arm/kvm/guest.c | 9 +
_EL1 and ERRSELR_EL1 are zero.
Then, the others ERX* registers are RAZ/WI.
Signed-off-by: Dongjiu Geng
---
arch/arm64/include/asm/kvm_arm.h | 2 ++
arch/arm64/include/asm/kvm_emulate.h | 7 +++
arch/arm64/include/asm/kvm_host.h| 2 ++
arch/arm64/include/asm/sysreg.h
one cares the
old VSESR_EL2 value
(3) Add a new KVM_ARM_SEI ioctl to set the VSESR_EL2 value and pend
a virtual system error
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
---
Documentation/virtual/kvm/api.txt| 10 ++
arch/arm/include/asm/kvm_host.h | 1 +
arch
Handle userspace's detection for RAS extension, because sometimes
the userspace needs to know the CPU's capacity
Signed-off-by: Dongjiu Geng
---
arch/arm64/kvm/reset.c | 11 +++
include/uapi/linux/kvm.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/arch/arm64/kvm
se it delegates to the guest OS kernel
Signed-off-by: Dongjiu Geng
---
arch/arm64/include/asm/kvm_arm.h | 2 ++
arch/arm64/include/asm/kvm_emulate.h | 7 +++
2 files changed, 9 insertions(+)
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 61d694c..11
one cares the
old VSESR_EL2 value
(3) Add a new KVM_ARM_SEI ioctl to set the VSESR_EL2 value and pend
a virtual system error
Signed-off-by: Dongjiu Geng
Signed-off-by: Quanming Wu
---
Documentation/virtual/kvm/api.txt| 10 ++
arch/arm/include/asm/kvm_host.h | 1 +
arch
48 matches
Mail list logo