mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
dump: eliminate DumpState.page_shift ("guest's page shift")
Just use TARGET_PAGE_BITS. "DumpState.page_shift" used to have type "uint32_t", while the replacement TARGET_PAGE_BITS has type "int". Since "DumpState.page_shift" was only used as bit shift counts in the paddr_to_pfn() and pfn_to_paddr() macros, this is safe. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
92ba1401e0
commit
22227f121b
2 changed files with 8 additions and 10 deletions
|
@ -22,10 +22,10 @@
|
|||
|
||||
#define ARCH_PFN_OFFSET (0)
|
||||
|
||||
#define paddr_to_pfn(X, page_shift) \
|
||||
(((unsigned long long)(X) >> (page_shift)) - ARCH_PFN_OFFSET)
|
||||
#define pfn_to_paddr(X, page_shift) \
|
||||
(((unsigned long long)(X) + ARCH_PFN_OFFSET) << (page_shift))
|
||||
#define paddr_to_pfn(X) \
|
||||
(((unsigned long long)(X) >> TARGET_PAGE_BITS) - ARCH_PFN_OFFSET)
|
||||
#define pfn_to_paddr(X) \
|
||||
(((unsigned long long)(X) + ARCH_PFN_OFFSET) << TARGET_PAGE_BITS)
|
||||
|
||||
/*
|
||||
* flag for compressed format
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue