mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>
Cc: Huang Ying <ying.huang@intel.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH -v3] KVM: MCE: Add MCE support to KVM
Date: Mon, 25 May 2009 20:15:43 +0200	[thread overview]
Message-ID: <4A1AE04F.9070808@siemens.com> (raw)
In-Reply-To: <4A1ADED5.4020605@redhat.com>

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Avi Kivity wrote:
>>  
>>> Huang Ying wrote:
>>>    
>>>> The related MSRs are emulated. MCE capability is exported via
>>>> extension KVM_CAP_MCE and ioctl KVM_X86_GET_MCE_CAP_SUPPORTED.  A new
>>>> vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation
>>>> such as the mcg_cap. MCE is injected via vcpu ioctl command
>>>> KVM_X86_SET_MCE. Extended machine-check state (MCG_EXT_P) and CMCI are
>>>> not implemented.
>>>>
>>>>         
>>> Applied, thanks.
>>>
>>>     
>>
>> This patch breaks kvm build for 32-bit hosts.
>>   
> 
> Strange, I build-test on i386.  What's your failure?

This is against some 2.6.28 kernel:

  CC [M]  /data/kvm-kmod/x86/x86.o
/data/kvm-kmod/x86/x86.c: In function ‘set_msr_mce’:
/data/kvm-kmod/x86/x86.c:794: error: ‘MCG_CTL_P’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c:794: error: (Each undeclared identifier is reported only once
/data/kvm-kmod/x86/x86.c:794: error: for each function it appears in.)
/data/kvm-kmod/x86/x86.c: In function ‘get_msr_mce’:
/data/kvm-kmod/x86/x86.c:950: error: ‘MCG_CTL_P’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c: In function ‘kvm_arch_dev_ioctl’:
/data/kvm-kmod/x86/x86.c:1216: error: ‘MCG_CTL_P’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c: In function ‘kvm_vcpu_ioctl_x86_setup_mce’:
/data/kvm-kmod/x86/x86.c:1592: error: ‘MCG_CTL_P’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c: In function ‘kvm_vcpu_ioctl_x86_set_mce’:
/data/kvm-kmod/x86/x86.c:1613: error: ‘MCI_STATUS_VAL’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c:1619: error: ‘MCI_STATUS_UC’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c:1619: error: ‘MCG_CTL_P’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c:1630: error: ‘MCG_STATUS_MCIP’ undeclared (first use in this function)
/data/kvm-kmod/x86/x86.c:1639: error: ‘MCI_STATUS_OVER’ undeclared (first use in this function)

> 
>> Is the KVM MCE interface completely or only partially limited to x86-64,
>> ie. can I completely #ifdef it away on 32-bit hosts (including
>> KVM_CAP_MCE) or is this more complicated?
>>   
> 
> I don't see any reason to limit it to x86_64?
> 

Well, if I look at the definition of MCI_STATUS_VAL as (1UL<<63),
something tells me: "Hey, only use me on 64-bit hosts!" But I have no
clue about details of this stuff, and from a second glance at it is
seems to include at least some parts that are valid on 32-bit as well.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-05-25 18:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11  8:48 Huang Ying
2009-05-11  9:05 ` Jaswinder Singh Rajput
2009-05-11  9:08   ` Huang Ying
2009-05-14  5:30     ` [PATCH -tip] x86: kvm/x86.c use MSR names in place of address Jaswinder Singh Rajput
2009-05-14  6:27       ` [PATCH -tip] x86: kvm replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h Jaswinder Singh Rajput
2009-05-15 13:12         ` Jaswinder Singh Rajput
2009-05-17 18:48           ` Avi Kivity
2009-05-20  8:12             ` Jaswinder Singh Rajput
2009-05-20 11:47               ` Avi Kivity
2009-05-15 13:13       ` [PATCH -tip] x86: kvm/x86.c use MSR names in place of address Jaswinder Singh Rajput
2009-05-17 18:57       ` Avi Kivity
2009-05-17 18:56 ` [PATCH -v3] KVM: MCE: Add MCE support to KVM Avi Kivity
2009-05-25 17:40   ` Jan Kiszka
2009-05-25 18:09     ` Avi Kivity
2009-05-25 18:15       ` Jan Kiszka [this message]
2009-05-25 18:20         ` Jan Kiszka
2009-05-26  8:11           ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2009-05-04  6:47 Huang Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1AE04F.9070808@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome