All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: the arch/x86 maintainers <x86@kernel.org>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [Xen-devel] Re: [PATCH 2/3] xen: add CPU microcode update driver
Date: Mon, 15 Nov 2010 17:16:30 -0800	[thread overview]
Message-ID: <4CE1DB6E.9080301@goop.org> (raw)
In-Reply-To: <20101115155928.GC345@dumpdata.com>

On 11/15/2010 07:59 AM, Konrad Rzeszutek Wilk wrote:
>> +static enum ucode_state xen_request_microcode_user(int cpu,
>> +						   const void __user *buf, size_t size)
>> +{
>> +	struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
>> +	struct xen_microcode *uc;
>> +	enum ucode_state ret;
>> +	size_t unread;
>> +
>> +	if (cpu != 0) {
>> +		/* No real firmware for non-zero cpus; just store a
>> +		   placeholder */
>> +		size = 0;
>> +	}
>> +
>> +	if (uci->mc != NULL) {
>> +		vfree(uci->mc);
>> +		uci->mc = NULL;
>> +	}
>> +
>> +	ret = UCODE_ERROR;
>> +	uc = vmalloc(sizeof(*uc) + size);
>> +	if (uc == NULL)
>> +		goto out;
>> +
>> +	uc->len = size;
>> +
>> +	ret = UCODE_NFOUND;
>> +
>> +	/* XXX This sporadically returns uncopied bytes, so we return
>> +	   EFAULT.  As far as I can see, the usermode code
>            ^^^^^ UCODE_NFOUND.
>> +	   (microcode_ctl) isn't doing anything wrong... */
> Is this still valid? Looking at AMD it checks for a magic key and the Intel
> just copies without checks.

Probably not.

    J

  reply	other threads:[~2010-11-16  1:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-11 23:58 [PATCH 0/3] Xen Microcode update driver for 2.6.38 Jeremy Fitzhardinge
2010-11-11 23:58 ` [PATCH 1/3] xen dom0: Add support for the platform_ops hypercall Jeremy Fitzhardinge
2010-11-15 15:48   ` Konrad Rzeszutek Wilk
2010-11-16  1:14     ` [Xen-devel] " Jeremy Fitzhardinge
2010-11-16 15:52       ` Konrad Rzeszutek Wilk
2010-11-11 23:58 ` [PATCH 2/3] xen: add CPU microcode update driver Jeremy Fitzhardinge
2010-11-15 15:59   ` Konrad Rzeszutek Wilk
2010-11-16  1:16     ` Jeremy Fitzhardinge [this message]
2010-11-11 23:58 ` [PATCH 3/3] xen/microcode: partially enable even for non-privileged kernels Jeremy Fitzhardinge
2010-11-15 16:02   ` Konrad Rzeszutek Wilk
2010-11-16  1:17     ` [Xen-devel] " Jeremy Fitzhardinge

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=4CE1DB6E.9080301@goop.org \
    --to=jeremy@goop.org \
    --cc=hpa@zytor.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.