qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] What's the proper type of guest pde address, target_ulo


From: Wei-Ren Chen
Subject: Re: [Qemu-devel] What's the proper type of guest pde address, target_ulong or target_phys_addr_t?
Date: Fri, 24 Aug 2012 17:27:40 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

> In principle, yes, but you need to check the code carefully to make
> sure your type change doesn't change any of the results. (Or if it
> does, you then need to confirm against the specs that this was a bug
> that is being fixed, not a new one being introduced). The thing you have
> to remember is that for the 32 bit x86 cores guest physical addresses
> are only 32 bits but target_phys_addr_t is still a 64 bit type.

  Yes, I saw in configure x86 and x86_64 both have target_phys_bits
set to 64.

---
case "$target_arch2" in
  i386)
    target_phys_bits=64
  ;;

if test "$target_softmmu" = "yes" ; then
  echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_target_mak
---

  So that in targphys.h, it typedef target_phys_addr_t to uint_64,

#elif TARGET_PHYS_ADDR_BITS == 64
typedef uint64_t target_phys_addr_t;

> It may be we're deliberately (mis)using target_ulong to get the
> right behaviour on both 32 and 64 bit cores.

  Need to be further investigated. :)

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]