kpatch/test/integration/special-static-2.patch
Josh Poimboeuf c799ecc55f make _rs a special static local
The _rs variable is used for printk ratelimiting, similar to __warned,
which makes it a logical candidate to be "special": don't correlate it,
yet don't mark a function as changed just because it references it.
2014-10-07 08:09:20 -05:00

26 lines
625 B
Diff

Index: src/arch/x86/kvm/x86.c
===================================================================
--- src.orig/arch/x86/kvm/x86.c
+++ src/arch/x86/kvm/x86.c
@@ -2011,12 +2011,20 @@ static void record_steal_time(struct kvm
&vcpu->arch.st.steal, sizeof(struct kvm_steal_time));
}
+void kpatch_kvm_x86_foo(void)
+{
+ if (!jiffies)
+ printk("kpatch kvm x86 foo\n");
+}
+
int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
{
bool pr = false;
u32 msr = msr_info->index;
u64 data = msr_info->data;
+ kpatch_kvm_x86_foo();
+
switch (msr) {
case MSR_AMD64_NB_CFG:
case MSR_IA32_UCODE_REV: