* [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window
@ 2014-10-09 11:53 Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 1/3] FOLL_TRIED is not available before 3.18 Paolo Bonzini
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-10-09 11:53 UTC (permalink / raw)
To: kvm; +Cc: jan.kiszka
Patches are relative to next branch of kvm-kmod.git.
Paolo
Paolo Bonzini (3):
FOLL_TRIED is not available before 3.18
the MMU notifier clear_flush_young callback changed in 3.18
redefine is_zero_pfn to not rely on zero_pfn
external-module-compat-comm.h | 5 ++++-
sync | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH kvm-kmod 1/3] FOLL_TRIED is not available before 3.18
2014-10-09 11:53 [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Paolo Bonzini
@ 2014-10-09 11:53 ` Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 2/3] the MMU notifier clear_flush_young callback changed in 3.18 Paolo Bonzini
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-10-09 11:53 UTC (permalink / raw)
To: kvm; +Cc: jan.kiszka
Just do not pass it, which is roughly the same behavior that KVM had
until 3.17. Passing a non-existing flag could have unanticipated
effects.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
external-module-compat-comm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index e03a81a..dff603f 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -1419,5 +1419,5 @@ extern u64 kvm_get_boot_base_ns(struct timekeeper *tk);
#endif
#ifndef FOLL_TRIED
-#define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */
+#define FOLL_TRIED 0
#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH kvm-kmod 2/3] the MMU notifier clear_flush_young callback changed in 3.18
2014-10-09 11:53 [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 1/3] FOLL_TRIED is not available before 3.18 Paolo Bonzini
@ 2014-10-09 11:53 ` Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 3/3] redefine is_zero_pfn to not rely on zero_pfn Paolo Bonzini
2014-10-10 15:03 ` [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Jan Kiszka
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-10-09 11:53 UTC (permalink / raw)
To: kvm; +Cc: jan.kiszka
Passing end=start+1 is the easiest way to call the new callback from
the old API. That is how kvm_handle_hva is implemented on top of
kvm_handle_hva_range. So, now that kvm_age_hva calls kvm_handle_hva_range
instead of kvm_handle_hva, you can apply the same trick to the caller
of kvm_age_hva.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
sync | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/sync b/sync
index 8b63ca7..fff85f3 100755
--- a/sync
+++ b/sync
@@ -310,6 +310,22 @@ def hack_content(fname, data):
else:
w(sub(r'tkr\.', '', line))
line = '#endif'
+ if match_block_end('^static int kvm_mmu_notifier_clear_flush_young', '^}'):
+ w(line)
+ w('#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)')
+ w('static int kvm_mmu_notifier_clear_flush_young(struct mmu_notifier *mn,')
+ w(' struct mm_struct *mm,')
+ w(' unsigned long hva)')
+ w('{')
+ w('\treturn __kvm_mmu_notifier_clear_flush_young(mn, mm, hva, hva+1);')
+ w('}')
+ line = '#endif'
+ if match(r'^static int kvm_mmu_notifier_clear_flush_young'):
+ w('#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)')
+ w(line)
+ w('#else')
+ w(sub('kvm_', '__kvm_', line))
+ line = '#endif'
if line == '#ifdef CONFIG_KEXEC':
line = '#if defined(CONFIG_KEXEC) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)'
if line == '\tif (!cpu_has_vmx_apicv())':
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH kvm-kmod 3/3] redefine is_zero_pfn to not rely on zero_pfn
2014-10-09 11:53 [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 1/3] FOLL_TRIED is not available before 3.18 Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 2/3] the MMU notifier clear_flush_young callback changed in 3.18 Paolo Bonzini
@ 2014-10-09 11:53 ` Paolo Bonzini
2014-10-10 15:03 ` [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Jan Kiszka
3 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-10-09 11:53 UTC (permalink / raw)
To: kvm; +Cc: jan.kiszka
zero_pfn is not exported before 3.17.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
external-module-compat-comm.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index dff603f..c20b1ed 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -1421,3 +1421,6 @@ extern u64 kvm_get_boot_base_ns(struct timekeeper *tk);
#ifndef FOLL_TRIED
#define FOLL_TRIED 0
#endif
+
+#undef is_zero_pfn
+#define is_zero_pfn(pfn) ((pfn) == page_to_pfn(ZERO_PAGE(0)))
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window
2014-10-09 11:53 [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Paolo Bonzini
` (2 preceding siblings ...)
2014-10-09 11:53 ` [PATCH kvm-kmod 3/3] redefine is_zero_pfn to not rely on zero_pfn Paolo Bonzini
@ 2014-10-10 15:03 ` Jan Kiszka
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2014-10-10 15:03 UTC (permalink / raw)
To: Paolo Bonzini, kvm
On 2014-10-09 13:53, Paolo Bonzini wrote:
> Patches are relative to next branch of kvm-kmod.git.
>
> Paolo
>
> Paolo Bonzini (3):
> FOLL_TRIED is not available before 3.18
> the MMU notifier clear_flush_young callback changed in 3.18
> redefine is_zero_pfn to not rely on zero_pfn
>
> external-module-compat-comm.h | 5 ++++-
> sync | 16 ++++++++++++++++
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
Thanks, applied.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-10 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-09 11:53 [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 1/3] FOLL_TRIED is not available before 3.18 Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 2/3] the MMU notifier clear_flush_young callback changed in 3.18 Paolo Bonzini
2014-10-09 11:53 ` [PATCH kvm-kmod 3/3] redefine is_zero_pfn to not rely on zero_pfn Paolo Bonzini
2014-10-10 15:03 ` [PATCH kvm-kmod 0/3] First round of kvm-kmod fixes for 3.18 merge window Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).