1. 19 4月, 2019 1 次提交
  2. 09 4月, 2019 1 次提交
  3. 29 3月, 2019 5 次提交
  4. 26 3月, 2019 2 次提交
  5. 25 3月, 2019 4 次提交
  6. 24 3月, 2019 1 次提交
  7. 23 3月, 2019 1 次提交
  8. 22 3月, 2019 2 次提交
    • P
      target/riscv: Zero extend the inputs of divuw and remuw · f17e02cd
      Palmer Dabbelt 提交于
      While running the GCC test suite against 4.0.0-rc0, Kito found a
      regression introduced by the decodetree conversion that caused divuw and
      remuw to sign-extend their inputs.  The ISA manual says they are
      supposed to be zero extended:
      
          DIVW and DIVUW instructions are only valid for RV64, and divide the
          lower 32 bits of rs1 by the lower 32 bits of rs2, treating them as
          signed and unsigned integers respectively, placing the 32-bit
          quotient in rd, sign-extended to 64 bits. REMW and REMUW
          instructions are only valid for RV64, and provide the corresponding
          signed and unsigned remainder operations respectively.  Both REMW
          and REMUW always sign-extend the 32-bit result to 64 bits, including
          on a divide by zero.
      
      Here's Kito's reduced test case from the GCC test suite
      
          unsigned calc_mp(unsigned mod)
          {
               unsigned a,b,c;
               c=-1;
               a=c/mod;
               b=0-a*mod;
               if (b > mod) { a += 1; b-=mod; }
               return b;
          }
      
          int main(int argc, char *argv[])
          {
               unsigned x = 1234;
               unsigned y = calc_mp(x);
      
               if ((sizeof (y) == 4 && y != 680)
            || (sizeof (y) == 2 && y != 134))
          abort ();
               exit (0);
          }
      
      I haven't done any other testing on this, but it does fix the test case.
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      f17e02cd
    • M
      target/xtensa: fix break_dependency for repeated resources · b9ec5218
      Max Filippov 提交于
      break_dependency incorrectly handles the case of dependency on an opcode
      that references the same register multiple times. E.g. the following
      instruction is translated incorrectly:
      
        { or a2, a3, a3 ; or a3, a2, a2 }
      
      This happens because resource indices of both dependency graph nodes are
      incremented, and a copy for the second instance of the same register in
      the ending node is not done.
      Only increment resource index of the ending node of the dependency.
      Add test.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      b9ec5218
  9. 20 3月, 2019 3 次提交
    • E
      i386: Disable OSPKE on CPU model definitions · bb4928c7
      Eduardo Habkost 提交于
      Currently, the Cascadelake-Server, Icelake-Client, and
      Icelake-Server are always generating the following warning:
      
        qemu-system-x86_64: warning: \
          host doesn't support requested feature: CPUID.07H:ECX [bit 4]
      
      This happens because OSPKE was never returned by
      GET_SUPPORTED_CPUID or x86_cpu_get_supported_feature_word().
      OSPKE is a runtime flag automatically set by the KVM module or by
      TCG code, was always cleared by x86_cpu_filter_features(), and
      was not supposed to appear on the CPU model table.
      
      Remove the OSPKE flag from the CPU model table entries, to avoid
      the bogus warning and avoid returning invalid feature data on
      query-cpu-* QMP commands.  As OSPKE was always cleared by
      x86_cpu_filter_features(), this won't have any guest-visible
      impact.
      
      Include a test case that should detect the problem if we introduce
      a similar bug again.
      
      Fixes: c7a88b52 ("i386: Add new model of Cascadelake-Server")
      Fixes: 8a11c62d ("i386: Add new CPU model Icelake-{Server,Client}")
      Cc: Tao Xu <tao3.xu@intel.com>
      Cc: Robert Hoo <robert.hu@linux.intel.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20190319200515.14999-1-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      bb4928c7
    • E
      i386: Make arch_capabilities migratable · 014018e1
      Eduardo Habkost 提交于
      Now that kvm_arch_get_supported_cpuid() will only return
      arch_capabilities if QEMU is able to initialize the MSR properly,
      we know that the feature is safely migratable.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20190125220606.4864-3-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      014018e1
    • E
      i386: kvm: Disable arch_capabilities if MSR can't be set · 485b1d25
      Eduardo Habkost 提交于
      KVM has two bugs in the handling of MSR_IA32_ARCH_CAPABILITIES:
      
      1) Linux commit commit 1eaafe91a0df ("kvm: x86: IA32_ARCH_CAPABILITIES
         is always supported") makes GET_SUPPORTED_CPUID return
         arch_capabilities even if running on SVM.  This makes "-cpu
         host,migratable=off" incorrectly expose arch_capabilities on CPUID on
         AMD hosts (where the MSR is not emulated by KVM).
      
      2) KVM_GET_MSR_INDEX_LIST does not return MSR_IA32_ARCH_CAPABILITIES if
         the MSR is not supported by the host CPU.  This makes QEMU not
         initialize the MSR properly at kvm_put_msrs() on those hosts.
      
      Work around both bugs on the QEMU side, by checking if the MSR
      was returned by KVM_GET_MSR_INDEX_LIST before returning the
      feature flag on kvm_arch_get_supported_cpuid().
      
      This has the unfortunate side effect of making arch_capabilities
      unavailable on hosts without hardware support for the MSR until bug #2
      is fixed on KVM, but I can't see another way to work around bug #1
      without that side effect.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20190125220606.4864-2-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      485b1d25
  10. 19 3月, 2019 11 次提交
  11. 18 3月, 2019 2 次提交
  12. 16 3月, 2019 1 次提交
  13. 15 3月, 2019 2 次提交
  14. 13 3月, 2019 4 次提交