qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] vga optmization


From: andrzej zaborowski
Subject: Re: [Qemu-devel] vga optmization
Date: Tue, 4 Nov 2008 10:31:52 +0100

Hi,

2008/11/3 Glauber Costa <address@hidden>:
[...]
> diff --git a/cpu-all.h b/cpu-all.h
> index cdd79bc..9118f4d 100644
> --- a/cpu-all.h
> +++ b/cpu-all.h
> @@ -46,6 +46,8 @@
>
>  #ifdef BSWAP_NEEDED
>
> +#include "kvm.h"
> +
>  static inline uint16_t tswap16(uint16_t s)
>  {
>     return bswap16(s);
> @@ -909,17 +911,10 @@ int cpu_memory_rw_debug(CPUState *env, target_ulong 
> addr,
>  #define KQEMU_DIRTY_FLAG     0x04
>  #define MIGRATION_DIRTY_FLAG 0x08
>
> -/* read dirty bit (return 0 or 1) */
> -static inline int cpu_physical_memory_is_dirty(ram_addr_t addr)
> -{
> -    return phys_ram_dirty[addr >> TARGET_PAGE_BITS] == 0xff;
> -}
> +int cpu_physical_memory_get_dirty(ram_addr_t addr, int dirty_flags);
> +int cpu_physical_memory_is_dirty(ram_addr_t addr);
>
> -static inline int cpu_physical_memory_get_dirty(ram_addr_t addr,
> -                                                int dirty_flags)
> -{
> -    return phys_ram_dirty[addr >> TARGET_PAGE_BITS] & dirty_flags;
> -}
> +void qemu_physical_sync_dirty_bitmap(ram_addr_t start_addr);

This will prevent the functions from being inlined even if KVM is
disabled (e.g. on other archs) and I think it could be easily
retained.

Cheers




reply via email to

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