aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/microcode.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-01-17 14:57:59 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-01-17 14:57:59 +0000
commit1468aea9005c69cdb769010d8e1456955b967498 (patch)
treea5b50ce31dd76e53a521d900bd1f1fad1f6c3400 /xen/arch/x86/microcode.c
parent727e8b415489e59cb1f0fe19e64063afda2255f4 (diff)
downloadxen-1468aea9005c69cdb769010d8e1456955b967498.tar.gz
xen-1468aea9005c69cdb769010d8e1456955b967498.tar.bz2
xen-1468aea9005c69cdb769010d8e1456955b967498.zip
Microcode does not need to have the default size of 2000+48 bytes.
A corresponding patch has gone into Linux 2.6.19; this is the port to Xen. Signed-off-by: Kurt Garloff <kurt@garloff.de> Reference: Patch to linux kernel from Sep 27 2006 > # User Shaohua Li <shaohua.li@intel.com> > # Node ID 45898b908138b5d93c2cc7353f061ce54af145dc > # Parent f962eab7b82c9bf1a6da69571046e764f5128395 > [PATCH] x86 microcode: don't check the size > > IA32 manual says if micorcode update's size is 0, then the size is > default size (2048 bytes). But this doesn't suggest all microcode > update's size should be above 2048 bytes to me. We actually had a > microcode update whose size is 1024 bytes. The patch just removed > the check. > > Signed-off-by: Shaohua Li <shaohua.li@intel.com> > Cc: Tigran Aivazian <tigran@veritas.com> > Signed-off-by: Andrew Morton <akpm@osdl.org> > Signed-off-by: Linus Torvalds <torvalds@osdl.org> > > committer: Linus Torvalds <torvalds@g5.osdl.org> 1159370778 -0700
Diffstat (limited to 'xen/arch/x86/microcode.c')
-rw-r--r--xen/arch/x86/microcode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/xen/arch/x86/microcode.c b/xen/arch/x86/microcode.c
index 3dcac7d124..89138c9a79 100644
--- a/xen/arch/x86/microcode.c
+++ b/xen/arch/x86/microcode.c
@@ -249,14 +249,14 @@ static int find_matching_ucodes (void)
}
total_size = get_totalsize(&mc_header);
- if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) {
+ if (cursor + total_size > user_buffer_size) {
printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
error = -EINVAL;
goto out;
}
data_size = get_datasize(&mc_header);
- if ((data_size + MC_HEADER_SIZE > total_size) || (data_size < DEFAULT_UCODE_DATASIZE)) {
+ if (data_size + MC_HEADER_SIZE > total_size) {
printk(KERN_ERR "microcode: error! Bad data in microcode data file\n");
error = -EINVAL;
goto out;
@@ -459,11 +459,6 @@ int microcode_update(XEN_GUEST_HANDLE(void) buf, unsigned long len)
{
int ret;
- if (len < DEFAULT_UCODE_TOTALSIZE) {
- printk(KERN_ERR "microcode: not enough data\n");
- return -EINVAL;
- }
-
if (len != (typeof(user_buffer_size))len) {
printk(KERN_ERR "microcode: too much data\n");
return -E2BIG;