• First step cleaning up the drives handling.  This one does nothing but
    removing drives_table[], still it became seriously big.
    
    drive_get_index() is gone and is replaced by drives_get() which hands
    out DriveInfo pointers instead of a table index.  This needs adaption in
    *tons* of places all over.
    
    The drives are now maintained as linked list.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • The pc-0.11 type allows users of qemu-0.11 to use a machine type which
    they know will remain compatible when the upgrade to qemu-0.12.
    
    Management tools may choose to canonicalize the 'pc' machine type to
    'pc-0.11' so that if the 'pc' alias changes target in future versions
    of qemu, the machine type used will remain compatible.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »

  • Add vectors property, allowing to turn off msi by setting vectors=0.
    Add compat property to pc-0.10 disabling msi.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Add class property to virtio-console-pci allowing to specify the PCI class.
    Add compat property to pc-0.10 to set the old PCI class.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Add class property to virtio-blk-pci allowing to specify the PCI class.
    Add compat property to pc-0.10 to set the old PCI class.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • This patch is a major overhaul of the device properties.  The properties
    are saved directly in the device state struct now, the linked list of
    property values is gone.
    
    Advantages:
      * We don't have to maintain the list with the property values.
      * The value in the property list and the value actually used by
        the device can't go out of sync any more (used to happen for
        the pci.devfn == -1 case) because there is only one place where
        the value is stored.
      * A record describing the property is required now, you can't set
        random properties any more.
    
    There are bus-specific and device-specific properties.  The former
    should be used for properties common to all bus drivers.  Typical
    use case is bus addressing, i.e. pci.devfn and i2c.address.
    
    Properties have a PropertyInfo struct attached with name, size and
    function pointers to parse and print properties.  A few common property
    types have PropertyInfos defined in qdev-properties.c.  Drivers are free
    to implement their own very special property parsers if needed.
    
    Properties can have default values.  If unset they are zero-filled.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Here is a patch I had sent twice to the list 2 years ago.
    Hopefuly this time someone will be interested
    
    It adds support for passing vga mode to linux kernel through
    vga= option in -append
    
    Signed-off-by: Pascal Terjan <pterjan@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Pascal Terjan authored
     
    Browse Code »
  • Add a pc-0-10 machine type to allow a pc machine to be created with
    virtio block and console devices compatibility with qemu-0.10.x.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »

  • We want to do (at least) two things to the virtio-balloon device:
    suppress it, and control its PCI address.  Option -no-virtio-balloon
    lets us do only the former.  To get the latter, replace
    -no-virtio-balloon with
    
        -balloon none   disable balloon device
        -balloon virtio[,addr=str]
                        enable virtio balloon device (default)
    
    Syntax suggested by Anthony Liguori.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »
  • At this point, this refactoring looks like overkill. But we will need it
    for CPU hotplugging, and qemu-kvm already carries it. Merging it early
    would help qemu-kvm when rebasing against upstream.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • This reverts commit 8217606e (and
    updates later added users of qemu_register_reset), we solved the
    problem it originally addressed less invasively.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • This patch implements support for Multiboot on x86 for -kernel.
    Multiboot is a "new" approach to get rid of different bootloaders, providing
    a unified interface for the kernel. It supports command line options and
    kernel modules.
    
    The two probably best known projects using multiboot are Xen and GNU Hurd.
    
    This implementation should be mostly feature-complete. It is missing VBE
    extensions, but as no system uses them currently it does not really hurt.
    
    To use multiboot, specify the kernel as -kernel option. Modules should be given
    as -initrd options, seperated by a comma (,). -append also works.
    
    Please bear in mind that grub also does gzip decompression, which qemu does
    not do yet. To run existing images, please ungzip them first.
    
    The guest multiboot loader code is implemented as option rom using int 19.
    Parts of the work are based on efforts by Rene Rebe, who originally ported
    my code to int 19.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »
  • Multiboot passes options to the option rom using the fw_cfg device.
    Right now, that device is local to the bochs_bios_init function.
    
    Let's change that and expose it, so everyone may put data in there.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »
  • For multiboot support, we need bochs_bios_init to happen before
    load_linux, so we get the fw_cfg device.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »

  • APIC reset handler already resets cpu, no need to reset it twice.
    Also register cpu_reset handler directly to make it impossible to
    add additional code to main_cpu_reset() by mistake.
    
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gleb Natapov authored
     
    Browse File »
  • Make drive_init() accept addr=, put the value into struct DriveInfo.
    Use it in all the places that create virtio-blk-pci devices:
    pc_init1(), bamboo_init(), mpc8544ds_init().
    
    Don't support addr= in third argument of monitor command pci_add and
    second argument of drive_add, because that clashes with their first
    arguments.  Admittedly unelegant.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »
  • Make net_client_init() accept addr=, put the value into struct
    NICinfo.  Use it in pci_nic_init(), and remove arguments bus and
    devfn.
    
    Don't support addr= in third argument of monitor command pci_add,
    because that clashes with its first argument.  Admittedly unelegant.
    
    Machines "malta" and "r2d" have a default NIC with a well-known PCI
    address.  Deal with that the same way as the NIC model: make
    pci_nic_init() take an optional default to be used when the user
    doesn't specify one.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Markus Armbruster authored
     
    Browse Code »
  • introruce piix4_device_hot_add() for piix4 specific code
    and make qemu_system_device_hot_add() generic.
    
    Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Isaku Yamahata authored
     
    Browse Code »
  • The code how it is today, is totally painful to read and keep.
    To begin with, the code is duplicated with the option rom loading
    code that linux_boot and vga are already using.
    
    This patch introduces a "bootable" state in NICInfo structure,
    that we can use to keep track of whether or not a given nic should
    be bootable, avoiding the introduction of yet another global state.
    
    With that in hands, we move the code in vl.c to hw/pc.c, and use
    the already existing infra structure to load those option roms.
    
    Error checking code suggested by Mark McLoughlin
    
    Signed-off-by: Glauber Costa <glommer@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Glauber Costa authored
     
    Browse Code »

  • (patch is on top of "Apic creation should not depend on pci" series)
    
    Currently cpu_index is used as cpu apic id on x86.  This is incorrect
    since apic ids not have to be continuous (they can also encode cpu
    hierarchy information). This patch uses cpuid_apic_id for initial apic id
    value. For now cpuid_apic_id is set to be equal to cpu_index so behaviour
    is fully backward compatible, but it allows us to add qemu option to
    provide other values for cpu apic id.
    
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gleb Natapov authored
     
    Browse Code »
  • It should depend on whether cpu has APIC.
    
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gleb Natapov authored
     
    Browse Code »
  • This new option may be used to disable the virtio-balloon device.
    
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Eduardo Habkost authored
     
    Browse Code »


  • Implement and use a common device bus state.  The main side-effect is
    that creating a bus and attaching it to a parent device are no longer
    separate operations.  For legacy code we allow a NULL parent, but that
    should go away eventually.
    
    Also tweak creation code to veriry theat a device in on the right bus.
    
    Signed-off-by: Paul Brook <paul@codesourcery.com>
    Paul Brook authored
     
    Browse File »

  • Add the parameter 'order' to qemu_register_reset and sort callbacks on
    registration. On system reset, callbacks with lower order will be
    invoked before those with higher order. Update all existing users to the
    standard order 0.
    
    Note: At least for x86, the existing users seem to assume that handlers
    are called in their registration order. Therefore, the patch preserves
    this property. If someone feels bored, (s)he could try to identify this
    dependency and express it properly on callback registration.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »






  • The vga_ram_size argument to machine init functions always has the same
    value, and is ignored by many machines (including SPARC32 which has an
    obsolete ifdef for VGA_RAM_SIZE).
    
    Remove it and push VGA_RAM_SIZE into vga_int.h.
    
    Signed-off-by: Paul Brook <paul@codesourcery.com>
    Paul Brook authored
     
    Browse Code »