From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [RFC] VMX CR3 cache Date: Wed, 30 Jan 2008 09:26:53 +0100 Message-ID: <47A034CD.9010708@redhat.com> References: <20080128160444.GA3821@dmt> <479EE9C3.8000007@redhat.com> <479EFFB0.1000700@redhat.com> <20080129123355.GA11587@dmt> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000404030900080607070007" Cc: kvm-devel , Avi Kivity To: Marcelo Tosatti Return-path: In-Reply-To: <20080129123355.GA11587@dmt> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------000404030900080607070007 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Marcelo Tosatti wrote: > And this is against a changed x86.git -mm tree (with pvops64 patches). > I'll send the PTE-write-via-hypercall patches soon and will rebase on > top of that (the CR3 cache needs more testing/tuning apparently). Oops for sale ;) Triggered by guests wrmsr, looks like some error checks are missing. I've passed in a physical address. The vmx_cr3_cache_msr() function has a gva_to_page() call which makes me suspect it expects a virtual address. First it should not Oops when a invalid virtual address is passed in, and second I think it better shouldn't expect a virtual address in the first place. What is the reason to expect the cr3 cache being page aligned btw? It should be enougth to require the struct not cross a page border, right? cheers, Gerd --------------000404030900080607070007 Content-Type: text/plain; name="oops.cr3-cache" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="oops.cr3-cache" MSR_IA32_VMX_MISC: 00000000000403c0 cr3 target values: 4 device xenner0 entered promiscuous mode audit(1201680208.401:28): dev=3Dxenner0 prom=3D256 old_prom=3D0 auid=3D42= 94967295 br0: port 1(xenner0) entering learning state Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:= =20 [] :kvm_intel:vmx_cr3_cache_msr+0x76/0xef PGD 102d0067 PUD f816067 PMD 0=20 Oops: 0000 [1] SMP=20 CPU 1=20 Modules linked in: i915 drm nls_utf8 ipt_LOG xt_TCPMSS xt_mark xt_MARK ip= table_mangle kvm_intel(U) kvm(U) ipt_MASQUERADE iptable_nat nf_nat nfsd e= xportfs lockd nfs_acl auth_rpcgss autofs4 tun sunrpc bridge nf_conntrack_= ipv4 ipt_REJECT iptable_filter ip_tables nf_conntrack_netbios_ns nf_connt= rack_ipv6 xt_state nf_conntrack nfnetlink xt_tcpudp ip6t_ipv6header ip6t_= REJECT ip6table_filter ip6_tables x_tables ipv6 cpufreq_ondemand acpi_cpu= freq loop dm_multipath sr_mod cdrom ata_generic snd_hda_intel snd_seq_dum= my snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss arc4= snd_mixer_oss ecb blkcipher snd_pcm iTCO_wdt iTCO_vendor_support video s= nd_timer snd_page_alloc output i2c_i801 i2c_core ata_piix iwl3945 snd_hwd= ep snd battery ac nsc_ircc mac80211 button cfg80211 sg e1000 pcspkr irda = soundcore thinkpad_acpi crc_ccitt hwmon joydev dm_snapshot dm_zero dm_mir= ror dm_mod ahci libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd= ehci_hcd Pid: 7680, comm: xenner Not tainted 2.6.23.14-107.fc8 #1 RIP: 0010:[] [] :kvm_intel:vmx_cr3_c= ache_msr+0x76/0xef RSP: 0018:ffff810011509ca8 EFLAGS: 00010296 RAX: ffff810008e48770 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffffffffffffffff RSI: 0000000000000296 RDI: ffff810008e4876c RBP: ffff81001648a000 R08: 0000000087655678 R09: 0000000000000000 R10: 0000000000000034 R11: ffffffff8847afcd R12: ffff81007cc99000 R13: 0000000000000000 R14: 000000000000000a R15: 0000000000000000 FS: 00002aaaaaad2b20(0000) GS:ffff810037c21300(0000) knlGS:0000000000000= 000 CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b CR2: 0000000000000000 CR3: 000000007ad72000 CR4: 00000000000026e0 DR0: ffffffff8125b0e0 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff1 DR7: 0000000000000701 Process xenner (pid: 7680, threadinfo ffff810011508000, task ffff81000a83= b040) Stack: ffff81001648a000 ffff81001648a000 0000000000000000 ffffffff8847af= f8 ffff81001648a000 ffffffff88460c3f 000000008090ae81 ffff810011509e68 ffff810011509ee8 ffff81001648a000 0000000000000000 000000000000ae80 Call Trace: [] :kvm_intel:handle_wrmsr+0x2b/0x4f [] :kvm:kvm_arch_vcpu_ioctl_run+0x3a7/0x4fb [] :kvm:kvm_vcpu_ioctl+0xda/0x2dd [] n_tty_receive_buf+0xd49/0xdc9 [] generic_file_aio_write+0x6c/0xc1 [] avc_has_perm+0x49/0x5b [] :ext3:ext3_file_write+0x16/0x94 [] inode_has_perm+0x65/0x72 [] __wake_up+0x38/0x4f [] file_has_perm+0x94/0xa3 [] do_ioctl+0x21/0x6b [] vfs_ioctl+0x243/0x25c [] sys_ioctl+0x59/0x79 [] system_call+0x7e/0x83 Code: 48 8b 13 31 c9 48 c1 ea 33 48 89 d0 48 c1 e8 09 48 8b 04 c5=20 RIP [] :kvm_intel:vmx_cr3_cache_msr+0x76/0xef RSP CR2: 0000000000000000 xenner0: no IPv6 routers present br0: topology change detected, propagating br0: port 1(xenner0) entering forwarding state --------------000404030900080607070007 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --------------000404030900080607070007 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------000404030900080607070007--