target-arm queue:

* target/arm: Use correct GDB XML for M-profile cores
  * target/arm: Code cleanup to use gvec APIs better
  * aspeed: Add support for the sonorapass-bmc board
  * target/arm: Support reporting KVM host memory errors
    to the guest via ACPI notifications
  * target/arm: Finish conversion of Neon 3-reg-same insns to decodetree
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAl69U2MZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3i6YD/9GvoF5+Mr/5gbJ2rwV3Vhy
 Aet+/npEYhRnmRDc8lOldY5utZxNQQGWo0gYF+STRLPpDmTpBkKKUCTzdKfRWjnu
 9SIp+qge7+XLmOjXFtib55jPz2bxQgUSyj2i/mYtkQlgnMY56MU6lF0MNNOOug98
 sCLnRS4KewJKr01wnTKPrBKndkfOOwAOl7fXJ5lHUCGJnwvDy2QqybTXMTZN+U94
 PDkQsj5Bi9fvw1Yh5vEpURrvejPIK18faavn0bNIcxMXrpY9YeXh+e1RGS0c10+w
 YQNQCGOMjXEjHWDT993hlZLMZcW3Y7Vl5qAtSwpu6K280BLFQZ4N3NFpwt42FOX4
 aEfCFqPjAydiEefW36sRjDaRJGf4zqkUkXAzR9B9dwO7kxbhB+u1qjPrGUzLovoh
 Fr6NGHGb1geoygDWTvCaOGSX2g8/cVTCqKeHdH4wvAxn7uPySxxny/5RQY/2HYfe
 L+YPNmLUGsEJnx50LhFlCoaLme5qfaHrCgBg8v9X+LUpXAYXuRRfAtaaiPxkZLN1
 qy7xdQyaUHykI9HKKTHiLfQmQpkAa2vDi62QeHBVhf6GsaoeBL9EPzzE2ibDk+5E
 TkEbZ8go29VzEQasl1Tt3aynVEKxTtYo/ca0NOKDv71hkWuySVTGp/zii3614Pnh
 ej93D6aKUecOxPemRRiNow==
 =qRlZ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200514' into staging

target-arm queue:
 * target/arm: Use correct GDB XML for M-profile cores
 * target/arm: Code cleanup to use gvec APIs better
 * aspeed: Add support for the sonorapass-bmc board
 * target/arm: Support reporting KVM host memory errors
   to the guest via ACPI notifications
 * target/arm: Finish conversion of Neon 3-reg-same insns to decodetree

# gpg: Signature made Thu 14 May 2020 15:19:15 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200514: (45 commits)
  target/arm: Convert NEON VFMA, VFMS 3-reg-same insns to decodetree
  target/arm: Convert Neon fp VMAX/VMIN/VMAXNM/VMINNM/VRECPS/VRSQRTS to decodetree
  target/arm: Move 'env' argument of recps_f32 and rsqrts_f32 helpers to usual place
  target/arm: Convert Neon 3-reg-same compare insns to decodetree
  target/arm: Convert Neon fp VMUL, VMLA, VMLS 3-reg-same insns to decodetree
  target/arm: Convert Neon VPMIN/VPMAX/VPADD float 3-reg-same insns to decodetree
  target/arm: Convert Neon VADD, VSUB, VABD 3-reg-same insns to decodetree
  target/arm: Convert Neon VQDMULH/VQRDMULH 3-reg-same to decodetree
  target/arm: Convert Neon VPADD 3-reg-same insns to decodetree
  target/arm: Convert Neon VPMAX/VPMIN 3-reg-same insns to decodetree
  target/arm: Convert Neon VQSHL, VRSHL, VQRSHL 3-reg-same insns to decodetree
  target/arm: Convert Neon VRHADD, VHSUB 3-reg-same insns to decodetree
  target/arm: Convert Neon VABA/VABD 3-reg-same to decodetree
  target/arm: Convert Neon VHADD 3-reg-same insns
  target/arm: Convert Neon 64-bit element 3-reg-same insns
  target/arm: Convert Neon 3-reg-same SHA to decodetree
  target/arm: Convert Neon 3-reg-same VQRDMLAH/VQRDMLSH to decodetree
  MAINTAINERS: Add ACPI/HEST/GHES entries
  target-arm: kvm64: handle SIGBUS signal from kernel or KVM
  ACPI: Record Generic Error Status Block(GESB) table
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-05-14 16:17:55 +01:00
commit 013a18edbb
41 changed files with 3402 additions and 1445 deletions

View file

@ -220,6 +220,7 @@ struct AcpiBuildTables {
GArray *rsdp;
GArray *tcpalog;
GArray *vmgenid;
GArray *hardware_errors;
BIOSLinker *linker;
} AcpiBuildTables;

View file

@ -61,6 +61,7 @@
#include "hw/sysbus.h"
#include "hw/acpi/memory_hotplug.h"
#include "hw/acpi/ghes.h"
#define ACPI_POWER_BUTTON_DEVICE "PWRB"
@ -96,6 +97,7 @@ typedef struct AcpiGedState {
GEDState ged_state;
uint32_t ged_event_bitmap;
qemu_irq irq;
AcpiGhesState ghes_state;
} AcpiGedState;
void build_ged_aml(Aml *table, const char* name, HotplugHandler *hotplug_dev,

74
include/hw/acpi/ghes.h Normal file
View file

@ -0,0 +1,74 @@
/*
* Support for generating APEI tables and recording CPER for Guests
*
* Copyright (c) 2020 HUAWEI TECHNOLOGIES CO., LTD.
*
* Author: Dongjiu Geng <gengdongjiu@huawei.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ACPI_GHES_H
#define ACPI_GHES_H
#include "hw/acpi/bios-linker-loader.h"
/*
* Values for Hardware Error Notification Type field
*/
enum AcpiGhesNotifyType {
/* Polled */
ACPI_GHES_NOTIFY_POLLED = 0,
/* External Interrupt */
ACPI_GHES_NOTIFY_EXTERNAL = 1,
/* Local Interrupt */
ACPI_GHES_NOTIFY_LOCAL = 2,
/* SCI */
ACPI_GHES_NOTIFY_SCI = 3,
/* NMI */
ACPI_GHES_NOTIFY_NMI = 4,
/* CMCI, ACPI 5.0: 18.3.2.7, Table 18-290 */
ACPI_GHES_NOTIFY_CMCI = 5,
/* MCE, ACPI 5.0: 18.3.2.7, Table 18-290 */
ACPI_GHES_NOTIFY_MCE = 6,
/* GPIO-Signal, ACPI 6.0: 18.3.2.7, Table 18-332 */
ACPI_GHES_NOTIFY_GPIO = 7,
/* ARMv8 SEA, ACPI 6.1: 18.3.2.9, Table 18-345 */
ACPI_GHES_NOTIFY_SEA = 8,
/* ARMv8 SEI, ACPI 6.1: 18.3.2.9, Table 18-345 */
ACPI_GHES_NOTIFY_SEI = 9,
/* External Interrupt - GSIV, ACPI 6.1: 18.3.2.9, Table 18-345 */
ACPI_GHES_NOTIFY_GSIV = 10,
/* Software Delegated Exception, ACPI 6.2: 18.3.2.9, Table 18-383 */
ACPI_GHES_NOTIFY_SDEI = 11,
/* 12 and greater are reserved */
ACPI_GHES_NOTIFY_RESERVED = 12
};
enum {
ACPI_HEST_SRC_ID_SEA = 0,
/* future ids go here */
ACPI_HEST_SRC_ID_RESERVED,
};
typedef struct AcpiGhesState {
uint64_t ghes_addr_le;
} AcpiGhesState;
void build_ghes_error_table(GArray *hardware_errors, BIOSLinker *linker);
void acpi_build_hest(GArray *table_data, BIOSLinker *linker);
void acpi_ghes_add_fw_cfg(AcpiGhesState *vms, FWCfgState *s,
GArray *hardware_errors);
int acpi_ghes_record_errors(uint8_t notify, uint64_t error_physical_addr);
#endif

View file

@ -132,6 +132,7 @@ typedef struct {
bool highmem_ecam;
bool its;
bool virt;
bool ras;
OnOffAuto acpi;
VirtGICType gic_version;
VirtIOMMUType iommu;

View file

@ -34,6 +34,33 @@ typedef struct {
};
} QemuUUID;
/**
* UUID_LE - converts the fields of UUID to little-endian array,
* each of parameters is the filed of UUID.
*
* @time_low: The low field of the timestamp
* @time_mid: The middle field of the timestamp
* @time_hi_and_version: The high field of the timestamp
* multiplexed with the version number
* @clock_seq_hi_and_reserved: The high field of the clock
* sequence multiplexed with the variant
* @clock_seq_low: The low field of the clock sequence
* @node0: The spatially unique node0 identifier
* @node1: The spatially unique node1 identifier
* @node2: The spatially unique node2 identifier
* @node3: The spatially unique node3 identifier
* @node4: The spatially unique node4 identifier
* @node5: The spatially unique node5 identifier
*/
#define UUID_LE(time_low, time_mid, time_hi_and_version, \
clock_seq_hi_and_reserved, clock_seq_low, node0, node1, node2, \
node3, node4, node5) \
{ (time_low) & 0xff, ((time_low) >> 8) & 0xff, ((time_low) >> 16) & 0xff, \
((time_low) >> 24) & 0xff, (time_mid) & 0xff, ((time_mid) >> 8) & 0xff, \
(time_hi_and_version) & 0xff, ((time_hi_and_version) >> 8) & 0xff, \
(clock_seq_hi_and_reserved), (clock_seq_low), (node0), (node1), (node2),\
(node3), (node4), (node5) }
#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-" \
"%02hhx%02hhx-%02hhx%02hhx-" \
"%02hhx%02hhx-" \

View file

@ -379,8 +379,7 @@ bool kvm_vcpu_id_is_valid(int vcpu_id);
/* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */
unsigned long kvm_arch_vcpu_id(CPUState *cpu);
#ifdef TARGET_I386
#define KVM_HAVE_MCE_INJECTION 1
#ifdef KVM_HAVE_MCE_INJECTION
void kvm_arch_on_sigbus_vcpu(CPUState *cpu, int code, void *addr);
#endif

View file

@ -42,4 +42,16 @@ void kvm_memory_listener_register(KVMState *s, KVMMemoryListener *kml,
AddressSpace *as, int as_id);
void kvm_set_max_memslot_size(hwaddr max_slot_size);
/**
* kvm_hwpoison_page_add:
*
* Parameters:
* @ram_addr: the address in the RAM for the poisoned page
*
* Add a poisoned page to the list
*
* Return: None.
*/
void kvm_hwpoison_page_add(ram_addr_t ram_addr);
#endif