Skip to content
Snippets Groups Projects
  1. Nov 03, 2020
    • Xinhao Zhang's avatar
      hw/acpi : Don't use '#' flag of printf format · 88eed198
      Xinhao Zhang authored
      
      Fix code style. Don't use '#' flag of printf format ('%#') in
      format strings, use '0x' prefix instead
      
      Signed-off-by: default avatarXinhao Zhang <zhangxinhao1@huawei.com>
      Signed-off-by: default avatarKai Deng <dengkai1@huawei.com>
      Message-Id: <20201103102634.273021-1-zhangxinhao1@huawei.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      88eed198
    • David Hildenbrand's avatar
      virito-mem: Implement get_min_alignment() · 296e88fd
      David Hildenbrand authored
      
      The block size determines the alignment requirements. Implement
      get_min_alignment() of the TYPE_MEMORY_DEVICE interface.
      
      This allows auto-assignment of a properly aligned address in guest
      physical address space. For example, when specifying a 2GB block size
      for a virtio-mem device with 10GB with a memory setup "-m 4G, 20G",
      we'll no longer fail when realizing.
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201008083029.9504-7-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      296e88fd
    • David Hildenbrand's avatar
      memory-device: Add get_min_alignment() callback · c726aa69
      David Hildenbrand authored
      
      Add a callback that can be used to express additional alignment
      requirements (exceeding the ones from the memory region).
      
      Will be used by virtio-mem to express special alignment requirements due
      to manually configured, big block sizes (e.g., 1GB with an ordinary
      memory-backend-ram). This avoids failing later when realizing, because
      auto-detection wasn't able to assign a properly aligned address.
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201008083029.9504-6-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      c726aa69
    • David Hildenbrand's avatar
      memory-device: Support big alignment requirements · 780a4d24
      David Hildenbrand authored
      
      Let's warn instead of bailing out - the worst thing that can happen is
      that we'll fail hot/coldplug later. The user got warned, and this should
      be rare.
      
      This will be necessary for memory devices with rather big (user-defined)
      alignment requirements - say a virtio-mem device with a 2G block size -
      which will become important, for example, when supporting vfio in the
      future.
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201008083029.9504-5-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      780a4d24
    • David Hildenbrand's avatar
      virtio-mem: Probe THP size to determine default block size · 228957fe
      David Hildenbrand authored
      
      Let's allow a minimum block size of 1 MiB in all configurations. Select
      the default block size based on
      - The page size of the memory backend.
      - The THP size if the memory backend size corresponds to the real host
        page size.
      - The global minimum of 1 MiB.
      and warn if something smaller is configured by the user.
      
      VIRTIO_MEM only supports Linux (depends on LINUX), so we can probe the
      THP size unconditionally.
      
      For now we only support virtio-mem on x86-64 - there isn't a user-visible
      change (x86-64 only supports 2 MiB THP on the PMD level) - the default
      was, and will be 2 MiB.
      
      If we ever have THP on the PUD level (e.g., 1 GiB THP on x86-64), we
      expect it to be more transparent - e.g., to only optimize fully populated
      ranges unless explicitly told /configured otherwise (in contrast to PMD
      THP).
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201008083029.9504-4-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      228957fe
    • David Hildenbrand's avatar
      virtio-mem: Make sure "usable_region_size" is always multiples of the block size · 0aed2800
      David Hildenbrand authored
      
      The spec states:
        "The device MUST set addr, region_size, usable_region_size, plugged_size,
         requested_size to multiples of block_size."
      
      With block sizes > 256MB, we currently wouldn't guarantee that for the
      usable_region_size.
      
      Note that we cannot exceed the region_size, as we already enforce the
      alignment there properly.
      
      Fixes: 910b2576 ("virtio-mem: Paravirtualized memory hot(un)plug")
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201008083029.9504-3-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      0aed2800
    • David Hildenbrand's avatar
      virtio-mem: Make sure "addr" is always multiples of the block size · d31992ae
      David Hildenbrand authored
      
      The spec states:
        "The device MUST set addr, region_size, usable_region_size, plugged_size,
         requested_size to multiples of block_size."
      
      In some cases, we currently don't guarantee that for "addr": For example,
      when starting a VM with 4 GiB boot memory and a virtio-mem device with a
      block size of 2 GiB, "memaddr"/"addr" will be auto-assigned to
      0x140000000 (5 GiB).
      
      We'll try to improve auto-assignment for memory devices next, to avoid
      bailing out in case memory device code selects a bad address.
      
      Note: The Linux driver doesn't support such big block sizes yet.
      
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
      Fixes: 910b2576 ("virtio-mem: Paravirtualized memory hot(un)plug")
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20201008083029.9504-2-david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      d31992ae
    • Michael S. Tsirkin's avatar
      pc: comment style fixup · 54420332
      Michael S. Tsirkin authored
      
      Fix up checkpatch comment style warnings.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarChen Qun <kuhn.chenqun@huawei.com>
      54420332
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201102' into staging · c7a7a877
      Peter Maydell authored
      
      target-arm queue:
       * target/arm: Fix Neon emulation bugs on big-endian hosts
       * target/arm: fix handling of HCR.FB
       * target/arm: fix LORID_EL1 access check
       * disas/capstone: Fix monitor disassembly of >32 bytes
       * hw/arm/smmuv3: Fix potential integer overflow (CID 1432363)
       * hw/arm/boot: fix SVE for EL3 direct kernel boot
       * hw/display/omap_lcdc: Fix potential NULL pointer dereference
       * hw/display/exynos4210_fimd: Fix potential NULL pointer dereference
       * target/arm: Get correct MMU index for other-security-state
       * configure: Test that gio libs from pkg-config work
       * hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work
       * docs: Fix building with Sphinx 3
       * tests/qtest/npcm7xx_rng-test: Disable randomness tests
      
      # gpg: Signature made Mon 02 Nov 2020 17:09:00 GMT
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20201102: (26 commits)
        tests/qtest/npcm7xx_rng-test: Disable randomness tests
        qemu-option-trace.rst.inc: Don't use option:: markup
        scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments
        hw/intc/arm_gicv3_cpuif: Make GIC maintenance interrupts work
        configure: Test that gio libs from pkg-config work
        target/arm: Get correct MMU index for other-security-state
        hw/display/exynos4210_fimd: Fix potential NULL pointer dereference
        hw/display/omap_lcdc: Fix potential NULL pointer dereference
        hw/arm/boot: fix SVE for EL3 direct kernel boot
        hw/arm/smmuv3: Fix potential integer overflow (CID 1432363)
        disas/capstone: Fix monitor disassembly of >32 bytes
        target/arm: fix LORID_EL1 access check
        target/arm: fix handling of HCR.FB
        target/arm: Fix VUDOT/VSDOT (scalar) on big-endian hosts
        target/arm: Fix float16 pairwise Neon ops on big-endian hosts
        target/arm: Improve do_prewiden_3d
        target/arm: Simplify do_long_3d and do_2scalar_long
        target/arm: Rename neon_load_reg64 to vfp_load_reg64
        target/arm: Add read/write_neon_element64
        target/arm: Rename neon_load_reg32 to vfp_load_reg32
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      c7a7a877
  2. Nov 02, 2020
Loading