summaryrefslogtreecommitdiffstats
path: root/qemu/hw/s390x/sclpcpu.c
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/hw/s390x/sclpcpu.c
parenta14b48d18a9ed03ec191cf16b162206998a895ce (diff)
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/hw/s390x/sclpcpu.c')
-rw-r--r--qemu/hw/s390x/sclpcpu.c101
1 files changed, 0 insertions, 101 deletions
diff --git a/qemu/hw/s390x/sclpcpu.c b/qemu/hw/s390x/sclpcpu.c
deleted file mode 100644
index b1f3ef8c7..000000000
--- a/qemu/hw/s390x/sclpcpu.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * SCLP event type
- * Signal CPU - Trigger SCLP interrupt for system CPU configure or
- * de-configure
- *
- * Copyright IBM, Corp. 2013
- *
- * Authors:
- * Thang Pham <thang.pham@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2 or (at your
- * option) any later version. See the COPYING file in the top-level directory.
- *
- */
-#include "qemu/osdep.h"
-#include "sysemu/sysemu.h"
-#include "hw/s390x/sclp.h"
-#include "hw/s390x/event-facility.h"
-#include "cpu.h"
-#include "sysemu/cpus.h"
-#include "sysemu/kvm.h"
-
-typedef struct ConfigMgtData {
- EventBufferHeader ebh;
- uint8_t reserved;
- uint8_t event_qualifier;
-} QEMU_PACKED ConfigMgtData;
-
-#define EVENT_QUAL_CPU_CHANGE 1
-
-void raise_irq_cpu_hotplug(void)
-{
- Object *obj = object_resolve_path_type("", TYPE_SCLP_CPU_HOTPLUG, NULL);
-
- SCLP_EVENT(obj)->event_pending = true;
-
- /* Trigger SCLP read operation */
- sclp_service_interrupt(0);
-}
-
-static unsigned int send_mask(void)
-{
- return SCLP_EVENT_MASK_CONFIG_MGT_DATA;
-}
-
-static unsigned int receive_mask(void)
-{
- return 0;
-}
-
-static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr,
- int *slen)
-{
- ConfigMgtData *cdata = (ConfigMgtData *) evt_buf_hdr;
- if (*slen < sizeof(ConfigMgtData)) {
- return 0;
- }
-
- /* Event is no longer pending */
- if (!event->event_pending) {
- return 0;
- }
- event->event_pending = false;
-
- /* Event header data */
- cdata->ebh.length = cpu_to_be16(sizeof(ConfigMgtData));
- cdata->ebh.type = SCLP_EVENT_CONFIG_MGT_DATA;
- cdata->ebh.flags |= SCLP_EVENT_BUFFER_ACCEPTED;
-
- /* Trigger a rescan of CPUs by setting event qualifier */
- cdata->event_qualifier = EVENT_QUAL_CPU_CHANGE;
- *slen -= sizeof(ConfigMgtData);
-
- return 1;
-}
-
-static void cpu_class_init(ObjectClass *oc, void *data)
-{
- SCLPEventClass *k = SCLP_EVENT_CLASS(oc);
- DeviceClass *dc = DEVICE_CLASS(oc);
-
- k->get_send_mask = send_mask;
- k->get_receive_mask = receive_mask;
- k->read_event_data = read_event_data;
- set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-}
-
-static const TypeInfo sclp_cpu_info = {
- .name = TYPE_SCLP_CPU_HOTPLUG,
- .parent = TYPE_SCLP_EVENT,
- .instance_size = sizeof(SCLPEvent),
- .class_init = cpu_class_init,
- .class_size = sizeof(SCLPEventClass),
-};
-
-static void sclp_cpu_register_types(void)
-{
- type_register_static(&sclp_cpu_info);
-}
-
-type_init(sclp_cpu_register_types)