Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205458
b: refs/heads/master
c: 1be85a6
h: refs/heads/master
v: v3
  • Loading branch information
Hans Rosenfeld authored and H. Peter Anvin committed Jul 28, 2010
1 parent 5f0b7d2 commit 5c814a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d8888c2a214aece2494a49e699a097c2ba9498b
refs/heads/master: 1be85a6d93f4207d8c2c6238c4a96895e28cefba
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ unsigned long calc_aperfmperf_ratio(struct aperfmperf *old,
* AMD errata checking
*/
#ifdef CONFIG_CPU_SUP_AMD
extern const int amd_erratum_383[];
extern const int amd_erratum_400[];
extern bool cpu_has_amd_erratum(const int *);

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ const int amd_erratum_400[] =
AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf),
AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf));

const int amd_erratum_383[] =
AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf));

bool cpu_has_amd_erratum(const int *erratum)
{
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ static void svm_init_erratum_383(void)
int err;
u64 val;

/* Only Fam10h is affected */
if (boot_cpu_data.x86 != 0x10)
if (!cpu_has_amd_erratum(amd_erratum_383))
return;

/* Use _safe variants to not break nested virtualization */
Expand Down

0 comments on commit 5c814a1

Please sign in to comment.