Statistics
| Branch: | Revision:

root / hw / pc_piix.c @ 2558e0a6

History | View | Annotate | Download (20.5 kB)

1 845773ab Isaku Yamahata
/*
2 845773ab Isaku Yamahata
 * QEMU PC System Emulator
3 845773ab Isaku Yamahata
 *
4 845773ab Isaku Yamahata
 * Copyright (c) 2003-2004 Fabrice Bellard
5 845773ab Isaku Yamahata
 *
6 845773ab Isaku Yamahata
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 845773ab Isaku Yamahata
 * of this software and associated documentation files (the "Software"), to deal
8 845773ab Isaku Yamahata
 * in the Software without restriction, including without limitation the rights
9 845773ab Isaku Yamahata
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 845773ab Isaku Yamahata
 * copies of the Software, and to permit persons to whom the Software is
11 845773ab Isaku Yamahata
 * furnished to do so, subject to the following conditions:
12 845773ab Isaku Yamahata
 *
13 845773ab Isaku Yamahata
 * The above copyright notice and this permission notice shall be included in
14 845773ab Isaku Yamahata
 * all copies or substantial portions of the Software.
15 845773ab Isaku Yamahata
 *
16 845773ab Isaku Yamahata
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 845773ab Isaku Yamahata
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 845773ab Isaku Yamahata
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 845773ab Isaku Yamahata
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 845773ab Isaku Yamahata
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 845773ab Isaku Yamahata
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 845773ab Isaku Yamahata
 * THE SOFTWARE.
23 845773ab Isaku Yamahata
 */
24 845773ab Isaku Yamahata
25 ae0a5466 Avi Kivity
#include <glib.h>
26 ae0a5466 Avi Kivity
27 845773ab Isaku Yamahata
#include "hw.h"
28 845773ab Isaku Yamahata
#include "pc.h"
29 845773ab Isaku Yamahata
#include "apic.h"
30 845773ab Isaku Yamahata
#include "pci.h"
31 845773ab Isaku Yamahata
#include "usb-uhci.h"
32 845773ab Isaku Yamahata
#include "usb-ohci.h"
33 845773ab Isaku Yamahata
#include "net.h"
34 845773ab Isaku Yamahata
#include "boards.h"
35 845773ab Isaku Yamahata
#include "ide.h"
36 845773ab Isaku Yamahata
#include "kvm.h"
37 3b9a6ee5 Jan Kiszka
#include "kvm/clock.h"
38 666daa68 Markus Armbruster
#include "sysemu.h"
39 96051119 Blue Swirl
#include "sysbus.h"
40 0dfa5ef9 Isaku Yamahata
#include "arch_init.h"
41 2446333c Blue Swirl
#include "blockdev.h"
42 a88df0b9 Isaku Yamahata
#include "smbus.h"
43 29d3ccde Anthony PERARD
#include "xen.h"
44 4aa63af1 Avi Kivity
#include "memory.h"
45 4aa63af1 Avi Kivity
#include "exec-memory.h"
46 29d3ccde Anthony PERARD
#ifdef CONFIG_XEN
47 29d3ccde Anthony PERARD
#  include <xen/hvm/hvm_info_table.h>
48 29d3ccde Anthony PERARD
#endif
49 845773ab Isaku Yamahata
50 845773ab Isaku Yamahata
#define MAX_IDE_BUS 2
51 845773ab Isaku Yamahata
52 845773ab Isaku Yamahata
static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
53 845773ab Isaku Yamahata
static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
54 845773ab Isaku Yamahata
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
55 845773ab Isaku Yamahata
56 10b61882 Jan Kiszka
static void kvm_piix3_setup_irq_routing(bool pci_enabled)
57 10b61882 Jan Kiszka
{
58 10b61882 Jan Kiszka
#ifdef CONFIG_KVM
59 10b61882 Jan Kiszka
    KVMState *s = kvm_state;
60 10b61882 Jan Kiszka
    int ret, i;
61 10b61882 Jan Kiszka
62 10b61882 Jan Kiszka
    if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) {
63 10b61882 Jan Kiszka
        for (i = 0; i < 8; ++i) {
64 10b61882 Jan Kiszka
            if (i == 2) {
65 10b61882 Jan Kiszka
                continue;
66 10b61882 Jan Kiszka
            }
67 10b61882 Jan Kiszka
            kvm_irqchip_add_route(s, i, KVM_IRQCHIP_PIC_MASTER, i);
68 10b61882 Jan Kiszka
        }
69 10b61882 Jan Kiszka
        for (i = 8; i < 16; ++i) {
70 10b61882 Jan Kiszka
            kvm_irqchip_add_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8);
71 10b61882 Jan Kiszka
        }
72 a39c1d47 Jan Kiszka
        if (pci_enabled) {
73 a39c1d47 Jan Kiszka
            for (i = 0; i < 24; ++i) {
74 a39c1d47 Jan Kiszka
                if (i == 0) {
75 a39c1d47 Jan Kiszka
                    kvm_irqchip_add_route(s, i, KVM_IRQCHIP_IOAPIC, 2);
76 a39c1d47 Jan Kiszka
                } else if (i != 2) {
77 a39c1d47 Jan Kiszka
                    kvm_irqchip_add_route(s, i, KVM_IRQCHIP_IOAPIC, i);
78 a39c1d47 Jan Kiszka
                }
79 a39c1d47 Jan Kiszka
            }
80 a39c1d47 Jan Kiszka
        }
81 10b61882 Jan Kiszka
        ret = kvm_irqchip_commit_routes(s);
82 10b61882 Jan Kiszka
        if (ret < 0) {
83 10b61882 Jan Kiszka
            hw_error("KVM IRQ routing setup failed");
84 10b61882 Jan Kiszka
        }
85 10b61882 Jan Kiszka
    }
86 10b61882 Jan Kiszka
#endif /* CONFIG_KVM */
87 10b61882 Jan Kiszka
}
88 10b61882 Jan Kiszka
89 10b61882 Jan Kiszka
static void kvm_piix3_gsi_handler(void *opaque, int n, int level)
90 10b61882 Jan Kiszka
{
91 10b61882 Jan Kiszka
    GSIState *s = opaque;
92 10b61882 Jan Kiszka
93 10b61882 Jan Kiszka
    if (n < ISA_NUM_IRQS) {
94 10b61882 Jan Kiszka
        /* Kernel will forward to both PIC and IOAPIC */
95 10b61882 Jan Kiszka
        qemu_set_irq(s->i8259_irq[n], level);
96 10b61882 Jan Kiszka
    } else {
97 10b61882 Jan Kiszka
        qemu_set_irq(s->ioapic_irq[n], level);
98 10b61882 Jan Kiszka
    }
99 10b61882 Jan Kiszka
}
100 10b61882 Jan Kiszka
101 b881fbe9 Jan Kiszka
static void ioapic_init(GSIState *gsi_state)
102 96051119 Blue Swirl
{
103 96051119 Blue Swirl
    DeviceState *dev;
104 96051119 Blue Swirl
    SysBusDevice *d;
105 96051119 Blue Swirl
    unsigned int i;
106 96051119 Blue Swirl
107 3d4b2649 Jan Kiszka
    if (kvm_irqchip_in_kernel()) {
108 a39c1d47 Jan Kiszka
        dev = qdev_create(NULL, "kvm-ioapic");
109 a39c1d47 Jan Kiszka
    } else {
110 a39c1d47 Jan Kiszka
        dev = qdev_create(NULL, "ioapic");
111 a39c1d47 Jan Kiszka
    }
112 96051119 Blue Swirl
    qdev_init_nofail(dev);
113 96051119 Blue Swirl
    d = sysbus_from_qdev(dev);
114 96051119 Blue Swirl
    sysbus_mmio_map(d, 0, 0xfec00000);
115 96051119 Blue Swirl
116 96051119 Blue Swirl
    for (i = 0; i < IOAPIC_NUM_PINS; i++) {
117 b881fbe9 Jan Kiszka
        gsi_state->ioapic_irq[i] = qdev_get_gpio_in(dev, i);
118 96051119 Blue Swirl
    }
119 96051119 Blue Swirl
}
120 96051119 Blue Swirl
121 845773ab Isaku Yamahata
/* PC hardware initialisation */
122 6bd10515 Avi Kivity
static void pc_init1(MemoryRegion *system_memory,
123 aee97b84 Avi Kivity
                     MemoryRegion *system_io,
124 6bd10515 Avi Kivity
                     ram_addr_t ram_size,
125 845773ab Isaku Yamahata
                     const char *boot_device,
126 845773ab Isaku Yamahata
                     const char *kernel_filename,
127 845773ab Isaku Yamahata
                     const char *kernel_cmdline,
128 845773ab Isaku Yamahata
                     const char *initrd_filename,
129 845773ab Isaku Yamahata
                     const char *cpu_model,
130 0ec329da Jan Kiszka
                     int pci_enabled,
131 0ec329da Jan Kiszka
                     int kvmclock_enabled)
132 845773ab Isaku Yamahata
{
133 845773ab Isaku Yamahata
    int i;
134 845773ab Isaku Yamahata
    ram_addr_t below_4g_mem_size, above_4g_mem_size;
135 845773ab Isaku Yamahata
    PCIBus *pci_bus;
136 48a18b3c Hervรฉ Poussineau
    ISABus *isa_bus;
137 845773ab Isaku Yamahata
    PCII440FXState *i440fx_state;
138 845773ab Isaku Yamahata
    int piix3_devfn = -1;
139 845773ab Isaku Yamahata
    qemu_irq *cpu_irq;
140 b881fbe9 Jan Kiszka
    qemu_irq *gsi;
141 845773ab Isaku Yamahata
    qemu_irq *i8259;
142 845773ab Isaku Yamahata
    qemu_irq *cmos_s3;
143 845773ab Isaku Yamahata
    qemu_irq *smi_irq;
144 b881fbe9 Jan Kiszka
    GSIState *gsi_state;
145 845773ab Isaku Yamahata
    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
146 c0897e0c Markus Armbruster
    BusState *idebus[MAX_IDE_BUS];
147 1d914fa0 Isaku Yamahata
    ISADevice *rtc_state;
148 34d4260e Kevin Wolf
    ISADevice *floppy;
149 ae0a5466 Avi Kivity
    MemoryRegion *ram_memory;
150 ae0a5466 Avi Kivity
    MemoryRegion *pci_memory;
151 4463aee6 Jan Kiszka
    MemoryRegion *rom_memory;
152 ad6d45fa Anthony Liguori
    DeviceState *dev;
153 845773ab Isaku Yamahata
154 845773ab Isaku Yamahata
    pc_cpus_init(cpu_model);
155 845773ab Isaku Yamahata
156 0ec329da Jan Kiszka
    if (kvmclock_enabled) {
157 0ec329da Jan Kiszka
        kvmclock_create();
158 0ec329da Jan Kiszka
    }
159 0ec329da Jan Kiszka
160 e0e7e67b Anthony PERARD
    if (ram_size >= 0xe0000000 ) {
161 e0e7e67b Anthony PERARD
        above_4g_mem_size = ram_size - 0xe0000000;
162 e0e7e67b Anthony PERARD
        below_4g_mem_size = 0xe0000000;
163 e0e7e67b Anthony PERARD
    } else {
164 e0e7e67b Anthony PERARD
        above_4g_mem_size = 0;
165 e0e7e67b Anthony PERARD
        below_4g_mem_size = ram_size;
166 e0e7e67b Anthony PERARD
    }
167 e0e7e67b Anthony PERARD
168 4463aee6 Jan Kiszka
    if (pci_enabled) {
169 4463aee6 Jan Kiszka
        pci_memory = g_new(MemoryRegion, 1);
170 4463aee6 Jan Kiszka
        memory_region_init(pci_memory, "pci", INT64_MAX);
171 4463aee6 Jan Kiszka
        rom_memory = pci_memory;
172 4463aee6 Jan Kiszka
    } else {
173 4463aee6 Jan Kiszka
        pci_memory = NULL;
174 4463aee6 Jan Kiszka
        rom_memory = system_memory;
175 4463aee6 Jan Kiszka
    }
176 ae0a5466 Avi Kivity
177 845773ab Isaku Yamahata
    /* allocate ram and load rom/bios */
178 29d3ccde Anthony PERARD
    if (!xen_enabled()) {
179 4aa63af1 Avi Kivity
        pc_memory_init(system_memory,
180 4aa63af1 Avi Kivity
                       kernel_filename, kernel_cmdline, initrd_filename,
181 ae0a5466 Avi Kivity
                       below_4g_mem_size, above_4g_mem_size,
182 c1d23eac Hervรฉ Poussineau
                       pci_enabled ? rom_memory : system_memory, &ram_memory);
183 29d3ccde Anthony PERARD
    }
184 845773ab Isaku Yamahata
185 b881fbe9 Jan Kiszka
    gsi_state = g_malloc0(sizeof(*gsi_state));
186 3d4b2649 Jan Kiszka
    if (kvm_irqchip_in_kernel()) {
187 10b61882 Jan Kiszka
        kvm_piix3_setup_irq_routing(pci_enabled);
188 10b61882 Jan Kiszka
        gsi = qemu_allocate_irqs(kvm_piix3_gsi_handler, gsi_state,
189 10b61882 Jan Kiszka
                                 GSI_NUM_PINS);
190 10b61882 Jan Kiszka
    } else {
191 10b61882 Jan Kiszka
        gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
192 10b61882 Jan Kiszka
    }
193 845773ab Isaku Yamahata
194 845773ab Isaku Yamahata
    if (pci_enabled) {
195 60573079 Hervรฉ Poussineau
        pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, gsi,
196 ae0a5466 Avi Kivity
                              system_memory, system_io, ram_size,
197 ae0a5466 Avi Kivity
                              below_4g_mem_size,
198 ae0a5466 Avi Kivity
                              0x100000000ULL - below_4g_mem_size,
199 ae0a5466 Avi Kivity
                              0x100000000ULL + above_4g_mem_size,
200 ae0a5466 Avi Kivity
                              (sizeof(target_phys_addr_t) == 4
201 ae0a5466 Avi Kivity
                               ? 0
202 ae0a5466 Avi Kivity
                               : ((uint64_t)1 << 62)),
203 ae0a5466 Avi Kivity
                              pci_memory, ram_memory);
204 845773ab Isaku Yamahata
    } else {
205 845773ab Isaku Yamahata
        pci_bus = NULL;
206 02a89b21 Isaku Yamahata
        i440fx_state = NULL;
207 48a18b3c Hervรฉ Poussineau
        isa_bus = isa_bus_new(NULL, system_io);
208 57285cc3 Jan Kiszka
        no_hpet = 1;
209 845773ab Isaku Yamahata
    }
210 48a18b3c Hervรฉ Poussineau
    isa_bus_irqs(isa_bus, gsi);
211 845773ab Isaku Yamahata
212 3d4b2649 Jan Kiszka
    if (kvm_irqchip_in_kernel()) {
213 10b61882 Jan Kiszka
        i8259 = kvm_i8259_init(isa_bus);
214 10b61882 Jan Kiszka
    } else if (xen_enabled()) {
215 10b61882 Jan Kiszka
        i8259 = xen_interrupt_controller_init();
216 10b61882 Jan Kiszka
    } else {
217 4bae1efe Richard Henderson
        cpu_irq = pc_allocate_cpu_irq();
218 48a18b3c Hervรฉ Poussineau
        i8259 = i8259_init(isa_bus, cpu_irq[0]);
219 4bae1efe Richard Henderson
    }
220 4bae1efe Richard Henderson
221 43a0db35 Jan Kiszka
    for (i = 0; i < ISA_NUM_IRQS; i++) {
222 43a0db35 Jan Kiszka
        gsi_state->i8259_irq[i] = i8259[i];
223 43a0db35 Jan Kiszka
    }
224 4bae1efe Richard Henderson
    if (pci_enabled) {
225 b881fbe9 Jan Kiszka
        ioapic_init(gsi_state);
226 4bae1efe Richard Henderson
    }
227 4bae1efe Richard Henderson
228 b881fbe9 Jan Kiszka
    pc_register_ferr_irq(gsi[13]);
229 845773ab Isaku Yamahata
230 48a18b3c Hervรฉ Poussineau
    dev = pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
231 ad6d45fa Anthony Liguori
    if (dev) {
232 57c9fafe Anthony Liguori
        object_property_add_child(object_get_root(), "vga", OBJECT(dev), NULL);
233 ad6d45fa Anthony Liguori
    }
234 845773ab Isaku Yamahata
235 01195b73 Steven Smith
    if (xen_enabled()) {
236 01195b73 Steven Smith
        pci_create_simple(pci_bus, -1, "xen-platform");
237 01195b73 Steven Smith
    }
238 01195b73 Steven Smith
239 845773ab Isaku Yamahata
    /* init basic PC hardware */
240 48a18b3c Hervรฉ Poussineau
    pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled());
241 845773ab Isaku Yamahata
242 845773ab Isaku Yamahata
    for(i = 0; i < nb_nics; i++) {
243 845773ab Isaku Yamahata
        NICInfo *nd = &nd_table[i];
244 845773ab Isaku Yamahata
245 845773ab Isaku Yamahata
        if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0))
246 48a18b3c Hervรฉ Poussineau
            pc_init_ne2k_isa(isa_bus, nd);
247 845773ab Isaku Yamahata
        else
248 845773ab Isaku Yamahata
            pci_nic_init_nofail(nd, "e1000", NULL);
249 845773ab Isaku Yamahata
    }
250 845773ab Isaku Yamahata
251 75717903 Isaku Yamahata
    ide_drive_get(hd, MAX_IDE_BUS);
252 845773ab Isaku Yamahata
    if (pci_enabled) {
253 c0897e0c Markus Armbruster
        PCIDevice *dev;
254 679f4f8b Stefano Stabellini
        if (xen_enabled()) {
255 679f4f8b Stefano Stabellini
            dev = pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1);
256 679f4f8b Stefano Stabellini
        } else {
257 679f4f8b Stefano Stabellini
            dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
258 679f4f8b Stefano Stabellini
        }
259 c0897e0c Markus Armbruster
        idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
260 c0897e0c Markus Armbruster
        idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
261 ddcada78 Jan Kiszka
262 ddcada78 Jan Kiszka
        /* FIXME there's some major spaghetti here.  Somehow we create the
263 ddcada78 Jan Kiszka
         * devices on the PIIX before we actually create it.  We create the
264 ddcada78 Jan Kiszka
         * PIIX3 deep in the recess of the i440fx creation too and then lose
265 ddcada78 Jan Kiszka
         * the DeviceState.
266 ddcada78 Jan Kiszka
         *
267 ddcada78 Jan Kiszka
         * For now, let's "fix" this by making judicious use of paths.  This
268 ddcada78 Jan Kiszka
         * is not generally the right way to do this.
269 ddcada78 Jan Kiszka
         */
270 57c9fafe Anthony Liguori
        object_property_add_child(object_resolve_path("/i440fx/piix3", NULL),
271 57c9fafe Anthony Liguori
                                  "rtc", (Object *)rtc_state, NULL);
272 845773ab Isaku Yamahata
    } else {
273 845773ab Isaku Yamahata
        for(i = 0; i < MAX_IDE_BUS; i++) {
274 c0897e0c Markus Armbruster
            ISADevice *dev;
275 48a18b3c Hervรฉ Poussineau
            dev = isa_ide_init(isa_bus, ide_iobase[i], ide_iobase2[i],
276 48a18b3c Hervรฉ Poussineau
                               ide_irq[i],
277 c0897e0c Markus Armbruster
                               hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]);
278 c0897e0c Markus Armbruster
            idebus[i] = qdev_get_child_bus(&dev->qdev, "ide.0");
279 845773ab Isaku Yamahata
        }
280 845773ab Isaku Yamahata
    }
281 845773ab Isaku Yamahata
282 4a0f031d Hervรฉ Poussineau
    audio_init(isa_bus, pci_enabled ? pci_bus : NULL);
283 845773ab Isaku Yamahata
284 c0897e0c Markus Armbruster
    pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device,
285 34d4260e Kevin Wolf
                 floppy, idebus[0], idebus[1], rtc_state);
286 845773ab Isaku Yamahata
287 845773ab Isaku Yamahata
    if (pci_enabled && usb_enabled) {
288 845773ab Isaku Yamahata
        usb_uhci_piix3_init(pci_bus, piix3_devfn + 2);
289 845773ab Isaku Yamahata
    }
290 845773ab Isaku Yamahata
291 845773ab Isaku Yamahata
    if (pci_enabled && acpi_enabled) {
292 845773ab Isaku Yamahata
        i2c_bus *smbus;
293 845773ab Isaku Yamahata
294 c9622478 Anthony PERARD
        if (!xen_enabled()) {
295 c9622478 Anthony PERARD
            cmos_s3 = qemu_allocate_irqs(pc_cmos_set_s3_resume, rtc_state, 1);
296 c9622478 Anthony PERARD
        } else {
297 c9622478 Anthony PERARD
            cmos_s3 = qemu_allocate_irqs(xen_cmos_set_s3_resume, rtc_state, 1);
298 c9622478 Anthony PERARD
        }
299 845773ab Isaku Yamahata
        smi_irq = qemu_allocate_irqs(pc_acpi_smi_interrupt, first_cpu, 1);
300 845773ab Isaku Yamahata
        /* TODO: Populate SPD eeprom data.  */
301 845773ab Isaku Yamahata
        smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
302 b881fbe9 Jan Kiszka
                              gsi[9], *cmos_s3, *smi_irq,
303 845773ab Isaku Yamahata
                              kvm_enabled());
304 a88df0b9 Isaku Yamahata
        smbus_eeprom_init(smbus, 8, NULL, 0);
305 845773ab Isaku Yamahata
    }
306 845773ab Isaku Yamahata
307 845773ab Isaku Yamahata
    if (pci_enabled) {
308 845773ab Isaku Yamahata
        pc_pci_device_init(pci_bus);
309 845773ab Isaku Yamahata
    }
310 845773ab Isaku Yamahata
}
311 845773ab Isaku Yamahata
312 845773ab Isaku Yamahata
static void pc_init_pci(ram_addr_t ram_size,
313 845773ab Isaku Yamahata
                        const char *boot_device,
314 845773ab Isaku Yamahata
                        const char *kernel_filename,
315 845773ab Isaku Yamahata
                        const char *kernel_cmdline,
316 845773ab Isaku Yamahata
                        const char *initrd_filename,
317 845773ab Isaku Yamahata
                        const char *cpu_model)
318 845773ab Isaku Yamahata
{
319 6bd10515 Avi Kivity
    pc_init1(get_system_memory(),
320 aee97b84 Avi Kivity
             get_system_io(),
321 6bd10515 Avi Kivity
             ram_size, boot_device,
322 845773ab Isaku Yamahata
             kernel_filename, kernel_cmdline,
323 0ec329da Jan Kiszka
             initrd_filename, cpu_model, 1, 1);
324 0ec329da Jan Kiszka
}
325 0ec329da Jan Kiszka
326 0ec329da Jan Kiszka
static void pc_init_pci_no_kvmclock(ram_addr_t ram_size,
327 0ec329da Jan Kiszka
                                    const char *boot_device,
328 0ec329da Jan Kiszka
                                    const char *kernel_filename,
329 0ec329da Jan Kiszka
                                    const char *kernel_cmdline,
330 0ec329da Jan Kiszka
                                    const char *initrd_filename,
331 0ec329da Jan Kiszka
                                    const char *cpu_model)
332 0ec329da Jan Kiszka
{
333 6bd10515 Avi Kivity
    pc_init1(get_system_memory(),
334 aee97b84 Avi Kivity
             get_system_io(),
335 6bd10515 Avi Kivity
             ram_size, boot_device,
336 0ec329da Jan Kiszka
             kernel_filename, kernel_cmdline,
337 0ec329da Jan Kiszka
             initrd_filename, cpu_model, 1, 0);
338 845773ab Isaku Yamahata
}
339 845773ab Isaku Yamahata
340 845773ab Isaku Yamahata
static void pc_init_isa(ram_addr_t ram_size,
341 845773ab Isaku Yamahata
                        const char *boot_device,
342 845773ab Isaku Yamahata
                        const char *kernel_filename,
343 845773ab Isaku Yamahata
                        const char *kernel_cmdline,
344 845773ab Isaku Yamahata
                        const char *initrd_filename,
345 845773ab Isaku Yamahata
                        const char *cpu_model)
346 845773ab Isaku Yamahata
{
347 845773ab Isaku Yamahata
    if (cpu_model == NULL)
348 845773ab Isaku Yamahata
        cpu_model = "486";
349 6bd10515 Avi Kivity
    pc_init1(get_system_memory(),
350 aee97b84 Avi Kivity
             get_system_io(),
351 6bd10515 Avi Kivity
             ram_size, boot_device,
352 845773ab Isaku Yamahata
             kernel_filename, kernel_cmdline,
353 0ec329da Jan Kiszka
             initrd_filename, cpu_model, 0, 1);
354 845773ab Isaku Yamahata
}
355 845773ab Isaku Yamahata
356 29d3ccde Anthony PERARD
#ifdef CONFIG_XEN
357 29d3ccde Anthony PERARD
static void pc_xen_hvm_init(ram_addr_t ram_size,
358 29d3ccde Anthony PERARD
                            const char *boot_device,
359 29d3ccde Anthony PERARD
                            const char *kernel_filename,
360 29d3ccde Anthony PERARD
                            const char *kernel_cmdline,
361 29d3ccde Anthony PERARD
                            const char *initrd_filename,
362 29d3ccde Anthony PERARD
                            const char *cpu_model)
363 29d3ccde Anthony PERARD
{
364 29d3ccde Anthony PERARD
    if (xen_hvm_init() != 0) {
365 29d3ccde Anthony PERARD
        hw_error("xen hardware virtual machine initialisation failed");
366 29d3ccde Anthony PERARD
    }
367 29d3ccde Anthony PERARD
    pc_init_pci_no_kvmclock(ram_size, boot_device,
368 29d3ccde Anthony PERARD
                            kernel_filename, kernel_cmdline,
369 29d3ccde Anthony PERARD
                            initrd_filename, cpu_model);
370 29d3ccde Anthony PERARD
    xen_vcpu_init();
371 29d3ccde Anthony PERARD
}
372 29d3ccde Anthony PERARD
#endif
373 29d3ccde Anthony PERARD
374 19857e62 Gerd Hoffmann
static QEMUMachine pc_machine_v1_0 = {
375 19857e62 Gerd Hoffmann
    .name = "pc-1.0",
376 845773ab Isaku Yamahata
    .alias = "pc",
377 845773ab Isaku Yamahata
    .desc = "Standard PC",
378 845773ab Isaku Yamahata
    .init = pc_init_pci,
379 845773ab Isaku Yamahata
    .max_cpus = 255,
380 845773ab Isaku Yamahata
    .is_default = 1,
381 845773ab Isaku Yamahata
};
382 845773ab Isaku Yamahata
383 ce01a508 Anthony Liguori
static QEMUMachine pc_machine_v0_15 = {
384 ce01a508 Anthony Liguori
    .name = "pc-0.15",
385 ce01a508 Anthony Liguori
    .desc = "Standard PC",
386 ce01a508 Anthony Liguori
    .init = pc_init_pci,
387 ce01a508 Anthony Liguori
    .max_cpus = 255,
388 ce01a508 Anthony Liguori
    .is_default = 1,
389 ce01a508 Anthony Liguori
};
390 ce01a508 Anthony Liguori
391 19857e62 Gerd Hoffmann
static QEMUMachine pc_machine_v0_14 = {
392 19857e62 Gerd Hoffmann
    .name = "pc-0.14",
393 19857e62 Gerd Hoffmann
    .desc = "Standard PC",
394 19857e62 Gerd Hoffmann
    .init = pc_init_pci,
395 19857e62 Gerd Hoffmann
    .max_cpus = 255,
396 3827cdb1 Alon Levy
    .compat_props = (GlobalProperty[]) {
397 3827cdb1 Alon Levy
        {
398 3827cdb1 Alon Levy
            .driver   = "qxl",
399 3827cdb1 Alon Levy
            .property = "revision",
400 3827cdb1 Alon Levy
            .value    = stringify(2),
401 3827cdb1 Alon Levy
        },{
402 3827cdb1 Alon Levy
            .driver   = "qxl-vga",
403 3827cdb1 Alon Levy
            .property = "revision",
404 3827cdb1 Alon Levy
            .value    = stringify(2),
405 ea830ebb Anthony Liguori
        },{
406 ea830ebb Anthony Liguori
            .driver   = "virtio-blk-pci",
407 ea830ebb Anthony Liguori
            .property = "event_idx",
408 ea830ebb Anthony Liguori
            .value    = "off",
409 ea830ebb Anthony Liguori
        },{
410 ea830ebb Anthony Liguori
            .driver   = "virtio-serial-pci",
411 ea830ebb Anthony Liguori
            .property = "event_idx",
412 ea830ebb Anthony Liguori
            .value    = "off",
413 ea830ebb Anthony Liguori
        },{
414 ea830ebb Anthony Liguori
            .driver   = "virtio-net-pci",
415 ea830ebb Anthony Liguori
            .property = "event_idx",
416 ea830ebb Anthony Liguori
            .value    = "off",
417 ea830ebb Anthony Liguori
        },{
418 ea830ebb Anthony Liguori
            .driver   = "virtio-balloon-pci",
419 ea830ebb Anthony Liguori
            .property = "event_idx",
420 ea830ebb Anthony Liguori
            .value    = "off",
421 3827cdb1 Alon Levy
        },
422 3827cdb1 Alon Levy
        { /* end of list */ }
423 3827cdb1 Alon Levy
    },
424 19857e62 Gerd Hoffmann
};
425 19857e62 Gerd Hoffmann
426 b903a0f7 Gerd Hoffmann
static QEMUMachine pc_machine_v0_13 = {
427 b903a0f7 Gerd Hoffmann
    .name = "pc-0.13",
428 b903a0f7 Gerd Hoffmann
    .desc = "Standard PC",
429 0ec329da Jan Kiszka
    .init = pc_init_pci_no_kvmclock,
430 b903a0f7 Gerd Hoffmann
    .max_cpus = 255,
431 9dbcca5a Gerd Hoffmann
    .compat_props = (GlobalProperty[]) {
432 9dbcca5a Gerd Hoffmann
        {
433 9dbcca5a Gerd Hoffmann
            .driver   = "virtio-9p-pci",
434 9dbcca5a Gerd Hoffmann
            .property = "vectors",
435 9dbcca5a Gerd Hoffmann
            .value    = stringify(0),
436 281a26b1 Gerd Hoffmann
        },{
437 281a26b1 Gerd Hoffmann
            .driver   = "VGA",
438 281a26b1 Gerd Hoffmann
            .property = "rombar",
439 281a26b1 Gerd Hoffmann
            .value    = stringify(0),
440 281a26b1 Gerd Hoffmann
        },{
441 281a26b1 Gerd Hoffmann
            .driver   = "vmware-svga",
442 281a26b1 Gerd Hoffmann
            .property = "rombar",
443 281a26b1 Gerd Hoffmann
            .value    = stringify(0),
444 362dd48c Isaku Yamahata
        },{
445 362dd48c Isaku Yamahata
            .driver   = "PCI",
446 362dd48c Isaku Yamahata
            .property = "command_serr_enable",
447 362dd48c Isaku Yamahata
            .value    = "off",
448 b91cb442 Michael S. Tsirkin
        },{
449 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-blk-pci",
450 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
451 b91cb442 Michael S. Tsirkin
            .value    = "off",
452 b91cb442 Michael S. Tsirkin
        },{
453 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-serial-pci",
454 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
455 b91cb442 Michael S. Tsirkin
            .value    = "off",
456 b91cb442 Michael S. Tsirkin
        },{
457 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-net-pci",
458 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
459 b91cb442 Michael S. Tsirkin
            .value    = "off",
460 25a21c94 Gerd Hoffmann
        },{
461 ea830ebb Anthony Liguori
            .driver   = "virtio-balloon-pci",
462 ea830ebb Anthony Liguori
            .property = "event_idx",
463 ea830ebb Anthony Liguori
            .value    = "off",
464 ea830ebb Anthony Liguori
        },{
465 25a21c94 Gerd Hoffmann
            .driver   = "AC97",
466 25a21c94 Gerd Hoffmann
            .property = "use_broken_id",
467 25a21c94 Gerd Hoffmann
            .value    = stringify(1),
468 9dbcca5a Gerd Hoffmann
        },
469 9dbcca5a Gerd Hoffmann
        { /* end of list */ }
470 9dbcca5a Gerd Hoffmann
    },
471 b903a0f7 Gerd Hoffmann
};
472 b903a0f7 Gerd Hoffmann
473 845773ab Isaku Yamahata
static QEMUMachine pc_machine_v0_12 = {
474 845773ab Isaku Yamahata
    .name = "pc-0.12",
475 845773ab Isaku Yamahata
    .desc = "Standard PC",
476 0ec329da Jan Kiszka
    .init = pc_init_pci_no_kvmclock,
477 845773ab Isaku Yamahata
    .max_cpus = 255,
478 845773ab Isaku Yamahata
    .compat_props = (GlobalProperty[]) {
479 845773ab Isaku Yamahata
        {
480 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
481 1e29a009 Amit Shah
            .property = "max_ports",
482 845773ab Isaku Yamahata
            .value    = stringify(1),
483 845773ab Isaku Yamahata
        },{
484 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
485 845773ab Isaku Yamahata
            .property = "vectors",
486 845773ab Isaku Yamahata
            .value    = stringify(0),
487 281a26b1 Gerd Hoffmann
        },{
488 281a26b1 Gerd Hoffmann
            .driver   = "VGA",
489 281a26b1 Gerd Hoffmann
            .property = "rombar",
490 281a26b1 Gerd Hoffmann
            .value    = stringify(0),
491 281a26b1 Gerd Hoffmann
        },{
492 281a26b1 Gerd Hoffmann
            .driver   = "vmware-svga",
493 281a26b1 Gerd Hoffmann
            .property = "rombar",
494 281a26b1 Gerd Hoffmann
            .value    = stringify(0),
495 b1aeb926 Isaku Yamahata
        },{
496 b1aeb926 Isaku Yamahata
            .driver   = "PCI",
497 b1aeb926 Isaku Yamahata
            .property = "command_serr_enable",
498 b1aeb926 Isaku Yamahata
            .value    = "off",
499 b91cb442 Michael S. Tsirkin
        },{
500 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-blk-pci",
501 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
502 b91cb442 Michael S. Tsirkin
            .value    = "off",
503 b91cb442 Michael S. Tsirkin
        },{
504 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-serial-pci",
505 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
506 b91cb442 Michael S. Tsirkin
            .value    = "off",
507 b91cb442 Michael S. Tsirkin
        },{
508 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-net-pci",
509 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
510 b91cb442 Michael S. Tsirkin
            .value    = "off",
511 25a21c94 Gerd Hoffmann
        },{
512 ea830ebb Anthony Liguori
            .driver   = "virtio-balloon-pci",
513 ea830ebb Anthony Liguori
            .property = "event_idx",
514 ea830ebb Anthony Liguori
            .value    = "off",
515 ea830ebb Anthony Liguori
        },{
516 25a21c94 Gerd Hoffmann
            .driver   = "AC97",
517 25a21c94 Gerd Hoffmann
            .property = "use_broken_id",
518 25a21c94 Gerd Hoffmann
            .value    = stringify(1),
519 845773ab Isaku Yamahata
        },
520 845773ab Isaku Yamahata
        { /* end of list */ }
521 845773ab Isaku Yamahata
    }
522 845773ab Isaku Yamahata
};
523 845773ab Isaku Yamahata
524 845773ab Isaku Yamahata
static QEMUMachine pc_machine_v0_11 = {
525 845773ab Isaku Yamahata
    .name = "pc-0.11",
526 845773ab Isaku Yamahata
    .desc = "Standard PC, qemu 0.11",
527 0ec329da Jan Kiszka
    .init = pc_init_pci_no_kvmclock,
528 845773ab Isaku Yamahata
    .max_cpus = 255,
529 845773ab Isaku Yamahata
    .compat_props = (GlobalProperty[]) {
530 845773ab Isaku Yamahata
        {
531 845773ab Isaku Yamahata
            .driver   = "virtio-blk-pci",
532 845773ab Isaku Yamahata
            .property = "vectors",
533 845773ab Isaku Yamahata
            .value    = stringify(0),
534 845773ab Isaku Yamahata
        },{
535 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
536 1e29a009 Amit Shah
            .property = "max_ports",
537 845773ab Isaku Yamahata
            .value    = stringify(1),
538 845773ab Isaku Yamahata
        },{
539 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
540 845773ab Isaku Yamahata
            .property = "vectors",
541 845773ab Isaku Yamahata
            .value    = stringify(0),
542 845773ab Isaku Yamahata
        },{
543 845773ab Isaku Yamahata
            .driver   = "ide-drive",
544 845773ab Isaku Yamahata
            .property = "ver",
545 845773ab Isaku Yamahata
            .value    = "0.11",
546 845773ab Isaku Yamahata
        },{
547 845773ab Isaku Yamahata
            .driver   = "scsi-disk",
548 845773ab Isaku Yamahata
            .property = "ver",
549 845773ab Isaku Yamahata
            .value    = "0.11",
550 845773ab Isaku Yamahata
        },{
551 845773ab Isaku Yamahata
            .driver   = "PCI",
552 845773ab Isaku Yamahata
            .property = "rombar",
553 845773ab Isaku Yamahata
            .value    = stringify(0),
554 b1aeb926 Isaku Yamahata
        },{
555 b1aeb926 Isaku Yamahata
            .driver   = "PCI",
556 b1aeb926 Isaku Yamahata
            .property = "command_serr_enable",
557 b1aeb926 Isaku Yamahata
            .value    = "off",
558 b91cb442 Michael S. Tsirkin
        },{
559 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-blk-pci",
560 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
561 b91cb442 Michael S. Tsirkin
            .value    = "off",
562 b91cb442 Michael S. Tsirkin
        },{
563 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-serial-pci",
564 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
565 b91cb442 Michael S. Tsirkin
            .value    = "off",
566 b91cb442 Michael S. Tsirkin
        },{
567 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-net-pci",
568 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
569 b91cb442 Michael S. Tsirkin
            .value    = "off",
570 25a21c94 Gerd Hoffmann
        },{
571 ea830ebb Anthony Liguori
            .driver   = "virtio-balloon-pci",
572 ea830ebb Anthony Liguori
            .property = "event_idx",
573 ea830ebb Anthony Liguori
            .value    = "off",
574 ea830ebb Anthony Liguori
        },{
575 25a21c94 Gerd Hoffmann
            .driver   = "AC97",
576 25a21c94 Gerd Hoffmann
            .property = "use_broken_id",
577 25a21c94 Gerd Hoffmann
            .value    = stringify(1),
578 845773ab Isaku Yamahata
        },
579 845773ab Isaku Yamahata
        { /* end of list */ }
580 845773ab Isaku Yamahata
    }
581 845773ab Isaku Yamahata
};
582 845773ab Isaku Yamahata
583 845773ab Isaku Yamahata
static QEMUMachine pc_machine_v0_10 = {
584 845773ab Isaku Yamahata
    .name = "pc-0.10",
585 845773ab Isaku Yamahata
    .desc = "Standard PC, qemu 0.10",
586 0ec329da Jan Kiszka
    .init = pc_init_pci_no_kvmclock,
587 845773ab Isaku Yamahata
    .max_cpus = 255,
588 845773ab Isaku Yamahata
    .compat_props = (GlobalProperty[]) {
589 845773ab Isaku Yamahata
        {
590 845773ab Isaku Yamahata
            .driver   = "virtio-blk-pci",
591 845773ab Isaku Yamahata
            .property = "class",
592 845773ab Isaku Yamahata
            .value    = stringify(PCI_CLASS_STORAGE_OTHER),
593 845773ab Isaku Yamahata
        },{
594 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
595 845773ab Isaku Yamahata
            .property = "class",
596 845773ab Isaku Yamahata
            .value    = stringify(PCI_CLASS_DISPLAY_OTHER),
597 845773ab Isaku Yamahata
        },{
598 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
599 1e29a009 Amit Shah
            .property = "max_ports",
600 845773ab Isaku Yamahata
            .value    = stringify(1),
601 845773ab Isaku Yamahata
        },{
602 845773ab Isaku Yamahata
            .driver   = "virtio-serial-pci",
603 845773ab Isaku Yamahata
            .property = "vectors",
604 845773ab Isaku Yamahata
            .value    = stringify(0),
605 845773ab Isaku Yamahata
        },{
606 845773ab Isaku Yamahata
            .driver   = "virtio-net-pci",
607 845773ab Isaku Yamahata
            .property = "vectors",
608 845773ab Isaku Yamahata
            .value    = stringify(0),
609 845773ab Isaku Yamahata
        },{
610 845773ab Isaku Yamahata
            .driver   = "virtio-blk-pci",
611 845773ab Isaku Yamahata
            .property = "vectors",
612 845773ab Isaku Yamahata
            .value    = stringify(0),
613 845773ab Isaku Yamahata
        },{
614 845773ab Isaku Yamahata
            .driver   = "ide-drive",
615 845773ab Isaku Yamahata
            .property = "ver",
616 845773ab Isaku Yamahata
            .value    = "0.10",
617 845773ab Isaku Yamahata
        },{
618 845773ab Isaku Yamahata
            .driver   = "scsi-disk",
619 845773ab Isaku Yamahata
            .property = "ver",
620 845773ab Isaku Yamahata
            .value    = "0.10",
621 845773ab Isaku Yamahata
        },{
622 845773ab Isaku Yamahata
            .driver   = "PCI",
623 845773ab Isaku Yamahata
            .property = "rombar",
624 845773ab Isaku Yamahata
            .value    = stringify(0),
625 b1aeb926 Isaku Yamahata
        },{
626 b1aeb926 Isaku Yamahata
            .driver   = "PCI",
627 b1aeb926 Isaku Yamahata
            .property = "command_serr_enable",
628 b1aeb926 Isaku Yamahata
            .value    = "off",
629 b91cb442 Michael S. Tsirkin
        },{
630 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-blk-pci",
631 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
632 b91cb442 Michael S. Tsirkin
            .value    = "off",
633 b91cb442 Michael S. Tsirkin
        },{
634 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-serial-pci",
635 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
636 b91cb442 Michael S. Tsirkin
            .value    = "off",
637 b91cb442 Michael S. Tsirkin
        },{
638 b91cb442 Michael S. Tsirkin
            .driver   = "virtio-net-pci",
639 b91cb442 Michael S. Tsirkin
            .property = "event_idx",
640 b91cb442 Michael S. Tsirkin
            .value    = "off",
641 25a21c94 Gerd Hoffmann
        },{
642 ea830ebb Anthony Liguori
            .driver   = "virtio-balloon-pci",
643 ea830ebb Anthony Liguori
            .property = "event_idx",
644 ea830ebb Anthony Liguori
            .value    = "off",
645 ea830ebb Anthony Liguori
        },{
646 25a21c94 Gerd Hoffmann
            .driver   = "AC97",
647 25a21c94 Gerd Hoffmann
            .property = "use_broken_id",
648 25a21c94 Gerd Hoffmann
            .value    = stringify(1),
649 845773ab Isaku Yamahata
        },
650 845773ab Isaku Yamahata
        { /* end of list */ }
651 845773ab Isaku Yamahata
    },
652 845773ab Isaku Yamahata
};
653 845773ab Isaku Yamahata
654 845773ab Isaku Yamahata
static QEMUMachine isapc_machine = {
655 845773ab Isaku Yamahata
    .name = "isapc",
656 845773ab Isaku Yamahata
    .desc = "ISA-only PC",
657 845773ab Isaku Yamahata
    .init = pc_init_isa,
658 845773ab Isaku Yamahata
    .max_cpus = 1,
659 845773ab Isaku Yamahata
};
660 845773ab Isaku Yamahata
661 29d3ccde Anthony PERARD
#ifdef CONFIG_XEN
662 29d3ccde Anthony PERARD
static QEMUMachine xenfv_machine = {
663 29d3ccde Anthony PERARD
    .name = "xenfv",
664 29d3ccde Anthony PERARD
    .desc = "Xen Fully-virtualized PC",
665 29d3ccde Anthony PERARD
    .init = pc_xen_hvm_init,
666 29d3ccde Anthony PERARD
    .max_cpus = HVM_MAX_VCPUS,
667 29d3ccde Anthony PERARD
    .default_machine_opts = "accel=xen",
668 29d3ccde Anthony PERARD
};
669 29d3ccde Anthony PERARD
#endif
670 29d3ccde Anthony PERARD
671 845773ab Isaku Yamahata
static void pc_machine_init(void)
672 845773ab Isaku Yamahata
{
673 19857e62 Gerd Hoffmann
    qemu_register_machine(&pc_machine_v1_0);
674 ce01a508 Anthony Liguori
    qemu_register_machine(&pc_machine_v0_15);
675 19857e62 Gerd Hoffmann
    qemu_register_machine(&pc_machine_v0_14);
676 b903a0f7 Gerd Hoffmann
    qemu_register_machine(&pc_machine_v0_13);
677 845773ab Isaku Yamahata
    qemu_register_machine(&pc_machine_v0_12);
678 845773ab Isaku Yamahata
    qemu_register_machine(&pc_machine_v0_11);
679 845773ab Isaku Yamahata
    qemu_register_machine(&pc_machine_v0_10);
680 845773ab Isaku Yamahata
    qemu_register_machine(&isapc_machine);
681 29d3ccde Anthony PERARD
#ifdef CONFIG_XEN
682 29d3ccde Anthony PERARD
    qemu_register_machine(&xenfv_machine);
683 29d3ccde Anthony PERARD
#endif
684 845773ab Isaku Yamahata
}
685 845773ab Isaku Yamahata
686 845773ab Isaku Yamahata
machine_init(pc_machine_init);