Skip to content

Commit

Permalink
KVM: Fix bogus sign extension in mmu mapping audit
Browse files Browse the repository at this point in the history
When auditing a 32-bit guest on a 64-bit host, sign extension of the page
table directory pointer table index caused bogus addresses to be shown on
audit errors.

Fix by declaring the index unsigned.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed May 3, 2007
1 parent ff42697 commit 1ea252a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ static void audit_mappings_page(struct kvm_vcpu *vcpu, u64 page_pte,

static void audit_mappings(struct kvm_vcpu *vcpu)
{
int i;
unsigned i;

if (vcpu->mmu.root_level == 4)
audit_mappings_page(vcpu, vcpu->mmu.root_hpa, 0, 4);
Expand Down

0 comments on commit 1ea252a

Please sign in to comment.