]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: update repeat count upon nested lin->phys failure
authorJan Beulich <jbeulich@suse.com>
Thu, 17 Apr 2025 08:01:19 +0000 (10:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 17 Apr 2025 08:01:19 +0000 (10:01 +0200)
commitc07b16fd6e47782ebf1ee767cd07c1e2b4140f47
tree2d66d549a7af0bcf8ba8f38db3ef7f1e6b70ceab
parentb097a774b3cfaecb985c46e4b2579b4a41c86c24
x86/HVM: update repeat count upon nested lin->phys failure

For the X86EMUL_EXCEPTION case the repeat count must be correctly
propagated back. Since for the recursive invocation we use a local
helper variable, its value needs copying to the caller's one.

While there also correct the off-by-1 range in the comment ahead of the
function (strictly speaking for the "DF set" case we'd need to put
another, different range there as well).

Fixes: 53f87c03b4ea ("x86emul: generalize exception handling for rep_* hooks")
Reported-by: Manuel Andreas <manuel.andreas@tum.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/emulate.c