Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

get-report.c: fix compilation error with >= 6.4 kernels #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

whitebrandy
Copy link

Upstream Linux kernel commit 0144e3b85d7b (x86/sev: Change snp_guest_issue_request()'s fw_err argument) breaks up the fw_err error field in struct snp_guest_request_ioctl to two 32 bit fields to properly reflect the firmware error code which is the lower 32 bits only.

Unfortunately, the commit also renamed fw_err to fw_error when splitting up the field. To prevent compilation failures for older kernels, keep relying on the 64 bit field which refers to the combined firmware and VM error code. But since this code was already relying on the 64 bit field to print error messages, this change keeps it consistent with old behavior.

Reported-by: Zixi Chen zixchen@redhat.com

Upstream Linux kernel commit 0144e3b85d7b (x86/sev: Change snp_guest_issue_request()'s fw_err argument)
breaks up the fw_err error field in struct snp_guest_request_ioctl to two 32 bit
fields to properly reflect the firmware error code which is the lower 32 bits only.

Unfortunately, the commit also renamed fw_err to fw_error when splitting up
the field. To prevent compilation failures for older kernels, keep
relying on the 64 bit field which refers to the combined firmware and VM
error code. But since this code was already relying on the 64 bit field to
print error messages, this change keeps it consistent with old behavior.

Reported-by: Zixi Chen <zixchen@redhat.com>
Signed-off-by: Bandan Das <bsd@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants