aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x86: s3: ensure CR4.MCE is enabled after mcheck_init()4.0.0-rc7Keir Fraser2010-03-231-1/+4
| | | | | | | | Changeset 21045: 7751288b1386 introduces a potential issue: CR4.MCE is enabled before mcheck_init() -- thought looks I don't meet with an actual issue with this, we'd better fix it. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* Added tag 4.0.0-rc7 for changeset b8f8b07e0076Keir Fraser2010-03-231-0/+1
|
* Update Xen version to 4.0.0-rc7Keir Fraser2010-03-232-2/+3
|
* Update QEMU_TAG to 73cef2cca413c17f314724c66194315038ea66c3Keir Fraser2010-03-231-3/+3
|
* xend: fix traceback in pci.pyKeir Fraser2010-03-231-0/+3
| | | | Signed-off-by: Jim Fehlig <jfehlig@novell.com>
* x86_32: Relocate multiboot modules to below 1GB.Keir Fraser2010-03-233-2/+22
| | | | | | | | Otherwise Xen cannot access them later during boot. GRUB2 places modules as high as possible below 4GB, which has been causing boot failure. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* No cpu_add_remove_lock in do_boot_cpu.Keir Fraser2010-03-221-2/+0
| | | | | | | | The do_boot_cpu() will be called when system booting or CPU online. When system booting, we don't need hold this lock. When system online, the lock is held already by cpu_up. Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* Do not spin on locks that may be held by stop_machine_run() callers.Keir Fraser2010-03-223-6/+33
| | | | | | | | | | | | | | | | | | Currently stop_machine_run() will try to bring all CPUs to softirq context, with some locks held, like xenpf_lock or cpu_add_remove_lock etc. However, if another CPU is trying to get these locks, it may cause deadlock. This patch replace all such spin_lock with spin_trylock. For xenpf_lock and sysctl_lock, we try to use hypercall_continuation, so that we will not cause trouble to user space tools. For cpu_hot_remove_lock, we simply return EBUSY if failure, since it will only impact small number of user space tools. In the end, we should try to make the stop_machine_run as spinlock free. Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* ns16550: Do not re-init active timer on S3 resume.Keir Fraser2010-03-221-1/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Fix vcpu hotplug bug: transfer vcpu_avail hex string to qemuKeir Fraser2010-03-202-5/+4
| | | | | | | | | | | | | | | Currently qemu has a bug: When maxvcpus > 64, qemu will get wrong vcpu bitmap (s->cpus_sts[i]) since it only get bitmap from a long variable. This patch, cooperate with another qemu patch, is to fix this bug. This patch transfer a vcpu_avail string in a hex string format, so that at qemu side it's more easier to get vcpu bitmap from hex string, especially when many vcpus, like more than 64. (Also update QEMU_TAG for matching qemu-side update) Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* cpufreq: make non-verbose by defaultKeir Fraser2010-03-184-34/+59
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: fix dom0 S3 when x2apic is used.Keir Fraser2010-03-183-5/+6
| | | | | | | | | | | | 1) Some variables and functions in xen/arch/x86/genapic/x2apic.c should not be marked with __init* as they will be used during s3 resume; 2) In do_suspend_lowlevel -> restore_rest_processor_state -> mcheck_init, lapic is accessed, but x2apic hasn't been re-enabled yet (x2apic is re-enabled() in device_power_up -> lapic_resume). The patch moves mcheck_init to a later place. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* Fixes for 21040:b64a8d2a80ad "support affinity for >64 CPUs"Keir Fraser2010-03-182-11/+6
| | | | Signed-off-by: James (Song Wei) <jsong@novell.com>
* Improve graphical console performanceKeir Fraser2010-03-171-6/+25
| | | | | | | | | | As it is pretty pointless to clear unused parts of a line over and over again, keep track of how much of a line was actually written to and avoid clearing parts of the screen that are known to already be clear. With this, scrolling speed becomes comparable to that of Linux' VESA console. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: suppress pointless Xen messages from ioapic_guest_write()Keir Fraser2010-03-171-4/+10
| | | | | | | | | | | Previously, these messages were only issued when old and new RTE differed. Make it so again (requiring adjustment of the guest provided RTE as that no longer holds a real vector). While at it, also make the "allocated vector for irq" message more useful and occur when what it says really happened. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Fix a race condition for cpufreq dbs timer while S3 resumingKeir Fraser2010-03-171-0/+1
| | | | | | | | | | The cpufreq_dbs_timer_suspend/resume may race with dbs_timer_init while s3 resuming before this patch. This patch along with cset 21030 fix the bug 1586 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1586. Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Wei Gang <gang.wei@intel.com>
* libxc: Support set affinity for more than 64 CPUs.Keir Fraser2010-03-173-29/+83
| | | | | | | | There are more than 64 cpus on new intel platform especially on NUMA system, so that we need break the pcpu limit (that is 64) when set affinity of a VCPU. Signed-off-by: James (song wei) <jsong@novell.com>
* VT-d: reduce default verbosityKeir Fraser2010-03-178-108/+133
| | | | | | | | | | | | | | | Introduce a new sub-option "verbose" to "iommu=", and hide most (debugging) messages when that option is not specified. Particularly messages printed after time management was initialized can, on sufficiently large systems and with a graphical console, lead to time management issues (therefore a call to process_pending_softirqs() also gets added in case the new sub-option is being used). While touching that code, also convert all improper uses of gdprintk() to dprintk(), and convert all boolean iommu config variables to bool_t residing in the .data.read_mostly section. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Increase default console ring allocation size and reduce default verbosityKeir Fraser2010-03-1716-79/+171
| | | | | | | | | | | | | | | | | | | | In order to have better chance that relevant messages fit into the ring buffer, allocate a dynamic (larger) one in more cases, and make the default allocation size depend on both the number of CPUs and the log level. Also free the static buffer if a dynamic one was obtained. In order for "xm dmesg" to retrieve larger buffers, eliminate pyxc_readconsolering()'s 32k limitation resulting from the use of a statically allocated buffer. Finally, suppress on x86 most per-CPU boot time messages (by default, most of them can be re-enabled with a new command line option "cpuinfo", some others are now only printed more than once when there are inconsistencies between CPUs). This reduces both boot time (namely when a graphical console is in use) and pressure on the console ring and serial transmit buffers. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xend: Remove warning message from xend.logKeir Fraser2010-03-171-0/+1
| | | | | | | | | | When I created a domain, I saw the following warning message in xend.log. This patch removes the message from xend.log. [2010-03-16 19:04:16 3623] WARNING (XendConfig:872) Unconverted key: Description Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* blktap/fs-back: Build fixes for Fedora 13Keir Fraser2010-03-157-2/+7
| | | | | | | | | | | | | 1. Some files use stat, mkfifo, mkdir etc. without including sys/stat.h 2. Some programs link against libpthread without a -lpthread compile option. The compile used to work if this library happened to be used by one of the other libraries that was being linked against, but Fedora 13 has stopped allowing this. From: M A Young <m.a.young@durham.ac.uk> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: adjust Dom0 initial memory allocation strategyKeir Fraser2010-03-151-1/+22
| | | | | | | | | | | | | | Simply trying order-9 allocations until they won't succeed anymore may consume unnecessarily much memory from the DMA zone (since the page allocator will try to fulfill the request by using memory from that zone when only lower order memory blocks are left in all other zones). To avoid using DMA zone memory, make alloc_chunk() try to allocate a second smaller chunk and use that one in favor of the first one if it came from a higher addressed memory. This way, all memory outside the DMA zone will be consumed before eating into that zone. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Reduce boot-time memory fragmentationKeir Fraser2010-03-152-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On certain NUMA configurations having init_node_heap() consume the first few pages of a new node's memory for internal data structures leads to unnecessary memory fragmentation, which can - with sufficiently many nodes - result in there not remaining enough memory below 4G for Dom0 to set up its swiotlb and PCI-consistent buffers. Since alloc_boot_pages() generally consumes from the end of available regions, make init_node_heap() prefer the end of such regions too (so that fragmentation occurs at only one end of a region). (Adjustment from first version: Use the tail of the region when the end addresses alignment is less or equal to the beginning one's, not just when it's less.) Further, in order to prefer allocations from higher memory locations, insert memory regions in reverse order in end_boot_allocator(), with the exception of inserting one region residing on the boot CPU's node first (for the statically allocated structures - used for the first node seen - to be used for this node). Finally, reduce MAX_ORDER on x86 to the maximum useful value (1Gb), so that the reservation of a page on node boundaries (again leading to fragmentation) can be avoided as much as possible (having node boundaries on less the 1Gb aligned addresses is expected to be rare, if found in practice at all). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* pygrub: further improve grub2 supportKeir Fraser2010-03-151-11/+16
| | | | | | | | | | | | | | * Improve syntax error messages to say what actually went wrong instead of giving an arbitrary and basically useless integer. * Improve handling of quoted values used with the "set" command, previously only the default variable was special cased to handle quoting. * Allow for extra options to the menuentry command, syntax now appears to be menuentry "TITLE" --option1 --option2 {...} Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxenlight: fix segfault when domid_to_name returns NULLKeir Fraser2010-03-151-3/+3
| | | | | | | | | | | | | The function libxl_domid_to_name() can return NULL if the path /local/domain/%d/name does not exist. This causes a segfault if the NULL name is later passed as a value to libxl_xs_writev(). I'm hitting this making a call to libxl_device_vfb_add() from my graphical switcher application. This patch modifies xs_writev() and libxl_xs_writev() to skip NULL values. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
* Fix incremental access to hypervisor console logKeir Fraser2010-03-151-1/+1
| | | | | | | "xenconsoled --log=hv" outputs duplicated messages to /var/log/xen/hypervisor.log. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* x86: Fix possible S3 suspend hangsKeir Fraser2010-03-152-2/+4
| | | | | | | | | It is possible for cpu to become offlined before irq disabled in idle loop, which will cause this cpu stay in C state and can't wakeup to play dead. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Yu Ke <ke.yu@intel.com>
* hotplug: Avoid race condition when creating or destroying network bridgesKeir Fraser2010-03-151-0/+10
| | | | | | | | | | | | | | | I saw the following message when I created or destroyed two bridges by using network-bridge script at same time. Of course names of the bridges are different. But, a temporal name "tmpbridge" is used by the script to create or destroy the bridges. I think that the message was shown by "tmpbridge". SIOCSIFNAME: File exists This patch avoids race condition when creating or destroying the bridges. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* x86: adjust available memory calculation for Dom0 constructionKeir Fraser2010-03-111-20/+18
| | | | | | | | | | | | With a large number of CPUs, the amount of memory needed to construct the vCPU structures for Dom0 becomes significant and hence should be accounted for when calculating the amount of memory to pass to Dom0. Signed-off-by: Jan Beulich <jbeulich@novell.com> Add code comments and clean up compute_dom0_nr_pages() invocation. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* VT-d: various initialization fixesKeir Fraser2010-03-112-52/+42
| | | | | | | | | | | | | | | | | | | | | | | Detect invalid/unsupported configurations in iommu_alloc() - offsets read from hardware must not lead to exceeding a single page (since only that much gets mapped). This covers the apparently not uncommon case of the address pointed to by a DMAR reading as all ones (Linux for example also checks for this). Further correct error handling of that function: Without storing the allocated "struct iommu" instance in the drhd, iommu_free() won't do anything, and hence all successfully set up pieces would be leaked. Also keep iommu_free() from calling destroy_irq() when no irq was ever set up. Additionally, clear_fault_bits() has no need to read the capabilities field from I/O memory - it's already cached in "struct iommu". Finally, simplify print_iommu_regs() and its output, and actually use this function. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xsm/flask: Eliminate "array subscript above array bounds" warningKeir Fraser2010-03-111-9/+12
| | | | | | | | gcc 4.4 incorrectly reports an "array subscript above array bounds" warning in the flask policydb code, causing the build to fail with FLASK_ENABLE=y. Rework the code slightly to make it go away. Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
* iommu: clear the iommu_* variables to 0 when iommu is not enabled.Keir Fraser2010-03-111-0/+5
| | | | | | | With "iommu=0" xen parameter, the 3 iommu_* variables are still left to the default value 1 -- this is misleading... Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* Fix 21020:3198a2e81d38Keir Fraser2010-03-111-1/+1
| | | | | | | | | This has a pretty serious bug. ioapic_to_iommu() gets returned drhd->iommu. However, drhd->iommu isn't allocated until part of iommu_setup(), which is called after enable_x2apic(). Has this ever worked? Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* VTd: Ignore HPET/IOAPIC decls in DRHD scopesKeir Fraser2010-03-111-1/+7
| | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* Added tag 4.0.0-rc6 for changeset b4a1832a916fKeir Fraser2010-03-091-0/+1
|
* Update Xen version to 4.0.0-rc64.0.0-rc6Keir Fraser2010-03-092-2/+2
|
* Intel VT-D: Don't turn x2APIC if there is a missing DRHD entry for the IOAPIC.Keir Fraser2010-03-091-0/+6
| | | | | | | | | | | Follow the Linux kernel lead in which the x2APIC is only turned on only if there is an DRHD entry for all IOAPICs in the system. If we don't do this we might enable x2APIC and see various devices not covered by the IOAPIC mentioned in DRHD, not receive any interrupts. From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tmem: typo causes incorrect return on out-of-memoryKeir Fraser2010-03-091-1/+1
| | | | | | | | This classic typo in tmem would result in a false positive report on a tmem "put" operation if a (unfragmented) page of memory is completely unavailable. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* stdvga: avoid bogus warning messageKeir Fraser2010-03-091-2/+3
| | | | | | | | Prevents stdvga to print the 'unsupported mmio request type' warning when the actual request type is 'IOREQ_TYPE_COPY'. This avoids confusion. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Fix grant table debug key.Keir Fraser2010-03-091-10/+15
| | | | | | Must skip domains with gt_version==0. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Disable VCPUOP_register_vcpu_time_memory_area.Keir Fraser2010-03-091-0/+6
| | | | | | Its implementation is buggy and causes memory corruption. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Disable debug build by default.Keir Fraser2010-03-091-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add cpufreq sanity checkKeir Fraser2010-03-092-0/+16
| | | | | | | | | | | This fixes bug 1585 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=3D1585 root cause: with incorrect BIOS info, cpufreq driver may not start. in this case, if user use xenpm to manipulate cpufreq driver, NULL pointer will cause xen panic. this patch add the sanity check and warning info to fix this issue. Signed-off-by: Yu Ke <ke.yu@intel.com>
* hvm: correct time offset update in RTC write emulationKeir Fraser2010-03-091-2/+2
| | | | | | | | | mktime takes a month in 1..12 form while tm->tm_mon contains 0..11 so we need to add 1. Without this fix setting the month back or forward a month inside the guest would lead to the wrong number of days being added/subtracted. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* x86: Increase the default NR_CPUS to 128.Keir Fraser2010-03-091-1/+1
| | | | | | | | | | We have newer systems which have more than 64 CPUs, and users often complain some cpus can't be waken up when play with Xen. Certainly, MAX_PHYS_CPUS option also can support more CPUs, but it is still inconvenient for them, so change the default value to 128. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
* libxl: Do not delete checked-in flex/bison outputs.Keir Fraser2010-03-081-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: a little bit of cleanupKeir Fraser2010-03-082-11/+3
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Fix compat mode type checking macros for gcc 4.5Keir Fraser2010-03-082-30/+46
| | | | | | | Just like with the __RING_SIZE() macro, the compat mode type checking macros also need changing in order to work with gcc 4.5. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* cpu hotplug: Add the missed rcu init for new added CPUKeir Fraser2010-03-081-0/+2
| | | | Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
* PV-GRUB: Fix gzip support and iso support on x86_64Keir Fraser2010-03-081-0/+67
| | | | Signed-off-by: Samuel Thibault <sthibault@debian.org>