x86/hvm: Treat non-instruction fetch nested page faults also as read violations

As pointed out by Jan Beulich in http://lists.xen.org/archives/html/xen-devel/2014-08/msg01269.html: "Read-modify-write instructions absolutely need to be treated as read accesses, yet hardware doesn't guarantee to tell us so (they may surface as just write accesses)." This patch addresses the issue in both the VMX and the SVM side.

VMX: Treat all write data access violations also as read violations (in addition to those that were already reported as read violations).
SVM: Refine the meaning of read data access violations to distinguish between read/write and instruction fetch access violations.

With this patch both VMX and SVM specific nested page fault handling code reports violations the same way, thus abstracting the hardware specific behaviour from the layers above.

Suggested-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>

---
v7: - Add comment blocks describing the rationale behind the specific handling of violations.
    - Tweak the logic in the VMX code to better match the description in the manual.
x86/mem_event: Deliver gla fault EPT violation information

On Intel EPT the exit qualification generated by a violation also includes a bit (EPT_GLA_FAULT) which describes the following information:
Set if the access causing the EPT violation is to a guest-physical address that is the translation of a linear address. Clear if the access causing the EPT violation is to a paging-structure entry as part of a page walk or the update of an accessed or dirty bit.

For more information see Table 27-7 in the Intel SDM.

This patch extends the mem_event system to deliver this extra information, which could be useful for determining the cause of a violation.

v7: Minor fix of setting the mem event response values twice.
v6: Fixes regarding the enum usage.
v5: Add missing bits to the SVM side, style fixes and switching to shared struct+enum in mm.h.
v4: Use new bitmaps to pass information.
v3: Style fixes.
v2: Split gla_fault into fault_in_gpt and fault_gla to be more compatible with the AMD implementation.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>
tools/xen-access: Print gla valid/fault information

Extend the print-out of the memory violations to show gla valid/fault information.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>

---
v7: Style fix of printf.
v4: Change vcpu-id printf to unsigned and update to new fields.
v2: Update to new fields and change printing 1/0 to y/n.