1. 04 4月, 2011 8 次提交
    • P
      vl.c: Tidy up message printed when we exit on a signal · f1d3fb04
      Peter Maydell 提交于
      Tidy up the message printed when qemu exits due to a signal, so that
      it's clearer where the message is coming from and that it's not just
      stray debug output.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Acked-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      f1d3fb04
    • S
      net: Remove unused net-checksum.c file · 22156ab4
      Stefan Hajnoczi 提交于
      The common checksum functions were moved to net/checksum.c in commit
      7200ac3c but the original net-checksum.c
      was never deleted from the source tree.  Remove it now since all users
      of the checksum functions link against net/checksum.o and net-checksum.c
      is not even compiled anymore.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      22156ab4
    • K
      e1000: Mask out lower bits of RDBAL/TDBAL · d17161f6
      Kevin Wolf 提交于
      Rx and Tx descriptors are 16 byte aligned, so the lower bits are
      ignored by real hardware. In fact, they always read back as zero on real
      hardware, but probably nobody relies on that.
      Signed-off-by: NKevin Wolf <mail@kevin-wolf.de>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      d17161f6
    • J
      gdbstub: Catch and report more vmstop reasons · 425189a8
      Jan Kiszka 提交于
      When the VM goes into stop state while there is a gdb frontend attached,
      it makes sense to inform gdb about this fact and at least a bit about
      the stop reason. Basically, all stops are interesting except for the
      temporary VMSTOP_SAVE/LOADVM.
      
      The patch maps the relevant VMSTOP reasons on unique and more or less
      associatable signals that gdb understands.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      425189a8
    • S
      tests/cris: Fix some errors and potential crashes · 2917dce4
      Stefan Weil 提交于
      These errors were reported by cppcheck:
      
      tests/cris/check_openpf1.c:30: error:
      Mismatching allocation and deallocation: f
      
      tests/cris/check_openpf2.c:13: error:
      Mismatching allocation and deallocation: f
      
      tests/cris/check_stat3.c:16: error:
      Buffer overrun possible for long cmd-line args
      
      tests/cris/check_stat4.c:18: error:
      Buffer overrun possible for long cmd-line args
      
      The first two are obvious coding errors (fopen needs fclose, not close).
      
      The last two may seem less important (nobody will start test code
      with an argument of more than 1022 characters which raises a buffer
      overrun). Fixing them nevertheless helps with static code checks
      like those done by cppcheck.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
      2917dce4
    • I
      ioapic: when switches to level trigger mode, interrupts raised repeatedly. · 9bcfc7da
      Isaku Yamahata 提交于
      - the trigger mode is edge at first
      - During initializatoin, the interrupt is raised as edge which is masked.
        The corresponding bit of irr is set.
      - Then the mode is switched to level and it's unmasked.
      - the bit of irr is set, so the interrupt is raised repeatedly by
        ioapic_service().
      - OS considers that the irq line is broken and falls back to polling mode.
      
      This patch fixes the issues.
      After raising edige, clear the bit of irr.
      
      > Bringing up interface eth0:
      > Determining IP information for eth0...irq 18: nobody cared (try booting with the "irqpoll" option)
      > Pid: 4126, comm: ip Not tainted 2.6.38-rc7 #1
      > Call Trace:
      >  <IRQ>  [<ffffffff8105b009>] ? __report_bad_irq+0x38/0x87
      >  [<ffffffff8105b177>] ? note_interrupt+0x11f/0x188
      >  [<ffffffff8105bacf>] ? handle_fasteoi_irq+0xa7/0xd1
      >  [<ffffffff810046ff>] ? handle_irq+0x83/0x8c
      >  [<ffffffff81003eb9>] ? do_IRQ+0x48/0xaf
      >  [<ffffffff81300513>] ? ret_from_intr+0x0/0xe
      >  [<ffffffff81031ab8>] ? __do_softirq+0x4f/0x114
      >  [<ffffffff81002d6c>] ? call_softirq+0x1c/0x28
      >  [<ffffffff81004647>] ? do_softirq+0x33/0x68
      >  [<ffffffff810316fb>] ? irq_exit+0x36/0x38
      >  [<ffffffff81015f2c>] ? smp_apic_timer_interrupt+0x88/0x96
      >  [<ffffffff81002853>] ? apic_timer_interrupt+0x13/0x20
      >  <EOI>  [<ffffffff810177ed>] ? __ioapic_set_affinity+0x68/0x7c
      >  [<ffffffff813000f0>] ? _raw_spin_unlock_irqrestore+0x8/0xa
      >  [<ffffffff8105a84f>] ? __setup_irq+0x224/0x2cb
      >  [<ffffffff8120e3c5>] ? e1000_intr+0x0/0x103
      >  [<ffffffff8105a9c7>] ? request_threaded_irq+0xd1/0x114
      >  [<ffffffff8120e396>] ? e1000_request_irq+0x34/0x63
      >  [<ffffffff8121237d>] ? e1000_open+0x81/0x11f
      >  [<ffffffff8129097c>] ? call_netdevice_notifiers+0x45/0x4a
      >  [<ffffffff81290d8d>] ? __dev_open+0x97/0xc4
      >  [<ffffffff8128e9c5>] ? __dev_change_flags+0xb9/0x13d
      >  [<ffffffff81290cc1>] ? dev_change_flags+0x1c/0x51
      >  [<ffffffff812d0542>] ? devinet_ioctl+0x26e/0x594
      >  [<ffffffff812d174c>] ? inet_ioctl+0x92/0xaa
      >  [<ffffffff81281d75>] ? T.1003+0x13/0x32
      >  [<ffffffff81282152>] ? sock_ioctl+0x1f2/0x1ff
      >  [<ffffffff810ae2d3>] ? do_vfs_ioctl+0x498/0x4e7
      >  [<ffffffff81281203>] ? sock_alloc_file+0xb3/0x115
      >  [<ffffffff8109f79f>] ? fd_install+0x31/0x5d
      >  [<ffffffff810ae364>] ? sys_ioctl+0x42/0x65
      >  [<ffffffff81001f3b>] ? system_call_fastpath+0x16/0x1b
      > handlers:
      > [<ffffffff8120e3c5>] (e1000_intr+0x0/0x103)
      > Disabling IRQ #18
      Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      9bcfc7da
    • S
      Fix trivial "endianness bugs" · 4ff9786c
      Stefan Weil 提交于
      Replace endianess -> endianness.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      4ff9786c
    • P
      hw/vexpress.c: Add model of ARM Versatile Express board · 2055283b
      Peter Maydell 提交于
      Add a model of the ARM Versatile Express board (with A9MPx4
      daughterboard).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      2055283b
  2. 03 4月, 2011 7 次提交
  3. 02 4月, 2011 25 次提交
    • A
      ccid: add docs · 1056c02b
      Alon Levy 提交于
      Add documentation for the usb-ccid device and accompanying two card
      devices, ccid-card-emulated and ccid-card-passthru.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      1056c02b
    • A
      ccid: add ccid-card-emulated device · 585738a6
      Alon Levy 提交于
      This devices uses libcacard (internal) to emulate a smartcard conforming
      to the CAC standard. It attaches to the usb-ccid bus. Usage instructions
      (example command lines) are in the following patch in docs/ccid.txt. It
      uses libcacard which uses nss, so it can work with both hw cards and
      certificates (files).
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v20->v21: (Jes Sorenson review)
       * cosmetics
       * use qemu-thread and qemu_malloc/qemu_free
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v18->v19:
       * add qdev.desc
       * backend: drop the enumeration property, back to using a string one.
      
      changes from v16->v17:
       * use PROP_TYPE_ENUM for backend
      
      changes from v15->v16:
       * fix error reporting in initfn
       * bump copyright year
       * update copyright license
      
      changes from v1:
       * remove stale comments, use only c-style comments
       * bugfix, forgot to set recv_len
       * change reader name to 'Virtual Reader'
      585738a6
    • R
      libcacard: add docs · 65794b43
      Robert Relyea 提交于
      65794b43
    • R
      libcacard: add vscclient · 2ac85b93
      Robert Relyea 提交于
      client to talk to ccid-card-passthru and use smartcard on client to
      perform actual operations.
      
      v23->v24 changes: (Jes Sorensen review 2)
       * use qemu_socket instead of socket
       * use fprintf(stderr,..) for errors
       * remove unneccessary includes since using qemu_common.h
      2ac85b93
    • R
      libcacard: initial commit · 111a38b0
      Robert Relyea 提交于
      libcacard emulates a Common Access Card (CAC) which is a standard
      for smartcards. It is used by the emulated ccid card introduced in
      a following patch. Docs are available in docs/libcacard.txt
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v24->v25:
       * Fix out of tree builds.
       * Fix build with linux-user targets.
      
      changes from v23->v24: (Jes Sorensen review 2)
       * Makefile.target: use obj-$(CONFIG_*) +=
       * remove unrequired includes, include qemu-common before qemu-thread
        * required adding #define NO_NSPR_10_SUPPORT (harmless)
      
      changes from v22->v23:
       * configure fixes: (reported by Stefan Hajnoczi)
        * test a = b, not a == b (second isn't portable)
        * quote $source_path in case it contains spaces
         - this doesn't really help since there are many other places
           that need similar fixes, not introduced by this patch.
      
      changes from v21->v22:
       * fix configure to not link libcacard if nss not found
          (reported by Stefan Hajnoczi)
       * fix vscclient linkage with simpletrace backend
          (reported by Stefan Hajnoczi)
       * card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
          (reported by William van de Velde)
      
      changes from v20->v21: (Jes Sorensen review)
       * use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
        and qemu_free), error_report
       * assert instead of ASSERT
       * cosmetic fixes
       * use strpbrk and isspace
       * add --disable-nss --enable-nss here, instead of in the final patch.
       * split vscclient, passthru and docs to following patches.
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v15->v16:
      
      Build:
       * don't erase self with distclean
       * fix make clean after make distclean
       * Makefile: make vscclient link quiet
      
      Behavioral:
       * vcard_emul_nss: load coolkey in more situations
       * vscclient:
        * use hton,ntoh
        * send init on connect, only start vevent thread on response
        * read payload after header check, before type switch
        * remove Reconnect
        * update for vscard_common changes, empty Flush implementation
      
      Style/Whitespace:
       * fix wrong variable usage
       * remove unused variable
       * use only C style comments
        * add copyright header
        * fix tabulation
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      libcacard: fix out of tree builds
      111a38b0
    • A
      ccid: add passthru card device · edbb2136
      Alon Levy 提交于
      The passthru ccid card is a device sitting on the usb-ccid bus and
      using a chardevice to communicate with a remote device using the
      VSCard protocol defined in libcacard/vscard_common.h
      
      Usage docs available in following patch in docs/ccid.txt
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      Changes from v23->v24:
       * fixed double license line in header.
      
      Changes from v20->v21: (Jes Sorensen review)
       * add reference to COPYING in header
       * long comment reformatting
      
      Changes from v19->v20:
       * checkpatch.pl
      
      Changes from v18->v19:
       * add qdev.desc
       * remove .qdev.unplug (no hot unplug support for ccid bus)
      
      Changes from v16->v17:
       * fix wrong cast when receiving VSC_Error
       * ccid-card-passthru: force chardev user wakeup by sending Init
         see lengthy comment below.
      
      Changes from v15->v16:
      
      Behavioral changes:
       * return correct size
       * return error instead of assert if client sent too large ATR
       * don't assert if client sent too large a size, but add asserts for indices to buffer
       * reset vscard_in indices on chardev disconnect
       * handle init from client
       * error if no chardev supplied
       * use ntoh, hton
       * eradicate reader_id_t
       * remove Reconnect usage (removed from VSCARD protocol)
       * send VSC_SUCCESS on card insert/remove and reader add/remove
      
      Style fixes:
       * width of line fix
       * update copyright
       * remove old TODO's
       * update file header comment
       * use macros for debug levels
       * c++ style comment replacement
       * update copyright license
       * fix ATR size comment
       * fix whitespace in struct def
       * fix DPRINTF prefix
       * line width fix
      
      ccid-card-passthru: force chardev user wakeup by sending Init
      
      The problem: how to wakeup the user of the smartcard when the smartcard
      device is initialized?
      
      Long term solution: have a callback interface. This was done via
      the deprecated so called chardev ioctl interface.
      
      Short term solution: do a write. Specifically we write an Init message.
      And we change the client to send it's own Init message regardless of
      receiving this one. Additional Init messages will be regarded as
      acceptable, the first one received after connection establishment is
      the determining one wrt capabilities.
      edbb2136
    • A
      introduce libcacard/vscard_common.h · 0c165247
      Alon Levy 提交于
      ---
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      v20->v21 changes: (Jes Sorensen review)
       * license set to 2+
       * long comment fixes, remove empty line at eof.
       * add reference to COPYING
      
      v19->v20 changes:
       * checkpatch.pl
      
      v15->v16 changes:
      
      Protocol change:
       * VSCMsgInit capabilities and magic
       * removed ReaderResponse, will use Error instead with code==VSC_SUCCESS.
       * adaded Flush and FlushComplete, remove Reconnect.
       * define VSCARD_MAGIC
       * added error code VSC_SUCCESS.
      
      Fixes:
       * update VSCMsgInit comment
       * fix message type enum
       * remove underscore from wrapping define
       * update copyright
       * updated comments.
       * Header comment updated
       * remove C++ style comment
       * fix comment for VSCMsgError
       * give names to enums in typedefs
      0c165247
    • A
      usb-ccid: add CCID bus · 36707144
      Alon Levy 提交于
      A CCID device is a smart card reader. It is a USB device, defined at [1].
      This patch introduces the usb-ccid device that is a ccid bus. Next patches will
      introduce two card types to use it, a passthru card and an emulated card.
      
       [1] http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_CCID_Rev110.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v20->v21: (Jes Sorenson review)
       * cosmetic changes - fix multi line comments.
       * reorder fields in USBCCIDState
       * add reference to COPYING
       * add --enable-smartcard and --disable-smartcard here (moved
       from last patch)
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v18->v19:
       * merged: ccid.h: add copyright, fix define and remove non C89 comments
       * add qdev.desc
      
      changes from v15->v16:
      
      Behavioral changes:
       * fix abort on client answer after card remove
       * enable migration
       * remove side affect code from asserts
       * return consistent self-powered state
       * mask out reserved bits in ccid_set_parameters
       * add missing abRFU in SetParameters (no affect on linux guest)
      
      whitefixes / comments / consts defines:
       * remove stale comment
       * remove ccid_print_pending_answers if no DEBUG_CCID
       * replace printf's with DPRINTF, remove DEBUG_CCID, add verbosity defines
       * use error_report
       * update copyright (most of the code is not original)
       * reword known bug comment
       * add missing closing quote in comment
       * add missing whitespace on one line
       * s/CCID_SetParameter/CCID_SetParameters/
       * add comments
       * use define for max packet size
      
      Comment for "return consistent self-powered state":
      
      the Configuration Descriptor bmAttributes claims we are self powered,
      but we were returning not self powered to USB_REQ_GET_STATUS control message.
      
      In practice, this message is not sent by a linux 2.6.35.10-74.fc14.x86_64
      guest (not tested on other guests), unless you issue lsusb -v as root (for
      example).
      36707144
    • A
      qemu-thread.h: include inttypes.h · 65097429
      Alon Levy 提交于
      qemu-thread.h relies on uint64_t being defined, but doesn't include
      inttypes.h explicitly. This makes it easier to use it from vscclient (part
      of libcacard).
      65097429
    • A
      f20600f2
    • P
      net: Improve the warnings for dubious command line option combinations · f68b9d67
      Peter Maydell 提交于
      Improve the warnings we give if the user specified a combination of -net
      options which don't make much sense:
       * Don't warn about anything if the config is the implicit default
         "-net user -net nic" rather than one specified by the user (this will
         only kick in for boards with no NIC or if CONFIG_SLIRP is not set)
       * Diagnose the case where the user asked for NICs which the board
         didn't instantiate (for example where the user asked for two NICs
         but the board only supports one)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      f68b9d67
    • P
      hw/versatilepb, realview: Fix condition for instantiation of onboard NIC · e6b3c8ca
      Peter Maydell 提交于
      Correct the condition determining whether we instantiate the onboard
      NIC or a PCI card NIC on VersatilePB and Realview boards. This was broken
      in two ways:
       (1) if the user asked for two default NICs ("-net nic -net nic") we would
      crash trying to strcmp() a NULL pointer
       (2) if the user asked for two NICs explicitly of the same model as the
      onboard NIC (eg "-net nic,model=smc91c111 -net nic,model=smc91c111")
      we would try to instantiate two onboard NICs at the same address.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      e6b3c8ca
    • M
      pcnet: Fix sign extension: make ipxe work with >2G RAM · 366c9332
      Michael Brown 提交于
      The problem is with definitions in hw/pcnet.c such as:
      
        #define CSR_CRDA(S)      ((S)->csr[28] | ((S)->csr[29] << 16))
      
      "(S)->csr[29]" is a uint16_t, but "(S)->csr[29] << 16" gets promoted to
      int, so the overall CSR_CRDA(s) is a (signed) int rather than a uint32_t.
      
      This then gets assigned to a uint64_t using
      
        target_phys_addr_t crda = CSR_CRDA(s);
      
      so when (S)->csr[29] has the high bit set, we end up with
      crda=0xffffffffxxxxxxxx.
      
      From: Michael Brown <mcb30@ipxe.org>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      366c9332
    • P
      target-arm: Don't leak TCG temp for UNDEFs in Neon load/store space · e318a60b
      Peter Maydell 提交于
      Move the allocation and freeing of the TCG temp used for the address for
      Neon load/store instructions so that we don't allocate the temporary
      until we've done enough decoding to know that the instruction is not
      an UNDEF pattern; this avoids leaking the TCG temp in these cases.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      e318a60b
    • P
      target-arm: Fix VLD of single element to all lanes · 8e18cde3
      Peter Maydell 提交于
      Fix several bugs in VLD of single element to all lanes:
      
      The "single element to all lanes" form of VLD1 differs from those for
      VLD2, VLD3 and VLD4 in that bit 5 indicates whether the loaded element
      should be written to one or two Dregs (rather than being a register
      stride). Handle this by special-casing VLD1 rather than trying to
      have one loop which deals with both VLD1 and 2/3/4.
      
      Handle VLD4.32 with 16 byte alignment specified, rather than UNDEFfing.
      
      UNDEF for the invalid size and alignment combinations.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      8e18cde3
    • T
    • L
      vnc: added missing name->keysym pairs for Polish national characters · ee7495d3
      Leszek Grzegorek 提交于
      There are no { name, keysym } values in name2keysym[] array for Polish
      national characters so "-k pl" option has no effect.
      Signed-off-by: NLeszek Grzegorek <leszek.grzegorek@gmail.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      ee7495d3
    • M
      get rid of private bitmap functions in block/sheepdog.c, use generic ones · 8cffde73
      Michael Tokarev 提交于
      qemu now has generic bitmap functions,
      so don't redefine them in sheepdog.c,
      use common header instead.  A small cleanup.
      
      Here's only one function which is actually
      used in sheepdog and gets replaced with
      a generic one (simplified):
      
      - static inline int test_bit(int nr, const volatile unsigned long *addr)
      + static inline int test_bit(int nr, const unsigned long *addr)
       {
      -  return ((1UL << (nr % BITS_PER_LONG))
                  & ((unsigned long*)addr)[nr / BITS_PER_LONG])) != 0;
      +  return 1UL & (addr[nr / BITS_PER_LONG] >> (nr & (BITS_PER_LONG-1)));
       }
      
      The body is equivalent, but the argument is not: there's
      "volatile" in there.  Why it is used for - I'm not sure.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Acked-by: NMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      8cffde73
    • B
      lsi53c895a: add support for ABORT messages · 508240c0
      Bernhard Kohl 提交于
      If these messages are not handled correctly the guest driver may hang.
      
      Always mandatory:
      - ABORT
      - BUS DEVICE RESET
      
      Mandatory if tagged queuing is implemented (which disks usually do):
      - ABORT TAG
      - CLEAR QUEUE
      Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      508240c0
    • W
      fix build errors when we enable acpi_piix4 debug · 59df4c11
      Wen Congyang 提交于
      I enable acpi_piix4 debug, and got the following build errors:
      # make
        CC    libhw64/acpi_piix4.o
      cc1: warnings being treated as errors
      /home/wency/source/qemu/hw/acpi_piix4.c: In function ‘pm_ioport_write’:
      /home/wency/source/qemu/hw/acpi_piix4.c:193: error: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘uint64_t’
      /home/wency/source/qemu/hw/acpi_piix4.c:193: error: format ‘%04x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’
      /home/wency/source/qemu/hw/acpi_piix4.c: In function ‘pm_ioport_read’:
      /home/wency/source/qemu/hw/acpi_piix4.c:219: error: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘uint64_t’
      make[1]: *** [acpi_piix4.o] Error 1
      make: *** [subdir-libhw64] Error 2
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      59df4c11
    • S
      ui/sdl: Load optional QEMU icon · 09cec717
      Stefan Weil 提交于
      Load an optional QEMU icon file. If there is no icon file named
      qemu.bmp in QEMU's default search path, QEMU will run with
      the usual system default icon.
      
      A matching icon file  will be loaded and used by X Windows managers
      or MS Windows while a QEMU instance is running.
      
      SDL requires icon files in 32x32x4 bmp format.
      
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      09cec717
    • A
      d818bfc5
    • D
      Add SLOF-based partition firmware for pSeries machine, allowing more boot options · a9f8ad8f
      David Gibson 提交于
      Currently, the emulated pSeries machine requires the use of the
      -kernel parameter in order to explicitly load a guest kernel.  This
      means booting from the virtual disk, cdrom or network is not possible.
      
      This patch addresses this limitation by inserting a within-partition
      firmware image (derived from the "SLOF" free Open Firmware project).
      If -kernel is not specified, qemu will now load the SLOF image, which
      has access to the qemu boot device list through the device tree, and
      can boot from any of the usual virtual devices.
      
      In order to support the new firmware, an extension to the emulated
      machine/hypervisor is necessary.  Unlike Linux, which expects
      multi-CPU entry to be handled kexec() style, the SLOF firmware expects
      only one CPU to be active at entry, and to use a hypervisor RTAS
      method to enable the other CPUs one by one.
      
      This patch also implements this 'start-cpu' method, so that SLOF can
      start the secondary CPUs and marshal them into the kexec() holding
      pattern ready for entry into the guest OS.  Linux should, and in the
      future might directly use the start-cpu method to enable initially
      disabled CPUs, but for now it does require kexec() entry.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a9f8ad8f
    • D
      Implement PAPR VPA functions for pSeries shared processor partitions · ed120055
      David Gibson 提交于
      Shared-processor partitions are those where a CPU is time-sliced between
      partitions, rather than being permanently dedicated to a single
      partition.  qemu emulated partitions, since they are just scheduled with
      the qemu user process, behave mostly like shared processor partitions.
      
      In order to better support shared processor partitions (splpar), PAPR
      defines the "VPA" (Virtual Processor Area), a shared memory communication
      channel between the hypervisor and partitions.  There are also two
      additional shared memory communication areas for specialized purposes
      associated with the VPA.
      
      A VPA is not essential for operating an splpar, though it can be necessary
      for obtaining accurate performance measurements in the presence of
      runtime partition switching.
      
      Most importantly, however, the VPA is a prerequisite for PAPR's H_CEDE,
      hypercall, which allows a partition OS to give up it's shared processor
      timeslices to other partitions when idle.
      
      This patch implements the VPA and H_CEDE hypercalls in qemu.  We don't
      implement any of the more advanced statistics which can be communicated
      through the VPA.  However, this is enough to make normal pSeries kernels
      do an effective power-save idle on an emulated pSeries, significantly
      reducing the host load of a qemu emulated pSeries running an idle guest OS.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ed120055
    • B
      Add a PAPR TCE-bypass mechanism for the pSeries machine · 08942ac1
      Ben Herrenschmidt 提交于
      Usually, PAPR virtual IO devices use a virtual IOMMU mechanism, TCEs,
      to mediate all DMA transfers.  While this is necessary for some sorts of
      operation, it can be complex to program and slow for others.
      
      This patch implements a mechanism for bypassing TCE translation, treating
      "IO" addresses as plain (guest) physical memory addresses.  This has two
      main uses:
       * Simple, but 64-bit aware programs like firmwares can use the VIO devices
      without the complexity of TCE setup.
       * The guest OS can optionally use the TCE bypass to improve performance in
      suitable situations.
      
      The mechanism used is a per-device flag which disables TCE translation.
      The flag is toggled with some (hypervisor-implemented) RTAS methods.
      Signed-off-by: NBen Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      08942ac1