OSDN Git Service

i386/sev: Update checks and information related to reduced-phys-bits
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 30 Sep 2022 15:14:29 +0000 (10:14 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Apr 2023 10:50:34 +0000 (12:50 +0200)
commit8168fed9f84e3128f7628969ae78af49433d5ce7
treed2d39bd833617b78baec47aee66eff99cb45d786
parent326e3015c4c6f3197157ea0bb00826ae740e2fad
i386/sev: Update checks and information related to reduced-phys-bits

The value of the reduced-phys-bits parameter is propogated to the CPUID
information exposed to the guest. Update the current validation check to
account for the size of the CPUID field (6-bits), ensuring the value is
in the range of 1 to 63.

Maintain backward compatibility, to an extent, by allowing a value greater
than 1 (so that the previously documented value of 5 still works), but not
allowing anything over 63.

Fixes: d8575c6c02 ("sev/i386: add command to initialize the memory encryption context")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <cca5341a95ac73f904e6300f10b04f9c62e4e8ff.1664550870.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/sev.c