1. 05 5月, 2017 3 次提交
    • S
      Merge remote-tracking branch 'shorne/tags/pull-or-20170504' into staging · 317134bb
      Stefan Hajnoczi 提交于
      Openrisc Features and Fixes for qemu 2.10
      
      # gpg: Signature made Thu 04 May 2017 01:41:45 AM BST
      # gpg:                using RSA key 0xC3B31C2D5E6627E4
      # gpg: Good signature from "Stafford Horne <shorne@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: D9C4 7354 AEF8 6C10 3A25  EFF1 C3B3 1C2D 5E66 27E4
      
      * shorne/tags/pull-or-20170504:
        target/openrisc: Support non-busy idle state using PMR SPR
        target/openrisc: Remove duplicate features property
        target/openrisc: Implement full vmstate serialization
        migration: Add VMSTATE_STRUCT_2DARRAY()
        target/openrisc: implement shadow registers
        migration: Add VMSTATE_UINTTL_2DARRAY()
        target/openrisc: add numcores and coreid support
        target/openrisc: Fixes for memory debugging
        target/openrisc: Implement EPH bit
        target/openrisc: Implement EVBAR register
        MAINTAINERS: Add myself as openrisc maintainer
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      317134bb
    • S
      Merge remote-tracking branch 'awilliam/tags/vfio-updates-20170503.0' into staging · 4f3652b3
      Stefan Hajnoczi 提交于
      VFIO fixes 2017-05-03
      
       - Enable 8-byte memory region accesses (Jose Ricardo Ziviani)
       - Fix vfio-pci error message (Dong Jia Shi)
      
      # gpg: Signature made Wed 03 May 2017 10:28:55 PM BST
      # gpg:                using RSA key 0x239B9B6E3BB08B22
      # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
      # gpg:                 aka "Alex Williamson <alex@shazbot.org>"
      # gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
      # gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"
      # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22
      
      * awilliam/tags/vfio-updates-20170503.0:
        vfio/pci: Fix incorrect error message
        vfio: enable 8-byte reads/writes to vfio
        vfio: Set MemoryRegionOps:max_access_size and min_access_size
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4f3652b3
    • S
      Merge remote-tracking branch 'cohuck/tags/s390x-20170502' into staging · 4f225f34
      Stefan Hajnoczi 提交于
      More s390x patches, this time boot related:
      - LOADPARM machine property, exposed to the guest via SCLP and
        diagnose 308
      - Use LOADPARM in the s390-ccw bios to select a boot entry
      - Fix a crash in the ipl device code when a virtio-scsi-pci device
        has been specified
      
      # gpg: Signature made Tue 02 May 2017 02:29:26 PM BST
      # gpg:                using RSA key 0xDECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * cohuck/tags/s390x-20170502:
        hw/s390x/ipl: Fix crash with virtio-scsi-pci device
        pc-bios/s390-ccw.img: update image
        pc-bios/s390-ccw: add boot entry selection to El Torito routine
        pc-bios/s390-ccw: add boot entry selection for ECKD DASD
        pc-bios/s390-ccw: provide entry selection on LOADPARM for SCSI disk
        pc-bios/s390-ccw: provide a function to interpret LOADPARM value
        pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info
        pc-bios/s390-ccw: Make ebcdic/ascii conversion public
        util/qemu-config: Add loadparm to qemu machine_opts
        hw/s390x/sclp: update LOADPARM in SCP Info
        hw/s390x/ipl: enable LOADPARM in IPIB for a boot device
        hw/s390x: provide loadparm property for the machine
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4f225f34
  2. 04 5月, 2017 12 次提交
    • S
      Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging · 12a95f32
      Stefan Hajnoczi 提交于
      Block layer patches
      
      # gpg: Signature made Fri 28 Apr 2017 09:20:17 PM BST
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * kwolf/tags/for-upstream: (34 commits)
        progress: Show current progress on SIGINFO
        iotests: fix exclusion option
        iotests: clarify help text
        qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed
        qemu-img: improve convert_iteration_sectors()
        block: assert no image modification under BDRV_O_INACTIVE
        block: fix obvious coding style mistakes in block_int.h
        qcow2: Allow discard of final unaligned cluster
        block: Add .bdrv_truncate() error messages
        block: Add errp to BD.bdrv_truncate()
        block: Add errp to b{lk,drv}_truncate()
        block/vhdx: Make vhdx_create() always set errp
        qemu-img: Document backing options
        qemu-img/convert: Move bs_n > 1 && -B check down
        qemu-img/convert: Use @opts for one thing only
        block: fix alignment calculations in bdrv_co_do_zero_pwritev
        block: Do not unref bs->file on error in BD's open
        iotests: 109: Filter out "len" of failed jobs
        iotests: Fix typo in 026
        Issue a deprecation warning if the user specifies the "-hdachs" option.
        ...
      
      Message-id: 1493411622-5343-1-git-send-email-kwolf@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      12a95f32
    • S
      target/openrisc: Support non-busy idle state using PMR SPR · f4d1414a
      Stafford Horne 提交于
      The OpenRISC architecture has the Power Management Register (PMR)
      special purpose register to manage cpu power states.  The interesting
      modes are:
      
       * Doze Mode (DME) - Stop cpu except timer & pic - wake on interrupt
       * Sleep Mode (SME) - Stop cpu and all units - wake on interrupt
       * Suspend Model (SUME) - Stop cpu and all units - wake on reset
      
      The linux kernel will set DME when idle.
      
      This patch implements the PMR SPR and halts the qemu cpu when there is a
      change to DME or SME.  This means that openrisc qemu in no longer peggs
      a host cpu at 100%.
      
      In order for this to work we need to kick the CPU when timers are
      expired.  Update the cpu timer to kick the cpu upon each timer event.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      f4d1414a
    • S
      target/openrisc: Remove duplicate features property · 48a1b62b
      Stafford Horne 提交于
      The features property has stored the exact same thing as the cpucfgr
      spr. Remove the feature enum and property as it is not needed.
      
      In order to preserve the behavior or keeping features accross reset this
      patch moves cpucfgr into the non reset region of the state struct.  Since
      the cpucfgr is read only this means we only need to sset cpucfgr once
      during class init.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      48a1b62b
    • S
      target/openrisc: Implement full vmstate serialization · acf57591
      Stafford Horne 提交于
      Previously serialization did not persist the tlb, timer, pic and other
      key state items.  This meant snapshotting and restoring a running os
      would crash. After adding these I am able to take snapshots of a
      running linux os and restore at a later time.
      
      I am currently not trying to maintain capatibility with older versions
      as I do not believe this really worked before or anyone used it.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      acf57591
    • S
      migration: Add VMSTATE_STRUCT_2DARRAY() · b75c958d
      Stafford Horne 提交于
      For openrisc we implement tlb state as a 2d array of tlb entry structs.
      This is added to allow easy storing of state of 2d arrays.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      b75c958d
    • S
      target/openrisc: implement shadow registers · d89e71e8
      Stafford Horne 提交于
      Shadow registers are part of the openrisc spec along with sr[cid], as
      part of the fast context switching feature.  When exceptions occur,
      instead of having to save registers to the stack if enabled the CID will
      increment and a new set of registers will be available.
      
      This patch only implements shadow registers which can be used as extra
      scratch registers via the mfspr and mtspr if required.  This is
      implemented in a way where it would be easy to add on the fast context
      switching, currently cid is hardcoded to 0.
      
      This is need for openrisc linux smp kernels to boot correctly.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      d89e71e8
    • S
      migration: Add VMSTATE_UINTTL_2DARRAY() · 4597992f
      Stafford Horne 提交于
      In openRISC we are implementing the shadow registers as a 2d array.
      Using this target long method rather than direct 32-bit alternatives is
      consistent with the rest of our vm state serialization logic.
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      4597992f
    • S
      target/openrisc: add numcores and coreid support · ef3f5b9e
      Stafford Horne 提交于
      These are used to identify the processor in SMP system.  Their
      definition has been defined in verilog cores but it not yet part of the
      spec but it will be soon.
      
      The proposal for this is available:
        https://openrisc.io/proposals/core-identifier-and-number-of-coresReviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      ef3f5b9e
    • S
      target/openrisc: Fixes for memory debugging · 461a4b94
      Stafford Horne 提交于
      When debugging in gdb you might want to inspect instructions in mapped
      pages or in exception vectors like 0x800 etc.  This was previously not
      possible in qemu since the *get_phys_page_debug() routine only looked
      into the data tlb.
      
      Change to fall back to look into instruction tlb and plain physical
      pages.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      461a4b94
    • D
      vfio/pci: Fix incorrect error message · 6e4e6f0d
      Dong Jia Shi 提交于
      When the "No host device provided" error occurs, the hint message
      that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci"
      is not a valid command line parameter.
      
      Correct this by replacing "-vfio-pci" with "-device vfio-pci".
      Signed-off-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      6e4e6f0d
    • J
      vfio: enable 8-byte reads/writes to vfio · 38d49e8c
      Jose Ricardo Ziviani 提交于
      This patch enables 8-byte writes and reads to VFIO. Such implemention
      is already done but it's missing the 'case' to handle such accesses in
      both vfio_region_write and vfio_region_read and the MemoryRegionOps:
      impl.max_access_size and impl.min_access_size.
      
      After this patch, 8-byte writes such as:
      
      qemu_mutex_lock locked mutex 0x10905ad8
      vfio_region_write  (0001:03:00.0:region1+0xc0, 0x4140c, 4)
      vfio_region_write  (0001:03:00.0:region1+0xc4, 0xa0000, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      
      goes like this:
      
      qemu_mutex_lock locked mutex 0x10905ad8
      vfio_region_write  (0001:03:00.0:region1+0xc0, 0xbfd0008, 8)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      Signed-off-by: NJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      38d49e8c
    • J
      vfio: Set MemoryRegionOps:max_access_size and min_access_size · 15126cba
      Jose Ricardo Ziviani 提交于
      Sets valid.max_access_size and valid.min_access_size to ensure safe
      8-byte accesses to vfio. Today, 8-byte accesses are broken into pairs
      of 4-byte calls that goes unprotected:
      
      qemu_mutex_lock locked mutex 0x10905ad8
        vfio_region_write  (0001:03:00.0:region1+0xc0, 0x2020c, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      qemu_mutex_lock locked mutex 0x10905ad8
        vfio_region_write  (0001:03:00.0:region1+0xc4, 0xa0000, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      
      which occasionally leads to:
      
      qemu_mutex_lock locked mutex 0x10905ad8
        vfio_region_write  (0001:03:00.0:region1+0xc0, 0x2030c, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      qemu_mutex_lock locked mutex 0x10905ad8
        vfio_region_write  (0001:03:00.0:region1+0xc0, 0x1000c, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      qemu_mutex_lock locked mutex 0x10905ad8
        vfio_region_write  (0001:03:00.0:region1+0xc4, 0xb0000, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      qemu_mutex_lock locked mutex 0x10905ad8
        vfio_region_write  (0001:03:00.0:region1+0xc4, 0xa0000, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      
      causing strange errors in guest OS. With this patch, such accesses
      are protected by the same lock guard:
      
      qemu_mutex_lock locked mutex 0x10905ad8
      vfio_region_write  (0001:03:00.0:region1+0xc0, 0x2000c, 4)
      vfio_region_write  (0001:03:00.0:region1+0xc4, 0xb0000, 4)
      qemu_mutex_unlock unlocked mutex 0x10905ad8
      
      This happens because the 8-byte write should be broken into 4-byte
      writes by memory.c:access_with_adjusted_size() in order to be under
      the same lock. Today, it's done in exec.c:address_space_write_continue()
      which was able to handle only 4 bytes due to a zero'ed
      valid.max_access_size (see exec.c:memory_access_size()).
      Signed-off-by: NJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      15126cba
  3. 02 5月, 2017 13 次提交
  4. 30 4月, 2017 9 次提交
  5. 29 4月, 2017 3 次提交