WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH 2/3] xen: add CPU microcode update driver

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 2/3] xen: add CPU microcode update driver
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 15 Nov 2010 17:16:30 -0800
Cc: the arch/x86 maintainers <x86@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Mon, 15 Nov 2010 17:20:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101115155928.GC345@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <cover.1289519130.git.jeremy.fitzhardinge@xxxxxxxxxx> <37a80bdde5957ffa81c2ecdffc4ccc2e874e34cb.1289519130.git.jeremy.fitzhardinge@xxxxxxxxxx> <20101115155928.GC345@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.6
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel