Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186027
b: refs/heads/master
c: ab34482
h: refs/heads/master
i:
  186025: dc88601
  186023: bce4eeb
v: v3
  • Loading branch information
Gleb Natapov authored and Marcelo Tosatti committed Mar 1, 2010
1 parent e28f1e4 commit 8499fa9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: f0f4b930900ffa8daddb5262522c3e5c67ee1835
refs/heads/master: ab344828ebe729e52949d64046adaa196f6b9dbe
6 changes: 5 additions & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,16 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{
cr0 |= X86_CR0_ET;

if (cr0 & CR0_RESERVED_BITS) {
#ifdef CONFIG_X86_64
if (cr0 & 0xffffffff00000000UL) {
printk(KERN_DEBUG "set_cr0: 0x%lx #GP, reserved bits 0x%lx\n",
cr0, kvm_read_cr0(vcpu));
kvm_inject_gp(vcpu, 0);
return;
}
#endif

cr0 &= ~CR0_RESERVED_BITS;

if ((cr0 & X86_CR0_NW) && !(cr0 & X86_CR0_CD)) {
printk(KERN_DEBUG "set_cr0: #GP, CD == 0 && NW == 1\n");
Expand Down

0 comments on commit 8499fa9

Please sign in to comment.