1. 05 3月, 2014 20 次提交
    • A
      target-ppc: disable unsupported modes for SPR_CTRL/SPR_UCTRL · 4e381819
      Alexey Kardashevskiy 提交于
      The Figure 17 "SPR encodings" of the PowerISA 2.07 describes CTRL SPR as:
      
                             priviledged
      #   spr5-9 spr0-4 name mtspr mfspr len cat
      136 00100  01000  CTRL   -    no    32  S
      152 00100  11000  CTRL  yes    -    32  S
      
      According to this chart, the hypervisor's CTRL (#152) does not support
      reading, the user-space's CTRL (UCTRL, #136) does not support writing.
      
      This replaces unsupported operations with the default SPR_NOACCESS hook.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      4e381819
    • N
      spapr_vscsi: Fix REPORT_LUNS handling · 3052f0d5
      Nathan Whitehorn 提交于
      Intercept REPORT_LUNS commands addressed either to SRP LUN 0 or the well-known
      LUN for REPORT_LUNS commands. This is required to implement the SAM and SPC
      specifications.
      
      Since SRP implements only a single SCSI target port per connection, the SRP
      target is required to report all available LUNs in response to a REPORT_LUNS
      command addressed either to LUN 0 or the well-known LUN. Instead, QEMU was
      forwarding such requests to the first QEMU SCSI target, with the result that
      initiators that relied on this feature would only see LUNs on the first QEMU
      SCSI target.
      
      Behavior for REPORT_LUNS commands addressed to any other LUN is not specified
      by the standard and so is left unchanged. This preserves behavior under Linux
      and SLOF, which enumerate possible LUNs by hand and so address no commands
      either to LUN 0 or the well-known REPORT_LUNS LUN.
      Signed-off-by: NNathan Whitehorn <nwhitehorn@freebsd.org>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      [agraf: define constant as ULL for 32bit hosts]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3052f0d5
    • A
      spapr-pci: enable adding PHB via -device · 09aa9a52
      Alexey Kardashevskiy 提交于
      Recent changes introduced cannot_instantiate_with_device_add_yet
      and removed capability of adding yet another PCI host bridge via
      command line for SPAPR platform (POWERPC64 server).
      
      This brings the capability back and puts SPAPR PHB into "bridge"
      category.
      
      This is not much use for emulated PHB but it is absolutely required
      for VFIO as we put an IOMMU group onto a separate PHB on SPAPR.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      09aa9a52
    • G
      PPC: KVM: add support for LPCR · 6cd8712c
      Greg Kurz 提交于
      The LPCR special purpose register was introduced with the PowerPC 970MP family.
      
      This patch initializes LPCR for the following families:
      - 970 MP
      - POWER5+
      - POWER7
      - POWER8
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6cd8712c
    • A
      PPC: KVM: fix "set one register" · 7a7c05d7
      Alexey Kardashevskiy 提交于
      Due to missing @one_reg_id assignment in _spr_register(),
      the kvm_get_one_reg/kvm_set_one_reg API has never really been working.
      
      This reenables the API by assigning the @one_reg_id field in the SPR
      descriptor.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7a7c05d7
    • C
      mmu-hash64: fix Virtual Page Class Key Protection · 363248e8
      Cédric Le Goater 提交于
      commit f80872e2 (mmu-hash64: Implement
      Virtual Page Class Key Protection) added a new page protection
      mechanism based on page keys and the AMR register to control access.
      
      The AMR register allows or prohibits reads and/or writes on a page
      depending on the control bits associated to the key. A store or a load
      is only permitted if the associate bit is 0 (Power ISA), and not 1 as
      the code is currently doing. This patch modifies ppc_hash64_amr_prot()
      to correct the protection check.
      
      This issue was unvailed by commit ccfb53ed6360cac0d5f6f7915ca9ae7eed866412
      (target-ppc: fix Authority Mask Register init value) which changed the
      initialisation value of the AMR register to 0.
      Signed-off-by: NCédric Le Goater <clg@fr.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      363248e8
    • A
      target-ppc: fix Authority Mask Register init value · 0dc083fe
      Alexey Kardashevskiy 提交于
      The existing default value (-1) of the AMR register forbids data access
      to all 32 classes. Since the guest linux does not change this register,
      we end up with the guest hanging right after switching from the real to
      protected mode.
      
      This sets the default AMR value to zero what enables data access for all
      classes.
      
      The only reason for not hitting this bug before is that
      kvm_arch_put_registers() did not put any SPR to KVM due to missing
      assignment of @one_reg_id in _spr_register() (which is going to be fixed
      by a separate patch).
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      0dc083fe
    • A
      target-ppc: dump DAR and DSISR · ca480de6
      Anton Blanchard 提交于
      The DAR and DSISR can be very useful when debugging issues, so add
      them to ppc_cpu_dump_state. We had another bug in this area: all
      of the v2.06 MMU types were missing.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ca480de6
    • A
      kvm: Add a new machine option kvm-type · 135a129a
      Aneesh Kumar K.V 提交于
      Targets like ppc64 support different types of KVM, one which use
      hypervisor mode and the other which doesn't. Add a new machine
      option kvm-type that helps in selecting the respective ones
      We also add a new QEMUMachine callback get_vm_type that helps
      in mapping the string representation of kvm type specified.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      [agraf: spelling fixes, use error_report(), use qemumachine.h]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      135a129a
    • A
      KVM: Split QEMUMachine typedef into separate header · 9c06a1f7
      Alexander Graf 提交于
      Older gcc versions (such as the one in SLES11) get confused when you declare
      a typedef on the same struct twice.
      
      To work around that limitation, let's extract the QEMUMachine typedef into a
      separate header file that is guarded by preprocessor duplicate include checks.
      
      This fixes the following type of compile errors for me:
      
        In file included from vl.c:125:
        include/hw/xen/xen.h:39: error: redefinition of typedef "QEMUMachine"
        include/sysemu/kvm.h:155: error: previous declaration of "QEMUMachine" was here
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9c06a1f7
    • A
      target-ppc: remove unsupported SPRs from 970 and P5+ · 88ccd23a
      Alexey Kardashevskiy 提交于
      SPR_750FX_HID2 and L2CR are not defined in 970* user manuals nor POWER5
      bookIV nor PowerISA 2.04, the numbers assigned to them are not defined
      either so remove them.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      88ccd23a
    • A
      target-ppc: remove embedded MMU SPRs from 970, P5+/7/7+/8 · 40194917
      Alexey Kardashevskiy 提交于
      PowerISA 2.04+ puts MMUCFG and MMUCSR0 SPRs to "E" (embedded) category so
      remove it from POWER7/8 class as it is "S" (server) category.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      40194917
    • A
      target-ppc: fix SPR_CTRL/SPR_UCTRL register numbers · 0bfe9299
      Alexey Kardashevskiy 提交于
      Assuming that "U" in SPR_UCTRL is for "user", there is inconsistency with
      970 user manuals/P5-bookIV/PowerISA204 which define the number as:
      
                             priviledged
      #   spr5-9 spr0-4 name mtspr mfspr len cat
      136 00100  01000  CTRL   -    no    32  S
      152 00100  11000  CTRL  yes    -    32  S
      
      This swaps the numbers. No effect from this change is expected though.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      0bfe9299
    • A
      target-ppc: remove powerpc 970gx · 81d2fb4d
      Alexey Kardashevskiy 提交于
      The 970GX definition was added in 2007 and it made sense then but this
      version has never been released to the markets and it does not exist in
      the real world so there is no point in emulating it.
      
      This removes 970GX.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      81d2fb4d
    • A
      target-ppc: fix LPCR SPR number · 6475c9f0
      Alexey Kardashevskiy 提交于
      PowerISA defines LPCR SPR number as 318=0x13E but QEMU uses the value of
      316.
      
      This fixes the definition of LPCR SPR.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6475c9f0
    • A
      target-ppc: fix compile error when PPC_DUMP_CPU is enabled · a5100e75
      Alexey Kardashevskiy 提交于
      Since last use of PPC_DUMP_CPU by whoever he/she was, env->tlb became
      a union and POWERPC CPU class got QOM'ed so defining PPC_DUMP_CPU
      breaks compile.
      
      This fixes compiler errors.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a5100e75
    • A
      block/gluster: Add missing argument to qemu_gluster_init() call · f55ea629
      Andreas Färber 提交于
      Commit adccfbcd (block: gluster - add
      reopen support.) did not supply the qemu_gluster_init() Error **
      argument, needed since commit a7451cb8
      (gluster: correctly propagate errors).
      
      Pass through qemu_gluster_reopen_prepare()'s errp, as done in
      qemu_gluster_open().
      
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f55ea629
    • P
      Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-04' into staging · ac458e12
      Peter Maydell 提交于
      trivial patches for 2014-03-04
      
      # gpg: Signature made Tue 04 Mar 2014 06:13:56 GMT using RSA key ID 74F0C838
      # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
      # gpg:                 aka "Michael Tokarev <mjt@debian.org>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
      #      Subkey fingerprint: E190 8639 3B10 B51B AC2C  8B73 5253 C5AD 74F0 C838
      
      * remotes/mjt/tags/trivial-patches-2014-03-04:
        vl: Remove unneeded include file
        qga: Remove unneeded include file
        qemu-img: Remove unneeded include files
        exec: Remove unneeded include files
        util/iov: Use qemu/sockets.h instead of conditional code
        qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration
        tests/test-int128: Don't use __noclone__ attribute on clang
        stubs: Optimize dependencies for gdbstub.c
        tcg: Fix typo in comment (dependancies -> dependencies)
        bswap: Modify prototypes of st[wl]_{le, be}_p (avoid type conversions)
        bswap: Modify prototype of stb_p (avoid type conversions)
        object: Report type in error when not user creatable.
        include/qemu/host-utils.h: Trivial typo: ctz->cto
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ac458e12
    • P
      Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging · e00ef747
      Peter Maydell 提交于
      * remotes/qmp-unstable/queue/qmp: (32 commits)
        qapi: Add missing null check to opts_start_struct()
        qapi: Clean up superfluous null check in qapi_dealloc_type_str()
        qapi: Clean up null checking in generated visitors
        qapi: Drop unused code in qapi-commands.py
        qapi: Drop nonsensical header guard in generated qapi-visit.c
        qapi: Fix licensing of scripts
        tests/qapi-schema: Cover flat union types
        tests/qapi-schema: Cover union types with base
        tests/qapi-schema: Cover complex types with base
        tests/qapi-schema: Cover anonymous union types
        tests/qapi-schema: Cover simple argument types
        tests/qapi-schema: Cover optional command arguments
        tests/qapi-schema: Actually check successful QMP command response
        monitor: Remove left-over code in do_info_profile.
        qerror: Improve QERR_DEVICE_NOT_ACTIVE message
        qmp: Check for returned data from __json_read in get_events
        dump: add 'query-dump-guest-memory-capability' command
        Define the architecture for compressed dump format
        dump: make kdump-compressed format available for 'dump-guest-memory'
        dump: add API to write dump pages
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e00ef747
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 4a29420e
      Peter Maydell 提交于
      Block pull request
      
      # gpg: Signature made Fri 28 Feb 2014 18:27:24 GMT using RSA key ID 81AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        block/vmdk: do not report file offset for compressed extents
        discard rbd error output when not relevant in qemu-iotests
        block: use /var/tmp instead of /tmp for -snapshot
        qemu-io-test: Disable Quorum test when not compiled in.
        qmp: Make Quorum error events more palatable.
        qmp: Fix BlockdevOptionQuorum.
        block: gluster - add reopen support.
        block: gluster - code movements, state storage changes
        qemu-iotests: add more tests to the "quick" group
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4a29420e
  2. 04 3月, 2014 18 次提交
  3. 03 3月, 2014 2 次提交