1 /*
2  * Generic Virtual-Device Fuzzing Target Configs
3  *
4  * Copyright Red Hat Inc., 2020
5  *
6  * Authors:
7  *  Alexander Bulekov   <alxndr@bu.edu>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2 or later.
10  * See the COPYING file in the top-level directory.
11  */
12 
13 #ifndef GENERIC_FUZZ_CONFIGS_H
14 #define GENERIC_FUZZ_CONFIGS_H
15 
16 #include "qemu/osdep.h"
17 
18 typedef struct generic_fuzz_config {
19     const char *name, *args, *objects;
20 } generic_fuzz_config;
21 
22 const generic_fuzz_config predefined_configs[] = {
23     {
24         .name = "virtio-net-pci-slirp",
25         .args = "-M q35 -nodefaults "
26         "-device virtio-net,netdev=net0 -netdev user,id=net0",
27         .objects = "virtio*",
28     },{
29         .name = "virtio-blk",
30         .args = "-machine q35 -device virtio-blk,drive=disk0 "
31         "-drive file=null-co://,id=disk0,if=none,format=raw",
32         .objects = "virtio*",
33     },{
34         .name = "virtio-scsi",
35         .args = "-machine q35 -device virtio-scsi,num_queues=8 "
36         "-device scsi-hd,drive=disk0 "
37         "-drive file=null-co://,id=disk0,if=none,format=raw",
38         .objects = "scsi* virtio*",
39     },{
40         .name = "virtio-gpu",
41         .args = "-machine q35 -nodefaults -device virtio-gpu",
42         .objects = "virtio*",
43     },{
44         .name = "virtio-vga",
45         .args = "-machine q35 -nodefaults -device virtio-vga",
46         .objects = "virtio*",
47     },{
48         .name = "virtio-rng",
49         .args = "-machine q35 -nodefaults -device virtio-rng",
50         .objects = "virtio*",
51     },{
52         .name = "virtio-balloon",
53         .args = "-machine q35 -nodefaults -device virtio-balloon",
54         .objects = "virtio*",
55     },{
56         .name = "virtio-serial",
57         .args = "-machine q35 -nodefaults -device virtio-serial",
58         .objects = "virtio*",
59     },{
60         .name = "virtio-mouse",
61         .args = "-machine q35 -nodefaults -device virtio-mouse",
62         .objects = "virtio*",
63     },{
64         .name = "e1000",
65         .args = "-M q35 -nodefaults "
66         "-device e1000,netdev=net0 -netdev user,id=net0",
67         .objects = "e1000",
68     },{
69         .name = "e1000e",
70         .args = "-M q35 -nodefaults "
71         "-device e1000e,netdev=net0 -netdev user,id=net0",
72         .objects = "e1000e",
73     },{
74         .name = "cirrus-vga",
75         .args = "-machine q35 -nodefaults -device cirrus-vga",
76         .objects = "cirrus*",
77     },{
78         .name = "bochs-display",
79         .args = "-machine q35 -nodefaults -device bochs-display",
80         .objects = "bochs*",
81     },{
82         .name = "intel-hda",
83         .args = "-machine q35 -nodefaults -device intel-hda,id=hda0 "
84         "-device hda-output,bus=hda0.0 -device hda-micro,bus=hda0.0 "
85         "-device hda-duplex,bus=hda0.0",
86         .objects = "intel-hda",
87     },{
88         .name = "ide-hd",
89         .args = "-machine q35 -nodefaults "
90         "-drive file=null-co://,if=none,format=raw,id=disk0 "
91         "-device ide-hd,drive=disk0",
92         .objects = "ahci*",
93     },{
94         .name = "floppy",
95         .args = "-machine pc -nodefaults -device floppy,id=floppy0 "
96         "-drive id=disk0,file=null-co://,file.read-zeroes=on,if=none "
97         "-device floppy,drive=disk0,drive-type=288",
98         .objects = "fd* floppy*",
99     },{
100         .name = "xhci",
101         .args = "-machine q35 -nodefaults "
102         "-drive file=null-co://,if=none,format=raw,id=disk0 "
103         "-device qemu-xhci,id=xhci -device usb-tablet,bus=xhci.0 "
104         "-device usb-bot -device usb-storage,drive=disk0 "
105         "-chardev null,id=cd0 -chardev null,id=cd1 "
106         "-device usb-braille,chardev=cd0 -device usb-ccid -device usb-ccid "
107         "-device usb-kbd -device usb-mouse -device usb-serial,chardev=cd1 "
108         "-device usb-tablet -device usb-wacom-tablet -device usb-audio",
109         .objects = "*usb* *uhci* *xhci*",
110     },{
111         .name = "pc-i440fx",
112         .args = "-machine pc",
113         .objects = "*",
114     },{
115         .name = "pc-q35",
116         .args = "-machine q35",
117         .objects = "*",
118     }
119 };
120 
121 #endif
122