ipmi.c (95a9457fd44ad97c518858a4e1586a5498f9773c) ipmi.c (6af94767daf6364dcc74d70f494fe0dda795824f)
1/*
2 * QEMU IPMI emulation
3 *
4 * Copyright (c) 2015 Corey Minyard, MontaVista Software, LLC
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 14 unchanged lines hidden (view full) ---

23 */
24
25#include "qemu/osdep.h"
26#include "hw/ipmi/ipmi.h"
27#include "hw/qdev-properties.h"
28#include "qom/object_interfaces.h"
29#include "sysemu/runstate.h"
30#include "qapi/error.h"
1/*
2 * QEMU IPMI emulation
3 *
4 * Copyright (c) 2015 Corey Minyard, MontaVista Software, LLC
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 14 unchanged lines hidden (view full) ---

23 */
24
25#include "qemu/osdep.h"
26#include "hw/ipmi/ipmi.h"
27#include "hw/qdev-properties.h"
28#include "qom/object_interfaces.h"
29#include "sysemu/runstate.h"
30#include "qapi/error.h"
31#include "qapi/qapi-commands-misc.h"
32#include "qapi/visitor.h"
33#include "qemu/module.h"
31#include "qemu/module.h"
32#include "hw/nmi.h"
34
35static uint32_t ipmi_current_uuid = 1;
36
37uint32_t ipmi_next_uuid(void)
38{
39 return ipmi_current_uuid++;
40}
41

--- 13 unchanged lines hidden (view full) ---

55 }
56 qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
57 return 0;
58
59 case IPMI_SEND_NMI:
60 if (checkonly) {
61 return 0;
62 }
33
34static uint32_t ipmi_current_uuid = 1;
35
36uint32_t ipmi_next_uuid(void)
37{
38 return ipmi_current_uuid++;
39}
40

--- 13 unchanged lines hidden (view full) ---

54 }
55 qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
56 return 0;
57
58 case IPMI_SEND_NMI:
59 if (checkonly) {
60 return 0;
61 }
63 qmp_inject_nmi(NULL);
62 /* We don't care what CPU we use. */
63 nmi_monitor_handle(0, NULL);
64 return 0;
65
66 case IPMI_SHUTDOWN_VIA_ACPI_OVERTEMP:
67 if (checkonly) {
68 return 0;
69 }
70 qemu_system_powerdown_request();
71 return 0;

--- 68 unchanged lines hidden ---
64 return 0;
65
66 case IPMI_SHUTDOWN_VIA_ACPI_OVERTEMP:
67 if (checkonly) {
68 return 0;
69 }
70 qemu_system_powerdown_request();
71 return 0;

--- 68 unchanged lines hidden ---