} while (0)
enum mcheck_type {
- mcheck_unset = -1,
- mcheck_none,
- mcheck_amd_famXX,
- mcheck_amd_k8,
- mcheck_intel
+ mcheck_unset = -1,
+ mcheck_none,
+ mcheck_amd_famXX,
+ mcheck_amd_k8,
+ mcheck_intel
};
extern uint8_t cmci_apic_vector;
struct mc_info *x86_mcinfo_getptr(void);
void noreturn mc_panic(char *s);
void x86_mc_get_cpu_info(unsigned, uint32_t *, uint16_t *, uint16_t *,
- uint32_t *, uint32_t *, uint32_t *, uint32_t *);
+ uint32_t *, uint32_t *, uint32_t *, uint32_t *);
/* Register a handler for machine check exceptions. */
typedef void (*x86_mce_vector_t)(const struct cpu_user_regs *regs);
static inline uint64_t mca_rdmsr(unsigned int msr)
{
- uint64_t val;
- if (intpose_lookup(smp_processor_id(), msr, &val) == NULL)
- rdmsrl(msr, val);
- return val;
+ uint64_t val;
+ if (intpose_lookup(smp_processor_id(), msr, &val) == NULL)
+ rdmsrl(msr, val);
+ return val;
}
/* Write an MSR, invalidating any interposed value */
* of the MCA data observed in the logout operation. */
enum mca_source {
- MCA_POLLER,
- MCA_CMCI_HANDLER,
- MCA_RESET,
- MCA_MCE_SCAN
+ MCA_POLLER,
+ MCA_CMCI_HANDLER,
+ MCA_RESET,
+ MCA_MCE_SCAN
};
struct mca_summary {
- uint32_t errcnt; /* number of banks with valid errors */
- int ripv; /* meaningful on #MC */
- int eipv; /* meaningful on #MC */
- bool_t uc; /* UC flag */
- bool_t pcc; /* PCC flag */
- bool_t recoverable; /* software error recoverable flag */
+ uint32_t errcnt; /* number of banks with valid errors */
+ int ripv; /* meaningful on #MC */
+ int eipv; /* meaningful on #MC */
+ bool_t uc; /* UC flag */
+ bool_t pcc; /* PCC flag */
+ bool_t recoverable; /* software error recoverable flag */
};
DECLARE_PER_CPU(struct mca_banks *, poll_bankmask);
struct mcinfo_common *_mic; \
\
found = 0; \
- (_ret) = NULL; \
- if (_mi == NULL) break; \
+ (_ret) = NULL; \
+ if (_mi == NULL) break; \
_mic = x86_mcinfo_first(_mi); \
for (i = 0; i < x86_mcinfo_nentries(_mi); i++) { \
if (_mic->type == (_type)) { \
/* IN/OUT variables. */
uint32_t flags; /* IN: XEN_MC_NONURGENT, XEN_MC_URGENT,
XEN_MC_ACK if ack'ing an earlier fetch */
- /* OUT: XEN_MC_OK, XEN_MC_FETCHFAILED,
- XEN_MC_NODATA, XEN_MC_NOMATCH */
+ /* OUT: XEN_MC_OK, XEN_MC_FETCHFAILED,
+ XEN_MC_NODATA, XEN_MC_NOMATCH */
uint32_t _pad0;
uint64_t fetch_id; /* OUT: id for ack, IN: id we are ack'ing */
#define XEN_MC_physcpuinfo 3
struct xen_mc_physcpuinfo {
- /* IN/OUT */
- uint32_t ncpus;
- uint32_t _pad0;
- /* OUT */
- XEN_GUEST_HANDLE(xen_mc_logical_cpu_t) info;
+ /* IN/OUT */
+ uint32_t ncpus;
+ uint32_t _pad0;
+ /* OUT */
+ XEN_GUEST_HANDLE(xen_mc_logical_cpu_t) info;
};
#define XEN_MC_msrinject 4
#define XEN_MC_mceinject 5
struct xen_mc_mceinject {
- unsigned int mceinj_cpunr; /* target processor id */
+ unsigned int mceinj_cpunr; /* target processor id */
};
#if defined(__XEN__) || defined(__XEN_TOOLS__)
#define XEN_MC_INJECT_CPU_BROADCAST 0x8
struct xen_mc_inject_v2 {
- uint32_t flags;
- struct xenctl_bitmap cpumap;
+ uint32_t flags;
+ struct xenctl_bitmap cpumap;
};
#endif