Signed-off-by: Paolo Bonzini <[email protected]>
---
        Not tested with APICv!
---
 sync | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/sync b/sync
index 3086b70..36bed39 100755
--- a/sync
+++ b/sync
@@ -341,13 +341,18 @@ def hack_content(fname, data):
         if line == '\tif (!cpu_has_vmx_apicv())':
             w('#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)')
             w(line)
+            w('#else')
+            w('if (1)')
             line = '#endif'
         if line == '#if IS_ENABLED(CONFIG_KVM)':
             line = '#if 1'
-        if line == '\t\tapic->send_IPI_mask(get_cpu_mask(vcpu->cpu),':
-            line = '\t\t;'
-        if line == '\t\t\t\tPOSTED_INTR_VECTOR);':
-            line = ''
+        if match(r'^\t+apic->send_IPI_mask\(get_cpu_mask\(vcpu->cpu\),$'):
+            w('#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)')
+           w('\t\t;')
+           w('#else')
+        if match(r'^\t+POSTED_INTR_VECTOR\);$'):
+            w(line)
+            line = '#endif'
         if line == '\tif (!static_cpu_has_bug(X86_BUG_AMD_TLB_MMATCH))':
             w('#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)')
             w(line)
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to