From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@bugzilla.kernel.org Subject: [Bug 65561] KVM:Entry failed on Single stepping sti instruction Date: Sat, 24 May 2014 05:46:44 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.19.201]:33413 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbaEXFqs (ORCPT ); Sat, 24 May 2014 01:46:48 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1775E203FB for ; Sat, 24 May 2014 05:46:47 +0000 (UTC) Received: from bugzilla1.web.kernel.org (bugzilla1.web.kernel.org [172.20.200.51]) by mail.kernel.org (Postfix) with ESMTP id 0AF5E203E3 for ; Sat, 24 May 2014 05:46:45 +0000 (UTC) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: https://bugzilla.kernel.org/show_bug.cgi?id=65561 --- Comment #22 from Jidong Xiao --- Alright, I added a printk statement in the wrmsr case, like this: case 0x30: printk(KERN_ERR "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__); /* wrmsr */ msr_data = (u32)c->regs[VCPU_REGS_RAX] | ((u64)c->regs[VCPU_REGS_RDX] << 32); rc = kvm_set_msr(ctxt->vcpu, c->regs[VCPU_REGS_RCX], msr_data); if (rc) { kvm_inject_gp(ctxt->vcpu, 0); c->eip = kvm_rip_read(ctxt->vcpu); } rc = X86EMUL_CONTINUE; c->dst.type = OP_NONE; break; And i run a c program to access msr, like this: linux:~/code/cvedr # cat accessmsr.c #include main(){ asm volatile("wrmsr"); printf("test msr\n"); } linux:~/code/cvedr # ./accessmsr Segmentation fault Even though my c program in the guest os got a segmentation fault, from the host os level, I don't see the printk statement is triggered, so this is not about privileged instructions or unprivileged instructions. I think there must be some other conditions to trigger these printk statements. -- You are receiving this mail because: You are watching the assignee of the bug.