aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge4.1.0-branchedIan Jackson2011-03-032-3/+5
|\
| * x86, libxc: Fix xc_translate_foreign_address() for PV guests ofKeir Fraser2011-03-032-3/+5
| | | | | | | | | | | | | | different bitness than dom0 (32-bit vs 64-bit). Original patch by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Keir Fraser <keir@xen.org>
* | tools: gtracestate: fix several problemsWei Gang2011-03-031-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed problems include: * previously just print out a error instead of help info while running without cmdline parameters. * -u & -n lead to Segmentation fault. * -c and then use default ranges, the default ranges is not 50us... but 50000/tsc2us.... Signed-off-by: Wei Gang <gang.wei@intel.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | libxc: Missed one when replacing read_exact with RDEXACT macroGeorge Dunlap2011-03-031-1/+1
| | | | | | | | | | | | | | | | This corrects an error in 21488:dd6bbdc42033. 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: correctly initialise yylinenoIan Jackson2011-03-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes xl would read an uninitialised variable when printing error messages, resulting in things like this: /etc/xen/thing.cfg:1030057088: config parsing error near `"ws08r2-x64-2': lexical error This is because yylineno is a variable inside the scanner created by yylex_init, but it is not initialised by yylex_init. (Debian bug #616099.) On the way I discovered a lot of complication to do with the calling convention between bison and flex in reentrant parsers/scanners which use locations (Debian bug #616100) but as the above change makes the current code in xen-unstable work I don't propose to do anything else about that now in our tree. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Tested-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* | xl: add "device_model_args" to pass arbitrary extra arguments to device modelIan Campbell2011-03-031-20/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libxl support was already in place so simply plumb it through. This allows for passing debug options to the device model and provides a method to work around missing toolstack functionality. e.g. xl does not current support floppy disks but adding: device_model_args = [ "-fda", "/scratch/fdboot.img" ] allowed me to boot FreeDOS from a floppy image. I was unable to find any equivalent functionality in xend so this is a new xl feature. Moved xmalloc/xrealloc earlier to allow use from parse_config_data. 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>
* | libxc: fix incorrect scanning of pfn array in pagebuf during migrationShriram Rajagopalan2011-03-031-4/+4
|/ | | | | | | | | | | | | | | | | | | xc_domain_restore.c:apply_batch function makes two passes over the pfn_types array in pagebuf to allocate the needed MFNs. The curbatch parameter to this function specifies the array offset in pfn_types, from where the current scan should begin. But this variable is not taken into account (index always starts at 0) during the two passes. While this [bug] does not manifest itsef during save/restore or live migration, under Remus, xc_domain_restore fails due to corrupt guest page tables. (This appears to have been broken by 21588:6c3d8aec202d which reverted two changesets from before Remus support was added and hence reintroduced some none-Remus compatible bits.) Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> 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>
* credit2: Add more debuggingGeorge Dunlap2011-03-031-0/+26
| | | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: Fix cpu online/offline bug: mce memory leak.Liu, Jinsong2011-03-021-35/+57
| | | | | | | | | | | | | | | Current Xen mce logic didn't free mcabanks. This would be a memory leak when cpu offline. When repeatly do cpu online/offline, this memory leak would make xenpool shrink, and at a time point, will call alloc_heap_pages --> flush_area_mask, which ASSERT(local_irq_is_enabled()). However, cpu online is irq disable, so it finally result in Xen crash. This patch fix the memory leak bug, and tested OK over 50,000 round cpu online/offline. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Signed-off-by: Keir Fraser <keir@xen.org>
* x86: Disable IRQs and do WBINVD first in play_dead().Keir Fraser2011-03-021-4/+5
| | | | | | | | | | When we advertise we are dead via cpu_exit_clear(), it is no longer safe to handle interrupts as our per-cpu vars can go away. In future, we may want to think about NMI handling in this scenario too. Signed-off-by: Keir Fraser <keir@xen.org>
* x86: Add warning comment explaining restrictions to play_dead().Shan Haitao2011-03-021-0/+9
| | | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Keir Fraser <keir@xen.org>
* Update Xen version to 4.1.0-rc7-preKeir Fraser2011-02-281-1/+1
|
* Added signature for changeset 7b6791dbfecdKeir Fraser2011-02-281-0/+1
|
* Added tag 4.1.0-rc6 for changeset 7b6791dbfecdKeir Fraser2011-02-281-0/+1
|
* 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>