From: Nadav Amit Date: Thu, 25 Dec 2014 00:52:16 +0000 (+0200) Subject: KVM: x86: #PF error-code on R/W operations is wrong X-Git-Tag: fixes-v4.0-rc1~113^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c205fb7d7d4f81e46fc577b707ceb9e356af1456;p=pandora-kernel.git KVM: x86: #PF error-code on R/W operations is wrong When emulating an instruction that reads the destination memory operand (i.e., instructions without the Mov flag in the emulator), the operand is first read. If a page-fault is detected in this phase, the error-code which would be delivered to the VM does not indicate that the access that caused the exception is a write one. This does not conform with real hardware, and may cause the VM to enter the page-fault handler twice for no reason (once for read, once for write). Signed-off-by: Nadav Amit Signed-off-by: Paolo Bonzini --- Reading git-diff-tree failed