diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-09 23:35:27 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-09 23:35:27 +0000 |
commit | df01e0fc33af5b1247d8ac4bfec5b94466ff69c2 (patch) | |
tree | aac79403965a0602952eee4ab7b13d069098d1fd /target-i386/helper.c | |
parent | 8543243c29a60f102d7a3d98027b46bc8cdac421 (diff) |
Add rdpmc SVM intercept, by Bernhard Kauer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3791 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r-- | target-i386/helper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index a2f465c736..07ff3563cc 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -2743,6 +2743,18 @@ void helper_rdtsc(void) EDX = (uint32_t)(val >> 32); } +void helper_rdpmc(void) +{ + if ((env->cr[4] & CR4_PCE_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) { + raise_exception(EXCP0D_GPF); + } + + if (!svm_check_intercept_param(SVM_EXIT_RDPMC, 0)) { + /* currently unimplemented */ + raise_exception_err(EXCP06_ILLOP, 0); + } +} + #if defined(CONFIG_USER_ONLY) void helper_wrmsr(void) { |