From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huang Ying Subject: Re: [PATCH -v6] QEMU: MCE: Add MCE simulation to qemu/tcg Date: Wed, 01 Jul 2009 09:14:05 +0800 Message-ID: <1246410845.12836.93.camel@yhuang-dev.sh.intel.com> References: <1245722714.22246.424.camel@yhuang-dev.sh.intel.com> <4A4A5570.1070107@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Andi Kleen , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" To: Anthony Liguori Return-path: In-Reply-To: <4A4A5570.1070107@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Hi, Anthony, On Wed, 2009-07-01 at 02:12 +0800, Anthony Liguori wrote: > Hi Huang, > > Huang Ying wrote: > > - MCE features are initialized when VCPU is intialized according to CPUID. > > - A monitor command "mce" is added to inject a MCE. > > - A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE. > > > > Can you post some instructions on how to test this functionality? During development, I use QEMU monitor command "mce" to test this functionality. For corrected error, you can use /sbin/mcelog to get the error information. For uncorrected error, you will get panic. If you want to get result faster for corrected error, set the following sysfs file to a small number, which is seconds between corrected error polls. /sys/devices/system/machinecheck/machinecheck0/check_interval For corrected error: mce 0 1 0x8000000000000000 0x0 0x0 0x0 For uncorrected error: mce 0 1 0xb200000000000000 0x0 0x0 0x0 > For > instance, I believe Linux is capable of delivering a SIGBUS to a process > based on certain MCE's. I'm not sure what the steps would be though to > create a process using a particular physical memory address, generate a > MCE for that address, and then inspect that the process received the signal. > > Are you testing the patches via something like that? It is possible to test like that, but it is much easier to test the case I mentioned above. Best Regards, Huang Ying