• 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: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »
  • Signed-off-by: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »
  • On Win32 the setvbuf function requires the last parameter to be size between 2 and INT_MAX bytes, so the calls always failed. Since the whole point of the calls is to set line-buffered mode for the file handle and that's not supported on Win32 anyway, conditionally remove them.
    
    Signed-off-by: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »
  • Signed-off-by: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »
  • Replace the usage of DDK headers with the SDK counterpart "winioctl.h".
    
    Signed-off-by: Filip Navara <filip.navara@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Filip Navara authored
     
    Browse Code »
  • While fixing migration with -S, commit
    89befdd1 broke the rest of us. Poor
    glommer, with a poor family, spare him his life from this monstruosity.
    
    Since the unconditional vm_start, not autostart was the villain, I'm putting
    back autostart. Let me know if you prefer other solutions, it doesn't really matter,
    doesn't really matter to me.
    
    Any way the wind blows...
    
    Signed-off-by: Glauber Costa <glommer@redhat.com>
    CC: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Glauber Costa authored
     
    Browse Code »
  • The only caller of on_vcpu() is protected by ifdef
    KVM_CAP_SET_GUEST_DEBUG, so protect on_vcpu() too otherwise QEMU
    may not to build.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Luiz Capitulino authored
     
    Browse Code »
  • Calling gettimeofday() to compute a time interval can cause problems if
    the system clock jumps forwards or backwards; replace updtime() with
    qemu_get_clock(rt_clock), which calls clock_gettime(CLOCK_MONOTONIC) if
    it is available.
    
    Also remove some useless macros.
    
    Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Ed Swierk authored
     
    Browse Code »
  • The UDP emulation code for talk has been commented out since the
    beginning of time, and unless someone who runs CU-SeeMe on qemu with
    user-mode networking can vouch that the special magic (a) is necessary
    and (b) works, let's get rid of the code.
    
    Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Ed Swierk authored
     
    Browse Code »
  • I don't think it's critical to do this, but it's
    best to keep uninit and error recovery consistent.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Signed-off-by: Jes Sorensen <jes@sgi.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jes Sorensen authored
     
    Browse Code »
  • Follow on patch will use it to determine the size of the MADT and
    other BIOS tables.
    
    Signed-off-by: Jes Sorensen <jes@sgi.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jes Sorensen authored
     
    Browse Code »
  • We currently use host endian long types to store information
    in the dirty bitmap.
    
    This works reasonably well on Little Endian targets, because the
    u32 after the first contains the next 32 bits. On Big Endian this
    breaks completely though, forcing us to be inventive here.
    
    So Ben suggested to always use Little Endian, which looks reasonable.
    
    We only have dirty bitmap implemented in Little Endian targets so far
    and since PowerPC would be the first Big Endian platform, we can just
    as well switch to Little Endian always with little effort without
    breaking existing targets.
    
    This is the userspace part of the patch. It shouldn't change anything
    for existing targets, but help PowerPC.
    
    It replaces my older patch called "Use 64bit pointer for dirty log".
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »
  • Dirty logs currently get written with native "long" size. On little endian
    it doesn't matter if we use uint64_t instead though, because we'd still end
    up using the right bytes.
    
    On big endian, this does become a bigger problem, so we need to ensure that
    kernel and userspace talk the same language, which means getting rid of "long"
    and using a defined size instead.
    
    So I decided to use 64 bit types at all times. This doesn't break existing
    targets but will in conjunction with a patch I'll send to the KVM ML make
    dirty logs work with 32 bit userspace on 64 kernel with big endian.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Alexander Graf authored
     
    Browse Code »
  • This patch addresses the problems found by Andriy Gapon:
    
    - The code was incorrectly overwriting the high order 32
      bits of the timer and hpet config registers. This didn't show up
      in testing because linux and windows use hpet in legacy mode,
      where the high order 32 bits (advertising available interrupts)
      of the timer config register are ignored, and the high order 32
      bits of the hpet config register are reserved and unused.
    
    - The mask for level-triggered interrupts was off by a bit. (hpet
      doesn't currently support level-triggered interrupts).
    
    In addition, I removed some unused #defines, and corrected the ioapic
    interrupt values advertised. I'd set this up early in hpet development
    and never went back to correct it, and no bugs resulted since linux and
    windows use hpet in legacy mode where available interrupts are ignored.
    
    Signed-off-by: Beth Kon <eak@us.ibm.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Beth Kon authored
     
    Browse Code »
  • Unless a virtual server address was explicitly defined (which is
    impossible with the legacy -net channel format), guestfwd did not
    properly forwarded host->guest packets. This patch fixes it.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Demo QemuOpts in action ;)
    
    Implementing a alternative way to specify the filename should be
    just a few lines of code now once we decided how the cmd line syntax
    should look like.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • This stores device parameters in a better way than unparsed strings.
    
    New types:
      QemuOpt       -  one key-value pair.
      QemuOpts      -  group of key-value pairs, belonging to one
                       device, i.e. one drive.
      QemuOptsList  -  list of some kind of devices, i.e. all drives.
    
    Functions are provided to work with these types.  The plan is that some
    day we will pass around QemuOpts pointers instead of strings filled with
    "key1=value1,key2=value2".
    
    Check out the next patch to see all this in action ;)
    
    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 »
  • 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 »
  • cleanup pretty simliar to the drives_table removal patch:
     - drop the table and make a linked list out of it.
     - pass around struct pointers instead of table indices.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • -drive accepts the new id= now, allowing to explicitely name your
    drives.  They will show up with that name in "info block" if specified,
    otherwise the existing namimg scheme is used to autogenerate one.
    
    There is also a new function to lookup drives by name.  Not used yet.
    The plan is to link disk drivers and drives using the drive id instead
    of passing around pointers to BlockDriveState.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • 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 »
  • Hook i44fx pcihost into sysbus.
    Convert Host bridge and ISA bridge pci devices to qdev.
    Tag as no-user.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • The -device switch is the users frontend to the qdev_device_add function
    added by the previous patch.
    
    Also adds a linked list where command line options can be saved.
    Use it for the new -device and for the -usbdevice and -bt switches.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • This patch implements a parser and qdev tree walker for bus paths and
    adds qdev_device_add on top of this.
    
    A bus path can be:
      (1) full path, i.e. /i440FX-pcihost/pci.0/lsi/scsi.0
      (2) bus name, i.e. "scsi.0".  Best used together with id= to make
          sure this is unique.
      (3) relative path starting with a bus name, i.e. "pci.0/lsi/scsi.0"
    
    For the (common) case of a single child bus being attached to a device
    it is enougth to specify the device only, i.e. "pci.0/lsi" will be
    accepted too.
    
    qdev_device_add() adds devices and accepts bus= parameters to find the
    bus the device should be attached to.  Without bus= being specified it
    takes the first bus it finds where the device can be attached to (i.e.
    first pci bus for pci devices, ...).
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Create a default bus name if none is passed to qbus_create().
    
    If the parent device has DeviceState->id set it will be used to create
    the bus name,. i.e. -device lsi,id=foo will give you a scsi bus named
    "foo.0".
    
    If there is no id BusInfo->name (lowercased) will be used instead, i.e.
    -device lsi will give you a scsi bus named "scsi.0".
    
    A scsi adapter with two scsi busses would have "scsi.0" and "scsi.1" or
    "$id.0" and "$id.1" busses.  The numbers of the child busses are per
    device, i.e. when adding two lsi adapters both will have a "*.0" child
    bus.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Put the new property into use.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • So we can parse "$slot.$fn" strings into devfn numbers.
    
    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 an 'alias' field to QEMUMachine and display it in the output of
    'qemu -M ?' with an '(aliased to foo)' suffix.
    
    Aliases can change targets in newer versions of qemu, so management tools
    may choose canonicalize machine types to ensure that if a user chooses an
    alias, that the actual machine type used will remain compatible in
    future.
    
    This is intended to mimic a symlink to a machine description file.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • This allows a program to initialize a host networking device using a
    file descriptor passed over a unix monitor socket.
    
    The program must first pass the file descriptor using SCM_RIGHTS
    ancillary data with the getfd monitor command. It then may do
    "host_net_add tap fd=name" to use the named file descriptor.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • Add monitor commands to support passing file descriptors via
    SCM_RIGHTS.
    
    getfd assigns the passed file descriptor a name for use with other
    monitor commands.
    
    closefd allows passed file descriptors to be closed. If a monitor
    command actually uses a named file descriptor, closefd will not be
    required.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • If a file descriptor is passed via a message with SCM_RIGHTS ancillary
    data on a unix socket, store the file descriptor for use in the
    chr_read() handler. Close the file descriptor if it was not used.
    
    The qemu_chr_get_msgfd() API provides access to the passed descriptor.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • Split out tcp_chr_recv() out of tcp_chr_read() and implement it on
    non-win32 using recvmsg(). This is needed for a subsequent patch
    which implements SCM_RIGHTS support.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • - implement "used" bit in tlb translation entry
    - mark tlb entry used if qemu code/data translation succeeds
    - fold i/d mmu replacement writes code into replace_tlb_1bit_lru which
    adds 1bit lru replacement algorithm; previously code tried to replace
    first unlocked entry only
    
    - extract more bitmasks to named macros
    - add "immu" or "dmmu" type name to debugging output where appropriate
    
    Signed-off-by: igor.v.kovalenko@gmail.com
    
    --
    Kind regards,
    Igor V. Kovalenko
    Igor Kovalenko authored
     
    Browse Code »
  • - add names to mmu registers, this helps understanding the code which
    uses/modifies them.
    - fold i/d mmu tlb entries tag and tte arrays into arrays of tlb entries
    - extract demap_tlb routine (code duplication)
    - extract replace_tlb routine (code duplication)
    
    - flush qemu tlb translations when replacing sparc64 mmu tlb entries
    
    I have no test case which demands flushing qemu translations,
    and this patch should have no other visible changes to runtime.
    
    Signed-off-by: igor.v.kovalenko@gmail.com
    
    --
    Kind regards,
    Igor V. Kovalenko
    Igor Kovalenko authored
     
    Browse Code »