[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 12/15] savevm: Create a new continue flag to avo
From: |
Alex Williamson |
Subject: |
[Qemu-devel] Re: [PATCH 12/15] savevm: Create a new continue flag to avoid resending block name |
Date: |
Thu, 24 Jun 2010 09:06:32 -0600 |
On Thu, 2010-06-24 at 07:51 +0200, Paolo Bonzini wrote:
> > @@ -377,26 +398,11 @@ int ram_load(QEMUFile *f, void *opaque, int
> > version_id)
> > } else if (flags& RAM_SAVE_FLAG_PAGE) {
> > void *host;
> >
> > - if (version_id == 3) {
> > + if (version_id == 3)
> > host = qemu_get_ram_ptr(addr);
> > - } else {
> > - RAMBlock *block;
> > - char id[256];
> > - uint8_t len;
> > + else
> > + host = host_from_stream_offset(f, addr, flags);
> >
> > - len = qemu_get_byte(f);
> > - qemu_get_buffer(f, (uint8_t *)id, len);
> > - id[len] = 0;
> > -
> > - QLIST_FOREACH(block,&ram_list.blocks, next) {
> > - if (!strncmp(id, block->idstr, sizeof(id)))
> > - break;
> > - }
> > - if (!block)
> > - return -EINVAL;
> > -
> > - host = block->host + addr;
> > - }
> > qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
> > }
> > if (qemu_file_has_error(f)) {
>
> Gah, sorry. :)
>
> This also takes care of the code duplication, great.
It was certainly a good thought ;) See my reply to Yoshi for the
overhead saved. Thanks,
Alex
- [Qemu-devel] [PATCH 05/15] savevm: Make use of DeviceState, (continued)
- [Qemu-devel] [PATCH 05/15] savevm: Make use of DeviceState, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 06/15] eepro100: Add a dev field to eeprom new/free functions, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 07/15] virtio-net: Incorporate a DeviceState pointer and let savevm track instances, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 08/15] qemu_ram_alloc: Add DeviceState and name parameters, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 10/15] savevm: Migrate RAM based on name/offset, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 09/15] ramblocks: Make use of DeviceState pointer and BusInfo.get_dev_path, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 11/15] savevm: Use RAM blocks for basis of migration, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 12/15] savevm: Create a new continue flag to avoid resending block name, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 13/15] qemu_ram_free: Implement it, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 14/15] pci: Free the space allocated for the option rom on removal, Alex Williamson, 2010/06/24
- [Qemu-devel] [PATCH 15/15] ramblocks: No more being lazy about duplicate names, Alex Williamson, 2010/06/24
- Re: [Qemu-devel] [PATCH 00/15] Make migration work with hotplug, Yoshiaki Tamura, 2010/06/24
- [Qemu-devel] [PATCH v2 00/16] Make migration work with hotplug, Alex Williamson, 2010/06/25