aboutsummaryrefslogtreecommitdiff
path: root/target-i386/arch_memory_mapping.c
AgeCommit message (Collapse)Author
2014-02-11exec: Make ldq/ldub_*_phys input an AddressSpaceEdgar E. Iglesias
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-11exec: Make ldl_*_phys input an AddressSpaceEdgar E. Iglesias
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2013-10-02target-i386: Fix compiler warning (integer constant is too large)Stefan Weil
From buildbot default_i386_rhel61: CC i386-softmmu/target-i386/arch_memory_mapping.o target-i386/arch_memory_mapping.c: In function 'walk_pde': target-i386/arch_memory_mapping.c:110: warning: integer constant is too large for 'long' type Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11cpu: Turn cpu_get_memory_mapping() into a CPUState hookAndreas Färber
Change error reporting from return value to Error argument. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Fixed cpu_get_memory_mapping() documentation] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11cpu: Turn cpu_paging_enabled() into a CPUState hookAndreas Färber
Relocate assignment of x86 get_arch_id to have all hooks in one place. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-31target-i386: Fix mask of pte index in memory mappingQiao Nuohan
Function walk_pte() needs pte index to calculate virtual address. However, pte index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff. Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Reviewed-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-05-31target-i386: fix abort on bad PML4E/PDPTE/PDE/PTE addressesLuiz Capitulino
The code used to walk IA-32e page-tables, and possibly PAE page-tables, uses the bit mask ~0xfff to get the next PML4E/PDPTE/PDE/PTE address. However, as we use a uint64_t to store the resulting address, that mask gets expanded to 0xfffffffffffff000 which not only ends up selecting reserved bits but also selects the XD bit (execute-disable) which happens to be enabled by Windows 8, causing qemu_get_ram_ptr() to abort. This commit fixes that problem by replacing ~0xfff by a correct mask that only selects the address bit range (ie. bits 51:12). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2013-01-09target-i386: fix bits 39:32 of the final physical address when using 4M pageWen Congyang
((pde & 0x1fe000) << 19) is the bits 39:32 of the final physical address, and we shouldn't use unit32_t to calculate it. Convert the type to hwaddr to fix this problem. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-23Rename target_phys_addr_t to hwaddrAvi Kivity
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-11Fix some more license versions (GPL2+ instead of GPL2)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
2012-06-07dump: remove dumping stuff from cpu-all.hPaolo Bonzini
This simplifies things, because they will only be included for softmmu targets and because the stubs are taken out-of-line in separate files, which in the future could even be compiled only once. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-04Add API to check whether paging mode is enabledWen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-06-04implement cpu_get_memory_mapping()Wen Congyang
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. If the guest does not use paging, it will do nothing. Note: the I/O memory will be skipped. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>