[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 830fc7: pl330: fix vmstate description
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 830fc7: pl330: fix vmstate description |
Date: |
Fri, 26 Jul 2019 09:09:25 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 830fc739d05b87b547ae281435335b366a279e20
https://github.com/qemu/qemu/commit/830fc739d05b87b547ae281435335b366a279e20
Author: Damien Hedde <address@hidden>
Date: 2019-07-26 (Fri, 26 Jul 2019)
Changed paths:
M hw/dma/pl330.c
Log Message:
-----------
pl330: fix vmstate description
Fix the pl330 main and queue vmstate description.
There were missing POINTER flags causing crashes during
incoming migration because:
+ PL330State chan field is a pointer to an array
+ PL330Queue queue field is a pointer to an array
Also bump corresponding vmsd version numbers.
Signed-off-by: Damien Hedde <address@hidden>
Reviewed-by: Philippe Mathieu-Daude <address@hidden>
Acked-by: Dr. David Alan Gilbert <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
Commit: 372e458ebc41c980d4fa23e3234a5222813cd405
https://github.com/qemu/qemu/commit/372e458ebc41c980d4fa23e3234a5222813cd405
Author: Peter Maydell <address@hidden>
Date: 2019-07-26 (Fri, 26 Jul 2019)
Changed paths:
M hw/input/stellaris_input.c
Log Message:
-----------
stellaris_input: Fix vmstate description of buttons field
gamepad_state::buttons is a pointer to an array of structs,
not an array of structs, so should be declared in the vmstate
with VMSTATE_STRUCT_VARRAY_POINTER_INT32; otherwise we
corrupt memory on incoming migration.
We bump the vmstate version field as the easiest way to
deal with the migration break, since migration wouldn't have
worked reliably before anyway.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Damien Hedde <address@hidden>
Message-id: address@hidden
Commit: 0c413ba0d87c1c0444b5aaec050ba86f33409474
https://github.com/qemu/qemu/commit/0c413ba0d87c1c0444b5aaec050ba86f33409474
Author: Peter Maydell <address@hidden>
Date: 2019-07-26 (Fri, 26 Jul 2019)
Changed paths:
M include/migration/vmstate.h
Log Message:
-----------
vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros
The VMSTATE_STRUCT_VARRAY_UINT32 macro is intended to handle
migrating a field which is an array of structs, but where instead of
migrating the entire array we only migrate a variable number of
elements of it.
The VMSTATE_STRUCT_VARRAY_POINTER_UINT32 macro is intended to handle
migrating a field which is of pointer type, and points to a
dynamically allocated array of structs of variable size.
We weren't actually checking that the field passed to
VMSTATE_STRUCT_VARRAY_UINT32 really is an array, with the result that
accidentally using it where the _POINTER_ macro was intended would
compile but silently corrupt memory on migration.
Add type-checking that enforces that the field passed in is
really of the right array type. This applies to all the VMSTATE
macros which use flags including VMS_VARRAY_* but not VMS_POINTER.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Damien Hedde <address@hidden>
Tested-by: Damien Hedde <address@hidden>
Message-id: address@hidden
Commit: d5fef92f6aa4e3287e5383e87777b20df9ded69c
https://github.com/qemu/qemu/commit/d5fef92f6aa4e3287e5383e87777b20df9ded69c
Author: Peter Maydell <address@hidden>
Date: 2019-07-26 (Fri, 26 Jul 2019)
Changed paths:
M hw/arm/boot.c
Log Message:
-----------
hw/arm/boot: Rename elf_{low, high}_addr to image_{low, high}_addr
Rename the elf_low_addr and elf_high_addr variables to image_low_addr
and image_high_addr -- in the next commit we will extend them to
be set for other kinds of image file and not just ELF files.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Mark Rutland <address@hidden>
Message-id: address@hidden
Commit: 67505c114e6acc26f3a1a2b74833c61b6a34ff95
https://github.com/qemu/qemu/commit/67505c114e6acc26f3a1a2b74833c61b6a34ff95
Author: Peter Maydell <address@hidden>
Date: 2019-07-26 (Fri, 26 Jul 2019)
Changed paths:
M hw/arm/boot.c
Log Message:
-----------
hw/arm/boot: Further improve initrd positioning code
In commit e6b2b20d9735d4ef we made the boot loader code try to avoid
putting the initrd on top of the kernel. However the expression used
to calculate the start of the initrd:
info->initrd_start = info->loader_start +
MAX(MIN(info->ram_size / 2, 128 * 1024 * 1024), kernel_size);
incorrectly uses 'kernel_size' as the offset within RAM of the
highest address to avoid. This is incorrect because the kernel
doesn't start at address 0, but slightly higher than that. This
means that we can still incorrectly end up overlaying the initrd on
the kernel in some cases, for example:
* The kernel's image_size is 0x0a7a8000
* The kernel was loaded at 0x40080000
* The end of the kernel is 0x4A828000
* The DTB was loaded at 0x4a800000
To get this right we need to track the actual highest address used
by the kernel and use that rather than kernel_size. We already
set image_low_addr and image_high_addr for ELF images; set them
also for the various other image types we support, and then use
image_high_addr as the lowest allowed address for the initrd.
(We don't use image_low_addr, but we set it for consistency
with the existing code path for ELF files.)
Fixes: e6b2b20d9735d4ef
Reported-by: Mark Rutland <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Mark Rutland <address@hidden>
Message-id: address@hidden
Commit: fff3159900d2b95613a9cb75fc3703e67a674729
https://github.com/qemu/qemu/commit/fff3159900d2b95613a9cb75fc3703e67a674729
Author: Peter Maydell <address@hidden>
Date: 2019-07-26 (Fri, 26 Jul 2019)
Changed paths:
M hw/arm/boot.c
M hw/dma/pl330.c
M hw/input/stellaris_input.c
M include/migration/vmstate.h
Log Message:
-----------
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190726'
into staging
target-arm queue:
* Fix broken migration on pl330 device
* Fix broken migration on stellaris-input device
* Add type checks to vmstate varry macros to avoid this class of bugs
* hw/arm/boot: Fix some remaining cases where we would put the
initrd on top of the kernel image
# gpg: Signature made Fri 26 Jul 2019 16:19:17 BST
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "address@hidden"
# gpg: Good signature from "Peter Maydell <address@hidden>" [ultimate]
# gpg: aka "Peter Maydell <address@hidden>" [ultimate]
# gpg: aka "Peter Maydell <address@hidden>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-target-arm-20190726:
hw/arm/boot: Further improve initrd positioning code
hw/arm/boot: Rename elf_{low, high}_addr to image_{low, high}_addr
vmstate.h: Type check VMSTATE_STRUCT_VARRAY macros
stellaris_input: Fix vmstate description of buttons field
pl330: fix vmstate description
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/c985266ea5b5...fff3159900d2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 830fc7: pl330: fix vmstate description,
Peter Maydell <=