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 
17 typedef struct generic_fuzz_config {
18     const char *name, *args, *objects;
19 } generic_fuzz_config;
20 
21 const generic_fuzz_config predefined_configs[] = {
22     {
23         .name = "virtio-net-pci-slirp",
24         .args = "-M q35 -nodefaults "
25         "-device virtio-net,netdev=net0 -netdev user,id=net0",
26         .objects = "virtio*",
27     },{
28         .name = "virtio-blk",
29         .args = "-machine q35 -device virtio-blk,drive=disk0 "
30         "-drive file=null-co://,id=disk0,if=none,format=raw",
31         .objects = "virtio*",
32     },{
33         .name = "virtio-scsi",
34         .args = "-machine q35 -device virtio-scsi,num_queues=8 "
35         "-device scsi-hd,drive=disk0 "
36         "-drive file=null-co://,id=disk0,if=none,format=raw",
37         .objects = "scsi* virtio*",
38     },{
39         .name = "virtio-gpu",
40         .args = "-machine q35 -nodefaults -device virtio-gpu",
41         .objects = "virtio*",
42     },{
43         .name = "virtio-vga",
44         .args = "-machine q35 -nodefaults -device virtio-vga",
45         .objects = "virtio*",
46     },{
47         .name = "virtio-rng",
48         .args = "-machine q35 -nodefaults -device virtio-rng",
49         .objects = "virtio*",
50     },{
51         .name = "virtio-balloon",
52         .args = "-machine q35 -nodefaults -device virtio-balloon",
53         .objects = "virtio*",
54     },{
55         .name = "virtio-serial",
56         .args = "-machine q35 -nodefaults -device virtio-serial",
57         .objects = "virtio*",
58     },{
59         .name = "virtio-mouse",
60         .args = "-machine q35 -nodefaults -device virtio-mouse",
61         .objects = "virtio*",
62     },{
63         .name = "e1000",
64         .args = "-M q35 -nodefaults "
65         "-device e1000,netdev=net0 -netdev user,id=net0",
66         .objects = "e1000",
67     },{
68         .name = "e1000e",
69         .args = "-M q35 -nodefaults "
70         "-device e1000e,netdev=net0 -netdev user,id=net0",
71         .objects = "e1000e",
72     },{
73         .name = "cirrus-vga",
74         .args = "-machine q35 -nodefaults -device cirrus-vga",
75         .objects = "cirrus*",
76     },{
77         .name = "bochs-display",
78         .args = "-machine q35 -nodefaults -device bochs-display",
79         .objects = "bochs*",
80     },{
81         .name = "intel-hda",
82         .args = "-machine q35 -nodefaults -device intel-hda,id=hda0 "
83         "-device hda-output,bus=hda0.0 -device hda-micro,bus=hda0.0 "
84         "-device hda-duplex,bus=hda0.0",
85         .objects = "intel-hda",
86     },{
87         .name = "ide-hd",
88         .args = "-machine q35 -nodefaults "
89         "-drive file=null-co://,if=none,format=raw,id=disk0 "
90         "-device ide-hd,drive=disk0",
91         .objects = "ahci*",
92     },{
93         .name = "floppy",
94         .args = "-machine pc -nodefaults -device floppy,id=floppy0 "
95         "-drive id=disk0,file=null-co://,file.read-zeroes=on,if=none "
96         "-device floppy,drive=disk0,drive-type=288",
97         .objects = "fd* floppy*",
98     },{
99         .name = "xhci",
100         .args = "-machine q35 -nodefaults "
101         "-drive file=null-co://,if=none,format=raw,id=disk0 "
102         "-device qemu-xhci,id=xhci -device usb-tablet,bus=xhci.0 "
103         "-device usb-bot -device usb-storage,drive=disk0 "
104         "-chardev null,id=cd0 -chardev null,id=cd1 "
105         "-device usb-braille,chardev=cd0 -device usb-ccid -device usb-ccid "
106         "-device usb-kbd -device usb-mouse -device usb-serial,chardev=cd1 "
107         "-device usb-tablet -device usb-wacom-tablet -device usb-audio",
108         .objects = "*usb* *uhci* *xhci*",
109     },{
110         .name = "pc-i440fx",
111         .args = "-machine pc",
112         .objects = "*",
113     },{
114         .name = "pc-q35",
115         .args = "-machine q35",
116         .objects = "*",
117     }
118 };
119 
120 #endif
121