]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: update repeat count upon nested lin->phys failure
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Apr 2025 09:44:56 +0000 (11:44 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Apr 2025 09:44:56 +0000 (11:44 +0200)
commitade8230830e9bf8c891ab37d2129cd5b48f51c99
treeda7e0d28458bfd010825ff4e5a919db03174ae81
parentdee15facf81d1f0f6e91ca52eb1f0f8f1b2a20dc
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>
master commit: c07b16fd6e47782ebf1ee767cd07c1e2b4140f47
master date: 2025-04-17 10:01:19 +0200
xen/arch/x86/hvm/emulate.c