IGVM directives _can_ place their data at a byte_offset within a shared
parameter area, letting multiple parameters be packed into one area.
This offset was either ignored entirely or used without first checking it.
Patch 1 introduces checks and honors the offset.
Patch 2 cleanup patch (marks one function as static).
More details in commit messages.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
---
Changes in v5:
- Marked `qigvm_find_param_entry` as static [Stefano]
- Improved commit message [Stefano]
- Link to v4: https://lore.kernel.org/qemu-devel/20260914-fix_offset-v4-1-39d74497c6b5@redhat.com
Changes in v4:
- Squashed two commits in one.
- Removed one parameter from `qigvm_get_param_data` [Stefano]
- Removed some useless variables [Stefano]
- Rebased to latest upstream
- Link to v3: https://lore.kernel.org/qemu-devel/20260907-fix_offset-v3-0-bcffcefc0985@redhat.com
Changes in v3:
- Renamed the function to `qigvm_get_param_data`. [Stefano]
- `qigvm_get_param_data` now returns the data pointer directly [Stefano]
- Added fixes tags. [Stefano]
- Renamed variables to param_data and param_size [Stefano]
- Link to v2: https://lore.kernel.org/qemu-devel/20260904-fix_offset-v2-0-f5bb4cf6d4b0@redhat.com
Changes in v2:
- Inverted commit order: first I introduce the helper and use it where
necessary, then in commit 2 I handle the `offset`. [Stefano]
- The helper now returns data and size, that already consider the byte
offset [Stefano]
- Link to v1: https://lore.kernel.org/qemu-devel/20260902-fix_offset-v1-0-04b18f7595b2@redhat.com
---
Luigi Leonardi (2):
igvm: validate and honor byte_offset in parameter directives
igvm: mark qigvm_find_param_entry as static
backends/igvm.c | 91 +++++++++++++++++++++++++++++++-----------
include/system/igvm-internal.h | 7 ++--
target/i386/igvm.c | 12 +++---
3 files changed, 77 insertions(+), 33 deletions(-)
---
base-commit: 5f664cd37aec17e8145aa117d8da68f507edc8f1
change-id: 20260902-fix_offset-a268cb12aafc
Best regards,
--
Luigi Leonardi <leonardi@redhat.com>