Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp556183imm; Tue, 15 May 2018 05:53:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpeHnjNVrCLy29s9E1oVDW3nS4gxUzV2awJMo1qBcVbY6sNjxSyUp79SeYH7S7Epx9g5aAT X-Received: by 2002:a62:7105:: with SMTP id m5-v6mr14684296pfc.167.1526388821756; Tue, 15 May 2018 05:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526388821; cv=none; d=google.com; s=arc-20160816; b=ya6rMs2CqM9MFVxPg1OTR8xWUQy12jNSZnGNlscsGOf+yq1Vwt2WkVt8gsbaoDVkWW Ievq5Nhifjrn99v8mEZBimIB19jQoOUajPzBgYyKaNgNRGF6unTVoNrVEKYrmKt5BnD+ cRRmuqJYFh12HECBwAQ4j8IBfkQK0Di0eahoc4lAOtIJSEIyD+5K9Etir7rs2gQu5RHJ g6mMfn2I9p3leR1GQs+Nb3KEsBRJrolRLrUZzNUf3hXTfbmvApvrQf/RpxEyKxlZS6ii JjHyIPnfy2dx4aYC4iT9+yKvkoY0W2f21A1uXSyPV3wGcOwy6Idh2iMgjAH8hWbPNora i10A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=bkDrTp2nQa80qV++X4cMB/iofY1Es7tcCvh2o8qFils=; b=KJSL1kxhG4X53E/qqQ68tYERu9LwcfB0o6qbr2pqwMXoyhOUmTLXBmy9SEVGR3aEUW cI+tmZDy7uLGByIQ5yejj0YSNxh4518CTDKfVSfrVhOGPncoxVV5u8Ivdjf0IJta9MMp 2OUPtksw+lS2ybU7dMcAgT3kJ6OFGR0wJvwCrB9j0DQM2G4JfX2yQfQ2enWdUWJxVDxc +JHktyp5xyxQnuyZjxJ/K2JQ/tpvL0KmzkAe42bl9V1quB2JWn8caCpORqkgCBY46ygm 8Xslwn+8MBY92Bn8KBdCZE85k94F8bSt+vKwqfs7UWX6vblUAH1kdGYkTOhIJ5h8zan5 YKtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i74-v6si12461158pfd.105.2018.05.15.05.53.10; Tue, 15 May 2018 05:53:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753216AbeEOMw6 (ORCPT + 99 others); Tue, 15 May 2018 08:52:58 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7252 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752135AbeEOMwv (ORCPT ); Tue, 15 May 2018 08:52:51 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E4D4ABD545022; Tue, 15 May 2018 20:52:34 +0800 (CST) Received: from localhost.localdomain (10.143.28.90) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.382.0; Tue, 15 May 2018 20:52:26 +0800 From: Dongjiu Geng To: , , , , , , , , , , , , , , , , CC: , , Subject: [PATCH v12 0/4] set VSESR_EL2 by user space and support NOTIFY_SEI notification Date: Wed, 16 May 2018 04:58:03 +0800 Message-ID: <1526417887-25843-1-git-send-email-gengdongjiu@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.143.28.90] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 1. Detect whether KVM can set set guest SError syndrome 2. Support to Set VSESR_EL2 and inject SError by user space. 3. Support live migration to keep SError pending state and VSESR_EL2 value. 4. ACPI 6.1 adds support for NOTIFY_SEI as a GHES notification mechanism, so support this notification in software, KVM or kernel ARCH code call handle_guest_sei() to let ACP driver to handle this notification. 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. Change variables 'injected' name to 'serror_pending' in the kvm_arm_vcpu_set_events() 4. Change to sizeof(events) from sizeof(struct kvm_vcpu_events) in kvm_arch_vcpu_ioctl() 5. Update the patches commit message and document description Change since V10: Address James's comments, thanks James 1. Merge the helper function with the user. 2. Move the ISS_MASK into pend_guest_serror() to clear top bits 3. 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: KVM: export the capability to set guest SError syndrome arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS ACPI / APEI: Add SEI notification type support for ARMv8 arm64: handle NOTIFY_SEI notification by the APEI driver Documentation/virtual/kvm/api.txt | 42 ++++++++++++++++++++++++++-- arch/arm/include/asm/kvm_host.h | 6 ++++ arch/arm/kvm/guest.c | 12 ++++++++ arch/arm64/include/asm/kvm_emulate.h | 5 ++++ arch/arm64/include/asm/kvm_host.h | 7 +++++ arch/arm64/include/asm/system_misc.h | 1 + arch/arm64/include/uapi/asm/kvm.h | 13 +++++++++ arch/arm64/kernel/traps.c | 4 +++ arch/arm64/kvm/guest.c | 36 ++++++++++++++++++++++++ arch/arm64/kvm/inject_fault.c | 7 ++++- arch/arm64/kvm/reset.c | 4 +++ arch/arm64/mm/fault.c | 10 +++++++ drivers/acpi/apei/Kconfig | 15 ++++++++++ drivers/acpi/apei/ghes.c | 53 ++++++++++++++++++++++++++++++++++++ include/acpi/ghes.h | 1 + include/uapi/linux/kvm.h | 1 + virt/kvm/arm/arm.c | 21 ++++++++++++++ 17 files changed, 234 insertions(+), 4 deletions(-) -- 1.9.1