devel/kernel kernel.spec, 1.531, 1.532 linux-2.6-fix-kvm-2.6.25-rc6-leak.patch, 1.1, 1.2
Jeremy Katz (katzj)
fedora-extras-commits at redhat.com
Mon Mar 24 22:37:22 UTC 2008
- Previous message (by thread): rpms/libflaim/devel fortify-source.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 libflaim.spec, 1.11, 1.12 sources, 1.3, 1.4 libflaim-gcc43.patch, 1.2, NONE
- Next message (by thread): rpms/kernel/devel kernel.spec,1.532,1.533
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: katzj
Update of /cvs/pkgs/devel/kernel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4161
Modified Files:
kernel.spec linux-2.6-fix-kvm-2.6.25-rc6-leak.patch
Log Message:
* Mon Mar 24 2008 Jeremy Katz <katzj at redhat.com>
- Update the kvm patch to a more final one
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/devel/kernel/kernel.spec,v
retrieving revision 1.531
retrieving revision 1.532
diff -u -r1.531 -r1.532
--- kernel.spec 24 Mar 2008 17:54:13 -0000 1.531
+++ kernel.spec 24 Mar 2008 22:36:30 -0000 1.532
@@ -1734,6 +1734,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Mon Mar 24 2008 Jeremy Katz <katzj at redhat.com>
+- Update the kvm patch to a more final one
+
* Mon Mar 24 2008 Jarod Wilson <jwilson at redhat.com>
- firewire not totally merged yet, fix up patch accordingly
linux-2.6-fix-kvm-2.6.25-rc6-leak.patch:
Index: linux-2.6-fix-kvm-2.6.25-rc6-leak.patch
===================================================================
RCS file: /cvs/pkgs/devel/kernel/linux-2.6-fix-kvm-2.6.25-rc6-leak.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-fix-kvm-2.6.25-rc6-leak.patch 24 Mar 2008 16:25:07 -0000 1.1
+++ linux-2.6-fix-kvm-2.6.25-rc6-leak.patch 24 Mar 2008 22:36:30 -0000 1.2
@@ -1,8 +1,45 @@
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
-index 4ba85d9..e55af12 100644
+index d8172aa..e55af12 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
-@@ -1412,7 +1412,7 @@ static void mmu_guess_page_from_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
+@@ -222,8 +222,7 @@ static int is_io_pte(unsigned long pte)
+
+ static int is_rmap_pte(u64 pte)
+ {
+- return pte != shadow_trap_nonpresent_pte
+- && pte != shadow_notrap_nonpresent_pte;
++ return is_shadow_present_pte(pte);
+ }
+
+ static gfn_t pse36_gfn_delta(u32 gpte)
+@@ -893,14 +892,25 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
+ int *ptwrite, gfn_t gfn, struct page *page)
+ {
+ u64 spte;
+- int was_rmapped = is_rmap_pte(*shadow_pte);
++ int was_rmapped = 0;
+ int was_writeble = is_writeble_pte(*shadow_pte);
++ hfn_t host_pfn = (*shadow_pte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT;
+
+ pgprintk("%s: spte %llx access %x write_fault %d"
+ " user_fault %d gfn %lx\n",
+ __FUNCTION__, *shadow_pte, pt_access,
+ write_fault, user_fault, gfn);
+
++ if (is_rmap_pte(*shadow_pte)) {
++ if (host_pfn != page_to_pfn(page)) {
++ pgprintk("hfn old %lx new %lx\n",
++ host_pfn, page_to_pfn(page));
++ rmap_remove(vcpu->kvm, shadow_pte);
++ }
++ else
++ was_rmapped = 1;
++ }
++
+ /*
+ * We don't set the accessed bit, since we sometimes want to see
+ * whether the guest actually used the pte (in order to detect
+@@ -1402,7 +1412,7 @@ static void mmu_guess_page_from_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
up_read(¤t->mm->mmap_sem);
vcpu->arch.update_pte.gfn = gfn;
@@ -11,3 +48,42 @@
}
void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
+diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
+index 94ea724..8e14628 100644
+--- a/arch/x86/kvm/vmx.c
++++ b/arch/x86/kvm/vmx.c
+@@ -349,8 +349,6 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu)
+
+ static void reload_tss(void)
+ {
+-#ifndef CONFIG_X86_64
+-
+ /*
+ * VT restores TR but not its size. Useless.
+ */
+@@ -361,7 +359,6 @@ static void reload_tss(void)
+ descs = (void *)gdt.base;
+ descs[GDT_ENTRY_TSS].type = 9; /* available TSS */
+ load_TR_desc();
+-#endif
+ }
+
+ static void load_transition_efer(struct vcpu_vmx *vmx)
+@@ -1436,7 +1433,7 @@ static int init_rmode_tss(struct kvm *kvm)
+ int ret = 0;
+ int r;
+
+- down_read(¤t->mm->mmap_sem);
++ down_read(&kvm->slots_lock);
+ r = kvm_clear_guest_page(kvm, fn, 0, PAGE_SIZE);
+ if (r < 0)
+ goto out;
+@@ -1459,7 +1456,7 @@ static int init_rmode_tss(struct kvm *kvm)
+
+ ret = 1;
+ out:
+- up_read(¤t->mm->mmap_sem);
++ up_read(&kvm->slots_lock);
+ return ret;
+ }
+
- Previous message (by thread): rpms/libflaim/devel fortify-source.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 libflaim.spec, 1.11, 1.12 sources, 1.3, 1.4 libflaim-gcc43.patch, 1.2, NONE
- Next message (by thread): rpms/kernel/devel kernel.spec,1.532,1.533
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list