aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update Xen version to 4.1.0-rc14.1.0-rc1Keir Fraser2011-01-132-2/+3
|
* xl: correct test for domid on error exit from domain_createIan Jackson2011-01-131-1/+1
| | | | | | | The previous changeset 22739:d839631b6048 changed the initialisation of domid without changing the corresponding cleanup test. Oops. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: save domain config (userdata) under correct domid/uuidIan Jackson2011-01-131-9/+9
| | | | | | | | | | | | | | | | | Recent changes caused the domain config file to be saved under dom0's filename in /var/lib/xen. This was due to the config file being saved before the domain was created and thus before the domid and uuid were known. Fix this by moving the saving code to after creation. Also, change the "default" initialisation of domid in xl_cmdimpl.c:create_domain to be domid=-1. That provides a more obviously wrong value than 0 (which refers to dom0) so that other bugs of this kind would be more likely to show up. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: config parser: Rebuild config file parser scanner (rerun flex)Ian Jackson2011-01-121-17/+26
| | | | | | | | | The scanner from c/s 22735:cb94dbe20f97 is buggy and crashes with a segmentation fault. Rebuilding the sanner appears to fix the problem so it appears that I somehow accidentally checked in a scanner which doesn't correspond to the committed scanner source code. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert 22706:ca10302ac285 "xenpaging: update machine_to_phys_mapping[] ↵Keir Fraser2011-01-121-5/+1
| | | | | | | | during page deallocation" Crashes during boot, due to m2p tables not being set up early enough. Signed-off-by: Keir Fraser <keir@xen.org>
* MergeIan Jackson2011-01-1133-4467/+1043
|\
| * tools/python/pyxl: Updates to builtin-type marshalling functionsGianni Tedesco2011-01-111-3/+20
| | | | | | | | | | | | | | | | | | Allow setting a string field to None as a way to zero it out. Implement setting/getting libx_file_references as strings. Produce relevant Exceptions marshallers which remain unimplemented. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools/python/pyxl: Export PCI passthrough related libxl functionsGianni Tedesco2011-01-111-0/+74
| | | | | | | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools/python/pyxl: Allow subclassing of auto-generated python typesGianni Tedesco2011-01-112-2/+2
| | | | | | | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools/python/pyxl: Export relevant integer constants from python wrapperGianni Tedesco2011-01-111-0/+32
| | | | | | | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools/python/pyxl: Un-muddle libxl_domain_(pause|unpause) wrappersGianni Tedesco2011-01-111-2/+2
| | | | | | | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools/python/pyxl: Fix reference counting of Py_(None|True|False)Gianni Tedesco2011-01-112-2/+15
| | | | | | | | | | | | | | The incorrect refcounting causes the python interpreter to crash Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * QEMU_TAG updateIan Jackson2011-01-111-3/+3
| |
| * tools/xend: check for device model if path is not specifiedMichal Novotny2011-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is the patch to check for device model (in XendConfig.py) when the device_model had no path specified, i.e. XenD was trying to read the file on the auxbin path. Without this patch applied the meaningless python error "coercing to Unicode: need string or buffer, NoneType found" occurred: [2010-11-30 13:56:47 5255] ERROR (xmlrpclib2:181) Internal error handling xend.domain.create Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/xen/util/xmlrpclib2.py", line 134, in _marshaled_dispatch response = self._dispatch(method, params) File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch return func(*params) File "/usr/lib64/python2.4/site-packages/xen/xend/server/XMLRPCServer.py", line 80, in domain_create info = XendDomain.instance().domain_create(config) File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line 1001, in domain_create dominfo = XendDomainInfo.create(config) File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 97, in create domconfig = XendConfig.XendConfig(sxp_obj = config) File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py", line 367, in __init__ self.validate() File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py", line 558, in validate self._platform_sanity_check() File "/usr/lib64/python2.4/site-packages/xen/xend/XendConfig.py", line 502, in _platform_sanity_check if not os.path.exists(self['platform']['device_model']): File "/usr/lib64/python2.4/posixpath.py", line 171, in exists st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found This patch raises VmError with message that no valid device model was specified if None type was found in the device_model specification. It's been tested on non-existing device model where the message is being printed. If an invalid (but existing) device_model is set in the configuration file the domain was destroyed because it crashed. If there is a path specified (i.e. it's not using auxbin path) it bails with error that the device model was not found (which was already implemented there). Signed-off-by: Michal Novotny <minovotn@redhat.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: fix missing include of <signal.h>Christoph Egger2011-01-111-0/+1
| | | | | | | | | | | | | | libxl_dm.c:713: warning: implicit declaration of function 'kill' Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: move domain struct init functions from xl to libxlGianni Tedesco2011-01-114-155/+164
| | | | | | | | | | | | | | | | | | | | This allows libxl users to get some sane default values for this complex set of structures. This is purely code movement and there are no functional changes except for a trivial error handling change in nic device init. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: Introduce libxl_domain_create_new() and libxl_domain_create_restore()Gianni Tedesco2011-01-119-614/+651
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are introduced as the new way to create domains with libxl they prevent the callers from need to know about low-level implementation details such as: - libxl_domain_make() - libxl_domain_build() - libxl_domain_restore() - when to attach the console - how to start the device model Above mentioned functions and all API's for the device model, which are now redundant, have been made internal to libxl and no longer accessible. The ocaml binding for libxl has not been properly updated to reflect the changes, wrappers for the old functions have been removed but the code to wrap the new functions has not been added. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: refactor code which adds per-PCI device backend nodes in xenstoreIan Campbell2011-01-111-25/+20
| | | | | | | | | | | | | | | | libxl_create_pci_backend and libxl_device_pci_add_xenstore contains identical code to setup the per device xenstore nodes in the backend. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: log which PCI device could not be reset.Ian Campbell2011-01-111-1/+1
| | | | | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: do not leak front flexarray on error in libxl_create_pci_backendIan Campbell2011-01-111-7/+12
| | | | | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: write PCI frontend xenstore nodes to the frontend directory.Ian Campbell2011-01-111-3/+5
| | | | | | | | | | | | | | They accidentally got moved to the backend directory by 22680:03718b569d97. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools: remove fs-front/fs-backTim Deegan2011-01-1114-3627/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its access controls are really not OK. In particular, it's not good for libxl, which stores per-VM config blobs in a directory that is exported to all VMs. This will break stub-qemu save/restore, which is the only user of fs-front that I'm aware of, but: - It's currently broken anyway (fs-back isn't run by default and crashes if it is run manually); and - Stefano has a plan to plumb qemu save records through a dedicated console channel instead. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * tools/xenpaging: fix return value from xc_mem_paging_flush_ioemu_cacheIan Jackson2011-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While using xenpaging, "Error flushing ioemu cache" message will be shown even if the "flush-cache" command is sent to xenstore correctly. That is because xenpaging assumes xc_mem_paging_flush_ioemu_cache() returns non-zero value when the operation fails. But xc_mem_paging_flush_ioemu_cache() returns the return value from xs_write() which is zero on error. So, we should invert the return value from xs_write() and return -1 on error, or 0 on success, like other xc_ functions. Signed-off-by: Han-Lin Li <Han-Lin.Li@itri.org.tw> Author: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * stubdom: Fix stubdom-dm using "grep" improperlyJohn Weekes2011-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stubdom-dm uses "grep" on "xm list" output to determine whether it is already running. The existing behavior is to use "grep $domname-dm" but this will result in a false-positive in the case of another domU running whose name ends with the full new name; for instance, if "abctest-dm" is running, a new "test-dm" will spin forever, waiting for it the end. Any easy fix is to have it use "grep -w" instead of "grep", searching for the whole word only. It also might be worth considering a switch to "xl list" from "xm list", here and in other places. Signed-off-by: John Weekes <lists.xen@nuclearfallout.net> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * stubdom/minios: don't retrieve the address of void variableGianni Tedesco2011-01-111-1/+1
| | | | | | | | | | | | | | | | | | Objects must not be declared to have type void. Declare shared_info to have the appropriate type instead. Author: Ganni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * stubdom/minios: use correct sized types for software floating pointSamuel Thibault2011-01-111-20/+16
| | | | | | | | | | | | | | | | | | Replace long/int/short sizes with proper exact-size types for 64bit architectures. As well as making the code correct, this eliminates a compiler warning about an uninitialised variable. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * libxl: Add gfx_passthru parameterDaniel De Graaf2011-01-112-0/+4
| | | | | | | | | | Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxl: config parser: print warning for apparent arbitrary pythonIan Jackson2011-01-116-44/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The characters - + . ( ) : are not legal in xl config files but are valid Python and use of at least one of them is almost essential for writing arbitrary Python in the config file. So if we see one of these during lexing, note it, and then after the parse is complete if it failed we print a special extra warning. Currently this warning refers to the nonexistent wiki page http://wiki.xen.org/xenwiki/PythonInXlConfig which will have to be written (and/or given a better name) before the actual 4.1 release. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxl: config parser: rerun flex (Debian lenny 2.5.35)Ian Jackson2011-01-112-10/+38
| | | | | | | | | | | | | | | | We are going to need to rerun flex to generate new lexer code. So rerun it now to separate out the irrelevant from the relevant changes to the generated files. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxl: config parser: make CfgParseContext initialisation commonIan Jackson2011-01-111-37/+45
| | | | | | | | | | | | | | | | | | xlu_cfg_readfile and xlu_cfg_readdata had some somewhat-boilerplate code for initialisation, parsing, and cleanup. Make that common. No functional change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxl: config parser: do not segfault in some error pathsIan Jackson2011-01-111-0/+1
|/ | | | | | | In error paths, xlu__cfg_set_free can be called on NULL. So check for that rather than segfaulting. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* xentrace: build fix "array subscript has type 'char'"Keir Fraser2011-01-111-3/+3
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: Fix flask does not build because linking fails withKeir Fraser2011-01-111-1/+1
| | | | | | | missing dlopen/dlsym etc. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* xenctx: misc adjustmentsKeir Fraser2011-01-111-13/+28
| | | | | | | | | - fix off-by-one errors during symbol insertion and lookup - don't store the symbol type, as it wasn't needed at all so far and is only needed now at parsing time - don't insert certain kinds of symbols Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: restore x2apic pre-enabled check logicKeir Fraser2011-01-114-11/+24
| | | | | | | | | | | | | c/s 22475 removed the early checking without replacement, neglecting the fact that x2apic_enabled must be set early for APIC register accesses done during second stage ACPI table parsing (rooted at acpi_boot_init()) to work correctly. Without this, particularly determination of the boot CPU won't work, resulting in an attempt to bring up that CPU again as a secondary one (which fails). Restore the functionality, now calling it from generic_apic_probe(). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xenpaging: update machine_to_phys_mapping[] during page deallocationKeir Fraser2011-01-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The machine_to_phys_mapping[] array needs updating during page deallocation. If that page is allocated again, a call to get_gpfn_from_mfn() will still return an old gfn from another guest. This will cause trouble because this gfn number has no or different meaning in the context of the current guest. This happens when the entire guest ram is paged-out before xen_vga_populate_vram() runs. Then XENMEM_populate_physmap is called with gfn 0xff000. A new page is allocated with alloc_domheap_pages. This new page does not have a gfn yet. However, in guest_physmap_add_entry() the passed mfn maps still to an old gfn (perhaps from another old guest). This old gfn is in paged-out state in this guests context and has no mfn anymore. As a result, the ASSERT() triggers because p2m_is_ram() is true for p2m_ram_paging* types. If the machine_to_phys_mapping[] array is updated properly, both loops in guest_physmap_add_entry() turn into no-ops for the new page and the mfn/gfn mapping will be done at the end of the function. If XENMEM_add_to_physmap is used with XENMAPSPACE_gmfn, get_gpfn_from_mfn() will return an appearently valid gfn. As a result, guest_physmap_remove_page() is called. The ASSERT in p2m_remove_page triggers because the passed mfn does not match the old mfn for the passed gfn. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: drop paged pages in guest_remove_pageKeir Fraser2011-01-115-27/+72
| | | | | | | | | Simply drop paged-pages in guest_remove_page(), and notify xenpaging to drop its reference to the gfn. If the ring is full, the page will remain in paged-out state in xenpaging. This is not an issue, it just means this gfn will not be nominated again. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: update machine_to_phys_mapping[] during page-inKeir Fraser2011-01-111-0/+1
| | | | | | | | Update the machine_to_phys_mapping[] array during page-in. The gfn is now at a different page and the array has still INVALID_M2P_ENTRY in the index. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: make three functions staticKeir Fraser2011-01-111-3/+3
| | | | | | | xenpaging_init(), xenpaging_teardown() and xenpaging_evict_page() are only used in file scope, so they can be marked static. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: print page-in/page-out progressKeir Fraser2011-01-111-0/+2
| | | | | | | | | Now that DPRINTF is triggered only when the environment variable XENPAGING_DEBUG is found, make such a debug session actually useful by printing the entire page-out/page-in process. The 'Got event from Xen' message alone is not helpful. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: mkdir /var/lib/xen/xenpaging during make installKeir Fraser2011-01-111-0/+1
| | | | | | | pagefiles go to /var/lib/xen/xenpaging directory, create this directory during make install Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: specify policy mru_size at runtimeKeir Fraser2011-01-113-5/+27
| | | | | | | | | | The environment variable XENPAGING_POLICY_MRU_SIZE will change the mru_size in the policy at runtime. Specifying the mru_size at runtime allows the admin to keep more pages in memory so guests can make more progress. Its also good for development to reduce the value to put more pressure on the paging related code paths. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* xenpaging: remove domain_id and mfn from struct xenpaging_victimKeir Fraser2011-01-114-29/+18
| | | | | | | | | | | | Remove unused member 'mfn' from struct xenpaging_victim. xenpaging operates on a single guest, so it needs only a single domain_id. Remove domain_id from struct xenpaging_victim and use the one from paging->mem_event where needed. Its not used in the policy. This saves 4MB runtime data with a 1GB pagefile. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* x86-64: refine access permission check for wrmsr to MSR_FAM10H_MMIO_CONF_BASEKeir Fraser2011-01-111-2/+1
| | | | | | | We really don't want the mmconf window to move/disappear whenever we use is ourselves, not only when we enabled it. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* vt-d: Remove unnecessary 'inline' qualifiersKeir Fraser2011-01-101-13/+5
| | | | | | | Compiler knows best when to inline. Also this shows up an unused flush function which is removed by this patch. Signed-off-by: Keir Fraser <keir@xen.org>
* vtd: Remove unused 'align' local variable from iommu_flush_iotlb_psi().Keir Fraser2011-01-101-1/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* vtd: Fix up iommu_flush_iotlb_psi().Keir Fraser2011-01-101-7/+6
| | | | | | | 1. Change missed usage of 'align' to 'order' 2. Remove unused 'pages' parameter Signed-off-by: Keir Fraser <keir@xen.org>
* x86_64: don't use weak symbols on x86-64Keir Fraser2011-01-101-2/+3
| | | | | | | | | | | | | | | | | | Various gcc versions inline functions that are both weak and hidden, without even giving a warning. Certainly the risk exists that we'll see the problem again when another weak function gets introduced, but I don't see a way to protect us from that. Signed-off-by: Jan Beulich <jbeulich@novell.com> Just remove the weak attribute altogether. It's the only one in non-ia64-specific code. We can get teh same effect with ifdefs which although a bit unsightly is better than using compiler/linker features we cannot trust. Signed-off-by: Keir Fraser <keir@xen.org>
* x86-64: don't allow wrmsr to MSR_FAM10H_MMIO_CONF_BASE when Xen itself is ↵Keir Fraser2011-01-101-1/+12
| | | | | | using it Signed-off-by: Jan Beulich <jbeulich@novell.com>
* EPT/VT-d: bug fix for EPT/VT-d table sharingKeir Fraser2011-01-104-58/+45
| | | | | | | | | | | This patch makes following changes: 1) Moves EPT/VT-d sharing initialization back to when it is actually needed to make sure vmx_ept_vpid_cap has been initialized. 2) added page order parameter to iommu_pte_flush() to tell VT-d what size of page to flush. 3) added hap_2mb flag to ease performance studies between base 4KB EPT size and when 2MB and 1GB page size support are enabled. Signed-off-by: Allen Kay <allen.m.kay@intel.com>