qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] qemu-kvm/cpuid: fix a emulation of guest physical address space
@ 2012-11-02  5:38 Xudong Hao
  2012-11-02  5:38 ` [Qemu-devel] [PATCH 2/2] qemu-kvm/pci-assign: 64 bits bar emulation Xudong Hao
  2012-11-03 10:54 ` [Qemu-devel] [PATCH 1/2] qemu-kvm/cpuid: fix a emulation of guest physical address space Jan Kiszka
  0 siblings, 2 replies; 11+ messages in thread
From: Xudong Hao @ 2012-11-02  5:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Xudong Hao, avi, kvm

For 64 bit processor, emulate 40 bits physical address if the host physical
address space >= 40bits, else guest physical is same as host.

Signed-off-by: Xudong Hao <xudong.hao@intel.com>
---
 target-i386/cpu.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 423e009..3a78881 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1584,7 +1584,10 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
         if (env->cpuid_ext2_features & CPUID_EXT2_LM) {
             /* 64 bit processor */
 /* XXX: The physical address space is limited to 42 bits in exec.c. */
-            *eax = 0x00003028;	/* 48 bits virtual, 40 bits physical */
+/* XXX: 40 bits physical if host physical address space >= 40 bits */
+            uint32_t a, b, c, d;
+            host_cpuid(0x80000008, 0, &a, &b, &c, &d);
+            *eax = a < 0x00003028 ? a : 0x00003028;
         } else {
             if (env->cpuid_features & CPUID_PSE36)
                 *eax = 0x00000024; /* 36 bits physical */
-- 
1.5.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 0/2] [PULL] qemu-kvm.git uq/master queue
@ 2012-12-26 13:45 Gleb Natapov
  2012-12-26 13:45 ` [Qemu-devel] [PATCH 2/2] qemu-kvm/pci-assign: 64 bits bar emulation Gleb Natapov
  0 siblings, 1 reply; 11+ messages in thread
From: Gleb Natapov @ 2012-12-26 13:45 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, kvm

The following changes since commit e376a788ae130454ad5e797f60cb70d0308babb6:

  Merge remote-tracking branch 'kwolf/for-anthony' into staging (2012-12-13 14:32:28 -0600)

are available in the git repository at:


  git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master

for you to fetch changes up to 0a2a59d35cbabf63c91340a1c62038e3e60538c1:

  qemu-kvm/pci-assign: 64 bits bar emulation (2012-12-25 14:37:52 +0200)

----------------------------------------------------------------
Will Auld (1):
      target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

Xudong Hao (1):
      qemu-kvm/pci-assign: 64 bits bar emulation

 hw/kvm/pci-assign.c   |   14 ++++++++++----
 target-i386/cpu.h     |    2 ++
 target-i386/kvm.c     |   14 ++++++++++++++
 target-i386/machine.c |   21 +++++++++++++++++++++
 4 files changed, 47 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-12-26 13:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02  5:38 [Qemu-devel] [PATCH 1/2] qemu-kvm/cpuid: fix a emulation of guest physical address space Xudong Hao
2012-11-02  5:38 ` [Qemu-devel] [PATCH 2/2] qemu-kvm/pci-assign: 64 bits bar emulation Xudong Hao
2012-11-03 10:44   ` Blue Swirl
2012-11-05  7:42     ` Hao, Xudong
2012-11-03 10:54 ` [Qemu-devel] [PATCH 1/2] qemu-kvm/cpuid: fix a emulation of guest physical address space Jan Kiszka
2012-11-04 12:15   ` Hao, Xudong
2012-11-04 12:54     ` Jan Kiszka
2012-11-05  2:42       ` Hao, Xudong
2012-11-05  6:22         ` Jan Kiszka
2012-11-08 16:40           ` Eduardo Habkost
  -- strict thread matches above, loose matches on Subject: below --
2012-12-26 13:45 [Qemu-devel] [PATCH 0/2] [PULL] qemu-kvm.git uq/master queue Gleb Natapov
2012-12-26 13:45 ` [Qemu-devel] [PATCH 2/2] qemu-kvm/pci-assign: 64 bits bar emulation Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).