public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>,
	mingo@kernel.org, linux-kernel@vger.kernel.org,
	boris.ostrovsky@amd.com, tglx@linutronix.de, hpa@linux.intel.com,
	linux-tip-commits@vger.kernel.org
Cc: Pekka Enberg <penberg@kernel.org>
Subject: Re: [tip:x86/cpu] x86, AMD: Enable WC+ memory type on family 10 processors
Date: Tue, 12 Feb 2013 16:21:13 -0800	[thread overview]
Message-ID: <511ADC79.6040007@zytor.com> (raw)
In-Reply-To: <20130213001626.GA30512@pd.tnic>

On 02/12/2013 04:16 PM, Borislav Petkov wrote:
>
> This family check is redundant, we're already in a 0x10 if-branch
> above. Boris had sent a second version which doesn't have that check:
> http://marc.info/?l=linux-kernel&m=135949774114910 but I don't know how this
> other version has gotten in.
>
> @hpa: maybe replace - patch is still at the top of tip:x86/cpu?
>

I'll check with Ingo if that is doable.

>> +			rdmsrl(MSR_AMD64_BU_CFG2, value);
>> +			value &= ~(1ULL << 24);
>> +			wrmsrl(MSR_AMD64_BU_CFG2, value);
>> +		}
>>   	}
>>
>>   	rdmsr_safe(MSR_AMD64_PATCH_LEVEL, &c->microcode, &dummy);
>
> However, the more serious issue is that that same kernel #GPs when
> booted in kvm. It seems it cannot stomach that specific MSR, see the
> second "<-- trapping instruction" below and that BU_CFG2 MSR landing in
> %ecx in the line before that.
>
> Oh, and this happens only with the kvm executable (/usr/bin/kvm) in
> debian testing. If I use qemu from git, it passes over init_amd just
> fine.
>
> Hmmm..
>

It #GPs on an MSR, which tends to be a bug in the VMM; RDMSR/WRMSR 
generally kick out to the VMM.  There isn't a huge lot of work we can do 
about that...

I think Qemu defaults to ignoring unknown-to-it MSRs whereas maybe 
kvmtool croaks?  Pekka?

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  reply	other threads:[~2013-02-13  0:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 21:32 [PATCH 2/2] x86,AMD: Enable WC+ memory type on family 10 processors Boris Ostrovsky
2013-01-31 22:45 ` [tip:x86/cpu] x86, AMD: " tip-bot for Boris Ostrovsky
2013-02-13  0:16   ` Borislav Petkov
2013-02-13  0:21     ` H. Peter Anvin [this message]
2013-02-13  0:31       ` Borislav Petkov
2013-02-13  8:06       ` Pekka Enberg
2013-02-13  8:16         ` Cyrill Gorcunov

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=511ADC79.6040007@zytor.com \
    --to=hpa@zytor.com \
    --cc=boris.ostrovsky@amd.com \
    --cc=bp@alien8.de \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=penberg@kernel.org \
    --cc=tglx@linutronix.de \
    /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