• * fix secondary bus setup.
     * use base->name instead of "FIXME" for device name.
       Yes, the device name is redundant.  Only for drivers converted
       to qdev already though.  Once all drivers are converted we can
       and should kill it.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Gerd Hoffmann authored
     
    Browse Dir »
  • BusInfo is filled with name and size (pretty much like I did for
    DeviceInfo as well).  There is also a function pointer to print
    bus-specific device information to the monitor.  sysbus is hooked
    up there, I've also added a print function for PCI.
    
    Device creation is slightly modified as well:  The device type search
    loop now also checks the bus type while scanning the list instead of
    complaining thereafter in case of a mismatch.  This effectively gives
    each bus a private namespace for device names.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Paul Brook <paul@codesourcery.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunch
    of parameters.  Also adds config_read and config_write callbacks to
    PCIDeviceInfo, so drivers needing these can be converted to the qdev
    device API too.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Gerd Hoffmann authored
     
    Browse Code »


  • Add "cmask" table of constant register masks: if a bit is not writeable
    and is set in cmask table, this bit is checked on load.  An attempt to
    load an image that would change such a register causes load to fail.
    Use this table to make sure that load does not modify registers that
    guest can not change (directly or indirectly).
    
    Note: we can't just assume that read-only registers never change,
    because the guest could change a register indirectly.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse File »
  • Add routines to manage PCI capability list. First user will be MSI-X.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse File »
  • Change much of hw/pci to use symbolic constants and a table-driven
    design: add a mask table with writable bits set and readonly bits unset.
    Detect change by comparing original and new registers.
    
    This makes it easy to support capabilities where read-only/writeable
    bit layout differs between devices, depending on capabilities present.
    
    As a result, writing a single byte in BAR registers now works as
    it should. Writing to upper limit registers in the bridge
    also works as it should. Code is also shorter.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin 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 »





  • Refactor the monitor API and prepare it for decoupled terminals:
    term_print functions are renamed to monitor_* and all monitor services
    gain a new parameter (mon) that will once refer to the monitor instance
    the output is supposed to appear on. However, the argument remains
    unused for now. All monitor command callbacks are also extended by a mon
    parameter so that command handlers are able to pass an appropriate
    reference to monitor output services.
    
    For the case that monitor outputs so far happen without clearly
    identifiable context, the global variable cur_mon is introduced that
    shall once provide a pointer either to the current active monitor (while
    processing commands) or to the default one. On the mid or long term,
    those use case will be obsoleted so that this variable can be removed
    again.
    
    Due to the broad usage of the monitor interface, this patch mostly deals
    with converting users of the monitor API. A few of them are already
    extended to pass 'mon' from the command handler further down to internal
    functions that invoke monitor_printf.
    
    At this chance, monitor-related prototypes are moved from console.h to
    a new monitor.h. The same is done for the readline API.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »








  • This sets a default PCI subsystem ID for all emulated PCI devices.  PCI
    specs require this, so do it.
    
    In many cases it is enougth to know the PCI ID to handle a device
    correctly.  Sometimes a device driver must identify the exact piece of
    hardware (via PCI Subsystem ID) though.
    
    What does this patch to qemu devices:
    
    Right now the emulated PCI devices have no PCI subsystem ID, only the
    PCI ID.  The discussed patch sets a default PCI subsystem ID for all
    emulated devices.  Which will make the qemu devices look pretty much
    like in the laptop case: all PCI subsystem IDs will point to qemu by
    default.
    
    If a driver emulates a very specific piece of hardware where it has to
    emulate more than just the PCI chip, it can overwrite the PCI subsystem
    ID without problems.  The es1370 driver does that for example.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5986 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »

  • MMIO exits are more expensive in KVM or Xen than in QEMU because they 
    involve, at least, privilege transitions.  However, MMIO write 
    operations can be effectively batched if those writes do not have side 
    effects.
    
    Good examples of this include VGA pixel operations when in a planar 
    mode.  As it turns out, we can get a nice boost in other areas too.  
    Laurent mentioned a 9.7% performance boost in iperf with the coalesced 
    MMIO changes for the e1000 when he originally posted this work for KVM.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »