aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update Xen version to 4.1.0-rc64.1.0-rc6Keir Fraser2011-02-282-2/+2
|
* Avoid possible live-lock in vcpu_migrateJuergen Gross2011-02-281-27/+44
| | | | | | | | | | | | If vcpu_migrate is called for two vcpus active on different cpus resulting in swapping the cpus, a live-lock could occur as both instances try to take the scheduling lock of the physical cpus in opposite order. To avoid this problem the locks are always taken in the same order (sorted by the address of the lock). Signed-off-by: Jueregn Gross <juergen.gross@ts.fujitsu.com>
* xl: allow config filename to precede optionsIan Jackson2011-02-251-0/+5
| | | | | | | | | | | | "xm create" supports options which follow the domain config filename. So xl should do as well. This is an ad-hoc fixup to the "xl create" command line parser. We should revisit the xl command line parser in 4.2. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Reported-by: W. Michael Petullo <mike@flyn.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: fix tap:aio disk parsingStefano Stabellini2011-02-251-4/+8
| | | | | | | Fix "tap:aio" parsing in xl after 22921 Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Handle failed xc_get_hvm_param in domain saveGeorge Dunlap2011-02-251-0/+4
| | | | | | | | | | | | | | The domain save code will read an HVM param, and if it's not zero, make an entry for it. However, if the hypercall fails for any reason, the data may not be written, and the value for the previous parameter may be written in the save file as the parameter that failed. Initialize the value to zero before each hypercall, so that in case of a failure, no value will be written. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* remus: fix incorrect disk_info_t initializationShriram Rajagopalan2011-02-251-2/+2
| | | | | | | | | Fix tapdisk-disktype.c's initialization for remus' disk_info_t, which is currently initializing the disk name with disk description. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Multi-device passthrough coldplug: do not wait for unstarted guestIan Jackson2011-02-253-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a PCI passthrough, the code checks to see whether there is an existing backend directory in xenstore with a nonzero "num_devs". If there isn't, it creates the backend directory with just the required device. If there is, it would assume that it was doing hotplug. If doing hotplug, it needs to set the "state" node in xenstore to "7" (reconfiguring) and thus avoid racing with the backend needs to wait for the backend to be "4" (connected). However during guest creation, the presence of "num_devs" doesn't necessarily mean hotplug. If we are still creating the initial xenstore setup (ie, adding devices as a subroutine of domain creation), we can just write the new devices to xenstore. So do that. This involves adding a new parameter "starting", indicating that we are still in domain creation, to libxl_device_pci_add_xenstore (a misnamed internal function) and its callers. Its callers include libxl_device_pci_add which we therefore split into an internal version with the new parameter, and an external version used only for hotplug by libxl-using applications. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: do not ignore errors from libxl_device_pci_add_xenstore in do_pci_addIan Jackson2011-02-251-2/+2
| | | | | | | | | | Without this, some failures of PCI device passthrough would be ignored. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl/libxl: treat vif "ip" fields as a simple stringIan Campbell2011-02-254-21/+10
| | | | | | | | | | | Currently we parse the string as an IPv4 address but this does not handle IPv6. We then format the IP address as a string into xenstore. Rather than add further parsing and formatting to support IPv6 simply treat the field as a string, which it turns out is all xend does. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86 NMI: continue in case of PCI SERR errosStefano Stabellini2011-02-251-16/+5
| | | | | | | | | | | Memory parity error is only valid for IBM PC-AT, newer machines use bit 7 (0x80) of 0x61 port for PCI SERR. While memory errors are usually reported via MCE. Rename the memory parity error handler to pci serr handler and print a warning and continue instead of crashing. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* cpupool: Avoid race when moving cpu between cpupoolsJuergen Gross2011-02-252-8/+38
| | | | | | | | | | | | Moving cpus between cpupools is done under the schedule lock of the moved cpu. When checking a cpu being member of a cpupool this must be done with the lock of that cpu being held. Hot-unplugging of physical cpus might encounter the same problems, but this should happen only very rarely. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Acked-by: Andre Przywara <andre.przywara@amd.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* amd-k8-mce: remove a stray break statementKeir Fraser2011-02-241-1/+0
| | | | | | | | | | | This was a leftover of converting from a switch to an if/else somewhere between 3.4 and 4.0. It also looks suspicious that MCEQUIRK_K7_BANK0 is not actually used anywhere. Perhaps amd_k7_mcheck_init() and amd_k8_mcheck_init() were intended to get (partially) folded? Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Fix mwait usage when doing cpu offlineKeir Fraser2011-02-241-1/+2
| | | | | | | | When cpu is offlined, it cannot access per cpu variable at all. This patch avoids using per_cpu variable inside play_dead. Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Wei Gang <gang.wei@intel.com>
* x86: add strictly sanity check for XSAVE/XRSTORWei Gang2011-02-219-21/+37
| | | | | | | | Replace most checks on cpu_has_xsave with checks on new fn xsave_enabled(), do additional sanity checks in the new fn. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Keir Fraser <keir.xen@gmail.com>
* libxl regression: don't require vncpasswd when password is empty stringChristoph Egger2011-02-181-1/+1
| | | | | | | | | | | Don't require an empty password when the guest config file has the entry vncpasswd='' Instead, do not require a password at all in this case. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl/xl: enable support for routed network configurations.Ian Campbell2011-02-185-0/+26
| | | | | | | | | | | | | Add "vifscript" option to xl.conf which configures the default vif script to use (default remains "vif-bridge") Write each VIFs "ip" option to xenstore so the vif-route script can pick it up. Reported-by: W. Michael Petullo <mike@flyn.org>. Signed-off-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>
* libxl: fix cd insert/ejectStefano Stabellini2011-02-181-3/+17
| | | | | | | | | | | | | | | When multiple disks are passed to libxl_wait_for_disk_ejects, watch the correct disk paths. Parse the backend type and backend domid from xenstore in libxl_event_get_disk_eject_info. libxl_event_get_disk_eject_info must return a valid string in disk->vdev, while at the moment is free'ed before returning. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* [IA64] fix missing header: asm/fpswa.hKUWAMURA Shin'ya2011-02-181-0/+1
| | | | | | | | This patch fixes the following error in recent kernel: ia64/asm/dom_fw_common.h:47:23: error: asm/fpswa.h: No such file or directory Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* libxl: Clear file object on successful munmap()Signed-off-by: Jim Fehlig2011-02-171-1/+7
| | | | | | | | Clear members of libxl_file_reference when file is successfully unmapped. Signed-off-by: Jim Fehlig <jfehlig@novell.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: remove the entries from xenstore when destroying a diskStefano Stabellini2011-02-173-4/+11
| | | | | | | | | Currently we are only changing the backend state but it is not enough to entirely destroying a disk device: remove all the entries from xenstore as well. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: create xenstore backend for empty disksStefano Stabellini2011-02-171-3/+1
| | | | | | | | We still need to create the vbd backend in xenstore even if the disk format is DISK_FORMAT_EMPTY. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: fix cdrom_insert parsingStefano Stabellini2011-02-171-27/+10
| | | | | | | | | Reuse the same code used to parse the disk line from the VM config file in cd_insert. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* docs: vbd-interface.txt: correct behaviour for modern Linux pv-on-hvmIan Jackson2011-02-171-3/+4
| | | | | | | | Modern PV on HVM kernels map hd* devices to corresponding xvd*. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: do slow resume after failed migration attemptIan Campbell2011-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | both of the current callers for libxl_domain_resume are calling after a migration has failed, one is failure to suspend on the sender and the other is failure to start on the destination, both leading to a resume attempt on the sender. However in the first case, failure to suspend, there is no guarantee that the guest has made it as far as the suspend hypercall and therefore the fast resume method, which frobs the hypercall return to indicate a cancelled suspend, cannot safely be used since it will corrupt %eax/%rax. For the second case, failure to start on destination, I don't think it really matters if the resume is fast or slow. Therefore always use the slow/uncooperative version of xc_domain_resume from libxl_domain_resume. This makes a PV domain which failed to suspend (e.g. because the core Linux PM infrastructure within the guest didn't allow it) recover gracefully. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl cpupool-numa-split: reduce number of Dom0 vcpusJuergen Gross2011-02-171-0/+23
| | | | | | | | | When reducing the number of physical cpus available for Domain-0 by xl cpupool-numa-split, reduce the number of vcpus accordingly. Signed-off-by: juergen.gross@ts.fujitsu.com Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl daemon: fix some memory leaksStefano Stabellini2011-02-171-4/+10
| | | | | | | | | | | If we are watching multiple disks we have to free multiple waiters. Free the event before continuing the loop. Destroy the disk device returned by libxl_event_get_disk_eject_info. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/examples: Remove obsolete bochsrc example file.Keir Fraser2011-02-171-20/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* Update Xen version to 4.1.0-rc6-preKeir Fraser2011-02-161-1/+1
|
* Added signature for changeset d2d27d989ebcKeir Fraser2011-02-161-0/+1
|
* Added tag 4.1.0-rc5 for changeset d2d27d989ebcKeir Fraser2011-02-161-0/+1
|
* Update Xen version to 4.1.0-rc54.1.0-rc5Keir Fraser2011-02-162-2/+3
|
* x86 p2m: Reinstate || errneously removed by 22924:86000076dceeKeir Fraser2011-02-161-1/+1
| | | | | | Fixes x86_32 build. Signed-off-by: Keir Fraser <keir@xen.org>
* MAINTAINERS: Explicitly list architecture maintainers and lists.Ian Campbell2011-02-161-0/+16
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* x86/shadow: unconditionally set the p2m/log-dirty allocation functions.Tim Deegan2011-02-161-4/+4
| | | | | | | | Otherwise enabling log-dirty mode on a PV guest that already has a shadow allocation can leave the alloc/free functions pointers NULL, and later try to dereference them. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86/mm: partially revert 21093:4a3e131f7498Tim Deegan2011-02-162-11/+7
| | | | | | | | | p2m internals should always gate on whether HAP is enabled for the domain, not whether a HAP paging mode is currently advertised. This lets us revert the change to hap_enable() that advertises the new mode before it's safe to use it. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* docs: document disk configuration string syntax (particularly, xl's syntax)Kamala Narasimhan2011-02-151-0/+154
| | | | | | Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: disk specification: special case vhdKamala Narasimhan2011-02-151-6/+16
| | | | | | | | | | Special case how we validate vhd image files. Without this patch when tap:aio:vhd prefixed image files are specified in the config file, disk validation and thus vm creation will fail. Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: disk specification interface changeKamala Narasimhan2011-02-1513-168/+216
| | | | | | | | | | | | | | | | | | | | | | | | | Currently we pile all the backend and format information pertaining to disk option in a single enum. This check-in separates the two and uses two enums, one for disk format and another for disk backend. This helps clearly differentiate between disk format and backend within the implementation and also helps cleanup the code in this area in preparation for the impending parser revamping to be done post 4.1. Along with separating format and backend, this check-in also removes unwanted types and renames variables in the disk interface and fixes the code affected by the interface changes. In specific, here are the disk interface changes made - In libxl_device_disk structure physpath was renamed to pdev_path, virtpath was renamed to vdev, phystype was removed and replaced with backend and format enums. Also previously a single enum libxl_disk_phystype held the values for qcow, qcow2, vhd, aio, file, phy, empty and that got refactored into two enums, libxl_disk_format to hold unknown, qcow, qcow2, vhd, raw, empty and libxl_disk_backend to hold unknown, phy, tap and qdisk. Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Include cpupool example in /etc/xenGeorge Dunlap2011-02-151-0/+1
| | | | | | | | | xl cpupool-create at the moment requires a config file. Make sure to include the example config file in the install. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: fix migrate for HVM guestsIan Campbell2011-02-141-51/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to 22909:6868f7f3ab3f libxl would loop waiting simultaneously for the domain the acknowledge a PV suspend request (by clearing the XenStore node) and for the domain to actually suspend. For HVM guests without PV drivers this same loop was simply waiting for the domain to suspend. In 22909:6868f7f3ab3f the original loop was split into two loops (first waiting for the acknowledgement and then for the actual suspend). This caused libxl to incorrectly wait for an HVM guest without PV drivers to acknowledge the XenStore request, which is not something it would ever do. Fix this by only waiting for an acknowledgement from a guest which contains PV drivers. Previously we were also making the request regardless of whether the guest had PV drivers, change that to only make the request if the guest has PV drivers. Lastly there is no need to sample HVM_PARAM_ACPI_S_STATE twice and not doing so simplifies the test for PVHVM vs. normal HVM guests. Tested with: Windows with GPL PV drivers (event channel suspend mode) Windows without PV drivers (xc_domain_shutdown mode) Linux PV (PV with XenBus control node mode) Linux HVM (PVHVM with XenBus control node mode (*)) Linux HVM (xc_domain_shutdown mode) (*) In this case the kernel didn't actually suspend, due to: PM: Device input1 failed to suspend: error -22 xen suspend: dpm_suspend_start -22 which may be a misconfiguration in my setup or may be a kernel bug, but the libxl side dealt with this as gracefully as it could. Signed-off-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>
* xl: Support more than 32 vcpus for xl vcpu-setJuergen Gross2011-02-143-7/+13
| | | | | | | | | | | | xl vcpu-set currently uses a 32 bit mask for specifying which cpus are to be set online. This restricts the number of cpus supported by this command. The patch switches to libxl_cpumap, the interface of libxl_set_vcpuonline() is changed accordingly. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: correct xl cpupool-create with extra parametersJuergen Gross2011-02-141-7/+6
| | | | | | | | | xl cpupool-create won't take always extra parameters specified on the command line, as a 0-byte is missing at the end of the configuration file contents. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: implement trigger s3resumeStefano Stabellini2011-02-141-1/+7
| | | | | | | | | | This is the equivalent of xm trigger s3resume and it is implemented the same way: using an ACPI state change. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: Fix S3 resume for HPET MSI IRQ caseWei Gang2011-02-141-5/+13
| | | | | | | | | | | | | | Jan Beulich found that for S3 resume on platforms without ARAT feature but with MSI capable HPET, request_irq() will be called in hpet_setup_msi_irq() for irq already setup(no release_irq() called during S3 suspend), so that always falling back to using legacy_hpet_event. Fix it by conditional calling request_irq() for 4.1. Planned to split the S3 resume path from booting path post 4.1, as Jan suggested. Signed-off-by: Wei Gang <gang.wei@intel.com> Acked-by: Jan Beulich <jbeulich@novell.com>
* MAINTAINERS: Update Remus pathsIan Campbell2011-02-141-0/+4
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
* MAINTAINERS: Add Remus maintainer.Keir Fraser2011-02-141-0/+5
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* Revert 22900:a0ef80c99264Keir Fraser2011-02-141-3/+0
| | | | | | The check it adds is already present in the function's sole caller. Signed-off-by: Keir Fraser <keir@xen.org>
* QEMU_TAG updateIan Jackson2011-02-111-4/+3
|
* tools/hotplug/Linux: Use correct device name for vifs in setup scriptsIan Jackson2011-02-113-28/+28
| | | | | | | | | | | | | | In vif-common.sh, set the shell variable "dev" to the new interface name when interfaces are renamed, and consistently use this variable in all the vif scripts. This fixes hotplug of renamed interfaces. From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> From: Patrick Scharrenberg <pittipatti@web.de> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Patrick Scharrenberg <pittipatti@web.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl/xl: improve behaviour when guest fails to suspend itself.Ian Campbell2011-02-113-12/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PV suspend protocol requires guest co-operating whereby the guest must respond to a suspend request written to the xenstore control node by clearing the node and then making a suspend hypercall. Currently when a guest fails to do this libxl times out and returns a generic failure code to the caller. In response to this failure xl attempts to resume the guest. However if the guest has not responded to the suspend request then the is no guarantee that the guest has made the suspend hypercall (in fact it is quite unlikely). Since the resume process attempts to modify the return value of the hypercall (to indicate a cancelled suspend) this results in the guest eax/rax register being corrupted! To fix this change libxl to do the following: * Wait for the guest to acknowledge the suspend request. - on timeout cancel the suspend request. - if cancellation is successful then return a new error code to indicate that the guest is not responding. - if the cancel does not succeed then we raced with the guest which actually did acknowledge at the last minute, so continue. * Wait for the guest to suspend. - on timeout return the standard error code as before * Guest successfully suspended, return success. Lastly in xl do not attempt to resume a guest if it has not responded to the suspend request. Tested by live migration of PVops kernels which either ignore the suspend request, have already crashed and those which suspend/resume correctly. In the first two cases the source domain is left alone (and continues to function in the first case) and in the third the migration is successful. Signed-off-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>