• The "pci_addr=" prefix currently required by pci_add/remove and
    drive_add has no practical use. Drop it, but still silently accept it
    for backward compatibility.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • The really time consuming part of snapshotting is to adjust the reference count
    of all clusters. Currently after each adjusted cluster the refcount block is
    written to disk.
    
    Don't write each single byte immediately to disk but cache all writes to the
    refcount block and write them out once we're done with the block.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Kevin Wolf authored
     
    Browse Code »
  • When using O_DIRECT, qcow2 snapshots didn't work any more for me. In the
    process of creating the snapshot, qcow2 tries to pwrite some new information
    (e.g. new L1 table) which will often end up being after the old end of the
    image file. Now pwrite tries to align things and reads the old contents of the
    file, read returns 0 because there is nothing to read after the end of file and
    pwrite is stuck in an endless loop.
    
    This patch allows to pread beyond the end of an image file. Whenever the
    given offset is after the end of the image file, the read succeeds and fills
    the buffer with zeros.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Kevin Wolf authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • Signed-off-by: Juan Quintela <quintela@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Juan Quintela authored
     
    Browse Code »
  • fix memory leak in cpu_unregister_map_client() and cpu_notify_map_clients().
    
    Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Isaku Yamahata authored
     
    Browse Code »
  • The documentation shows how to use -kernel and friends for booting Linux,
    but obviously knows nothing about multiboot yet.
    
    Let's include some documentation for multiboot, so people know how to fully
    exploit this cool new feature.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »
  • In order to build the multiboot option rom, we need a Makefile and a tool
    to sign the rom with.
    
    Both are provided by this patch and mostly taken from the extboot source,
    written by Anthony Liguori.
    
    Once built, the resulting binary gets copied to pc-bios automatically.
    
    Building also occurs automatically when on an x86 host.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf 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 »
  • The KVM kernel will disable all bits in CPUID which are not present in
    the host. As this is mostly true for the hypervisor bit (1.ecx),
    preserve its value before the trim and restore it afterwards.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • KVM provides an in-kernel feature to disable CPUID bits that are not
    present in the current host. So there is no need here to duplicate this
    work. Additionally allows 3DNow! on capable processors, since the
    restriction seems to apply to QEMU/TCG only.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • If we want to trim the user provided CPUID bits for KVM to be not greater
    than that of the host, we should not remove the bits _after_ we sent
    them to the kernel.
    This fixes the masking of features that are not present on the host by
    moving the trim function and it's call from helper.c to kvm.c.
    It helps to use -cpu host.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • Although the guest's CPUID bits can be controlled in a fine grained way
    in QEMU, a simple way to inject the host CPU is missing. This is handy
    for KVM desktop virtualization, where one wants the guest to support the
    full host feature set.
    Introduce another CPU type called 'host', which will propagate the host's
    CPUID bits to the guest. Unwanted bits can still be turned off by using
    the existing syntax (-cpu host,-skinit)
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • KVM defaults to the hypervisor CPUID bit to be set, whereas pure
    QEMU clears it. On some occasions one wants to set or clear it the
    other way round (for instance to get HyperV running inside a guest).
    
    Move the bit-set to be done before the command line parsing and
    enable it by default. One can disable it by using: -cpu qemu64,-hypervisor
    Fix some whitespace damage on the way.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Andre Przywara authored
     
    Browse Code »
  • Problem: It is impossible to feed filenames with the character colon because
    qemu interprets such names as a protocol. For example filename scsi:0, is
    interpreted as a protocol by name "scsi".
    
    This patch allows user to espace colon characters. For example the above
    filename can now be expressed either as 'scsi\:0' or as file:scsi:0
    
    anything following the "file:" tag is interpreted verbatin. However if "file:"
    tag is omitted then any colon characters in the string must be escaped using
    backslash.
    
    Here are couple of examples:
    
    scsi\:0\:abc is a local file scsi:0:abc
    http\://myweb is a local file by name http://myweb
    file:scsi:0:abc is a local file scsi:0:abc
    file:http://myweb is a local file by name http://myweb
    
    Signed-off-by: Ram Pai <linuxram@us.ibm.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Ram Pai authored
     
    Browse Code »
  • Not every distro provides libcurses anymore, at least OpenSUSE, and at
    least under a standard library search path. So try to link against
    standard ncurses first and then fall back to legacy curses.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Extend the syntax of hostfwd_add/remove to optionally take a tuple of
    VLAN ID and slirp stack name. If those are omitted, the commands will
    continue to work on the first registered slirp stack.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Introduce qemu_find_vlan_client_by_name for VLANClientState lookup based
    on VLAN ID and client name. This is useful for monitor commands.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Push the smb state, smb_dir, into SlirpState and construct it in a way
    that allows multiple smb instances (one per slirp stack). Remove the smb
    directory on slirp cleanup instead of qemu termination. As VLAN clients
    are also cleaned up on process termination, no feature is lost.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Make sure for invocations from the monitor that slirp_smb properly
    reports errors and doesn't terminate qemu.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Instead of open-coding this, we can use the power of the shell to remove
    the smb_dir on exit.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Once again this was a long journey to reach the destination: Allow to
    instantiate slirp multiple times. But as in the past, the journey was
    worthwhile, cleaning up, fixing and enhancing various parts of the user
    space network stack along the way.
    
    What is this particular change good for? Multiple slirps instances
    allow separated user space networks for guests with multiple NICs. This
    is already possible, but without any slirp support for the second
    network, ie. without a chance to talk to that network from the host via
    IP. We have a legacy guest system here that benefits from this slirp
    enhancement, allowing us to run both of its NICs purely over
    unprivileged user space IP stacks.
    
    Another benefit of this patch is that it simply removes an artificial
    restriction of the configuration space qemu is providing, avoiding
    another source of surprises that users may face when playing with
    possible setups.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »