aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-12-16 17:06:46 -0200
committerEduardo Habkost <ehabkost@redhat.com>2016-05-23 19:47:37 -0300
commit1abc2cae46b77ed345fd3eff88a49fe8f4b24abe (patch)
tree32a8c7e9750e1ee6daf75199c56fc122d80415aa /target-i386
parente25ffda7bd9e8b10d4d08f944ad87c7523096de5 (diff)
target-i386: kvm: Eliminate kvm_msr_entry_set()
Inline the function inside kvm_msr_entry_add(). Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/kvm.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 0b56b38de8..7b3667a089 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -1459,14 +1459,6 @@ static int kvm_put_sregs(X86CPU *cpu)
return kvm_vcpu_ioctl(CPU(cpu), KVM_SET_SREGS, &sregs);
}
-static void kvm_msr_entry_set(struct kvm_msr_entry *entry,
- uint32_t index, uint64_t value)
-{
- entry->index = index;
- entry->reserved = 0;
- entry->data = value;
-}
-
static void kvm_msr_buf_reset(X86CPU *cpu)
{
memset(cpu->kvm_msr_buf, 0, MSR_BUF_SIZE);
@@ -1480,7 +1472,9 @@ static void kvm_msr_entry_add(X86CPU *cpu, uint32_t index, uint64_t value)
assert((void *)(entry + 1) <= limit);
- kvm_msr_entry_set(entry, index, value);
+ entry->index = index;
+ entry->reserved = 0;
+ entry->data = value;
msrs->nmsrs++;
}