* [PATCH 4/4] Update source link
2009-10-12 8:54 [PULL REQUEST] kvm-kmod Jan Kiszka
@ 2009-10-12 8:54 ` Jan Kiszka
2009-10-12 8:54 ` [PATCH 1/4] Remove const from vm_ops to avoid warnings on older kernels Jan Kiszka
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2009-10-12 8:54 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
linux-2.6 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linux-2.6 b/linux-2.6
index abb015a..8fdcaf6 160000
--- a/linux-2.6
+++ b/linux-2.6
@@ -1 +1 @@
-Subproject commit abb015ac65852287c7a7c243c8cdee966a38854d
+Subproject commit 8fdcaf60d3e7d96450f3ae05c56f1046327fb3fe
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 1/4] Remove const from vm_ops to avoid warnings on older kernels
2009-10-12 8:54 [PULL REQUEST] kvm-kmod Jan Kiszka
2009-10-12 8:54 ` [PATCH 4/4] Update source link Jan Kiszka
@ 2009-10-12 8:54 ` Jan Kiszka
2009-10-12 8:54 ` [PATCH 2/4] Add cpufreq_get wrapper for !CONFIG_CPU_FREQ Jan Kiszka
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2009-10-12 8:54 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
sync | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sync b/sync
index 0bbd488..4821b84 100755
--- a/sync
+++ b/sync
@@ -119,6 +119,8 @@ def __hack(data):
line = sub(r'flags', r'kvm_pt_regs_flags', line)
mce = False
line = sub(r'boot_cpu_data.x86_phys_bits', 'kvm_x86_phys_bits', line)
+ if match(r'^static const struct vm_operations_struct kvm_'):
+ line = sub(r' const ', ' ', line)
w(line)
if match(r'\tkvm_init_debug'):
w('\thrtimer_kallsyms_resolve();')
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/4] Add cpufreq_get wrapper for !CONFIG_CPU_FREQ
2009-10-12 8:54 [PULL REQUEST] kvm-kmod Jan Kiszka
2009-10-12 8:54 ` [PATCH 4/4] Update source link Jan Kiszka
2009-10-12 8:54 ` [PATCH 1/4] Remove const from vm_ops to avoid warnings on older kernels Jan Kiszka
@ 2009-10-12 8:54 ` Jan Kiszka
2009-10-12 8:54 ` [PATCH 3/4] Avoid kmap_atomic_to_page in svm Jan Kiszka
2009-10-12 22:27 ` [PULL REQUEST] kvm-kmod Marcelo Tosatti
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2009-10-12 8:54 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
external-module-compat-comm.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index 47fdc86..de8ab23 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -993,3 +993,10 @@ unsigned long kvm_vma_kernel_pagesize(struct vm_area_struct *vma)
} \
})
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) && !defined(CONFIG_CPU_FREQ)
+static inline unsigned int cpufreq_get(unsigned int cpu)
+{
+ return 0;
+}
+#endif
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3/4] Avoid kmap_atomic_to_page in svm
2009-10-12 8:54 [PULL REQUEST] kvm-kmod Jan Kiszka
` (2 preceding siblings ...)
2009-10-12 8:54 ` [PATCH 2/4] Add cpufreq_get wrapper for !CONFIG_CPU_FREQ Jan Kiszka
@ 2009-10-12 8:54 ` Jan Kiszka
2009-10-12 22:27 ` [PULL REQUEST] kvm-kmod Marcelo Tosatti
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2009-10-12 8:54 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm
kmap_atomic_to_page was not exported before 2.6.32, and adding a compat
wrapper for it is impossible due to further missing exports. This breaks
x86-32 modules under CONFIG_HIGHMEM.
So avoid its use via a crude hack: nested_svm_map callers receive the
mapped page and have to pass it back to nested_svm_unmap.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
sync | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/sync b/sync
index 4821b84..8868e6d 100755
--- a/sync
+++ b/sync
@@ -121,6 +121,18 @@ def __hack(data):
line = sub(r'boot_cpu_data.x86_phys_bits', 'kvm_x86_phys_bits', line)
if match(r'^static const struct vm_operations_struct kvm_'):
line = sub(r' const ', ' ', line)
+ if line == 'static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, enum km_type idx)':
+ line = sub(r'\)', ', struct page **mapped_page)', line)
+ if line == '\treturn kmap_atomic(page, idx);':
+ line = '\t*mapped_page = page;\n' + line
+ if line == 'static void nested_svm_unmap(void *addr, enum km_type idx)':
+ line = sub(r'\)', ', struct page *mapped_page)', line)
+ if line == '\tpage = kmap_atomic_to_page(addr);':
+ line = '\tpage = mapped_page;'
+ if match(r'= nested_svm_map(.*);'):
+ line = '\t{ struct page *mapped_page;\n' + sub(r'\);', ', &mapped_page);', line)
+ if match('nested_svm_unmap(.*);'):
+ line = sub(r'\);', ', mapped_page); }', line)
w(line)
if match(r'\tkvm_init_debug'):
w('\thrtimer_kallsyms_resolve();')
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PULL REQUEST] kvm-kmod
2009-10-12 8:54 [PULL REQUEST] kvm-kmod Jan Kiszka
` (3 preceding siblings ...)
2009-10-12 8:54 ` [PATCH 3/4] Avoid kmap_atomic_to_page in svm Jan Kiszka
@ 2009-10-12 22:27 ` Marcelo Tosatti
4 siblings, 0 replies; 8+ messages in thread
From: Marcelo Tosatti @ 2009-10-12 22:27 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, kvm
On Mon, Oct 12, 2009 at 10:54:54AM +0200, Jan Kiszka wrote:
> The following changes since commit e19bf3254985d9b8b6b916acc82fc398595cff95:
> Jan Kiszka (1):
> x86: Remove zombie kvm_trace from build
>
> are available in the git repository at:
>
> git://git.kiszka.org/kvm-kmod.git queue
>
> Jan Kiszka (4):
> Remove const from vm_ops to avoid warnings on older kernels
> Add cpufreq_get wrapper for !CONFIG_CPU_FREQ
> Avoid kmap_atomic_to_page in svm
> Update source link
>
> external-module-compat-comm.h | 7 +++++++
> linux-2.6 | 2 +-
> sync | 14 ++++++++++++++
> 3 files changed, 22 insertions(+), 1 deletions(-)
Pushed, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread