pkg/ast, pkg/compiler: support per-file metadata

We have a bunch of hacks in syz-extract, syz-sysgen and syz-check
with respect to description files unsupported on some arches,
or that must not be part of make extract.

Add 2 meta attribtues to files:

meta noextract
Tells `make extract` to not extract constants for this file.
Though, `syz-extract` can still be invoked manually on this file.

meta arches["arch1", "arch2"]
Restricts this file only to the given set of architectures.
`make extract` and ``make generate` will not use it on other architectures.

Later we can potentially use meta attributes to specify git tree/commit
that must be used for extraction. Maybe something else.

Fixes #2754
diff --git a/docs/syscall_descriptions_syntax.md b/docs/syscall_descriptions_syntax.md
index a8f79b5..e2e2e2a 100644
--- a/docs/syscall_descriptions_syntax.md
+++ b/docs/syscall_descriptions_syntax.md
@@ -391,6 +391,22 @@
 define MY_PATH_MAX	PATH_MAX + 2
 ```
 
+## Meta
+
+Description files can also contain `meta` directives that specify meta-information for the whole file.
+
+```
+meta noextract
+```
+Tells `make extract` to not extract constants for this file.
+Though, `syz-extract` can still be invoked manually on this file.
+
+```
+meta arches["arch1", "arch2"]
+```
+Restricts this file only to the given set of architectures.
+`make extract` and ``make generate` will not use it on other architectures.
+
 ## Misc
 
 Description files also contain `include` directives that refer to Linux kernel header files,
diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go
index 66dfc11..f0403a0 100644
--- a/pkg/ast/ast.go
+++ b/pkg/ast/ast.go
@@ -46,6 +46,15 @@
 	return n.Pos, tok2str[tokComment], ""
 }
 
+type Meta struct {
+	Pos   Pos
+	Value *Type
+}
+
+func (n *Meta) Info() (Pos, string, string) {
+	return n.Pos, "meta", n.Value.Ident
+}
+
 type Include struct {
 	Pos  Pos
 	File *String
diff --git a/pkg/ast/clone.go b/pkg/ast/clone.go
index 23e4f42..0c9c831 100644
--- a/pkg/ast/clone.go
+++ b/pkg/ast/clone.go
@@ -24,6 +24,13 @@
 	}
 }
 
+func (n *Meta) Clone() Node {
+	return &Meta{
+		Pos:   n.Pos,
+		Value: n.Value.Clone().(*Type),
+	}
+}
+
 func (n *Include) Clone() Node {
 	return &Include{
 		Pos:  n.Pos,
diff --git a/pkg/ast/format.go b/pkg/ast/format.go
index 51538ea..f4a01d3 100644
--- a/pkg/ast/format.go
+++ b/pkg/ast/format.go
@@ -74,6 +74,12 @@
 	fmt.Fprintf(w, "#%v\n", strings.TrimRight(n.Text, " \t"))
 }
 
+func (n *Meta) serialize(w io.Writer) {
+	fmt.Fprintf(w, "meta ")
+	n.Value.serialize(w)
+	fmt.Fprintf(w, "\n")
+}
+
 func (n *Include) serialize(w io.Writer) {
 	fmt.Fprintf(w, "include <%v>\n", n.File.Value)
 }
diff --git a/pkg/ast/parser.go b/pkg/ast/parser.go
index 2089816..b2709e2 100644
--- a/pkg/ast/parser.go
+++ b/pkg/ast/parser.go
@@ -128,7 +128,10 @@
 		return p.parseResource()
 	case tokIdent:
 		name := p.parseIdent()
-		if name.Name == "type" {
+		switch name.Name {
+		case "meta":
+			return p.parseMeta()
+		case "type":
 			return p.parseTypeDef()
 		}
 		switch p.tok {
@@ -190,6 +193,13 @@
 	return c
 }
 
+func (p *parser) parseMeta() *Meta {
+	return &Meta{
+		Pos:   p.pos,
+		Value: p.parseType(),
+	}
+}
+
 func (p *parser) parseDefine() *Define {
 	pos0 := p.pos
 	p.consume(tokDefine)
diff --git a/pkg/ast/testdata/all.txt b/pkg/ast/testdata/all.txt
index c9398a8..7b5fa7c 100644
--- a/pkg/ast/testdata/all.txt
+++ b/pkg/ast/testdata/all.txt
@@ -1,4 +1,7 @@
 # Copyright 2017 syzkaller project authors. All rights reserved.
 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
 
+meta noextract
+meta arches["foo", "bar", "386"]
+
 incdir <some/path>
diff --git a/pkg/ast/testdata/errors.txt b/pkg/ast/testdata/errors.txt
index 4631587..2b022c1 100644
--- a/pkg/ast/testdata/errors.txt
+++ b/pkg/ast/testdata/errors.txt
@@ -5,6 +5,10 @@
 foo		### unexpected '\n', expecting '(', '{', '[', '='
 %		### illegal character U+0025 '%'
 
+meta		### unexpected '\n', expecting int, identifier, string
+meta: foo	### unexpected ':', expecting int, identifier, string
+meta foo, bar	### unexpected ',', expecting '\n'
+
 int_flags0 = 0, 0x1, 0xab
 int_flags1 = 123ab0x			### bad integer "123ab0x"
 int_flags1 == 0, 1			### unexpected '=', expecting int, identifier, string
@@ -93,4 +97,4 @@
 	f0 int8 (	### unexpected '\n', expecting int, identifier, string
 
 s6 {
-	f0 int8 ()	### unexpected ')', expecting int, identifier, string
\ No newline at end of file
+	f0 int8 ()	### unexpected ')', expecting int, identifier, string
diff --git a/pkg/ast/walk.go b/pkg/ast/walk.go
index 84a3c67..b187769 100644
--- a/pkg/ast/walk.go
+++ b/pkg/ast/walk.go
@@ -35,6 +35,10 @@
 func (n *String) walk(cb func(Node))  {}
 func (n *Int) walk(cb func(Node))     {}
 
+func (n *Meta) walk(cb func(Node)) {
+	cb(n.Value)
+}
+
 func (n *Include) walk(cb func(Node)) {
 	cb(n.File)
 }
diff --git a/pkg/compiler/check.go b/pkg/compiler/check.go
index ae9724d..402e9a8 100644
--- a/pkg/compiler/check.go
+++ b/pkg/compiler/check.go
@@ -836,11 +836,14 @@
 }
 
 func (comp *compiler) checkType(ctx checkCtx, t *ast.Type, flags checkFlags) {
+	comp.checkTypeImpl(ctx, t, comp.getTypeDesc(t), flags)
+}
+
+func (comp *compiler) checkTypeImpl(ctx checkCtx, t *ast.Type, desc *typeDesc, flags checkFlags) {
 	if unexpected, _, ok := checkTypeKind(t, kindIdent); !ok {
 		comp.error(t.Pos, "unexpected %v, expect type", unexpected)
 		return
 	}
-	desc := comp.getTypeDesc(t)
 	if desc == nil {
 		comp.error(t.Pos, "unknown type %v", t.Ident)
 		return
diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go
index 62a102d..b3e39be 100644
--- a/pkg/compiler/compiler.go
+++ b/pkg/compiler/compiler.go
@@ -7,6 +7,7 @@
 
 import (
 	"fmt"
+	"path/filepath"
 	"sort"
 	"strconv"
 	"strings"
@@ -74,6 +75,7 @@
 // Compile compiles sys description.
 func Compile(desc *ast.Description, consts map[string]uint64, target *targets.Target, eh ast.ErrorHandler) *Prog {
 	comp := createCompiler(desc.Clone(), target, eh)
+	comp.filterArch()
 	comp.typecheck()
 	// The subsequent, more complex, checks expect basic validity of the tree,
 	// in particular corrent number of type arguments. If there were errors,
@@ -151,6 +153,24 @@
 	comp.warnings = append(comp.warnings, warn{pos, fmt.Sprintf(msg, args...)})
 }
 
+func (comp *compiler) filterArch() {
+	files := comp.fileList()
+	comp.desc = comp.desc.Filter(func(n ast.Node) bool {
+		pos, typ, name := n.Info()
+		meta := files[filepath.Base(pos.File)]
+		if meta.SupportsArch(comp.target.Arch) {
+			return true
+		}
+		switch n.(type) {
+		case *ast.Resource, *ast.Struct, *ast.Call, *ast.TypeDef:
+			// This is required to keep the unsupported diagnostic working,
+			// otherwise sysgen will think that these things are still supported on some arches.
+			comp.unsupported[typ+" "+name] = true
+		}
+		return false
+	})
+}
+
 func (comp *compiler) structIsVarlen(name string) bool {
 	if varlen, ok := comp.structVarlen[name]; ok {
 		return varlen
diff --git a/pkg/compiler/meta.go b/pkg/compiler/meta.go
new file mode 100644
index 0000000..f0221d0
--- /dev/null
+++ b/pkg/compiler/meta.go
@@ -0,0 +1,88 @@
+// Copyright 2022 syzkaller project authors. All rights reserved.
+// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+package compiler
+
+import (
+	"path/filepath"
+
+	"github.com/google/syzkaller/pkg/ast"
+	"github.com/google/syzkaller/sys/targets"
+)
+
+type Meta struct {
+	NoExtract bool
+	Arches    map[string]bool
+}
+
+func (meta *Meta) SupportsArch(arch string) bool {
+	return len(meta.Arches) == 0 || meta.Arches[arch]
+}
+
+func FileList(desc *ast.Description, OS string, eh ast.ErrorHandler) map[string]Meta {
+	// Use any target for this OS.
+	for _, target := range targets.List[OS] {
+		return createCompiler(desc, target, eh).fileList()
+	}
+	return nil
+}
+
+func (comp *compiler) fileList() map[string]Meta {
+	files := make(map[string]Meta)
+	for _, n := range comp.desc.Nodes {
+		pos, _, _ := n.Info()
+		file := filepath.Base(pos.File)
+		if file == ast.BuiltinFile {
+			continue
+		}
+		meta := files[file]
+		switch n := n.(type) {
+		case *ast.Meta:
+			errors0 := comp.errors
+			comp.checkTypeImpl(checkCtx{}, n.Value, metaTypes[n.Value.Ident], 0)
+			if errors0 != comp.errors {
+				break
+			}
+			switch n.Value.Ident {
+			case metaNoExtract.Names[0]:
+				meta.NoExtract = true
+			case metaArches.Names[0]:
+				meta.Arches = make(map[string]bool)
+				for _, arg := range n.Value.Args {
+					meta.Arches[arg.String] = true
+				}
+			}
+		}
+		files[file] = meta
+	}
+	if comp.errors != 0 {
+		return nil
+	}
+	return files
+}
+
+var metaTypes = map[string]*typeDesc{
+	metaNoExtract.Names[0]: metaNoExtract,
+	metaArches.Names[0]:    metaArches,
+}
+
+var metaNoExtract = &typeDesc{
+	Names:     []string{"noextract"},
+	CantBeOpt: true,
+}
+
+var metaArches = &typeDesc{
+	Names:     []string{"arches"},
+	CantBeOpt: true,
+	OptArgs:   8,
+	Args:      []namedArg{metaArch, metaArch, metaArch, metaArch, metaArch, metaArch, metaArch, metaArch},
+}
+
+var metaArch = namedArg{Name: "arch", Type: &typeArg{
+	Kind: kindString,
+	Check: func(comp *compiler, t *ast.Type) {
+		if targets.List[comp.target.OS][t.String] == nil {
+			comp.error(t.Pos, "unknown arch %v", t.String)
+		}
+	},
+}}
diff --git a/pkg/compiler/testdata/all.txt b/pkg/compiler/testdata/all.txt
index c9a02f5..d03e35d 100644
--- a/pkg/compiler/testdata/all.txt
+++ b/pkg/compiler/testdata/all.txt
@@ -1,6 +1,9 @@
 # Copyright 2018 syzkaller project authors. All rights reserved.
 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
 
+meta noextract
+meta arches["32_shmem", "32_fork_shmem", "64", "64_fork"]
+
 foo_0(a int8)
 foo_1(a int8[C1:C2])
 foo_2(a ptr[out, array[int32]])
diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt
index 6d258cf..1201fa3 100644
--- a/pkg/compiler/testdata/errors.txt
+++ b/pkg/compiler/testdata/errors.txt
@@ -3,6 +3,11 @@
 
 # Errors that happen during type checking phase.
 
+meta foobar			### unknown type foobar
+meta noextract["foo"]		### wrong number of arguments for type noextract, expect no arguments
+meta "foobar"			### unexpected string "foobar", expect type
+meta arches["z80"]		### unknown arch z80
+
 #include "something"		### confusing comment faking a directive (rephrase if it's intentional)
 #define FOO BAR			### confusing comment faking a directive (rephrase if it's intentional)
 # include "something"		### confusing comment faking a directive (rephrase if it's intentional)
diff --git a/sys/linux/dev_bifrost.txt b/sys/linux/dev_bifrost.txt
index e6d2126..f1de33d 100644
--- a/sys/linux/dev_bifrost.txt
+++ b/sys/linux/dev_bifrost.txt
@@ -4,6 +4,10 @@
 # The source file of mali bifrost ioctl can be found in ChromeOS source tree:
 # https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/drivers/gpu/arm/bifrost/mali_kbase_ioctl.h
 
+# Not upstream, generated on:
+# https://chromium.googlesource.com/chromiumos/third_party/kernel d2a8a1eb8b86
+meta noextract
+
 include <asm/page.h>
 include <drivers/gpu/arm/bifrost/mali_kbase_debug.h>
 include <drivers/gpu/arm/bifrost/mali_kbase_hwcnt_reader.h>
diff --git a/sys/linux/dev_img_rogue.txt b/sys/linux/dev_img_rogue.txt
index a7b0ef3..e195293 100644
--- a/sys/linux/dev_img_rogue.txt
+++ b/sys/linux/dev_img_rogue.txt
@@ -4,6 +4,9 @@
 # The source file of IMG PowerVR Rogue ioctl can be found in ChromeOS source tree:
 # https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/drivers/gpu/drm/img-rogue/1.13/
 
+# Not upstream, generated on unknown tree.
+meta noextract
+
 incdir <drivers/gpu/drm/img-rogue/1.13>
 incdir <drivers/gpu/drm/img-rogue/1.13/km>
 include <linux/fcntl.h>
diff --git a/sys/linux/dev_kvm.txt b/sys/linux/dev_kvm.txt
index e8c7438..1920971 100644
--- a/sys/linux/dev_kvm.txt
+++ b/sys/linux/dev_kvm.txt
@@ -1,6 +1,8 @@
 # Copyright 2015 syzkaller project authors. All rights reserved.
 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
 
+meta arches["386", "amd64", "arm64", "mips64le", "ppc64le", "s390x"]
+
 include <linux/kvm.h>
 include <linux/kvm_host.h>
 include <uapi/linux/fcntl.h>
diff --git a/sys/linux/dev_kvm.txt.const b/sys/linux/dev_kvm.txt.const
index 67f2e8a..c31e2b0 100644
--- a/sys/linux/dev_kvm.txt.const
+++ b/sys/linux/dev_kvm.txt.const
@@ -1,243 +1,243 @@
 # Code generated by syz-sysgen. DO NOT EDIT.
-arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
-AT_FDCWD = 18446744073709551516, arm:riscv64:???
-KVM_ARM_SET_DEVICE_ADDR = 1074835115, arm:riscv64:???, mips64le:ppc64le:2148576939
-KVM_ARM_TARGET_AEM_V8 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:0
-KVM_ARM_TARGET_CORTEX_A53 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:4
-KVM_ARM_TARGET_CORTEX_A57 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:2
-KVM_ARM_TARGET_FOUNDATION_V8 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:1
-KVM_ARM_TARGET_GENERIC_V8 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:5
-KVM_ARM_TARGET_XGENE_POTENZA = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:3
-KVM_ARM_VCPU_EL1_32BIT = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:1
-KVM_ARM_VCPU_INIT = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:1075883694
-KVM_ARM_VCPU_PMU_V3 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:3
-KVM_ARM_VCPU_POWER_OFF = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:0
-KVM_ARM_VCPU_PSCI_0_2 = 386:amd64:arm:mips64le:ppc64le:riscv64:s390x:???, arm64:2
-KVM_ASSIGN_DEV_IRQ = 1077980784, arm:riscv64:???, mips64le:ppc64le:2151722608
-KVM_ASSIGN_PCI_DEVICE = 2151722601, arm:riscv64:???, mips64le:ppc64le:1077980777
-KVM_ASSIGN_SET_INTX_MASK = 1077980836, arm:riscv64:???, mips64le:ppc64le:2151722660
-KVM_ASSIGN_SET_MSIX_ENTRY = 1074835060, arm:riscv64:???, mips64le:ppc64le:2148576884
-KVM_ASSIGN_SET_MSIX_NR = 1074310771, arm:riscv64:???, mips64le:ppc64le:2148052595
-KVM_BUS_LOCK_DETECTION_EXIT = 2, arm:riscv64:???
-KVM_BUS_LOCK_DETECTION_OFF = 1, arm:riscv64:???
-KVM_CAP_DIRTY_LOG_RING = 192, arm:riscv64:???
-KVM_CAP_DISABLE_QUIRKS = 116, arm:riscv64:???
-KVM_CAP_ENFORCE_PV_FEATURE_CPUID = 190, arm:riscv64:???
-KVM_CAP_EXCEPTION_PAYLOAD = 164, arm:riscv64:???
-KVM_CAP_EXIT_HYPERCALL = 201, arm:riscv64:???
-KVM_CAP_EXIT_ON_EMULATION_FAILURE = 204, arm:riscv64:???
-KVM_CAP_HALT_POLL = 182, arm:riscv64:???
-KVM_CAP_HYPERV_DIRECT_TLBFLUSH = 175, arm:riscv64:???
-KVM_CAP_HYPERV_ENFORCE_CPUID = 199, arm:riscv64:???
-KVM_CAP_HYPERV_ENLIGHTENED_VMCS = 163, arm:riscv64:???
-KVM_CAP_HYPERV_SYNIC = 123, arm:riscv64:???
-KVM_CAP_HYPERV_SYNIC2 = 148, arm:riscv64:???
-KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 = 168, arm:riscv64:???
-KVM_CAP_MSR_PLATFORM_INFO = 159, arm:riscv64:???
-KVM_CAP_SGX_ATTRIBUTE = 196, arm:riscv64:???
-KVM_CAP_SPLIT_IRQCHIP = 121, arm:riscv64:???
-KVM_CAP_VM_COPY_ENC_CONTEXT_FROM = 197, arm:riscv64:???
-KVM_CAP_X2APIC_API = 129, arm:riscv64:???
-KVM_CAP_X86_BUS_LOCK_EXIT = 193, arm:riscv64:???
-KVM_CAP_X86_DISABLE_EXITS = 143, arm:riscv64:???
-KVM_CAP_X86_USER_SPACE_MSR = 188, arm:riscv64:???
-KVM_CHECK_EXTENSION = 44547, arm:riscv64:???, mips64le:ppc64le:536915459
-KVM_CPUID_FEATURES = 1073741825, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_CPUID_FLAG_SIGNIFCANT_INDEX = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_CPUID_FLAG_STATEFUL_FUNC = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_CPUID_FLAG_STATE_READ_NEXT = 4, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_CPUID_SIGNATURE = 1073741824, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_CREATE_DEVICE = 3222056672, arm:riscv64:???
-KVM_CREATE_DEVICE_TEST = 1, arm:riscv64:???
-KVM_CREATE_IRQCHIP = 44640, arm:riscv64:???, mips64le:ppc64le:536915552
-KVM_CREATE_PIT2 = 1077980791, arm:riscv64:???, mips64le:ppc64le:2151722615
-KVM_CREATE_VCPU = 44609, arm:riscv64:???, mips64le:ppc64le:536915521
-KVM_CREATE_VM = 44545, arm:riscv64:???, mips64le:ppc64le:536915457
-KVM_DEASSIGN_DEV_IRQ = 1077980789, arm:riscv64:???, mips64le:ppc64le:2151722613
-KVM_DEASSIGN_PCI_DEVICE = 1077980786, arm:riscv64:???, mips64le:ppc64le:2151722610
-KVM_DEV_ASSIGN_ENABLE_IOMMU = 1, arm:riscv64:???
-KVM_DEV_ASSIGN_MASK_INTX = 4, arm:riscv64:???
-KVM_DEV_ASSIGN_PCI_2_3 = 2, arm:riscv64:???
-KVM_DEV_IRQ_GUEST_INTX = 256, arm:riscv64:???
-KVM_DEV_IRQ_GUEST_MSI = 512, arm:riscv64:???
-KVM_DEV_IRQ_GUEST_MSIX = 1024, arm:riscv64:???
-KVM_DEV_IRQ_HOST_INTX = 1, arm:riscv64:???
-KVM_DEV_IRQ_HOST_MSI = 2, arm:riscv64:???
-KVM_DEV_IRQ_HOST_MSIX = 4, arm:riscv64:???
-KVM_DEV_TYPE_FLIC = 6, arm:riscv64:???
-KVM_DEV_TYPE_FSL_MPIC_20 = 1, arm:riscv64:???
-KVM_DEV_TYPE_FSL_MPIC_42 = 2, arm:riscv64:???
-KVM_DEV_TYPE_VFIO = 4, arm:riscv64:???
-KVM_DEV_TYPE_XICS = 3, arm:riscv64:???
-KVM_DIRTY_LOG_INITIALLY_SET = 2, arm:riscv64:???
-KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE = 1, arm:riscv64:???
-KVM_DIRTY_TLB = 1074835114, 386:1074572970, arm:riscv64:???, mips64le:ppc64le:2148576938
-KVM_ENABLE_CAP = 1080602275, arm:riscv64:???, mips64le:ppc64le:2154344099
-KVM_ENABLE_CAP_SIZE = 104, arm:riscv64:???
-KVM_EXIT_HYPERCALL_OFFSET = 32, arm:riscv64:???, s390x:48
-KVM_EXIT_HYPERCALL_SIZE = 72, arm:riscv64:???
-KVM_EXIT_MMIO_OFFSET = 32, arm:riscv64:???, s390x:48
-KVM_EXIT_MMIO_SIZE = 24, arm:riscv64:???
-KVM_GET_API_VERSION = 44544, arm:riscv64:???, mips64le:ppc64le:536915456
-KVM_GET_CLOCK = 2150674044, arm:riscv64:???, mips64le:ppc64le:1076932220
-KVM_GET_CPUID2 = 3221794449, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_DEBUGREGS = 2155916961, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_DEVICE_ATTR = 1075359458, arm:riscv64:???, mips64le:ppc64le:2149101282
-KVM_GET_DIRTY_LOG = 1074835010, arm:riscv64:???, mips64le:ppc64le:2148576834
-KVM_GET_EMULATED_CPUID = 3221794313, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_FPU = 2174791308, arm:riscv64:???, arm64:2147528332, mips64le:1073786508, ppc64le:1090563724, s390x:2156441228
-KVM_GET_IRQCHIP = 3255348834, arm:riscv64:???
-KVM_GET_LAPIC = 2214637198, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_MP_STATE = 2147790488, arm:riscv64:???, mips64le:ppc64le:1074048664
-KVM_GET_MSRS = 3221794440, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_MSR_INDEX_LIST = 3221532162, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_NESTED_STATE = 3229658814, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_NR_MMU_PAGES = 44613, arm:riscv64:???, mips64le:ppc64le:536915525
-KVM_GET_ONE_REG = 1074835115, arm:riscv64:???, mips64le:ppc64le:2148576939
-KVM_GET_PIT = 3225988709, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_PIT2 = 2154868383, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_REGS = 2156965505, arm:riscv64:???, arm64:2204151425, mips64le:1092136577, ppc64le:1099476609, s390x:2155916929
-KVM_GET_REG_LIST = 3221794480, arm:riscv64:???
-KVM_GET_SREGS = 2167975555, arm:riscv64:???, arm64:2147528323, mips64le:1073786499, ppc64le:1154526851, s390x:2160111235
-KVM_GET_SUPPORTED_CPUID = 3221794309, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_TSC_KHZ = 44707, arm:riscv64:???, mips64le:ppc64le:536915619
-KVM_GET_VCPU_EVENTS = 2151722655, arm:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_VCPU_MMAP_SIZE = 44548, arm:riscv64:???, mips64le:ppc64le:536915460
-KVM_GET_XCRS = 2173218470, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GET_XSAVE = 2415963812, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GUESTDBG_ENABLE = 1, arm:riscv64:???
-KVM_GUESTDBG_INJECT_BP = 524288, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GUESTDBG_INJECT_DB = 262144, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_GUESTDBG_SINGLESTEP = 2, arm:riscv64:???
-KVM_GUESTDBG_USE_HW_BP = 131072, arm:arm64:mips64le:riscv64:???, s390x:65536
-KVM_GUESTDBG_USE_SW_BP = 65536, arm:mips64le:riscv64:s390x:???
-KVM_HAS_DEVICE_ATTR = 1075359459, arm:riscv64:???, mips64le:ppc64le:2149101283
-KVM_HC_MAP_GPA_RANGE = 12, arm:riscv64:???
-KVM_HYPERV_EVENTFD = 1075359421, arm:riscv64:???, mips64le:ppc64le:2149101245
-KVM_INTERRUPT = 1074048646, arm:riscv64:???, mips64le:ppc64le:2147790470
-KVM_IOEVENTFD = 1077980793, arm:riscv64:???, mips64le:ppc64le:2151722617
-KVM_IOEVENTFD_FLAG_DATAMATCH = 1, arm:riscv64:???
-KVM_IOEVENTFD_FLAG_DEASSIGN = 4, arm:riscv64:???
-KVM_IOEVENTFD_FLAG_PIO = 2, arm:riscv64:???
-KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY = 8, arm:riscv64:???
-KVM_IRQCHIP_IOAPIC = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_IRQCHIP_PIC_MASTER = 0, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_IRQCHIP_PIC_SLAVE = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_IRQFD = 1075883638, arm:riscv64:???, mips64le:ppc64le:2149625462
-KVM_IRQ_LINE = 1074310753, arm:riscv64:???, mips64le:ppc64le:2148052577
-KVM_IRQ_LINE_STATUS = 3221794407, arm:riscv64:???
-KVM_IRQ_ROUTING_HV_SINT = 4, arm:riscv64:???
-KVM_IRQ_ROUTING_IRQCHIP = 1, arm:riscv64:???
-KVM_IRQ_ROUTING_MSI = 2, arm:riscv64:???
-KVM_IRQ_ROUTING_S390_ADAPTER = 3, arm:riscv64:???
-KVM_KVMCLOCK_CTRL = 44717, arm:riscv64:???, mips64le:ppc64le:536915629
-KVM_MAX_IRQ_ROUTES = 4096, 386:amd64:arm:mips64le:ppc64le:riscv64:???
-KVM_MEM_LOG_DIRTY_PAGES = 1, arm:riscv64:???
-KVM_MEM_READONLY = 2, arm:riscv64:???
-KVM_MP_STATE_CHECK_STOP = 6, arm:riscv64:???
-KVM_MP_STATE_HALTED = 3, arm:riscv64:???
-KVM_MP_STATE_INIT_RECEIVED = 2, arm:riscv64:???
-KVM_MP_STATE_LOAD = 8, arm:riscv64:???
-KVM_MP_STATE_OPERATING = 7, arm:riscv64:???
-KVM_MP_STATE_RUNNABLE = 0, arm:riscv64:???
-KVM_MP_STATE_SIPI_RECEIVED = 4, arm:riscv64:???
-KVM_MP_STATE_STOPPED = 5, arm:riscv64:???
-KVM_MP_STATE_UNINITIALIZED = 1, arm:riscv64:???
-KVM_MSR_EXIT_REASON_FILTER = 4, arm:riscv64:???
-KVM_MSR_EXIT_REASON_INVAL = 1, arm:riscv64:???
-KVM_MSR_EXIT_REASON_UNKNOWN = 2, arm:riscv64:???
-KVM_NMI = 44698, arm:riscv64:???, mips64le:ppc64le:536915610
-KVM_PPC_ALLOCATE_HTAB = 3221532327, arm:riscv64:???
-KVM_PPC_GET_PVINFO = 1082175137, arm:riscv64:???, mips64le:ppc64le:2155916961
-KVM_PPC_GET_SMMU_INFO = 2186325670, arm:riscv64:???, mips64le:ppc64le:1112583846
-KVM_REGISTER_COALESCED_MMIO = 1074835047, arm:riscv64:???, mips64le:ppc64le:2148576871
-KVM_REINJECT_CONTROL = 44657, arm:riscv64:???, mips64le:ppc64le:536915569
-KVM_RUN = 44672, arm:riscv64:???, mips64le:ppc64le:536915584
-KVM_RUN_SIZE = 2352, arm:riscv64:???, s390x:2368
-KVM_S390_INTERRUPT = 1074835092, arm:riscv64:???, mips64le:ppc64le:2148576916
-KVM_S390_UCAS_MAP = 1075359312, arm:riscv64:???, mips64le:ppc64le:2149101136
-KVM_S390_UCAS_UNMAP = 1075359313, arm:riscv64:???, mips64le:ppc64le:2149101137
-KVM_S390_VCPU_FAULT = 1074310738, 386:1074048594, arm:riscv64:???, mips64le:ppc64le:2148052562
-KVM_SETUP_CPL3 = 8, arm:riscv64:???
-KVM_SETUP_PAE = 2, arm:riscv64:???
-KVM_SETUP_PAGING = 1, arm:riscv64:???
-KVM_SETUP_PPC64_DR = 4, arm:riscv64:???
-KVM_SETUP_PPC64_IR = 2, arm:riscv64:???
-KVM_SETUP_PPC64_LE = 1, arm:riscv64:???
-KVM_SETUP_PPC64_PID1 = 16, arm:riscv64:???
-KVM_SETUP_PPC64_PR = 8, arm:riscv64:???
-KVM_SETUP_PROTECTED = 4, arm:riscv64:???
-KVM_SETUP_SMM = 32, arm:riscv64:???
-KVM_SETUP_VIRT86 = 16, arm:riscv64:???
-KVM_SETUP_VM = 64, arm:riscv64:???
-KVM_SET_BOOT_CPU_ID = 44664, arm:riscv64:???, mips64le:ppc64le:536915576
-KVM_SET_CLOCK = 1076932219, arm:riscv64:???, mips64le:ppc64le:2150674043
-KVM_SET_CPUID = 1074310794, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_CPUID2 = 1074310800, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_DEBUGREGS = 1082175138, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_DEVICE_ATTR = 1075359457, arm:riscv64:???, mips64le:ppc64le:2149101281
-KVM_SET_FPU = 1101049485, arm:riscv64:???, arm64:1073786509, mips64le:2147528333, ppc64le:2164305549, s390x:1082699405
-KVM_SET_GSI_ROUTING = 1074310762, arm:riscv64:???, mips64le:ppc64le:2148052586
-KVM_SET_GUEST_DEBUG = 1078505115, arm:riscv64:???, arm64:1107865243, mips64le:2148052635, ppc64le:2164829851, s390x:1075359387
-KVM_SET_IDENTITY_MAP_ADDR = 1074310728, arm:riscv64:???, mips64le:ppc64le:2148052552
-KVM_SET_IRQCHIP = 2181607011, arm:riscv64:???, mips64le:ppc64le:1107865187
-KVM_SET_LAPIC = 1140895375, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_MP_STATE = 1074048665, arm:riscv64:???, mips64le:ppc64le:2147790489
-KVM_SET_MSRS = 1074310793, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_NESTED_STATE = 1082175167, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_NR_MMU_PAGES = 44612, arm:riscv64:???, mips64le:ppc64le:536915524
-KVM_SET_ONE_REG = 1074835116, arm:riscv64:???, mips64le:ppc64le:2148576940
-KVM_SET_PIT = 2152246886, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_PIT2 = 1081126560, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_REGS = 1083223682, arm:riscv64:???, arm64:1130409602, mips64le:2165878402, ppc64le:2173218434, s390x:1082175106
-KVM_SET_SIGNAL_MASK = 1074048651, arm:riscv64:???, mips64le:ppc64le:2147790475
-KVM_SET_SREGS = 1094233732, arm:riscv64:???, arm64:1073786500, mips64le:2147528324, ppc64le:2228268676, s390x:1086369412
-KVM_SET_TSC_KHZ = 44706, arm:riscv64:???, mips64le:ppc64le:536915618
-KVM_SET_TSS_ADDR = 44615, arm:riscv64:???, mips64le:ppc64le:536915527
-KVM_SET_USER_MEMORY_REGION = 1075883590, arm:riscv64:???, mips64le:ppc64le:2149625414
-KVM_SET_VAPIC_ADDR = 1074310803, arm:riscv64:???, mips64le:ppc64le:2148052627
-KVM_SET_VCPU_EVENTS = 1077980832, arm:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_XCRS = 1099476647, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SET_XSAVE = 1342221989, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_SIGNAL_MSI = 1075883685, arm:riscv64:???, mips64le:ppc64le:2149625509
-KVM_SMI = 44727, arm:riscv64:???, mips64le:ppc64le:536915639
-KVM_STATE_NESTED_GUEST_MODE = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_STATE_NESTED_RUN_PENDING = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_STATE_NESTED_SMM_GUEST_MODE = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_STATE_NESTED_SMM_VMXON = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_TPR_ACCESS_REPORTING = 3223891602, arm:riscv64:???
-KVM_TRANSLATE = 3222843013, arm:riscv64:???
-KVM_UNREGISTER_COALESCED_MMIO = 1074835048, arm:riscv64:???, mips64le:ppc64le:2148576872
-KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK = 2, arm:riscv64:???
-KVM_X2APIC_API_USE_32BIT_IDS = 1, arm:riscv64:???
-KVM_X86_DISABLE_EXITS_CSTATE = 8, arm:riscv64:???
-KVM_X86_DISABLE_EXITS_HLT = 2, arm:riscv64:???
-KVM_X86_DISABLE_EXITS_MWAIT = 1, arm:riscv64:???
-KVM_X86_DISABLE_EXITS_PAUSE = 4, arm:riscv64:???
-KVM_X86_GET_MCE_CAP_SUPPORTED = 2148052637, arm:riscv64:???, mips64le:ppc64le:1074310813
-KVM_X86_QUIRK_CD_NW_CLEARED = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_X86_QUIRK_LAPIC_MMIO_HOLE = 4, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_X86_QUIRK_LINT0_REENABLED = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT = 16, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_X86_QUIRK_OUT_7E_INC_RIP = 8, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_X86_SETUP_MCE = 1074310812, arm:riscv64:???, mips64le:ppc64le:2148052636
-KVM_X86_SET_MCE = 1077980830, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-KVM_XEN_HVM_CONFIG = 1077456506, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCG_STATUS_EIPV = 2, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCG_STATUS_LMCES = 8, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCG_STATUS_MCIP = 4, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCG_STATUS_RIPV = 1, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_ADDRV = 288230376151711744, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_AR = 36028797018963968, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_EN = 1152921504606846976, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_MISCV = 576460752303423488, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_OVER = 4611686018427387904, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_PCC = 144115188075855872, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_S = 72057594037927936, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_UC = 2305843009213693952, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-MCI_STATUS_VAL = 9223372036854775808, arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-VMCS12_SIZE = 4096, arm:riscv64:???
-__NR_ioctl = 54, amd64:16, arm:riscv64:???, arm64:29, mips64le:5015
-__NR_mmap = 90, 386:192, amd64:9, arm:riscv64:???, arm64:222, mips64le:5009
-__NR_mmap2 = 386:192, amd64:arm:arm64:mips64le:ppc64le:riscv64:s390x:???
-__NR_openat = 386:295, amd64:257, arm:riscv64:???, arm64:56, mips64le:5247, ppc64le:286, s390x:288
+arches = 386, amd64, arm64, mips64le, ppc64le, s390x
+AT_FDCWD = 18446744073709551516
+KVM_ARM_SET_DEVICE_ADDR = 1074835115, mips64le:ppc64le:2148576939
+KVM_ARM_TARGET_AEM_V8 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:0
+KVM_ARM_TARGET_CORTEX_A53 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:4
+KVM_ARM_TARGET_CORTEX_A57 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:2
+KVM_ARM_TARGET_FOUNDATION_V8 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:1
+KVM_ARM_TARGET_GENERIC_V8 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:5
+KVM_ARM_TARGET_XGENE_POTENZA = 386:amd64:mips64le:ppc64le:s390x:???, arm64:3
+KVM_ARM_VCPU_EL1_32BIT = 386:amd64:mips64le:ppc64le:s390x:???, arm64:1
+KVM_ARM_VCPU_INIT = 386:amd64:mips64le:ppc64le:s390x:???, arm64:1075883694
+KVM_ARM_VCPU_PMU_V3 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:3
+KVM_ARM_VCPU_POWER_OFF = 386:amd64:mips64le:ppc64le:s390x:???, arm64:0
+KVM_ARM_VCPU_PSCI_0_2 = 386:amd64:mips64le:ppc64le:s390x:???, arm64:2
+KVM_ASSIGN_DEV_IRQ = 1077980784, mips64le:ppc64le:2151722608
+KVM_ASSIGN_PCI_DEVICE = 2151722601, mips64le:ppc64le:1077980777
+KVM_ASSIGN_SET_INTX_MASK = 1077980836, mips64le:ppc64le:2151722660
+KVM_ASSIGN_SET_MSIX_ENTRY = 1074835060, mips64le:ppc64le:2148576884
+KVM_ASSIGN_SET_MSIX_NR = 1074310771, mips64le:ppc64le:2148052595
+KVM_BUS_LOCK_DETECTION_EXIT = 2
+KVM_BUS_LOCK_DETECTION_OFF = 1
+KVM_CAP_DIRTY_LOG_RING = 192
+KVM_CAP_DISABLE_QUIRKS = 116
+KVM_CAP_ENFORCE_PV_FEATURE_CPUID = 190
+KVM_CAP_EXCEPTION_PAYLOAD = 164
+KVM_CAP_EXIT_HYPERCALL = 201
+KVM_CAP_EXIT_ON_EMULATION_FAILURE = 204
+KVM_CAP_HALT_POLL = 182
+KVM_CAP_HYPERV_DIRECT_TLBFLUSH = 175
+KVM_CAP_HYPERV_ENFORCE_CPUID = 199
+KVM_CAP_HYPERV_ENLIGHTENED_VMCS = 163
+KVM_CAP_HYPERV_SYNIC = 123
+KVM_CAP_HYPERV_SYNIC2 = 148
+KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 = 168
+KVM_CAP_MSR_PLATFORM_INFO = 159
+KVM_CAP_SGX_ATTRIBUTE = 196
+KVM_CAP_SPLIT_IRQCHIP = 121
+KVM_CAP_VM_COPY_ENC_CONTEXT_FROM = 197
+KVM_CAP_X2APIC_API = 129
+KVM_CAP_X86_BUS_LOCK_EXIT = 193
+KVM_CAP_X86_DISABLE_EXITS = 143
+KVM_CAP_X86_USER_SPACE_MSR = 188
+KVM_CHECK_EXTENSION = 44547, mips64le:ppc64le:536915459
+KVM_CPUID_FEATURES = 1073741825, arm64:mips64le:ppc64le:s390x:???
+KVM_CPUID_FLAG_SIGNIFCANT_INDEX = 1, arm64:mips64le:ppc64le:s390x:???
+KVM_CPUID_FLAG_STATEFUL_FUNC = 2, arm64:mips64le:ppc64le:s390x:???
+KVM_CPUID_FLAG_STATE_READ_NEXT = 4, arm64:mips64le:ppc64le:s390x:???
+KVM_CPUID_SIGNATURE = 1073741824, arm64:mips64le:ppc64le:s390x:???
+KVM_CREATE_DEVICE = 3222056672
+KVM_CREATE_DEVICE_TEST = 1
+KVM_CREATE_IRQCHIP = 44640, mips64le:ppc64le:536915552
+KVM_CREATE_PIT2 = 1077980791, mips64le:ppc64le:2151722615
+KVM_CREATE_VCPU = 44609, mips64le:ppc64le:536915521
+KVM_CREATE_VM = 44545, mips64le:ppc64le:536915457
+KVM_DEASSIGN_DEV_IRQ = 1077980789, mips64le:ppc64le:2151722613
+KVM_DEASSIGN_PCI_DEVICE = 1077980786, mips64le:ppc64le:2151722610
+KVM_DEV_ASSIGN_ENABLE_IOMMU = 1
+KVM_DEV_ASSIGN_MASK_INTX = 4
+KVM_DEV_ASSIGN_PCI_2_3 = 2
+KVM_DEV_IRQ_GUEST_INTX = 256
+KVM_DEV_IRQ_GUEST_MSI = 512
+KVM_DEV_IRQ_GUEST_MSIX = 1024
+KVM_DEV_IRQ_HOST_INTX = 1
+KVM_DEV_IRQ_HOST_MSI = 2
+KVM_DEV_IRQ_HOST_MSIX = 4
+KVM_DEV_TYPE_FLIC = 6
+KVM_DEV_TYPE_FSL_MPIC_20 = 1
+KVM_DEV_TYPE_FSL_MPIC_42 = 2
+KVM_DEV_TYPE_VFIO = 4
+KVM_DEV_TYPE_XICS = 3
+KVM_DIRTY_LOG_INITIALLY_SET = 2
+KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE = 1
+KVM_DIRTY_TLB = 1074835114, 386:1074572970, mips64le:ppc64le:2148576938
+KVM_ENABLE_CAP = 1080602275, mips64le:ppc64le:2154344099
+KVM_ENABLE_CAP_SIZE = 104
+KVM_EXIT_HYPERCALL_OFFSET = 32, s390x:48
+KVM_EXIT_HYPERCALL_SIZE = 72
+KVM_EXIT_MMIO_OFFSET = 32, s390x:48
+KVM_EXIT_MMIO_SIZE = 24
+KVM_GET_API_VERSION = 44544, mips64le:ppc64le:536915456
+KVM_GET_CLOCK = 2150674044, mips64le:ppc64le:1076932220
+KVM_GET_CPUID2 = 3221794449, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_DEBUGREGS = 2155916961, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_DEVICE_ATTR = 1075359458, mips64le:ppc64le:2149101282
+KVM_GET_DIRTY_LOG = 1074835010, mips64le:ppc64le:2148576834
+KVM_GET_EMULATED_CPUID = 3221794313, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_FPU = 2174791308, arm64:2147528332, mips64le:1073786508, ppc64le:1090563724, s390x:2156441228
+KVM_GET_IRQCHIP = 3255348834
+KVM_GET_LAPIC = 2214637198, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_MP_STATE = 2147790488, mips64le:ppc64le:1074048664
+KVM_GET_MSRS = 3221794440, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_MSR_INDEX_LIST = 3221532162, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_NESTED_STATE = 3229658814, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_NR_MMU_PAGES = 44613, mips64le:ppc64le:536915525
+KVM_GET_ONE_REG = 1074835115, mips64le:ppc64le:2148576939
+KVM_GET_PIT = 3225988709, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_PIT2 = 2154868383, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_REGS = 2156965505, arm64:2204151425, mips64le:1092136577, ppc64le:1099476609, s390x:2155916929
+KVM_GET_REG_LIST = 3221794480
+KVM_GET_SREGS = 2167975555, arm64:2147528323, mips64le:1073786499, ppc64le:1154526851, s390x:2160111235
+KVM_GET_SUPPORTED_CPUID = 3221794309, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_TSC_KHZ = 44707, mips64le:ppc64le:536915619
+KVM_GET_VCPU_EVENTS = 2151722655, mips64le:ppc64le:s390x:???
+KVM_GET_VCPU_MMAP_SIZE = 44548, mips64le:ppc64le:536915460
+KVM_GET_XCRS = 2173218470, arm64:mips64le:ppc64le:s390x:???
+KVM_GET_XSAVE = 2415963812, arm64:mips64le:ppc64le:s390x:???
+KVM_GUESTDBG_ENABLE = 1
+KVM_GUESTDBG_INJECT_BP = 524288, arm64:mips64le:ppc64le:s390x:???
+KVM_GUESTDBG_INJECT_DB = 262144, arm64:mips64le:ppc64le:s390x:???
+KVM_GUESTDBG_SINGLESTEP = 2
+KVM_GUESTDBG_USE_HW_BP = 131072, arm64:mips64le:???, s390x:65536
+KVM_GUESTDBG_USE_SW_BP = 65536, mips64le:s390x:???
+KVM_HAS_DEVICE_ATTR = 1075359459, mips64le:ppc64le:2149101283
+KVM_HC_MAP_GPA_RANGE = 12
+KVM_HYPERV_EVENTFD = 1075359421, mips64le:ppc64le:2149101245
+KVM_INTERRUPT = 1074048646, mips64le:ppc64le:2147790470
+KVM_IOEVENTFD = 1077980793, mips64le:ppc64le:2151722617
+KVM_IOEVENTFD_FLAG_DATAMATCH = 1
+KVM_IOEVENTFD_FLAG_DEASSIGN = 4
+KVM_IOEVENTFD_FLAG_PIO = 2
+KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY = 8
+KVM_IRQCHIP_IOAPIC = 2, arm64:mips64le:ppc64le:s390x:???
+KVM_IRQCHIP_PIC_MASTER = 0, arm64:mips64le:ppc64le:s390x:???
+KVM_IRQCHIP_PIC_SLAVE = 1, arm64:mips64le:ppc64le:s390x:???
+KVM_IRQFD = 1075883638, mips64le:ppc64le:2149625462
+KVM_IRQ_LINE = 1074310753, mips64le:ppc64le:2148052577
+KVM_IRQ_LINE_STATUS = 3221794407
+KVM_IRQ_ROUTING_HV_SINT = 4
+KVM_IRQ_ROUTING_IRQCHIP = 1
+KVM_IRQ_ROUTING_MSI = 2
+KVM_IRQ_ROUTING_S390_ADAPTER = 3
+KVM_KVMCLOCK_CTRL = 44717, mips64le:ppc64le:536915629
+KVM_MAX_IRQ_ROUTES = 4096, 386:amd64:mips64le:ppc64le:???
+KVM_MEM_LOG_DIRTY_PAGES = 1
+KVM_MEM_READONLY = 2
+KVM_MP_STATE_CHECK_STOP = 6
+KVM_MP_STATE_HALTED = 3
+KVM_MP_STATE_INIT_RECEIVED = 2
+KVM_MP_STATE_LOAD = 8
+KVM_MP_STATE_OPERATING = 7
+KVM_MP_STATE_RUNNABLE = 0
+KVM_MP_STATE_SIPI_RECEIVED = 4
+KVM_MP_STATE_STOPPED = 5
+KVM_MP_STATE_UNINITIALIZED = 1
+KVM_MSR_EXIT_REASON_FILTER = 4
+KVM_MSR_EXIT_REASON_INVAL = 1
+KVM_MSR_EXIT_REASON_UNKNOWN = 2
+KVM_NMI = 44698, mips64le:ppc64le:536915610
+KVM_PPC_ALLOCATE_HTAB = 3221532327
+KVM_PPC_GET_PVINFO = 1082175137, mips64le:ppc64le:2155916961
+KVM_PPC_GET_SMMU_INFO = 2186325670, mips64le:ppc64le:1112583846
+KVM_REGISTER_COALESCED_MMIO = 1074835047, mips64le:ppc64le:2148576871
+KVM_REINJECT_CONTROL = 44657, mips64le:ppc64le:536915569
+KVM_RUN = 44672, mips64le:ppc64le:536915584
+KVM_RUN_SIZE = 2352, s390x:2368
+KVM_S390_INTERRUPT = 1074835092, mips64le:ppc64le:2148576916
+KVM_S390_UCAS_MAP = 1075359312, mips64le:ppc64le:2149101136
+KVM_S390_UCAS_UNMAP = 1075359313, mips64le:ppc64le:2149101137
+KVM_S390_VCPU_FAULT = 1074310738, 386:1074048594, mips64le:ppc64le:2148052562
+KVM_SETUP_CPL3 = 8
+KVM_SETUP_PAE = 2
+KVM_SETUP_PAGING = 1
+KVM_SETUP_PPC64_DR = 4
+KVM_SETUP_PPC64_IR = 2
+KVM_SETUP_PPC64_LE = 1
+KVM_SETUP_PPC64_PID1 = 16
+KVM_SETUP_PPC64_PR = 8
+KVM_SETUP_PROTECTED = 4
+KVM_SETUP_SMM = 32
+KVM_SETUP_VIRT86 = 16
+KVM_SETUP_VM = 64
+KVM_SET_BOOT_CPU_ID = 44664, mips64le:ppc64le:536915576
+KVM_SET_CLOCK = 1076932219, mips64le:ppc64le:2150674043
+KVM_SET_CPUID = 1074310794, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_CPUID2 = 1074310800, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_DEBUGREGS = 1082175138, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_DEVICE_ATTR = 1075359457, mips64le:ppc64le:2149101281
+KVM_SET_FPU = 1101049485, arm64:1073786509, mips64le:2147528333, ppc64le:2164305549, s390x:1082699405
+KVM_SET_GSI_ROUTING = 1074310762, mips64le:ppc64le:2148052586
+KVM_SET_GUEST_DEBUG = 1078505115, arm64:1107865243, mips64le:2148052635, ppc64le:2164829851, s390x:1075359387
+KVM_SET_IDENTITY_MAP_ADDR = 1074310728, mips64le:ppc64le:2148052552
+KVM_SET_IRQCHIP = 2181607011, mips64le:ppc64le:1107865187
+KVM_SET_LAPIC = 1140895375, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_MP_STATE = 1074048665, mips64le:ppc64le:2147790489
+KVM_SET_MSRS = 1074310793, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_NESTED_STATE = 1082175167, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_NR_MMU_PAGES = 44612, mips64le:ppc64le:536915524
+KVM_SET_ONE_REG = 1074835116, mips64le:ppc64le:2148576940
+KVM_SET_PIT = 2152246886, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_PIT2 = 1081126560, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_REGS = 1083223682, arm64:1130409602, mips64le:2165878402, ppc64le:2173218434, s390x:1082175106
+KVM_SET_SIGNAL_MASK = 1074048651, mips64le:ppc64le:2147790475
+KVM_SET_SREGS = 1094233732, arm64:1073786500, mips64le:2147528324, ppc64le:2228268676, s390x:1086369412
+KVM_SET_TSC_KHZ = 44706, mips64le:ppc64le:536915618
+KVM_SET_TSS_ADDR = 44615, mips64le:ppc64le:536915527
+KVM_SET_USER_MEMORY_REGION = 1075883590, mips64le:ppc64le:2149625414
+KVM_SET_VAPIC_ADDR = 1074310803, mips64le:ppc64le:2148052627
+KVM_SET_VCPU_EVENTS = 1077980832, mips64le:ppc64le:s390x:???
+KVM_SET_XCRS = 1099476647, arm64:mips64le:ppc64le:s390x:???
+KVM_SET_XSAVE = 1342221989, arm64:mips64le:ppc64le:s390x:???
+KVM_SIGNAL_MSI = 1075883685, mips64le:ppc64le:2149625509
+KVM_SMI = 44727, mips64le:ppc64le:536915639
+KVM_STATE_NESTED_GUEST_MODE = 1, arm64:mips64le:ppc64le:s390x:???
+KVM_STATE_NESTED_RUN_PENDING = 2, arm64:mips64le:ppc64le:s390x:???
+KVM_STATE_NESTED_SMM_GUEST_MODE = 1, arm64:mips64le:ppc64le:s390x:???
+KVM_STATE_NESTED_SMM_VMXON = 2, arm64:mips64le:ppc64le:s390x:???
+KVM_TPR_ACCESS_REPORTING = 3223891602
+KVM_TRANSLATE = 3222843013
+KVM_UNREGISTER_COALESCED_MMIO = 1074835048, mips64le:ppc64le:2148576872
+KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK = 2
+KVM_X2APIC_API_USE_32BIT_IDS = 1
+KVM_X86_DISABLE_EXITS_CSTATE = 8
+KVM_X86_DISABLE_EXITS_HLT = 2
+KVM_X86_DISABLE_EXITS_MWAIT = 1
+KVM_X86_DISABLE_EXITS_PAUSE = 4
+KVM_X86_GET_MCE_CAP_SUPPORTED = 2148052637, mips64le:ppc64le:1074310813
+KVM_X86_QUIRK_CD_NW_CLEARED = 2, arm64:mips64le:ppc64le:s390x:???
+KVM_X86_QUIRK_LAPIC_MMIO_HOLE = 4, arm64:mips64le:ppc64le:s390x:???
+KVM_X86_QUIRK_LINT0_REENABLED = 1, arm64:mips64le:ppc64le:s390x:???
+KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT = 16, arm64:mips64le:ppc64le:s390x:???
+KVM_X86_QUIRK_OUT_7E_INC_RIP = 8, arm64:mips64le:ppc64le:s390x:???
+KVM_X86_SETUP_MCE = 1074310812, mips64le:ppc64le:2148052636
+KVM_X86_SET_MCE = 1077980830, arm64:mips64le:ppc64le:s390x:???
+KVM_XEN_HVM_CONFIG = 1077456506, arm64:mips64le:ppc64le:s390x:???
+MCG_STATUS_EIPV = 2, arm64:mips64le:ppc64le:s390x:???
+MCG_STATUS_LMCES = 8, arm64:mips64le:ppc64le:s390x:???
+MCG_STATUS_MCIP = 4, arm64:mips64le:ppc64le:s390x:???
+MCG_STATUS_RIPV = 1, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_ADDRV = 288230376151711744, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_AR = 36028797018963968, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_EN = 1152921504606846976, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_MISCV = 576460752303423488, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_OVER = 4611686018427387904, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_PCC = 144115188075855872, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_S = 72057594037927936, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_UC = 2305843009213693952, arm64:mips64le:ppc64le:s390x:???
+MCI_STATUS_VAL = 9223372036854775808, arm64:mips64le:ppc64le:s390x:???
+VMCS12_SIZE = 4096
+__NR_ioctl = 54, amd64:16, arm64:29, mips64le:5015
+__NR_mmap = 90, 386:192, amd64:9, arm64:222, mips64le:5009
+__NR_mmap2 = 386:192, amd64:arm64:mips64le:ppc64le:s390x:???
+__NR_openat = 386:295, amd64:257, arm64:56, mips64le:5247, ppc64le:286, s390x:288
diff --git a/sys/linux/dev_tlk_device.txt b/sys/linux/dev_tlk_device.txt
index a60649b..36df7c2 100644
--- a/sys/linux/dev_tlk_device.txt
+++ b/sys/linux/dev_tlk_device.txt
@@ -5,6 +5,10 @@
 # Reference source code:
 # https://android.googlesource.com/kernel/tegra/+/android-tegra-dragon-3.18-marshmallow-dr-dragon/security/tlk_driver/ote_protocol.h
 
+# This was generated on unknown tree.
+meta noextract
+meta arches["386", "amd64", "arm", "arm64"]
+
 include <linux/ioctl.h>
 include <linux/types.h>
 include <security/tlk_driver/ote_protocol.h>
diff --git a/sys/linux/dev_video4linux.txt b/sys/linux/dev_video4linux.txt
index 07c627d..f937b35 100644
--- a/sys/linux/dev_video4linux.txt
+++ b/sys/linux/dev_video4linux.txt
@@ -3,6 +3,8 @@
 
 # Constants for this descriptions were generated on the following tree:
 # https://source.codeaurora.org/quic/la/kernel/msm-4.9 msm-4.9
+# But must be generated on the upstream tree.
+meta noextract
 
 include <linux/time.h>
 include <linux/types.h>
diff --git a/sys/linux/fs_incfs.txt b/sys/linux/fs_incfs.txt
index b03ea0d..95c8ee6 100644
--- a/sys/linux/fs_incfs.txt
+++ b/sys/linux/fs_incfs.txt
@@ -1,14 +1,19 @@
 # Copyright 2020 syzkaller project authors. All rights reserved.
 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
 
+# incremental-fs is ChromeOS/Android-specific:
+# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2db8add7871ad%5E%21/
+
+# This was generated on:
+# https://chromium.googlesource.com/chromiumos/third_party/kernel 3a36438201f3
+meta noextract
+meta arches["386", "amd64", "arm", "arm64"]
+
 include <asm/ioctls.h>
 include <linux/stat.h>
 include <uapi/linux/fcntl.h>
 include <uapi/linux/incrementalfs.h>
 
-# incremental-fs is ChromeOS/Android-specific:
-# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2db8add7871ad%5E%21/
-
 mount$incfs(src ptr[in, filename], dst ptr[in, filename], type ptr[in, string["incremental-fs"]], flags flags[mount_flags], opts ptr[in, fs_options[incfs_options]])
 
 incfs_options [
diff --git a/sys/linux/vnet_mptcp.txt b/sys/linux/vnet_mptcp.txt
index 637e362..d824d7e 100644
--- a/sys/linux/vnet_mptcp.txt
+++ b/sys/linux/vnet_mptcp.txt
@@ -7,6 +7,9 @@
 # https://github.com/multipath-tcp/mptcp_net-next.git
 # Once this is upstream we need to move this to vnet.txt
 
+# Was generated on https://github.com/multipath-tcp/mptcp_net-next
+meta noextract
+
 include <net/tcp.h>
 include <net/mptcp.h>
 include <net/mptcp_v4.h>
diff --git a/sys/syz-extract/extract.go b/sys/syz-extract/extract.go
index 78666ac..117c10e 100644
--- a/sys/syz-extract/extract.go
+++ b/sys/syz-extract/extract.go
@@ -75,17 +75,12 @@
 	if *flagBuild && *flagBuildDir != "" {
 		tool.Failf("-build and -builddir is an invalid combination")
 	}
-
-	OS, archArray, files, err := archFileList(*flagOS, *flagArch, flag.Args())
-	if err != nil {
-		tool.Fail(err)
-	}
-
+	OS := *flagOS
 	extractor := extractors[OS]
 	if extractor == nil {
 		tool.Failf("unknown os: %v", OS)
 	}
-	arches, err := createArches(OS, archArray, files)
+	arches, err := createArches(OS, archList(OS, *flagArch), flag.Args())
 	if err != nil {
 		tool.Fail(err)
 	}
@@ -97,7 +92,7 @@
 		tool.Fail(err)
 	}
 
-	jobC := make(chan interface{}, len(archArray)*len(files))
+	jobC := make(chan interface{}, len(arches))
 	for _, arch := range arches {
 		jobC <- arch
 	}
@@ -108,11 +103,8 @@
 
 	failed := false
 	constFiles := make(map[string]*compiler.ConstFile)
-	for _, file := range files {
-		constFiles[file] = compiler.NewConstFile()
-	}
 	for _, arch := range arches {
-		fmt.Printf("generating %v/%v...\n", arch.target.OS, arch.target.Arch)
+		fmt.Printf("generating %v/%v...\n", OS, arch.target.Arch)
 		<-arch.done
 		if arch.err != nil {
 			failed = true
@@ -126,6 +118,9 @@
 				fmt.Printf("%v: %v\n", f.name, f.err)
 				continue
 			}
+			if constFiles[f.name] == nil {
+				constFiles[f.name] = compiler.NewConstFile()
+			}
 			constFiles[f.name].AddArch(f.arch.target.Arch, f.consts, f.undeclared)
 		}
 	}
@@ -175,6 +170,18 @@
 }
 
 func createArches(OS string, archArray, files []string) ([]*Arch, error) {
+	errBuf := new(bytes.Buffer)
+	eh := func(pos ast.Pos, msg string) {
+		fmt.Fprintf(errBuf, "%v: %v\n", pos, msg)
+	}
+	top := ast.ParseGlob(filepath.Join("sys", OS, "*.txt"), eh)
+	if top == nil {
+		return nil, fmt.Errorf("%v", errBuf.String())
+	}
+	allFiles := compiler.FileList(top, OS, eh)
+	if allFiles == nil {
+		return nil, fmt.Errorf("%v", errBuf.String())
+	}
 	var arches []*Arch
 	for _, archStr := range archArray {
 		buildDir := ""
@@ -203,7 +210,17 @@
 			build:       *flagBuild,
 			done:        make(chan bool),
 		}
-		for _, f := range files {
+		archFiles := files
+		if len(archFiles) == 0 {
+			for file, meta := range allFiles {
+				if meta.NoExtract || !meta.SupportsArch(archStr) {
+					continue
+				}
+				archFiles = append(archFiles, file)
+			}
+		}
+		sort.Strings(archFiles)
+		for _, f := range archFiles {
 			arch.files = append(arch.files, &File{
 				arch: arch,
 				name: f,
@@ -215,6 +232,18 @@
 	return arches, nil
 }
 
+func archList(OS, arches string) []string {
+	if arches != "" {
+		return strings.Split(arches, ",")
+	}
+	var archArray []string
+	for arch := range targets.List[OS] {
+		archArray = append(archArray, arch)
+	}
+	sort.Strings(archArray)
+	return archArray
+}
+
 func checkUnsupportedCalls(arches []*Arch) bool {
 	supported := make(map[string]bool)
 	unsupported := make(map[string]string)
@@ -240,60 +269,6 @@
 	return failed
 }
 
-func archFileList(os, arch string, files []string) (string, []string, []string, error) {
-	// Note: this is linux-specific and should be part of Extractor and moved to linux.go.
-	android := false
-	if os == "android" {
-		android = true
-		os = targets.Linux
-	}
-	var arches []string
-	if arch != "" {
-		arches = strings.Split(arch, ",")
-	} else {
-		for arch := range targets.List[os] {
-			arches = append(arches, arch)
-		}
-		if android {
-			arches = []string{targets.I386, targets.AMD64, targets.ARM, targets.ARM64}
-		}
-		sort.Strings(arches)
-	}
-	if len(files) == 0 {
-		matches, err := filepath.Glob(filepath.Join("sys", os, "*.txt"))
-		if err != nil || len(matches) == 0 {
-			return "", nil, nil, fmt.Errorf("failed to find sys files: %v", err)
-		}
-		manualFiles := map[string]bool{
-			// Not upstream, generated on https://github.com/multipath-tcp/mptcp_net-next
-			"vnet_mptcp.txt": true,
-			// Not upstream, generated on:
-			// https://chromium.googlesource.com/chromiumos/third_party/kernel d2a8a1eb8b86
-			"dev_bifrost.txt": true,
-			// Not upstream, generated on unknown tree.
-			"dev_img_rogue.txt": true,
-		}
-		androidFiles := map[string]bool{
-			"dev_tlk_device.txt": true,
-			// This was generated on:
-			// https://source.codeaurora.org/quic/la/kernel/msm-4.9 msm-4.9
-			"dev_video4linux.txt": true,
-			// This was generated on:
-			// https://chromium.googlesource.com/chromiumos/third_party/kernel 3a36438201f3
-			"fs_incfs.txt": true,
-		}
-		for _, f := range matches {
-			f = filepath.Base(f)
-			if manualFiles[f] || os == targets.Linux && android != androidFiles[f] {
-				continue
-			}
-			files = append(files, f)
-		}
-		sort.Strings(files)
-	}
-	return os, arches, files, nil
-}
-
 func processArch(extractor Extractor, arch *Arch) (map[string]*compiler.ConstInfo, error) {
 	errBuf := new(bytes.Buffer)
 	eh := func(pos ast.Pos, msg string) {
diff --git a/sys/syz-extract/linux.go b/sys/syz-extract/linux.go
index a07d6a9..10284d2 100644
--- a/sys/syz-extract/linux.go
+++ b/sys/syz-extract/linux.go
@@ -13,7 +13,6 @@
 	"github.com/google/syzkaller/pkg/build"
 	"github.com/google/syzkaller/pkg/compiler"
 	"github.com/google/syzkaller/pkg/osutil"
-	"github.com/google/syzkaller/sys/targets"
 )
 
 type linux struct{}
@@ -117,14 +116,6 @@
 }
 
 func (*linux) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uint64, map[string]bool, error) {
-	if strings.HasSuffix(info.File, "_kvm.txt") &&
-		(arch.target.Arch == targets.ARM || arch.target.Arch == targets.RiscV64) {
-		// Hack: KVM is not supported on ARM anymore. We may want some more official support
-		// for marking descriptions arch-specific, but so far this combination is the only
-		// one. For riscv64, KVM is not supported yet but might be in the future.
-		// Note: syz-sysgen also ignores this file for arm and riscv64.
-		return nil, nil, nil
-	}
 	headerArch := arch.target.KernelHeaderArch
 	sourceDir := arch.sourceDir
 	buildDir := arch.buildDir
diff --git a/sys/syz-sysgen/sysgen.go b/sys/syz-sysgen/sysgen.go
index 9ebaac3..0427272 100644
--- a/sys/syz-sysgen/sysgen.go
+++ b/sys/syz-sysgen/sysgen.go
@@ -176,32 +176,11 @@
 		job.Errors = append(job.Errors, fmt.Sprintf("%v: %v\n", pos, msg))
 	}
 	consts := constFile.Arch(job.Target.Arch)
-	top := descriptions
-	if job.Target.OS == targets.Linux && (job.Target.Arch == targets.ARM || job.Target.Arch == targets.RiscV64) {
-		// Hack: KVM is not supported on ARM anymore. On riscv64 it
-		// is not supported yet but might be in the future.
-		// Note: syz-extract also ignores this file for arm and riscv64.
-		top = descriptions.Filter(func(n ast.Node) bool {
-			pos, typ, name := n.Info()
-			if !strings.HasSuffix(pos.File, "_kvm.txt") {
-				return true
-			}
-			switch n.(type) {
-			case *ast.Resource, *ast.Struct, *ast.Call, *ast.TypeDef:
-				// Mimic what pkg/compiler would do with unsupported entries.
-				// This is required to keep the unsupported diagnostic below working
-				// for kvm entries, otherwise it will not think that kvm entries
-				// are not supported on all architectures.
-				job.Unsupported[typ+" "+name] = true
-			}
-			return false
-		})
-	}
 	if job.Target.OS == targets.TestOS {
-		constInfo := compiler.ExtractConsts(top, job.Target, eh)
+		constInfo := compiler.ExtractConsts(descriptions, job.Target, eh)
 		compiler.FabricateSyscallConsts(job.Target, constInfo, consts)
 	}
-	prog := compiler.Compile(top, consts, job.Target, eh)
+	prog := compiler.Compile(descriptions, consts, job.Target, eh)
 	if prog == nil {
 		return
 	}
diff --git a/sys/test/arch_32.txt b/sys/test/arch_32.txt
new file mode 100644
index 0000000..192f308
--- /dev/null
+++ b/sys/test/arch_32.txt
@@ -0,0 +1,9 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+meta arches["32_shmem", "32_fork_shmem"]
+
+resource unsupported3[int32]
+
+foo$unsupported3_ctor(cmd const[ONLY_32BITS_CONST]) unsupported3
+foo$unsupported3_use(res unsupported3)
diff --git a/sys/test/arch_64.txt b/sys/test/arch_64.txt
new file mode 100644
index 0000000..210984a
--- /dev/null
+++ b/sys/test/arch_64.txt
@@ -0,0 +1,9 @@
+# Copyright 2022 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+meta arches["64"]
+
+resource unsupported2[int32]
+
+foo$unsupported2_ctor(cmd const[ARCH_64_SPECIFIC_CONST]) unsupported2
+foo$unsupported2_use(res unsupported2)
diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go
index c97df42..714c195 100644
--- a/tools/syz-check/check.go
+++ b/tools/syz-check/check.go
@@ -153,10 +153,6 @@
 	}
 	byFile := make(map[string][]Warn)
 	for _, warn := range warnings {
-		// KVM is not supported on ARM completely.
-		if OS == targets.Linux && warn.arch == targets.ARM && strings.HasSuffix(warn.pos.File, "_kvm.txt") {
-			continue
-		}
 		byFile[warn.pos.File] = append(byFile[warn.pos.File], warn)
 	}
 	for file, warns := range byFile {