1. 01 6月, 2018 2 次提交
  2. 13 2月, 2018 1 次提交
    • Y
      hax: Support guest RAM sizes of 4GB or more · 7a5235c9
      Yu Ning 提交于
      Since HAX_VM_IOCTL_ALLOC_RAM takes a 32-bit size, it cannot handle
      RAM blocks of 4GB or larger, which is why HAXM can only run guests
      with less than 4GB of RAM. Solve this problem by utilizing the new
      HAXM API, HAX_VM_IOCTL_ADD_RAMBLOCK, which takes a 64-bit size, to
      register RAM blocks with the HAXM kernel module. The new API is
      first added in HAXM 7.0.0, and its availablility and be confirmed
      by the presence of the HAX_CAP_64BIT_RAMBLOCK capability flag.
      
      When the guest RAM size reaches 7GB, QEMU will ask HAXM to set up a
      memory mapping that covers a 4GB region, which will fail, because
      HAX_VM_IOCTL_SET_RAM also takes a 32-bit size. Work around this
      limitation by splitting the large mapping into small ones and
      calling HAX_VM_IOCTL_SET_RAM multiple times.
      
      Bug: https://bugs.launchpad.net/qemu/+bug/1735576Signed-off-by: NYu Ning <yu.ning@intel.com>
      Message-Id: <1515752555-12784-1-git-send-email-yu.ning@linux.intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7a5235c9
  3. 09 2月, 2018 1 次提交
  4. 16 1月, 2018 2 次提交
  5. 04 7月, 2017 1 次提交
  6. 15 6月, 2017 1 次提交
  7. 06 6月, 2017 1 次提交
    • D
      migration: Mark CPU states dirty before incoming migration/loadvm · 75e972da
      David Gibson 提交于
      As a rule, CPU internal state should never be updated when
      !cpu->kvm_vcpu_dirty (or the HAX equivalent).  If that is done, then
      subsequent calls to cpu_synchronize_state() - usually safe and idempotent -
      will clobber state.
      
      However, we routinely do this during a loadvm or incoming migration.
      Usually this is called shortly after a reset, which will clear all the cpu
      dirty flags with cpu_synchronize_all_post_reset().  Nothing is expected
      to set the dirty flags again before the cpu state is loaded from the
      incoming stream.
      
      This means that it isn't safe to call cpu_synchronize_state() from a
      post_load handler, which is non-obvious and potentially inconvenient.
      
      We could cpu_synchronize_all_state() before the loadvm, but that would be
      overkill since a) we expect the state to already be synchronized from the
      reset and b) we expect to completely rewrite the state with a call to
      cpu_synchronize_all_post_init() at the end of qemu_loadvm_state().
      
      To clear this up, this patch introduces cpu_synchronize_pre_loadvm() and
      associated helpers, which simply marks the cpu state as dirty without
      actually changing anything.  i.e. it says we want to discard any existing
      KVM (or HAX) state and replace it with what we're going to load.
      
      Cc: Juan Quintela <quintela@redhat.com>
      Cc: Dave Gilbert <dgilbert@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      75e972da
  8. 23 5月, 2017 1 次提交
    • E
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake 提交于
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      cf83f140
  9. 20 1月, 2017 1 次提交
    • V
      target/i386: Add Intel HAX files · 47c1c8c1
      Vincent Palatin 提交于
      That's a forward port of the core HAX interface code from the
      emu-2.2-release branch in the external/qemu-android repository as used by
      the Android emulator.
      
      The original commit was "target/i386: Add Intel HAX to android emulator"
      saying:
      """
        Backport of 2b3098ff27bab079caab9b46b58546b5036f5c0c
        from studio-1.4-dev into emu-master-dev
      
          Intel HAX (harware acceleration) will enhance android emulator performance
          in Windows and Mac OS X in the systems powered by Intel processors with
          "Intel Hardware Accelerated Execution Manager" package installed when
          user runs android emulator with Intel target.
      Signed-off-by: NDavid Chou <david.j.chou@intel.com>
      """
      
      It has been modified to build and run along with the current code base.
      The formatting has been fixed to go through scripts/checkpatch.pl,
      and the DPRINTF macros have been updated to get the instanciations checked by
      the compiler.
      
      The FPU registers saving/restoring has been updated to match the current
      QEMU registers layout.
      
      The implementation has been simplified by doing the following modifications:
      - removing the code for supporting the hardware without Unrestricted Guest (UG)
        mode (including all the code to fallback on TCG emulation).
      - not including the Darwin support (which is not yet debugged/tested).
      - simplifying the initialization by removing the leftovers from the Android
        specific code, then trimming down the remaining logic.
      - removing the unused MemoryListener callbacks.
      Signed-off-by: NVincent Palatin <vpalatin@chromium.org>
      Message-Id: <e1023837f8d0e4c470f6c4a3bf643971b2bca5be.1484045952.git.vpalatin@chromium.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      47c1c8c1