aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* xl: xl.conf(5): correct advice re autoballooning vs. dom0_mem.Ian Campbell2012-11-272-3/+8
| | | | | | | | | The advice was backwards, you should really disable autoballoon if you use dom0_mem. Also add a reference to the command-line docs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* README: add Pixman as build dependencyStefano Stabellini2012-11-271-0/+1
| | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix a variable underflow in libxl_wait_for_free_memoryRonny Hegewald2012-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | When xl is called to create a domU and there is not enough memory available, then the autoballooning is called to extract memory from dom0. During the ballooning a loop in libxl_wait_for_free_memory() waits unless enough memory is available to create the domU. But because of a variable-underflow the loop can finish too soon and xl finally aborts with the message: xc: error: panic: xc_dom_boot.c:161: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory libxl: error: libxl_dom.c:430:libxl__build_pv: xc_dom_boot_mem_init failed: Device or resource busy libxl: error: libxl_create.c:901:domcreate_rebuild_done: cannot (re-)build domain: -3 The variable-underflow happens when freemem_slack is larger then info.free_pages*4, because the solution of this operation is converted implicit to a unsigned int to match the type of memory_kb. Add a extra check for this condition to solve the problem. Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xenstore-chmod: handle arbitrary number of perms rather than MAX_PERMS constantChunyan Liu2012-11-271-21/+17
| | | | | | | | | | | Constant MAX_PERMS 16 is too small to use in some occasions, e.g. if there are more than 16 domU(s) on one hypervisor (it's easy to achieve) and one wants to do xenstore-chmod PATH to all domU(s). So, remove MAX_PERMS limitation and make it as arbitrary number of perms. Signed-off-by: Chunyan Liu <cyliu@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86/time: fix scale_delta() inline assemblyJan Beulich2012-11-261-2/+3
| | | | | | | | | | | | | | | The way it was coded, it clobbered %rdx without telling the compiler. This generally didn't cause any problems except when there are two back to back invocations (as in plt_overflow()), as in that case the compiler may validly assume that it can re-use for the second instance the value loaded into %rdx before the first one. Once at it, also properly relax the second operand of "mul" (there's no need for it to be in %rdx, or a register at all), and switch away from using explicit register names in the instruction operands. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xend: enable environment passing in xPopen3Olaf Hering2012-11-231-3/+2
| | | | | | | | | | In changeset 19990:38dd208e1d95 a new parameter 'env' was added to xPopen3, but no code was added to actually pass the environment down to execvpe. Also, the new code was unreachable. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: Tidy up flush_xen_dcache().Tim Deegan2012-11-235-15/+35
| | | | | | | | | | | | | | - Use a compile-time-constant check for whether we can safely flush just one cacheline. This reduces the common case from 28 instructions to three. - Pass an object to the macro, not a pointer, so we can detect attempts to flush arrays. - Decode CCSIDR correctly to get cacheline size. - Remove some redundant DSBs at the call sites. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: Suppress spurious warning message for cpupool-listGeorge Dunlap2012-11-231-1/+2
| | | | | | | | | | | | | | | | libxl_cpupool_list() enumerates the cpupools by "probing": calling cpupool_info, starting at 0 and stopping when it gets an error. However, cpupool_info will print an error when the call to xc_cpupool_getinfo() fails, resulting in every xl command that uses libxl_list_cpupool (such as cpupool-list) printing that error message spuriously. Since at the moment the times we want to print the message correspond with the use of the existing "exact" parameter, use it to decide whether to print the message or not. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* implement vmap()Jan Beulich2012-11-2210-47/+268
| | | | | | | ... and use it as basis for a proper ioremap() on x86. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/HPET: fix FSB interrupt maskingJan Beulich2012-11-221-21/+19
| | | | | | | | | | | | | | | | | | | HPET_TN_FSB is not really suitable for masking interrupts - it merely switches between the two delivery methods. The right way of masking is through the HPET_TN_ENABLE bit (which really is an interrupt enable, not a counter enable or some such). This is even more so with certain chip sets not even allowing HPET_TN_FSB to be cleared on some of the channels. Further, all the setup of the channel should happen before actually enabling the interrupt, which requires splitting legacy and FSB logic. Finally this also fixes an S3 resume problem (HPET_TN_FSB did not get set in hpet_broadcast_resume(), and hpet_msi_unmask() doesn't get called from the general resume code either afaict). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/HPET: include FSB interrupt information in 'M' debug key outputJan Beulich2012-11-223-9/+45
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* VT-d: clean up map/unmap log messagesJan Beulich2012-11-221-12/+14
| | | | | | | | | - printing file name and line number here is pointless - they are guest related, so should get their log level filter accordingly - include segment numbers and canonicalize number widths Signed-off-by: Jan Beulich <jbeulich@suse.com>
* xend: reinstate XendOptionsFile.get_external_migration_toolIan Campbell2012-11-202-0/+6
| | | | | | | | | | | This was removed by 26167:31dcc0e08754 "xend: Remove old vtpm support from xm" but at least one caller was left. Reinstate with s/TPM/device/ since it appears that this functionality could apply elsewhere. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* passthrough/PCI: replace improper uses of pci_find_next_cap()Jan Beulich2012-11-201-14/+3
| | | | | | | | | | | | | | | | Using pci_find_next_cap() without prior pci_find_cap_offset() is bogus (and possibly wrong, given that the latter doesn't check the PCI_STATUS_CAP_LIST flag, which so far was checked in an open-coded way only for the non-bridge case). Once at it, fold the two calls into one, as we need its result in any case. Question is whether, without any caller left, pci_find_next_cap() should be purged as well. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
* xen: fix build failure due to extra closing commentIan Campbell2012-11-191-1/+0
| | | | | | | Added by 26173:26facad2f1a1 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Include prototype for HYPERVISOR_multicallIan Campbell2012-11-191-1/+4
| | | | | | | | Mark-up for inclusion of generated docs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Document HYPERVISOR_update_descriptorIan Campbell2012-11-191-1/+14
| | | | | | | | Mark-up for inclusion of generated docs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Add ToC entry for start of day memory layout.Ian Campbell2012-11-191-1/+2
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: Document HYPERVISOR_mmuext_opIan Campbell2012-11-191-14/+22
| | | | | | | | | | Mark-up for inclusion of generated docs. Remove some trailing whitespace. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: document HYPERVISOR_update_va_mapping(_other_domain)Ian Campbell2012-11-191-0/+17
| | | | | | | | Mark-up for inclusion of generated docs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: document/mark-up SCHEDOP_*Ian Campbell2012-11-193-31/+72
| | | | | | | | | | | | | The biggest subtlety here is there additional argument when op == SCHEDOP_shutdown and reason == SHUTDOWN_suspend and its interpretation by xc_domain_{save,restore}. Add some clarifying comments to libxc as well. This patch moves some structs around but there is no functional change other than improved documentation. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* AMD IOMMU: fix type of "bdf" parameter of update_intremap_entry_from_msi_msg()Jan Beulich2012-11-191-1/+1
| | | | | Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com>
* Remove tools/vtpm* from MAINTAINERS fileMatthew Fioravante2012-11-191-2/+0
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Remove old vtpm stuff from tools/libxenMatthew Fioravante2012-11-196-516/+0
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* Remove VTPM_TOOLS from config/Tools.mk.inMatthew Fioravante2012-11-191-1/+0
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xend: Remove old vtpm support from xmMatthew Fioravante2012-11-1917-518/+4
| | | | | | Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: Update mini-os license to support GPL featuresMatthew Fioravante2012-11-191-0/+13
| | | | | | | | | | This patch updates extras/mini-os/COPYING to explain which optional features are GPL and what the implications of enabling them are. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* minios: fix bug in lseek for mini-osMatthew Fioravante2012-11-191-29/+38
| | | | | | | | | | lseek always used files[fd].file.offset. It should use the offset of whatever union member is actually being used. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: get the number of cpus from device treeStefano Stabellini2012-11-196-12/+71
| | | | | | | | The system might have fewer cpus than the GIC supports. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: flush D-cache and I-cache when appropriateStefano Stabellini2012-11-194-13/+71
| | | | | | | | | | | | - invalidate tlb after setting WXN - flush D-cache and I-cache after relocation; - invalidate D-cache after writing to smp_up_cpu; - flush I-cache after changing HTTBR; - flush I-cache and branch predictor after writing Xen text ptes. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* vscsiif: minor cleanupJan Beulich2012-11-191-8/+5
| | | | | | | | Remove a definition not belonging into the interface, and correct a few typos in comments. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* AMD IOMMU: Enable HPET broadcast msi remappingWei Wang2012-11-194-12/+57
| | | | | | | | | | | | | This patch enables hpet msi remapping for amd iommu. Signed-off-by: Wei Wang <wei.wang2@amd.com> - use the existing ACPI_IVHD_* #define-s - warn on finding more than one IVHD HPET entry - consolidate parameters of update_intremap_entry_from_msi_msg() Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* xen/arm: wake up secondary cpusStefano Stabellini2012-11-154-2/+53
| | | | | | | | | | | | Secondary cpus are held by the firmware until we send an IPI to them. Reordered non-boot cpu wait loop to perform the check before waiting for an event, to handled the case where the event has already happened when we reach the loop. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: set the SMP bit in the ACTLR registerStefano Stabellini2012-11-156-0/+88
| | | | | | | | | | | | | | | "Enables the processor to receive instruction cache, BTB, and TLB maintenance operations from other processors" ... "You must set this bit before enabling the caches and MMU, or performing any cache and TLB maintenance operations. The only time you must clear this bit is during a processor power-down sequence" Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* pl011: set baud and clock_hz to the right defaults for Versatile ExpressStefano Stabellini2012-11-151-2/+2
| | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: setup the fixmap in head.SStefano Stabellini2012-11-154-23/+26
| | | | | | | | | Setup the fixmap mapping directly in head.S rather than having a temporary mapping only to re-do it later in C. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen/arm: pass the correct bit-per-interrupt argument to vgic_irq_rankStefano Stabellini2012-11-151-12/+13
| | | | | | | | Use 1 for registers that have 1 bit per irq. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: Fix passing of application data to timeout_deregister hookJim Fehlig2012-11-151-1/+1
| | | | | | | | | | When deregistering a timeout, the address of application data was being passed to the timeout_deregister hook instead of the data itself. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* x86/nmi: self_nmi() should not unconditionally enable interruptsAndrew Cooper2012-11-151-3/+4
| | | | | | | | | It seems that all current callers have interrupts enabled, making the code currently safe but dangerous. Also, fix a trailing whitespace issue. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* update MAINTAINERS fileAndre Przywara2012-11-151-6/+7
| | | | | | | | | | | | | | | There have been some "organizational changes" within AMD. Update the MAINTAINERS file accordingly. Please also feel free to use the new email addresses if there are any inquires related to code authored by Wei Wang, Christoph Egger or Andre Przywara. Signed-off-by: Andre Przywara <osp@andrep.de> Acked-by: Wei Wang <weiwang.dd@gmail.com> Acked-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Acked-by: Wei Huang <wei.huang2@amd.com> Acked-by: Christoph Egger <Christoph_Egger@gmx.de> Committed-by: Keir Fraser <keir@xen.org>
* tools: rerun autoconf after 26144:170d45f7a2ebIan Campbell2012-11-141-27/+0
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* compat/gnttab: Prevent infinite loop in compat codeIan Jackson2012-11-141-0/+2
| | | | | | | | | | | | | | | c/s 20281:95ea2052b41b, which introduces Grant Table version 2 hypercalls introduces a vulnerability whereby the compat hypercall handler can fall into an infinite loop. If the watchdog is enabled, Xen will die after the timeout. This is a security problem, XSA-24 / CVE-2012-4539. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen/mm/shadow: check toplevel pagetables are present before unhooking them.Ian Jackson2012-11-141-2/+6
| | | | | | | | | | | | | | | If the guest has not fully populated its top-level PAE entries when it calls HVMOP_pagetable_dying, the shadow code could try to unhook entries from MFN 0. Add a check to avoid that case. This issue was introduced by c/s 21239:b9d2db109cf5. This is a security problem, XSA-23 / CVE-2012-4538. Signed-off-by: Tim Deegan <tim@xen.org> Tested-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86/physmap: Prevent incorrect updates of m2p mappingsIan Jackson2012-11-141-0/+4
| | | | | | | | | | | | | | | | | | | In certain conditions, such as low memory, set_p2m_entry() can fail. Currently, the p2m and m2p tables will get out of sync because we still update the m2p table after the p2m update has failed. If that happens, subsequent guest-invoked memory operations can cause BUG()s and ASSERT()s to kill Xen. This is fixed by only updating the m2p table iff the p2m was successfully updated. This is a security problem, XSA-22 / CVE-2012-4537. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* VCPU/timers: Prevent overflow in calculations, leading to DoS vulnerabilityIan Jackson2012-11-142-0/+5
| | | | | | | | | | | | | | The timer action for a vcpu periodic timer is to calculate the next expiry time, and to reinsert itself into the timer queue. If the deadline ends up in the past, Xen never leaves __do_softirq(). The affected PCPU will stay in an infinite loop until Xen is killed by the watchdog (if enabled). This is a security problem, XSA-20 / CVE-2012-4535. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen-tmem-list-parse: fix ugly parse outputDan Magenheimer2012-11-141-0/+2
| | | | | | | | | | | The program xen-tmem-list-parse parses the output of xm/xl tmem-list into human-readable format. A missing NULL terminator sometimes causes garbage to be spewed where the two-letter pool type should be output. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* hotplug/Linux: Fix locking in tools/hotplug/Linux/locking.shJacek Konieczny2012-11-141-1/+1
| | | | | | | | | | | | | | The claim_lock() function would fail in the perl code with: Invalid argument at -e line 2. because the Perl snippet opens for reading the file descriptor, which was earlier opened for write (append). Signed-off-by: Jacek Konieczny <jajcus@jajcus.net> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: fix vfb related assertion problem when starting pv-domURonny Hegewald2012-11-131-0/+2
| | | | | | | | | | | | | | | | | | | When a config-file for a pv-domU has a vfb section with a vnc=0 option then a "xl create" for that domU crashes with the message xl: libxl.c:252: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. and the domU hangs early in the start. This patch fixes the cause of the assertion and let the domU start normally. This problem exists since xen 4.2. Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: Remove the vtpm process modelMatthew Fioravante2012-11-13101-17106/+2
| | | | | | | | | Remove the old vtpm process model. It doesn't work very well and is no longer supported. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add vtpm supportMatthew Fioravante2012-11-1314-7/+640
| | | | | | | | | | | | This patch adds vtpm support to libxl. It adds vtpm parsing to config files and 3 new xl commands: vtpm-attach vtpm-detach vtpm-list Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>