Re: [PATCH v2 2/6] Introduce bit-based phys_ram_dirty for VGA, CODE, MIGRATION and MASTER.

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

 



On 04/12/2010 12:39 PM, Yoshiaki Tamura wrote:
Please put in some header file, maybe qemu-common.h.


OK.  BTW, is qemu-kvm.h planned to go upstream?

No.  Use kvm.h for kvm specific symbols (qemu-kvm.h includes it).


Should be nicer as a loop calling a helper to allocate each bitmap. This
patch won't work by itself, will it? I think you need to merge it with
the succeeding patches.

Yeah. I originally wrote as you suggested, but I needed to skip 0x03 because of the reason written below.

+/* Use DIRTY_FLAG as indexes of bit-based phys_ram_dirty.
+   0x03 is empty to make it compatible with byte-based bitmap. */
+#define MASTER_DIRTY_FLAG    0x00
 #define VGA_DIRTY_FLAG       0x01
 #define CODE_DIRTY_FLAG      0x02
-#define MIGRATION_DIRTY_FLAG 0x08
+#define MIGRATION_DIRTY_FLAG 0x04

If you think if (i != 0x03) is better, I would modify it to a loop.

You can have *_DIRTY_FLAG (1, 2, 4, 8) and *_DIRTY_IDX (0, 1, 2, 3); use _FLAG for compatibility with byte-based maps, and _IDX for multiple bitmaps.

Alternatively, have only _IDX, and modify the callers to shift when necessary. At the end of the patchset, we'll only use bitmaps, so the shifts will be all gone.


--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux