Statistics
| Branch: | Revision:

root / hw / s390-virtio.c @ 7bc3018b

History | View | Annotate | Download (9.9 kB)

1 8cb310e1 Alexander Graf
/*
2 8cb310e1 Alexander Graf
 * QEMU S390 virtio target
3 8cb310e1 Alexander Graf
 *
4 8cb310e1 Alexander Graf
 * Copyright (c) 2009 Alexander Graf <agraf@suse.de>
5 8cb310e1 Alexander Graf
 *
6 8cb310e1 Alexander Graf
 * This library is free software; you can redistribute it and/or
7 8cb310e1 Alexander Graf
 * modify it under the terms of the GNU Lesser General Public
8 8cb310e1 Alexander Graf
 * License as published by the Free Software Foundation; either
9 8cb310e1 Alexander Graf
 * version 2 of the License, or (at your option) any later version.
10 8cb310e1 Alexander Graf
 *
11 8cb310e1 Alexander Graf
 * This library is distributed in the hope that it will be useful,
12 8cb310e1 Alexander Graf
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 8cb310e1 Alexander Graf
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 8cb310e1 Alexander Graf
 * Lesser General Public License for more details.
15 8cb310e1 Alexander Graf
 *
16 8cb310e1 Alexander Graf
 * You should have received a copy of the GNU Lesser General Public
17 8cb310e1 Alexander Graf
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 8cb310e1 Alexander Graf
 */
19 8cb310e1 Alexander Graf
20 8cb310e1 Alexander Graf
#include "hw.h"
21 8cb310e1 Alexander Graf
#include "block.h"
22 6c33286a Alexander Graf
#include "blockdev.h"
23 8cb310e1 Alexander Graf
#include "sysemu.h"
24 8cb310e1 Alexander Graf
#include "net.h"
25 8cb310e1 Alexander Graf
#include "boards.h"
26 8cb310e1 Alexander Graf
#include "monitor.h"
27 8cb310e1 Alexander Graf
#include "loader.h"
28 8cb310e1 Alexander Graf
#include "elf.h"
29 8cb310e1 Alexander Graf
#include "hw/virtio.h"
30 8cb310e1 Alexander Graf
#include "hw/sysbus.h"
31 8cb310e1 Alexander Graf
#include "kvm.h"
32 ca3dbc27 Avi Kivity
#include "exec-memory.h"
33 8cb310e1 Alexander Graf
34 8cb310e1 Alexander Graf
#include "hw/s390-virtio-bus.h"
35 8cb310e1 Alexander Graf
36 8cb310e1 Alexander Graf
//#define DEBUG_S390
37 8cb310e1 Alexander Graf
38 8cb310e1 Alexander Graf
#ifdef DEBUG_S390
39 8cb310e1 Alexander Graf
#define dprintf(fmt, ...) \
40 8cb310e1 Alexander Graf
    do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
41 8cb310e1 Alexander Graf
#else
42 8cb310e1 Alexander Graf
#define dprintf(fmt, ...) \
43 8cb310e1 Alexander Graf
    do { } while (0)
44 8cb310e1 Alexander Graf
#endif
45 8cb310e1 Alexander Graf
46 8cb310e1 Alexander Graf
#define KVM_S390_VIRTIO_NOTIFY          0
47 8cb310e1 Alexander Graf
#define KVM_S390_VIRTIO_RESET           1
48 8cb310e1 Alexander Graf
#define KVM_S390_VIRTIO_SET_STATUS      2
49 8cb310e1 Alexander Graf
50 8cb310e1 Alexander Graf
#define KERN_IMAGE_START                0x010000UL
51 8cb310e1 Alexander Graf
#define KERN_PARM_AREA                  0x010480UL
52 8cb310e1 Alexander Graf
#define INITRD_START                    0x800000UL
53 8cb310e1 Alexander Graf
#define INITRD_PARM_START               0x010408UL
54 8cb310e1 Alexander Graf
#define INITRD_PARM_SIZE                0x010410UL
55 8cb310e1 Alexander Graf
#define PARMFILE_START                  0x001000UL
56 8cb310e1 Alexander Graf
57 fe270d04 Alexander Graf
#define ZIPL_START                        0x009000UL
58 fe270d04 Alexander Graf
#define ZIPL_LOAD_ADDR                        0x009000UL
59 fe270d04 Alexander Graf
#define ZIPL_FILENAME                        "s390-zipl.rom"
60 fe270d04 Alexander Graf
61 8cb310e1 Alexander Graf
#define MAX_BLK_DEVS                    10
62 8cb310e1 Alexander Graf
63 8cb310e1 Alexander Graf
static VirtIOS390Bus *s390_bus;
64 45fa769b Andreas Färber
static S390CPU **ipi_states;
65 8cb310e1 Alexander Graf
66 45fa769b Andreas Färber
S390CPU *s390_cpu_addr2state(uint16_t cpu_addr)
67 8cb310e1 Alexander Graf
{
68 8cb310e1 Alexander Graf
    if (cpu_addr >= smp_cpus) {
69 8cb310e1 Alexander Graf
        return NULL;
70 8cb310e1 Alexander Graf
    }
71 8cb310e1 Alexander Graf
72 8cb310e1 Alexander Graf
    return ipi_states[cpu_addr];
73 8cb310e1 Alexander Graf
}
74 8cb310e1 Alexander Graf
75 0e4213a7 Andreas Färber
int s390_virtio_hypercall(CPUS390XState *env, uint64_t mem, uint64_t hypercall)
76 8cb310e1 Alexander Graf
{
77 8cb310e1 Alexander Graf
    int r = 0, i;
78 8cb310e1 Alexander Graf
79 8d5192ee Alexander Graf
    dprintf("KVM hypercall: %ld\n", hypercall);
80 8d5192ee Alexander Graf
    switch (hypercall) {
81 8cb310e1 Alexander Graf
    case KVM_S390_VIRTIO_NOTIFY:
82 8cb310e1 Alexander Graf
        if (mem > ram_size) {
83 8cb310e1 Alexander Graf
            VirtIOS390Device *dev = s390_virtio_bus_find_vring(s390_bus,
84 8cb310e1 Alexander Graf
                                                               mem, &i);
85 8cb310e1 Alexander Graf
            if (dev) {
86 8cb310e1 Alexander Graf
                virtio_queue_notify(dev->vdev, i);
87 8cb310e1 Alexander Graf
            } else {
88 8cb310e1 Alexander Graf
                r = -EINVAL;
89 8cb310e1 Alexander Graf
            }
90 8cb310e1 Alexander Graf
        } else {
91 8cb310e1 Alexander Graf
            /* Early printk */
92 8cb310e1 Alexander Graf
        }
93 8cb310e1 Alexander Graf
        break;
94 8cb310e1 Alexander Graf
    case KVM_S390_VIRTIO_RESET:
95 8cb310e1 Alexander Graf
    {
96 baf0b55a Alexander Graf
        VirtIOS390Device *dev;
97 baf0b55a Alexander Graf
98 baf0b55a Alexander Graf
        dev = s390_virtio_bus_find_mem(s390_bus, mem);
99 baf0b55a Alexander Graf
        virtio_reset(dev->vdev);
100 e9d86b76 Christian Borntraeger
        stb_phys(dev->dev_offs + VIRTIO_DEV_OFFS_STATUS, 0);
101 baf0b55a Alexander Graf
        s390_virtio_device_sync(dev);
102 4170aea1 Jens Freimann
        s390_virtio_reset_idx(dev);
103 8cb310e1 Alexander Graf
        break;
104 8cb310e1 Alexander Graf
    }
105 8cb310e1 Alexander Graf
    case KVM_S390_VIRTIO_SET_STATUS:
106 8cb310e1 Alexander Graf
    {
107 8cb310e1 Alexander Graf
        VirtIOS390Device *dev;
108 8cb310e1 Alexander Graf
109 8cb310e1 Alexander Graf
        dev = s390_virtio_bus_find_mem(s390_bus, mem);
110 8cb310e1 Alexander Graf
        if (dev) {
111 8cb310e1 Alexander Graf
            s390_virtio_device_update_status(dev);
112 8cb310e1 Alexander Graf
        } else {
113 8cb310e1 Alexander Graf
            r = -EINVAL;
114 8cb310e1 Alexander Graf
        }
115 8cb310e1 Alexander Graf
        break;
116 8cb310e1 Alexander Graf
    }
117 8cb310e1 Alexander Graf
    default:
118 8cb310e1 Alexander Graf
        r = -EINVAL;
119 8cb310e1 Alexander Graf
        break;
120 8cb310e1 Alexander Graf
    }
121 8cb310e1 Alexander Graf
122 8d5192ee Alexander Graf
    return r;
123 8cb310e1 Alexander Graf
}
124 8cb310e1 Alexander Graf
125 854e42f3 Christian Borntraeger
/*
126 854e42f3 Christian Borntraeger
 * The number of running CPUs. On s390 a shutdown is the state of all CPUs
127 854e42f3 Christian Borntraeger
 * being either stopped or disabled (for interrupts) waiting. We have to
128 854e42f3 Christian Borntraeger
 * track this number to call the shutdown sequence accordingly. This
129 854e42f3 Christian Borntraeger
 * number is modified either on startup or while holding the big qemu lock.
130 854e42f3 Christian Borntraeger
 */
131 854e42f3 Christian Borntraeger
static unsigned s390_running_cpus;
132 854e42f3 Christian Borntraeger
133 0e4213a7 Andreas Färber
void s390_add_running_cpu(CPUS390XState *env)
134 854e42f3 Christian Borntraeger
{
135 854e42f3 Christian Borntraeger
    if (env->halted) {
136 854e42f3 Christian Borntraeger
        s390_running_cpus++;
137 854e42f3 Christian Borntraeger
        env->halted = 0;
138 854e42f3 Christian Borntraeger
        env->exception_index = -1;
139 854e42f3 Christian Borntraeger
    }
140 854e42f3 Christian Borntraeger
}
141 854e42f3 Christian Borntraeger
142 0e4213a7 Andreas Färber
unsigned s390_del_running_cpu(CPUS390XState *env)
143 854e42f3 Christian Borntraeger
{
144 854e42f3 Christian Borntraeger
    if (env->halted == 0) {
145 854e42f3 Christian Borntraeger
        assert(s390_running_cpus >= 1);
146 854e42f3 Christian Borntraeger
        s390_running_cpus--;
147 854e42f3 Christian Borntraeger
        env->halted = 1;
148 854e42f3 Christian Borntraeger
        env->exception_index = EXCP_HLT;
149 854e42f3 Christian Borntraeger
    }
150 854e42f3 Christian Borntraeger
    return s390_running_cpus;
151 854e42f3 Christian Borntraeger
}
152 854e42f3 Christian Borntraeger
153 8cb310e1 Alexander Graf
/* PC hardware initialisation */
154 22486aa0 Christian Borntraeger
static void s390_init(ram_addr_t my_ram_size,
155 8cb310e1 Alexander Graf
                      const char *boot_device,
156 8cb310e1 Alexander Graf
                      const char *kernel_filename,
157 8cb310e1 Alexander Graf
                      const char *kernel_cmdline,
158 8cb310e1 Alexander Graf
                      const char *initrd_filename,
159 8cb310e1 Alexander Graf
                      const char *cpu_model)
160 8cb310e1 Alexander Graf
{
161 0e4213a7 Andreas Färber
    CPUS390XState *env = NULL;
162 ca3dbc27 Avi Kivity
    MemoryRegion *sysmem = get_system_memory();
163 ca3dbc27 Avi Kivity
    MemoryRegion *ram = g_new(MemoryRegion, 1);
164 8cb310e1 Alexander Graf
    ram_addr_t kernel_size = 0;
165 8cb310e1 Alexander Graf
    ram_addr_t initrd_offset;
166 8cb310e1 Alexander Graf
    ram_addr_t initrd_size = 0;
167 22486aa0 Christian Borntraeger
    int shift = 0;
168 8d5192ee Alexander Graf
    uint8_t *storage_keys;
169 326384d5 Alexander Graf
    void *virtio_region;
170 326384d5 Alexander Graf
    target_phys_addr_t virtio_region_len;
171 326384d5 Alexander Graf
    target_phys_addr_t virtio_region_start;
172 8cb310e1 Alexander Graf
    int i;
173 8cb310e1 Alexander Graf
174 22486aa0 Christian Borntraeger
    /* s390x ram size detection needs a 16bit multiplier + an increment. So
175 22486aa0 Christian Borntraeger
       guests > 64GB can be specified in 2MB steps etc. */
176 22486aa0 Christian Borntraeger
    while ((my_ram_size >> (20 + shift)) > 65535) {
177 22486aa0 Christian Borntraeger
        shift++;
178 22486aa0 Christian Borntraeger
    }
179 22486aa0 Christian Borntraeger
    my_ram_size = my_ram_size >> (20 + shift) << (20 + shift);
180 22486aa0 Christian Borntraeger
181 22486aa0 Christian Borntraeger
    /* lets propagate the changed ram size into the global variable. */
182 22486aa0 Christian Borntraeger
    ram_size = my_ram_size;
183 e249651c Alexander Graf
184 8cb310e1 Alexander Graf
    /* get a BUS */
185 22486aa0 Christian Borntraeger
    s390_bus = s390_virtio_bus_init(&my_ram_size);
186 8cb310e1 Alexander Graf
187 8cb310e1 Alexander Graf
    /* allocate RAM */
188 c5705a77 Avi Kivity
    memory_region_init_ram(ram, "s390.ram", my_ram_size);
189 c5705a77 Avi Kivity
    vmstate_register_ram_global(ram);
190 ca3dbc27 Avi Kivity
    memory_region_add_subregion(sysmem, 0, ram);
191 8cb310e1 Alexander Graf
192 326384d5 Alexander Graf
    /* clear virtio region */
193 326384d5 Alexander Graf
    virtio_region_len = my_ram_size - ram_size;
194 326384d5 Alexander Graf
    virtio_region_start = ram_size;
195 326384d5 Alexander Graf
    virtio_region = cpu_physical_memory_map(virtio_region_start,
196 326384d5 Alexander Graf
                                            &virtio_region_len, true);
197 326384d5 Alexander Graf
    memset(virtio_region, 0, virtio_region_len);
198 326384d5 Alexander Graf
    cpu_physical_memory_unmap(virtio_region, virtio_region_len, 1,
199 326384d5 Alexander Graf
                              virtio_region_len);
200 326384d5 Alexander Graf
201 8d5192ee Alexander Graf
    /* allocate storage keys */
202 7267c094 Anthony Liguori
    storage_keys = g_malloc0(my_ram_size / TARGET_PAGE_SIZE);
203 8d5192ee Alexander Graf
204 8cb310e1 Alexander Graf
    /* init CPUs */
205 8cb310e1 Alexander Graf
    if (cpu_model == NULL) {
206 8cb310e1 Alexander Graf
        cpu_model = "host";
207 8cb310e1 Alexander Graf
    }
208 8cb310e1 Alexander Graf
209 45fa769b Andreas Färber
    ipi_states = g_malloc(sizeof(S390CPU *) * smp_cpus);
210 8cb310e1 Alexander Graf
211 8cb310e1 Alexander Graf
    for (i = 0; i < smp_cpus; i++) {
212 6fc150de Andreas Färber
        S390CPU *cpu;
213 0e4213a7 Andreas Färber
        CPUS390XState *tmp_env;
214 8cb310e1 Alexander Graf
215 6fc150de Andreas Färber
        cpu = cpu_s390x_init(cpu_model);
216 6fc150de Andreas Färber
        tmp_env = &cpu->env;
217 8cb310e1 Alexander Graf
        if (!env) {
218 8cb310e1 Alexander Graf
            env = tmp_env;
219 8cb310e1 Alexander Graf
        }
220 45fa769b Andreas Färber
        ipi_states[i] = cpu;
221 8cb310e1 Alexander Graf
        tmp_env->halted = 1;
222 8cb310e1 Alexander Graf
        tmp_env->exception_index = EXCP_HLT;
223 8d5192ee Alexander Graf
        tmp_env->storage_keys = storage_keys;
224 8cb310e1 Alexander Graf
    }
225 8cb310e1 Alexander Graf
226 854e42f3 Christian Borntraeger
    /* One CPU has to run */
227 854e42f3 Christian Borntraeger
    s390_add_running_cpu(env);
228 8cb310e1 Alexander Graf
229 8cb310e1 Alexander Graf
    if (kernel_filename) {
230 8cb310e1 Alexander Graf
231 1edb4934 Christian Borntraeger
        kernel_size = load_elf(kernel_filename, NULL, NULL, NULL, NULL,
232 1edb4934 Christian Borntraeger
                               NULL, 1, ELF_MACHINE, 0);
233 1edb4934 Christian Borntraeger
        if (kernel_size == -1UL) {
234 1edb4934 Christian Borntraeger
            kernel_size = load_image_targphys(kernel_filename, 0, ram_size);
235 8cb310e1 Alexander Graf
        }
236 118a8977 Christian Borntraeger
        if (kernel_size == -1UL) {
237 118a8977 Christian Borntraeger
            fprintf(stderr, "qemu: could not load kernel '%s'\n",
238 118a8977 Christian Borntraeger
                    kernel_filename);
239 118a8977 Christian Borntraeger
            exit(1);
240 118a8977 Christian Borntraeger
        }
241 1edb4934 Christian Borntraeger
        /*
242 1edb4934 Christian Borntraeger
         * we can not rely on the ELF entry point, since up to 3.2 this
243 1edb4934 Christian Borntraeger
         * value was 0x800 (the SALIPL loader) and it wont work. For
244 1edb4934 Christian Borntraeger
         * all (Linux) cases 0x10000 (KERN_IMAGE_START) should be fine.
245 1edb4934 Christian Borntraeger
         */
246 8cb310e1 Alexander Graf
        env->psw.addr = KERN_IMAGE_START;
247 0435d393 Michael S. Tsirkin
        env->psw.mask = 0x0000000180000000ULL;
248 fe270d04 Alexander Graf
    } else {
249 fe270d04 Alexander Graf
        ram_addr_t bios_size = 0;
250 fe270d04 Alexander Graf
        char *bios_filename;
251 fe270d04 Alexander Graf
252 fe270d04 Alexander Graf
        /* Load zipl bootloader */
253 fe270d04 Alexander Graf
        if (bios_name == NULL) {
254 fe270d04 Alexander Graf
            bios_name = ZIPL_FILENAME;
255 fe270d04 Alexander Graf
        }
256 fe270d04 Alexander Graf
257 fe270d04 Alexander Graf
        bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
258 1edb4934 Christian Borntraeger
        bios_size = load_image_targphys(bios_filename, ZIPL_LOAD_ADDR, 4096);
259 7267c094 Anthony Liguori
        g_free(bios_filename);
260 fe270d04 Alexander Graf
261 fe270d04 Alexander Graf
        if ((long)bios_size < 0) {
262 fe270d04 Alexander Graf
            hw_error("could not load bootloader '%s'\n", bios_name);
263 fe270d04 Alexander Graf
        }
264 fe270d04 Alexander Graf
265 fe270d04 Alexander Graf
        if (bios_size > 4096) {
266 fe270d04 Alexander Graf
            hw_error("stage1 bootloader is > 4k\n");
267 fe270d04 Alexander Graf
        }
268 fe270d04 Alexander Graf
269 fe270d04 Alexander Graf
        env->psw.addr = ZIPL_START;
270 fe270d04 Alexander Graf
        env->psw.mask = 0x0000000180000000ULL;
271 8cb310e1 Alexander Graf
    }
272 8cb310e1 Alexander Graf
273 8cb310e1 Alexander Graf
    if (initrd_filename) {
274 8cb310e1 Alexander Graf
        initrd_offset = INITRD_START;
275 8cb310e1 Alexander Graf
        while (kernel_size + 0x100000 > initrd_offset) {
276 8cb310e1 Alexander Graf
            initrd_offset += 0x100000;
277 8cb310e1 Alexander Graf
        }
278 1edb4934 Christian Borntraeger
        initrd_size = load_image_targphys(initrd_filename, initrd_offset,
279 1edb4934 Christian Borntraeger
                                          ram_size - initrd_offset);
280 118a8977 Christian Borntraeger
        if (initrd_size == -1UL) {
281 118a8977 Christian Borntraeger
            fprintf(stderr, "qemu: could not load initrd '%s'\n",
282 118a8977 Christian Borntraeger
                    initrd_filename);
283 118a8977 Christian Borntraeger
            exit(1);
284 118a8977 Christian Borntraeger
        }
285 118a8977 Christian Borntraeger
286 1edb4934 Christian Borntraeger
        /* we have to overwrite values in the kernel image, which are "rom" */
287 1edb4934 Christian Borntraeger
        memcpy(rom_ptr(INITRD_PARM_START), &initrd_offset, 8);
288 1edb4934 Christian Borntraeger
        memcpy(rom_ptr(INITRD_PARM_SIZE), &initrd_size, 8);
289 8cb310e1 Alexander Graf
    }
290 8cb310e1 Alexander Graf
291 cc3c7384 Christian Borntraeger
    if (rom_ptr(KERN_PARM_AREA)) {
292 1edb4934 Christian Borntraeger
        /* we have to overwrite values in the kernel image, which are "rom" */
293 1edb4934 Christian Borntraeger
        memcpy(rom_ptr(KERN_PARM_AREA), kernel_cmdline,
294 1edb4934 Christian Borntraeger
               strlen(kernel_cmdline) + 1);
295 8cb310e1 Alexander Graf
    }
296 8cb310e1 Alexander Graf
297 8cb310e1 Alexander Graf
    /* Create VirtIO network adapters */
298 8cb310e1 Alexander Graf
    for(i = 0; i < nb_nics; i++) {
299 8cb310e1 Alexander Graf
        NICInfo *nd = &nd_table[i];
300 8cb310e1 Alexander Graf
        DeviceState *dev;
301 8cb310e1 Alexander Graf
302 8cb310e1 Alexander Graf
        if (!nd->model) {
303 7267c094 Anthony Liguori
            nd->model = g_strdup("virtio");
304 8cb310e1 Alexander Graf
        }
305 8cb310e1 Alexander Graf
306 8cb310e1 Alexander Graf
        if (strcmp(nd->model, "virtio")) {
307 8cb310e1 Alexander Graf
            fprintf(stderr, "S390 only supports VirtIO nics\n");
308 8cb310e1 Alexander Graf
            exit(1);
309 8cb310e1 Alexander Graf
        }
310 8cb310e1 Alexander Graf
311 8cb310e1 Alexander Graf
        dev = qdev_create((BusState *)s390_bus, "virtio-net-s390");
312 8cb310e1 Alexander Graf
        qdev_set_nic_properties(dev, nd);
313 8cb310e1 Alexander Graf
        qdev_init_nofail(dev);
314 8cb310e1 Alexander Graf
    }
315 8cb310e1 Alexander Graf
316 8cb310e1 Alexander Graf
    /* Create VirtIO disk drives */
317 8cb310e1 Alexander Graf
    for(i = 0; i < MAX_BLK_DEVS; i++) {
318 8cb310e1 Alexander Graf
        DriveInfo *dinfo;
319 8cb310e1 Alexander Graf
        DeviceState *dev;
320 8cb310e1 Alexander Graf
321 8cb310e1 Alexander Graf
        dinfo = drive_get(IF_IDE, 0, i);
322 8cb310e1 Alexander Graf
        if (!dinfo) {
323 8cb310e1 Alexander Graf
            continue;
324 8cb310e1 Alexander Graf
        }
325 8cb310e1 Alexander Graf
326 8cb310e1 Alexander Graf
        dev = qdev_create((BusState *)s390_bus, "virtio-blk-s390");
327 18846dee Markus Armbruster
        qdev_prop_set_drive_nofail(dev, "drive", dinfo->bdrv);
328 8cb310e1 Alexander Graf
        qdev_init_nofail(dev);
329 8cb310e1 Alexander Graf
    }
330 8cb310e1 Alexander Graf
}
331 8cb310e1 Alexander Graf
332 8cb310e1 Alexander Graf
static QEMUMachine s390_machine = {
333 8cb310e1 Alexander Graf
    .name = "s390-virtio",
334 8cb310e1 Alexander Graf
    .alias = "s390",
335 8cb310e1 Alexander Graf
    .desc = "VirtIO based S390 machine",
336 8cb310e1 Alexander Graf
    .init = s390_init,
337 ad0bbc56 Einar Lueck
    .no_cdrom = 1,
338 ad0bbc56 Einar Lueck
    .no_floppy = 1,
339 986c5f78 Gerd Hoffmann
    .no_serial = 1,
340 986c5f78 Gerd Hoffmann
    .no_parallel = 1,
341 ad0bbc56 Einar Lueck
    .no_sdcard = 1,
342 cf708987 Michael S. Tsirkin
    .use_virtcon = 1,
343 8cb310e1 Alexander Graf
    .max_cpus = 255,
344 8cb310e1 Alexander Graf
    .is_default = 1,
345 8cb310e1 Alexander Graf
};
346 8cb310e1 Alexander Graf
347 8cb310e1 Alexander Graf
static void s390_machine_init(void)
348 8cb310e1 Alexander Graf
{
349 8cb310e1 Alexander Graf
    qemu_register_machine(&s390_machine);
350 8cb310e1 Alexander Graf
}
351 8cb310e1 Alexander Graf
352 8cb310e1 Alexander Graf
machine_init(s390_machine_init);