1. 26 8月, 2014 5 次提交
    • P
      checkpatch.pl: adjust typedef definition to QEMU coding style · a6859deb
      Paolo Bonzini 提交于
      Most QEMU typedefs are camelcase, starting with one uppercase letter
      and containing at least one lowercase letter.  There are a few
      all-uppercase types, add the most common too.
      
      This fixes recognition of types in lines such as
      
          static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v)
      
      (Example provided by Peter Maydell).
      Reported-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Stefan Weil <sw@weilnetz.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a6859deb
    • A
      x86: Clear MTRRs on vCPU reset · 9db2efd9
      Alex Williamson 提交于
      The SDM specifies (June 2014 Vol3 11.11.5):
      
          On a hardware reset, the P6 and more recent processors clear the
          valid flags in variable-range MTRRs and clear the E flag in the
          IA32_MTRR_DEF_TYPE MSR to disable all MTRRs. All other bits in the
          MTRRs are undefined.
      
      We currently do none of that, so whatever MTRR settings you had prior
      to reset is what you have after reset.  Usually this doesn't matter
      because KVM often ignores the guest mappings and uses write-back
      anyway.  However, if you have an assigned device and an IOMMU that
      allows NoSnoop for that device, KVM defers to the guest memory
      mappings which are now stale after reset.  The result is that OVMF
      rebooting on such a configuration takes a full minute to LZMA
      decompress the firmware volume, a process that is nearly instant on
      the initial boot.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9db2efd9
    • A
      x86: kvm: Add MTRR support for kvm_get|put_msrs() · d1ae67f6
      Alex Williamson 提交于
      The MTRR state in KVM currently runs completely independent of the
      QEMU state in CPUX86State.mtrr_*.  This means that on migration, the
      target loses MTRR state from the source.  Generally that's ok though
      because KVM ignores it and maps everything as write-back anyway.  The
      exception to this rule is when we have an assigned device and an IOMMU
      that doesn't promote NoSnoop transactions from that device to be cache
      coherent.  In that case KVM trusts the guest mapping of memory as
      configured in the MTRR.
      
      This patch updates kvm_get|put_msrs() so that we retrieve the actual
      vCPU MTRR settings and therefore keep CPUX86State synchronized for
      migration.  kvm_put_msrs() is also used on vCPU reset and therefore
      allows future modificaitons of MTRR state at reset to be realized.
      
      Note that the entries array used by both functions was already
      slightly undersized for holding every possible MSR, so this patch
      increases it beyond the 28 new entries necessary for MTRR state.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d1ae67f6
    • A
      x86: Use common variable range MTRR counts · d8b5c67b
      Alex Williamson 提交于
      We currently define the number of variable range MTRR registers as 8
      in the CPUX86State structure and vmstate, but use MSR_MTRRcap_VCNT
      (also 8) to report to guests the number available.  Change this to
      use MSR_MTRRcap_VCNT consistently.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d8b5c67b
    • W
      target-i386: Don't forbid NX bit on PAE PDEs and PTEs · 1844e68e
      William Grant 提交于
      Commit e8f6d00c ("target-i386: raise
      page fault for reserved physical address bits") added a check that the
      NX bit is not set on PAE PDPEs, but it also added it to rsvd_mask for
      the rest of the function. This caused any PDEs or PTEs with NX set to be
      erroneously rejected, making PAE guests with NX support unusable.
      Signed-off-by: NWilliam Grant <wgrant@ubuntu.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1844e68e
  2. 25 8月, 2014 4 次提交
  3. 20 8月, 2014 22 次提交
  4. 19 8月, 2014 8 次提交
  5. 18 8月, 2014 1 次提交