util/pgtblgen: Fix qemu on KVM

Running the x86_64 qemu mainboard target with '-accel kvm' results in hang,
as the 'D' and 'A' bits needs to be set in read only page tables.

Tested on QEMU Q35: Boots into payload with '-accel kvm'.

Change-Id: I4beae8deec6bf34f9762e7b54c5da4e5b63f6d24
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36778
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/util/pgtblgen/pgtblgen.c b/util/pgtblgen/pgtblgen.c
index e9ebd8b..3a41a90 100644
--- a/util/pgtblgen/pgtblgen.c
+++ b/util/pgtblgen/pgtblgen.c
@@ -38,12 +38,14 @@
  *
  * Page table attributes: WB, User+Supervisor, Present, Writeable
  */
-#define PRES (1ULL << 0)
-#define RW   (1ULL << 1)
-#define US   (1ULL << 2)
-#define PS   (1ULL << 7)
-#define _GEN_DIR(a) (PRES | RW | US | (a))
-#define _GEN_PAGE(a) (PRES | RW | US | PS | (a))
+#define _PRES (1ULL << 0)
+#define _RW   (1ULL << 1)
+#define _US   (1ULL << 2)
+#define _A    (1ULL << 5)
+#define _D    (1ULL << 6)
+#define _PS   (1ULL << 7)
+#define _GEN_DIR(a) (_PRES | _RW | _US | _A | (a))
+#define _GEN_PAGE(a) (_PRES | _RW | _US | _PS | _A |  _D | (a))
 
 /*
  * Generate x86_64 page tables.