s390x/virtio-ccw: migration and virtio for 2.4
1. Migration fixups 2. virtio 9pfs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJVdp0FAAoJEBF7vIC1phx8oZcP/RVDTZ8OOz+OkSqDQITTezmM yziWEjoWqFsGWBuwZp8eztQKdF/Jpx+YgE3XnFFFFFiH+HvsBhG8dJIHjKEPqP5W vdd2ZgO0VeXH8v5PW8TbZG6jUBjoNWjNGeFwxIunqbyViUXI98rwEIHj0ntXkPRR KhPuiPTpE4/cZOdGmC3qLC3m1nFVTTfnaXiVJGedcATkjJeDs5VbgstZd6YgXRkG HfUDJzkvD8FpdYW9/XBChfKPPWYvFa1wabGdrC/FJYmrcPuJUDWHpERsyAM8vF7F daAuYG2iF6EGv7H+XKJb4ZLnSkfHA3OCeGeMYApo/DIyWb3w6jwU0xjv2PVatSPa KMWOFq8um5pM9fV1+TQIbh2sFSq6aHcpG6r/vdt6cpbO2c9O3Xt/W8DgTNFMyBaC NUTs+8mKp165EzwbLZvAztcBE+2frHlXas+jFwLJm2S70pZTAw3uv4MbyLAePzd1 2cn2zmDGxpmgwCrjSZA8mNq/DPVXtc1/ACFv6ymYItz5Cnrls+SRdOmbwwZZRyXo SNmUyQxQCm+C8J52pVMC7hGZYiegSJjZRJYsR9zpUKzB/Y8ghoFTDPSTw8llWtLD wxiAOxPTo8gql1IpCdpPSLQqyxOvgKIhxU5yRs1H2b3xov65amc3CyYAS+DdJQ2g XHTKOR31driw82O6glu9 =s6YP -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20150609' into staging s390x/virtio-ccw: migration and virtio for 2.4 1. Migration fixups 2. virtio 9pfs # gpg: Signature made Tue Jun 9 09:00:05 2015 BST using RSA key ID B5A61C7C # gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>" * remotes/borntraeger/tags/s390x-20150609: s390x/migration: add comment about floating point migration s390x/kvm: always ignore empty vcpu interrupt state virtio-ccw/migration: Migrate config vector for virtio devices virtio-ccw: add support for 9pfs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
44ee94e486
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* virtio ccw target implementation
|
||||
*
|
||||
* Copyright 2012,2014 IBM Corp.
|
||||
* Copyright 2012,2015 IBM Corp.
|
||||
* Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
|
||||
* Pierre Morel <pmorel@linux.vnet.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
|
||||
@ -1310,6 +1311,7 @@ static void virtio_ccw_save_config(DeviceState *d, QEMUFile *f)
|
||||
{
|
||||
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
|
||||
SubchDev *s = dev->sch;
|
||||
VirtIODevice *vdev = virtio_ccw_get_vdev(s);
|
||||
|
||||
subch_device_save(s, f);
|
||||
if (dev->indicators != NULL) {
|
||||
@ -1333,6 +1335,7 @@ static void virtio_ccw_save_config(DeviceState *d, QEMUFile *f)
|
||||
qemu_put_be32(f, 0);
|
||||
qemu_put_be64(f, 0UL);
|
||||
}
|
||||
qemu_put_be16(f, vdev->config_vector);
|
||||
qemu_put_be64(f, dev->routes.adapter.ind_offset);
|
||||
qemu_put_byte(f, dev->thinint_isc);
|
||||
}
|
||||
@ -1341,6 +1344,7 @@ static int virtio_ccw_load_config(DeviceState *d, QEMUFile *f)
|
||||
{
|
||||
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
|
||||
SubchDev *s = dev->sch;
|
||||
VirtIODevice *vdev = virtio_ccw_get_vdev(s);
|
||||
int len;
|
||||
|
||||
s->driver_data = dev;
|
||||
@ -1366,6 +1370,7 @@ static int virtio_ccw_load_config(DeviceState *d, QEMUFile *f)
|
||||
qemu_get_be64(f);
|
||||
dev->summary_indicator = NULL;
|
||||
}
|
||||
qemu_get_be16s(f, &vdev->config_vector);
|
||||
dev->routes.adapter.ind_offset = qemu_get_be64(f);
|
||||
dev->thinint_isc = qemu_get_byte(f);
|
||||
if (s->thinint_active) {
|
||||
@ -1730,6 +1735,56 @@ static const TypeInfo virtio_ccw_bus_info = {
|
||||
.class_init = virtio_ccw_bus_class_init,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_VIRTFS
|
||||
static Property virtio_ccw_9p_properties[] = {
|
||||
DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id),
|
||||
DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
|
||||
VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp)
|
||||
{
|
||||
V9fsCCWState *dev = VIRTIO_9P_CCW(ccw_dev);
|
||||
DeviceState *vdev = DEVICE(&dev->vdev);
|
||||
Error *err = NULL;
|
||||
|
||||
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
|
||||
object_property_set_bool(OBJECT(vdev), true, "realized", &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
}
|
||||
}
|
||||
|
||||
static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
|
||||
|
||||
k->exit = virtio_ccw_exit;
|
||||
k->realize = virtio_ccw_9p_realize;
|
||||
dc->reset = virtio_ccw_reset;
|
||||
dc->props = virtio_ccw_9p_properties;
|
||||
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
|
||||
}
|
||||
|
||||
static void virtio_ccw_9p_instance_init(Object *obj)
|
||||
{
|
||||
V9fsCCWState *dev = VIRTIO_9P_CCW(obj);
|
||||
|
||||
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
|
||||
TYPE_VIRTIO_9P);
|
||||
}
|
||||
|
||||
static const TypeInfo virtio_ccw_9p_info = {
|
||||
.name = TYPE_VIRTIO_9P_CCW,
|
||||
.parent = TYPE_VIRTIO_CCW_DEVICE,
|
||||
.instance_size = sizeof(V9fsCCWState),
|
||||
.instance_init = virtio_ccw_9p_instance_init,
|
||||
.class_init = virtio_ccw_9p_class_init,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void virtio_ccw_register(void)
|
||||
{
|
||||
type_register_static(&virtio_ccw_bus_info);
|
||||
@ -1745,6 +1800,9 @@ static void virtio_ccw_register(void)
|
||||
#endif
|
||||
type_register_static(&virtio_ccw_rng);
|
||||
type_register_static(&virtual_css_bridge_info);
|
||||
#ifdef CONFIG_VIRTFS
|
||||
type_register_static(&virtio_ccw_9p_info);
|
||||
#endif
|
||||
}
|
||||
|
||||
type_init(virtio_ccw_register)
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* virtio ccw target definitions
|
||||
*
|
||||
* Copyright 2012 IBM Corp.
|
||||
* Copyright 2012,2015 IBM Corp.
|
||||
* Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
|
||||
* Pierre Morel <pmorel@linux.vnet.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
|
||||
@ -189,4 +190,19 @@ typedef struct VirtIORNGCcw {
|
||||
VirtualCssBus *virtual_css_bus_init(void);
|
||||
void virtio_ccw_device_update_status(SubchDev *sch);
|
||||
VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch);
|
||||
|
||||
#ifdef CONFIG_VIRTFS
|
||||
#include "hw/9pfs/virtio-9p.h"
|
||||
|
||||
#define TYPE_VIRTIO_9P_CCW "virtio-9p-ccw"
|
||||
#define VIRTIO_9P_CCW(obj) \
|
||||
OBJECT_CHECK(V9fsCCWState, (obj), TYPE_VIRTIO_9P_CCW)
|
||||
|
||||
typedef struct V9fsCCWState {
|
||||
VirtioCcwDevice parent_obj;
|
||||
V9fsState vdev;
|
||||
} V9fsCCWState;
|
||||
|
||||
#endif /* CONFIG_VIRTFS */
|
||||
|
||||
#endif
|
||||
|
@ -2175,13 +2175,14 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu)
|
||||
struct kvm_s390_irq_state irq_state;
|
||||
int r;
|
||||
|
||||
if (cpu->irqstate_saved_size == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) {
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
if (cpu->irqstate_saved_size == 0) {
|
||||
return 0;
|
||||
}
|
||||
irq_state.buf = (uint64_t) cpu->irqstate;
|
||||
irq_state.len = cpu->irqstate_saved_size;
|
||||
|
||||
|
@ -70,6 +70,7 @@ const VMStateDescription vmstate_fpu = {
|
||||
|
||||
static inline bool fpu_needed(void *opaque)
|
||||
{
|
||||
/* This looks odd, but we might want to NOT transfer fprs in the future */
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user