{"push_id":629696847,"size":8,"distinct_size":8,"ref":"refs/heads/arm_memaccess15","head":"6d310f291b6c73c81636e330d2e99606a05e7972","before":"ef854dea53f3cfeb7ead3333b00e9b38f3b29af7","commits":[{"sha":"fd592381d0ac3c46a7dfb8fde0a5e2c6cfa537cf","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"xen/arm: Allow hypervisor access to mem_access protected pages\n\nThe hypervisor may use the MMU to verify that the given guest has read/write\naccess to a given page during hypercalls. As we may have custom mem_access\npermissions set on these pages, we do a software-based type checking in case\nthe MMU based approach failed, but only if mem_access_enabled is set.\n\nThese memory accesses are not forwarded to the mem_event listener. Accesses\nperformed by the hypervisor are currently not part of the mem_access scheme.\nThis is consistent behaviour with the x86 side as well.\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>\nReviewed-by: Julien Grall <julien.grall@citrix.com>\n---\nv14: - Move software-based lookup into p2m, add comments and clean it up a bit\n       Only page type allowed is rw\n       Extend gva_to_ipa to take flags input for lookup validation\nv12: - Check for mfn_valid as well.","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/fd592381d0ac3c46a7dfb8fde0a5e2c6cfa537cf"},{"sha":"4e3f596a7d1a34536f7fe3397232e543e7f6a355","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"xen/arm: Data abort exception (R/W) mem_access events\n\nThis patch enables to store, set, check and deliver LPAE R/W mem_events.\nAs the LPAE PTE's lack enough available software programmable bits,\nwe store the permissions in a Radix tree. The tree is only looked at if\nmem_access_enabled is turned on.\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>\n---\nv15: - Style fixes\nv14: - Make radix_set function easier to read when mem_access not in use.\n     - Make dabt trap handler read HPFAR_EL2 when valid\n     - Distinguish between read/write access based on dabt.write\n     - Combine preemption in apply_p2m_changes\n     - Combine shared p2m functions into common/p2m-common.h\nv12: - Move the flush in apply_p2m_changes to the label out,\n       so we it used in the memaccess preemption case as well.\nv11: - Move including common/mem_event.h in here in p2m.h.\n     - Flush the tlb in p2m_set_mem_access to cover both the preemption\n       and successful finish cases.\nv10: - Remove ASSERT from MEMACCESS case.\n    - Flush the tlb in the MEMACCESS case as we progress.\n    - Typos and style fixes.\nv8: - Revert to arch specific p2m_mem_access_check.\n    - Retire dabt_dfsc enum and use FSC_FLT defines.\n    - Revert to Radix tree approach and use access_in_use flag to\n      indicate if the tree is in use or not to avoid uneccessary lookups.\nv7: - Removed p2m_shatter_page and p2m_set_permission into separate\n      patch.\n    - Replace Radix tree settings store with extended struct page_info\n      approach. This way the trap handlers can use the MMU directly to\n      locate the permission store instead of having to do a tree-lookup.\n    - Add p2m_get_entry/set_entry compat functions which are required by\n      the common mem_access_check function.\n    - Typo fixes.\nv6: - Add helper function p2m_shatter_page.\n    - Only allocate 4k pages when mem_access is in use.\n    - If no setting was found in radix tree but PTE exists,\n      return rwx as permission.\n    - Move the inclusion of various headers into this patch.\n    - Make npfec a const.\nv5: - Move p2m_set_entry's logic into apply_one_level via\n      a new p2m_op, MEMACCESS.\nv4: - Add p2m_mem_access_radix_set function to be called\n      when inserting new PTE's and when updating existing entries.\n    - Switch p2m_mem_access_check to return bool_t.\n    - Use new struct npfec to pass violation info.\nv3: - Add new function for updating the PTE entries, p2m_set_entry.\n    - Use the new struct npfec to pass violation information.\n    - Implement n2rwx, rx2rw and listener required routines.\nv2: - Patch been split to ease the review process.\n    - Add definitions of data abort data fetch status codes (enum dabt_dfsc)\n      and only call p2m_mem_access_check for traps caused by permission violations.\n    - Only call p2m_write_pte in p2m_lookup if the PTE permission actually changed.\n    - Properly save settings in the Radix tree and pause the VCPU with\n      mem_event_vcpu_pause.","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/4e3f596a7d1a34536f7fe3397232e543e7f6a355"},{"sha":"63bef24da2fafb059918400e4c2bb1515a4beba4","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"xen/arm: Instruction prefetch abort (X) mem_access event handling\n\nAdd missing structure definition for iabt and update the trap handling\nmechanism to only inject the exception if the mem_access checker\ndecides to do so.\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>\n---\nv15: - Use flush_tlb_local\n       Only get gpa if trap was triggered by permission fault\nv14: - Query HPFAR_EL2 when valid in iabt handler\n     - Flush TLB before doing GVA->IPA translation in iabt handler\nv10: - Minor comment fix for describing s1ptw.\nv8: - Revert to arch specific p2m_mem_access_check.\n    - Retire iabt_fsc enum and use FSC_FLT instead.\n    - Complete the struct definition of hsr_iabt.\nv7: - Use the new common mem_access_check.\nv6: - Make npfec a const.\nv4: - Don't mark instruction fetch violation as read violation.\n    - Use new struct npfec to pass violation info.\nv2: - Add definition for instruction abort instruction fetch status codes\n       (enum iabt_ifsc) and only call p2m_mem_access_check for traps triggered\n       for permission violations.","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/63bef24da2fafb059918400e4c2bb1515a4beba4"},{"sha":"dcd3c38888526131cb0e52fed219a860a9aba026","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"xen: Make gpfn related memops compatible with wider return values\n\nThe current implementation of three memops, XENMEM_current_reservation,\nXENMEM_maximum_reservation and XENMEM_maximum_gpfn return values as an\nint. However, in ARM64 we could potentially have 36-bit pfn's, thus\nin preparation for the ARM patch, in this patch we update the existing\nmemop routines to use a struct, xen_get_gpfn, to exchange the gpfn info\nas a uin64_t.\n\nThis patch also adds error checking on the toolside in case the memop\nfails.\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/dcd3c38888526131cb0e52fed219a860a9aba026"},{"sha":"a003149c15c4ff3139db5de5b8aa080d25f1ba9f","author":{"email":"2fe41d4e32b0bb991f63b975f2bed08c1e666665@linaro.org","name":"Julien Grall"},"message":"xen/arm: Implement domain_get_maximum_gpfn\n\nThe function domain_get_maximum_gpfn is returning the maximum gpfn ever\nmapped in the guest. We can use d->arch.p2m.max_mapped_gfn for this purpose.\n\nWe use this in xenaccess as to avoid the user attempting to set page\npermissions on pages which don't exist for the domain, as a non-arch specific\nsanity check.\n\nSigned-off-by: Julien Grall <julien.grall@linaro.org>","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/a003149c15c4ff3139db5de5b8aa080d25f1ba9f"},{"sha":"4a424e32b50aebeb5b72f2e4fe88f1d3ade02512","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"tools/libxc: Allocate magic page for mem access on ARM\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>\nReviewed-by: Julien Grall <julien.grall@linaro.org>\nAcked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>\nAcked-by: Ian Campbell <ian.campbell@citrix.com>","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/4a424e32b50aebeb5b72f2e4fe88f1d3ade02512"},{"sha":"4813833eed7ef01764136555433ff4841e24a60b","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"tools/tests: Enable xen-access on ARM\n\nDefine the ARM specific test_and_set_bit functions and switch\nto use maximum gpfn as the limit to setting permissions. Also,\nmove HAS_MEM_ACCESS definition into config.\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>\n---\nv15: - Rebase on staging\nv6: - Just use xc_domain_maximum_gpfn to get max_gpfn.\nv5: - Use the new information returned by getdomaininfo, max_gpfn, to\n      set access permissions. On ARM this will include the potential\n      memory hole as well which the hypervisor just loops over.\nv4: - Take into account multiple guest ram banks on ARM.\n    - Move HAS_MEM_ACCESS definition into config/*.mk and only compile\n      xen-access when it is defined.\n    - Pass CONFIG_X86/CONFIG_ARM flags during compilation in xen-access\n      Makefile.","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/4813833eed7ef01764136555433ff4841e24a60b"},{"sha":"6d310f291b6c73c81636e330d2e99606a05e7972","author":{"email":"dc226868a49efece0a100d3b431c1ba5dbf300fa@sec.in.tum.de","name":"Tamas K Lengyel"},"message":"xen/arm: Enable mem_access on ARM\n\nSigned-off-by: Tamas K Lengyel <tklengyel@sec.in.tum.de>\nAcked-by: Ian Campbell <ian.campbell@citrix.com>\nReviewed-by: Julien Grall <julien.grall@linaro.org>","distinct":true,"url":"https://api.github.com/repos/tklengyel/xen/commits/6d310f291b6c73c81636e330d2e99606a05e7972"}]}