microvm.h (3d09c00704adc1db4769cfa6291d96842f9674f1) microvm.h (4d01b8994ca5ce7f48e85e48fb1d31e73699108b)
1/*
2 * Copyright (c) 2018 Intel Corporation
3 * Copyright (c) 2019 Red Hat, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2 or later, as published by the Free Software Foundation.
8 *

--- 58 unchanged lines hidden (view full) ---

67#define PCIE_ECAM_BASE 0xe0000000
68#define PCIE_ECAM_SIZE 0x10000000
69
70/* Machine type options */
71#define MICROVM_MACHINE_PIT "pit"
72#define MICROVM_MACHINE_PIC "pic"
73#define MICROVM_MACHINE_RTC "rtc"
74#define MICROVM_MACHINE_PCIE "pcie"
1/*
2 * Copyright (c) 2018 Intel Corporation
3 * Copyright (c) 2019 Red Hat, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2 or later, as published by the Free Software Foundation.
8 *

--- 58 unchanged lines hidden (view full) ---

67#define PCIE_ECAM_BASE 0xe0000000
68#define PCIE_ECAM_SIZE 0x10000000
69
70/* Machine type options */
71#define MICROVM_MACHINE_PIT "pit"
72#define MICROVM_MACHINE_PIC "pic"
73#define MICROVM_MACHINE_RTC "rtc"
74#define MICROVM_MACHINE_PCIE "pcie"
75#define MICROVM_MACHINE_IOAPIC2 "ioapic2"
75#define MICROVM_MACHINE_ISA_SERIAL "isa-serial"
76#define MICROVM_MACHINE_OPTION_ROMS "x-option-roms"
77#define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline"
78
79struct MicrovmMachineClass {
80 X86MachineClass parent;
81 HotplugHandler *(*orig_hotplug_handler)(MachineState *machine,
82 DeviceState *dev);
83};
84
85struct MicrovmMachineState {
86 X86MachineState parent;
87
88 /* Machine type options */
89 OnOffAuto pic;
90 OnOffAuto pit;
91 OnOffAuto rtc;
92 OnOffAuto pcie;
76#define MICROVM_MACHINE_ISA_SERIAL "isa-serial"
77#define MICROVM_MACHINE_OPTION_ROMS "x-option-roms"
78#define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline"
79
80struct MicrovmMachineClass {
81 X86MachineClass parent;
82 HotplugHandler *(*orig_hotplug_handler)(MachineState *machine,
83 DeviceState *dev);
84};
85
86struct MicrovmMachineState {
87 X86MachineState parent;
88
89 /* Machine type options */
90 OnOffAuto pic;
91 OnOffAuto pit;
92 OnOffAuto rtc;
93 OnOffAuto pcie;
94 OnOffAuto ioapic2;
93 bool isa_serial;
94 bool option_roms;
95 bool auto_kernel_cmdline;
96
97 /* Machine state */
98 uint32_t pcie_irq_base;
99 uint32_t virtio_irq_base;
100 uint32_t virtio_num_transports;
101 bool kernel_cmdline_fixed;
102 Notifier machine_done;
103 Notifier powerdown_req;
104 struct GPEXConfig gpex;
105};
106
107#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm")
108OBJECT_DECLARE_TYPE(MicrovmMachineState, MicrovmMachineClass, MICROVM_MACHINE)
109
110#endif
95 bool isa_serial;
96 bool option_roms;
97 bool auto_kernel_cmdline;
98
99 /* Machine state */
100 uint32_t pcie_irq_base;
101 uint32_t virtio_irq_base;
102 uint32_t virtio_num_transports;
103 bool kernel_cmdline_fixed;
104 Notifier machine_done;
105 Notifier powerdown_req;
106 struct GPEXConfig gpex;
107};
108
109#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm")
110OBJECT_DECLARE_TYPE(MicrovmMachineState, MicrovmMachineClass, MICROVM_MACHINE)
111
112#endif