From: Rusty Russell <rusty@rustcorp.com.au>
set_msr_interception() is used by svm to set up which MSRs should be
intercepted. It can only fail if someone has changed the code to try
to intercept an MSR without updating the array of ranges.
The return value is ignored anyway: it should just BUG() if it doesn't
work. (A build-time failure would be better, but that's tricky).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
---
drivers/kvm/svm.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 827bc27..7beaff1 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -359,8 +359,8 @@ err_1:
}
-static int set_msr_interception(u32 *msrpm, unsigned msr,
- int read, int write)
+static void set_msr_interception(u32 *msrpm, unsigned msr,
+ int read, int write)
{
int i;
@@ -375,11 +375,10 @@ static int set_msr_interception(u32 *msrpm, unsigned msr,
u32 mask = ((write) ? 0 : 2) | ((read) ? 0 : 1);
*base = (*base & ~(0x3 << msr_shift)) |
(mask << msr_shift);
- return 1;
+ return;
}
}
- printk(KERN_DEBUG "%s: not found 0x%x\n", __FUNCTION__, msr);
- return 0;
+ BUG();
}
static __init int svm_hardware_setup(void)
--
1.5.3
-
| Linus Torvalds | Linux 2.6.27-rc8 |
| Rafael J. Wysocki | 2.6.26-rc9-git12: Reported regressions from 2.6.25 |
| Jarod Wilson | [PATCH 05/18] lirc driver for i2c-based IR receivers |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Andrew Morton | email address handling |
| Pierre Habouzit | Re: [RFC] Re: Convert 'git blame' to parse_options() |
| Linus Torvalds | Re: What's in git.git (stable), and Announcing GIT 1.4.4.3 |
| Brian Gernhardt | Re: [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch |
| Leon Dippenaar | New tcp stack attack |
| Marco Peereboom | Re: Real men don't attack straw men |
| Richard Storm | MAXDSIZ 1GB memory limit for process |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Patrick McHardy | [NET_SCHED 00/04]: External SFQ classifiers/flow classifier |
| Arjan van de Ven | Re: [GIT]: Networking |
| Ingo Oeser | Re: [PATCH]: Third (final?) release of Sun Neptune driver |
| Linus Torvalds | Re: [GIT]: Networking |
