- 20 Sep, 2017 16 commits
-
-
Jan Beulich authored
By virtue of the struct xen_domctl container structure, most of them are really just cluttering the name space. While doing so, - convert an enum typed (pt_irq_type_t) structure field to a fixed width type, - make x86's paging_domctl() and descendants take a properly typed handle, - add const in a few places. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com> Acked-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Meng Xu <mengxu@cis.upenn.edu> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Julien Grall <julien.grall@arm.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
-
Andrew Cooper authored
It will be reused by later changes. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
-
Andrew Cooper authored
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-
Juergen Gross authored
Add a domctl hypercall to set the domain's resource limits regarding grant tables. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
-
Juergen Gross authored
Many definitions can be moved from xen/grant_table.h to common/grant_table.c now, as they are no longer used in other sources. Rearrange the elements of struct grant_table to minimize holes due to alignment of elements. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
-
Juergen Gross authored
The x86 and arm versions of XENMAPSPACE_grant_table handling are nearly identical. Move the code into a function in grant_table.c and add an architecture dependant hook to handle the differences. Switch to mfn_t in order to be more type safe. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Julien Grall <julien.grall@arm.com>
-
Sergey Dyasli authored
Under the following circumstances: 1. L1 doesn't enable PAUSE exiting or PAUSE-loop exiting controls 2. L2 executes PAUSE in a loop with RFLAGS.IE == 0 L1's PV IPI through event channel will never reach the target L1's vCPU which runs L2 because nvmx_intr_intercept() doesn't know about hvm_intsrc_vector. This leads to infinite L2 loop without nested vmexits and can cause L1 to hang. The issue is easily reproduced with Qemu/KVM on CentOS-7-1611 as L1 and an L2 guest with SMP. Fix nvmx_intr_intercept() by injecting hvm_intsrc_vector irq into L1 which will cause nested vmexit. Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
-
Julien Grall authored
ioremap_cache is a wrapper of ioremap_attr(...). Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
Walk the hypervisor page table for data/prefetch abort fault to help diagnostics error in the page tables. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
While ARM32 has 2 distinct registers for the hypervisor fault register (one for prefetch abort, the other for data abort), AArch64 has only one. Currently, the logic is open-code but a follow-up patch will require to read it too. So move the logic in a separate helper and use it instead of open-coding it. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
This will allow to consolidate some part of the data abort and prefetch abort handling in a single function later on. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
FnV (FAR not Valid) bit was introduced by ARMv8 in both AArch32 and AArch64 (See D7-2275, D7-2277, G6-4958, G6-4962 in ARM DDI 0487B.a). Note the new revision of ARMv8 defined more bits in HSR. They haven't been added at the moment because we have no use of them in Xen. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
Aliasing FAR_EL1 to IFAR is wrong because on ARMv8 FAR_EL1[31:0] is architecturally mapped to DFAR and FAR_EL1[63:32] to IFAR. As FAR_EL1 is not currently used in ARM32 code, remove it. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
Aliasing FAR_EL2 to HIFAR makes the code confusing because on ARMv8 FAR_EL2[31:0] is architecturally mapped to HDFAR and FAR_EL2[63:32] to HIFAR. See D7.2.30 in ARM DDI 0487B.a. Open-code the alias instead. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
Julien Grall authored
This add a bit more safety in the memory subsystem code. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
-
- 19 Sep, 2017 3 commits
-
-
Julien Grall authored
The header public/arch-arm.h contains mostly ARM specific code. Avoid CC the "THE REST" maintainers on it. Signed-off-by: Julien Grall <julien.grall@arm.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
-
Juergen Gross authored
In gnttab_get_status_frames() all accesses to nr_status_frames should be done with the grant table lock held. While at it correct coding style: labels should be indented by one space. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
-
Boris Ostrovsky authored
Set free_heap_pages()'s need_scrub to true if alloc_domheap_pages() returns pages back to heap as result of assign_pages() error when those pages were requested with MEMF_no_scrub flag. We need to do this because there is a possibility that alloc_heap_pages() might clear buddy's PGC_need_scrubs flag without actually clearing the page. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
- 18 Sep, 2017 9 commits
-
-
Konrad Rzeszutek Wilk authored
instead of hardcoding values. We also drop the uint64_t cast as the macro uses ULL to produce the proper width types. Acked-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Wei Liu authored
Coverity-ID: 1418095 Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
-
Wei Liu authored
libxl__read_xenstore can return NULL. Use the _mandatory variant to return early when the read fails. Coverity-ID: 1418098 Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
-
Wei Liu authored
Coverity-ID: 1418097 Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
-
Jan Beulich authored
On older systems printing the "n/a" messages (resulting from the compiler not being new enough to deal with some of the test code) isn't very useful: If both CPU and compiler are too old for a certain test, we can as well omit those messages, as those tests wouldn't be run even if the compiler did produce code. (This has become obvious with the 3DNow! tests, which I had to run on an older system still supporting those insns, and that system naturally also had an older compiler.) Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
Julien Grall authored
At the moment, most of the callers will have to use mfn_x. However follow-up patches will remove some of them by propagating the typesafe a bit further. Signed-off-by: Julien Grall <julien.grall@arm.com> Acked-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
-
Jan Beulich authored
Bring code up-to-date with SDM version 063. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
-
Jan Beulich authored
Bring code up-to-date with SDM version 063, including the LBR format enumeration. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
-
Jan Beulich authored
This makes it easier to match them against SDM updates. Also update a few comments with names as per SDM version 063. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
-
- 15 Sep, 2017 12 commits
-
-
Oleksandr Tyshchenko authored
Since p2m_teardown() can be called when p2m_init() haven't executed yet we might deal with unitialized list "p2m->pages" which leads to crash. To avoid this use back pointer to domain as end-of-initialization indicator. Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
-
Oleksandr Tyshchenko authored
Since domain_vgic_free() can be called when the vgic_ops haven't been initialised yet, always check that d->arch.vgic.handler is not a null. Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Also removed a redundant pair of brackets. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Julien Grall <julien.grall@arm.com>
-
Wei Liu authored
Also fixed a coding style issue. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Julien Grall <julien.grall@arm.com>
-