Commit Graph
23708 Commits
Author SHA1 Message Date
Ian Campbell 68b5b85595 libxc: remove obsolete comment.
Seems to predate Xen 3.0...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2011-07-16 09:18:45 +01:00
Jan Beulich b0b0525d19 x86: fix guest migration after c/s 20892:d311d1efc25e
Guests would not manage to run successfully after being migrated to a
host having sufficiently much more memory than the host they were
originally started on.

Subsequently the plan is to re-enable the changes behavior under the
control of a guest kernel announced feature flag.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2011-07-16 09:18:21 +01:00
KUWAMURA Shin'ya 8e62cdfefe [IA64] Fix ia64 build for 22396:c1b7aae86cf5
The header xen/include/xen/wait.h conflicts with
xen/include/asm-ia64/linux/wait.h on ia64.
This patch fixes it.

# xen/include/xen/wait.h introduced by 22396:c1b7aae86cf5.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2011-07-16 09:17:20 +01:00
KUWAMURA Shin'ya 5b34724872 [IA64] fix warning: "in_atomic" redefined
This patch fixes `warning: "in_atomic" redefined'.
# It is introduced by 22395:deb438d43e79.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2011-07-16 09:16:48 +01:00
Keir Fraser d3566714ee xen/irq: Make it obvious that desc->status fields comprise a bitfield.
Signed-off-by: Keir Fraser <keir@xen.org>
2011-07-16 09:15:56 +01:00
Shan Haitao cebdd97736 Remove MSI IRQ storms prevention logic
The reason is:
1. The logic has negative impact on 10G NIC performance (assigned to
guest) by lowering the interrupt frequency that Xen can handle.
2. Xen already has IRQ rate limit logic, which can also help to
prevent IRQ storms.

Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2011-07-16 09:12:19 +01:00
Keir Fraser 3f3d4fd3b5 xen/libxc: Clean up pv_cpuid switch statements.
Signed-off-by: Keir Fraser <keir@xen.org>
2011-07-16 09:09:46 +01:00
David Vrabel 508424df09 xen/libxc: set CPUID topology leaf as unsupported for PV guests
The result of a CPUID Extended Topology Enumeration leaf for PV guests
is invalid as the level in ECX is ignored.  This can cause some guests
to loop endlessly when trying to enumerate the topology.

Since the physical topology isn't useful to PV guests set the topology
leaf as unsupported.

Guests affected include Linux kernels prior 2.6.32 where a workaround
was applied ("xen: mask extended topology info in cpu",
82d6469916c6fcfa345636a49004c9d1753905d1).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2011-07-16 09:05:45 +01:00
Roger Pau Monne 2e8644e1d9 tools: xencommons NetBSD init script: Multiple bugfixes and improvements
Added a cleanup of the xenstore database, to purge old entries,
prevented the restart of xenstore and set Domain-0 name.  Also
replaced the sleep 5 (wait for xenstore to come up) with the method
used in the linux init script.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-15 18:22:03 +01:00
Ian Campbell c57de7d5ae xl: log domain suspension.
Other shutdown reasons all end up saying something useful while
suspend does not. With this patch the log looks like:
  Domain 670 is dead
  Domain has suspended.
  Done. Exiting now

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>
2011-07-15 18:13:28 +01:00
Ian Campbell cf5cc0aa31 pygrub: prefer Grub2 to Grub1
If a VM image has grub2 installed it is likely the one we need to be using.

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>
2011-07-15 18:12:55 +01:00
Roger Pau Monne 22771413fb xenbackendd: fix mistaken treatment of unknown backend (eg console) as VIF/VBD
Fixed a cleanup of a variable used in a loop and added a debug message.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-15 18:09:49 +01:00
Ian Campbell 72be5b5baf libxl: add LIBXL_MAC_{FMT,FMTLEN,BYTES}
Modelled after LIBXL_UUID_... (where I also add FMTLEN).

signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:24:19 +01:00
Ian Campbell 30c794d5c5 libxl: rename testenum->testidl
I plan to add some non-Enumeration tests.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:24:11 +01:00
Ian Campbell 2763c22eba libxl: IDL: bring command line handling in genwrap.py into one place.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:36 +01:00
Ian Campbell 12073e5a69 libxl: IDL: add helper to generate references to Aggregate type members.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:36 +01:00
Ian Campbell f5f648c462 libxl: IDL: remove libxl_C_type_of
It's not really adding much...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:36 +01:00
Ian Campbell bd7f7849f2 libxl: IDL: refactor code to massage a type into a function argument
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:36 +01:00
Ian Campbell 48db030b86 libxl: IDL: handle generation of pass-by-reference arguments.
Up until now everything with a destructor function happened to be
pass-by-reference so the current code worked but this will not be the case for
*_to_string and *_to_json. Put some infrastructure in place and use it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:36 +01:00
Ian Campbell 2cbaaf0d42 libxl: IDL: s/anonynous/anonymous/
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:36 +01:00
Ian Campbell 2407671d89 build: define "move-if-changed" make macro.
Use it to replace various places which (should) use the
	if ! cmp -s ...; then mv ....; fi
pattern.

Also add an else clause to cleanup the unchanged temporary file.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
2011-07-14 13:22:35 +01:00
tools/pygrub: fix solaris kernel sniff 872ecdc9b5 tools/pygrub: fix solaris kernel sniff
Solaris 11 build 163+ removes '/platform/i86xpv/kernel/unix' and only the
64-bit PV kernel file '/platform/i86xpv/kernel/amd64/unix' exists.

This patch fixes the detection.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Frank Che <frank.che@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-14 18:09:58 +01:00
Stefano Stabellini f4766463d4 libxl: Fix segfault in get_all_assigned_devices
pcidevs is an array of ndev elements (ndev is the number of pci devices
assigend to a specific domain), but we access pcidevs + *num
where *num is the global number of pci devices assigned so far to all
domains in the system.

Fix the issue removing pcidevs and just realloc'ing *list every time we
want to add a new pci device to the array.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-14 15:49:49 +01:00
Keir Fraser 3d25064060 ns16550: Clean up code style
Signed-off-by: Keir Fraser <keir@xen.org>
2011-07-14 09:43:37 +01:00
Ross Philipson 6ff7e8e990 Placeholder for V4V hypercall and VIRQ numbers
The V4V Xen functionality is currently in our product trees for
XenClient b= ut is not yet in a state suitable for submission. We hope
to make available= the rest of the V4V functionality in the not too
distant future. Since the= se values are already in use in our
product, we would like to reserve them = in open source to prevent
issues or incompatibilities down the road.



Signed-off-by: Ross Philipson <ross.philipson@citrix.com>
2011-07-14 09:35:40 +01:00
Ian Campbell 56dfa6ced4 docs: correct typo in vbd-interface.txt
d1 is xvdb not xvda.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2011-07-14 09:33:38 +01:00
Keir Fraser f9aa7ce1a0 merge 2011-07-14 09:33:02 +01:00
Konrad Rzeszutek Wilk bc91eecaa1 doc: Update the com1,com2 section with pci and amt options.
The "xen: Automatically find serial port on PCI/PCIe and AMT devices."
provides the functionality to probe for the I/O base using the
"pci" and "amt" option. Update the documentation with this fact.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-07-14 09:31:53 +01:00
Konrad Rzeszutek Wilk e2da9f6845 xen: Update pci_uart_config to save the BAR1 contents if com2 is used
Jan Beulich pointed out that the pci_uart_config can be called for
com2 and we should probe the second BAR instead of the first one.

This patch will probe the BAR0 if it is com1, and BAR1 if its com2.
It also cleans up some of the whitespace problems and changes the
name of the parameter and function from 'magic' to 'pci'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-07-14 09:31:12 +01:00
Konrad Rzeszutek Wilk ac17df064f xen: Restore the BAR and PCI command after resume.
Certain PCI serial cards just don't want to remember
what they are when they come out of resume. Save
the BAR and the PCI command values before we suspend and
write them back in when we resume.

Signed-off-by: Roger Cruz <roger.cruz@virtualcomputer.com>
Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-07-14 09:30:25 +01:00
James Mckenzie 9738db88f6 xen: Automatically find serial port on PCI/PCIe and AMT devices.
Instead of having to manually look the right I/O port on the PCI
devices or AMT devices, lets probe the card and find that
automatically.

This means that you don't have to have this:
 com1=115200,8n1,0xd800,0

But instead can have
 com1=115200,8n1,magic

Or if you have AMT:
 com1=19200,8n1,amt

Signed-off-by: James Mckenzie <jamesmck@bob.uk.xensource.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com>
2011-07-14 09:28:23 +01:00
Jan Beulich d0ae97d413 x86-64: properly handle alias mappings beyond _end
Changeset 19632:b0966b6f5180 wasn't really complete: The Xen image
mapping doesn't end at _end, but a full 16Mb gets mapped during boot
(and never got unmapped so far), hence all of this space was subject
to alias mappings when it comes to cache attribute changes. Unmap all
full large pages between _end and the 16Mb boundary, and include all
other pages beyond _end when checking for aliases.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2011-07-14 09:26:13 +01:00
Ian Jackson 643b106b40 libxl: do not use tap disk backend other than for raw and vhd
tap does not support qcow/qcow2; update disk_try_backend accordingly.

Break out the "backend not suitable for this format" message so it can
be reused.  Remove now-redundant reporting from
libxl_device_disk_local_attach and replace with abort().

Reported-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>
2011-07-08 18:35:24 +01:00
Zhigang Wang bd86a4611d tools: fix shared loop device detection in block hotplug script
We need to cope with 0 or more '0' prefixed to '$dev':

  # stat -c '%D' "/system.img"
  13
  # losetup -a
  /dev/loop0: [0013]:12062248 (/system.img)

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-08 18:12:26 +01:00
Fabio Fantoni 89758766e5 tools: Improved LSB headers in init.d scripts
xendomains service now working also without xend service

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-08 18:10:48 +01:00
Jan Beulich 7844f90abd x86-64/EFI: discard .comment.* sections
The SuSE version of gcc produces a non-standard section named
.comment.SUSE.OPTs, but the PE32+ handling in binutils can't really
deal with any section to be placed at virtual address zero (and not
needing to be loaded). Even if binutils did, at least the UEFI
implementation in EDK 1.06 doesn't look at the section characteristics
at all, and hence would attempt to load such a section, and fail or
corrupt other data.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2011-07-08 13:23:05 +01:00
Jan Beulich 6b2c9b33a0 x86-64/physdevop: reduce generated code duplication
At least all the helper functions can be used by both the native and
the compat-mode implementations, requiring their parameters to be
adjusted.

Additionally, rather than having the compat mode wrapper source file
blindly define the native structures to be replaced by the compat mode
ones, replace unnecessary (un-)definitions by layout match checks.

In a second step, do_physdev_op() could be split into a part that
needs
re-compilation for compat mode handling and one that can be used for
native and compat mode.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2011-07-08 13:21:53 +01:00
Keir Fraser 71db85f478 Revert 23664:3e3c0a8be9f9 2011-07-08 13:20:09 +01:00
Tim Deegan 412b25c828 x86/mm: fix 32-bit p2m type lookups
23300:4b0692880dfa moved a check for 0 into p2m_flags_to_type()
and removed it from its caller, but the new check is only
compiled in 64-bit builds.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
2011-07-08 11:44:23 +01:00
Konrad Rzeszutek Wilk 7c7a202cce ns16550: Implement suspend handler.
For PCI type cards, you need to disable the timer code during
suspend. Otherwise during resume, the timer can be put on the
heap as its being resumed and corrupt it resulting in a crash.

Signed-off-by: Roger Cruz <roger.cruz@virtualcomputer.com>
Signed-off-by: Tom Goetz <tom.goetz@virtualcomputer.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-07-08 08:42:30 +01:00
KUWAMURA Shin'ya 1d67ac323c [IA64] kexec: fix ia64 build
23408:1fc3347850c7 causes the following error:
  machine_kexec.c:106: error: static declaration of
  'machine_kexec_get_xen' follows non-static declaration
  /xen-unstable.hg/xen/include/xen/kexec.h:39: error: previous
  declaration of 'machine_kexec_get_xen' was here

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2011-07-08 08:39:26 +01:00
Andrew Cooper c24c3e21e3 KEXEC: disconnect all PCI devices from the PCI bus on crash
In the case of a crash, IOMMU DMA remapping gets turned off so that
the kdump kernel may boot.  However, this is warned as being dangerous
in the VTD specification if a DMA transaction is in progress.

Also, in the case of a crash, DMA transactions and interrupts from
peripheral devices such as network cards are likely to keep coming in.
Without DMA remapping enabled, the transactions will be writing over
low memory, corrupting the crash state, and perhaps even the kdump
reserved memory.

Therefore, on the crash path, we can disconnect all PCI devices from
their respective buses so that they are no longer able to be DMA
busmasters.  This reduces the risk of DMA transactions corrupting
state (and will also reduce spurious interrupts arriving to the kdump
kernel) until the kdump kernel and properly reset the PCI devices.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2011-07-08 08:38:35 +01:00
Jan Beulich 56a86d9c66 libelf: "required" features should also be reported as "supported"
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2011-07-08 08:35:00 +01:00
Jan Beulich fe15cd0fb6 add privileged/unprivileged kernel feature indication
With our switching away from supporting 32-bit Dom0 operation, users
complained that attempts (perhaps due to lack of knowledge of that
change) to boot the no longer privileged kernel in Dom0 resulted in
apparently silent failure. To make the mismatch explicit and visible,
add feature flags that the kernel can set to indicate operation in
what modes it supports. For backward compatibility, absence of both
feature flags is taken to indicate a kernel that may be capable of
operating in both modes.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2011-07-08 08:34:29 +01:00
Kevin Tian 4776f8ddd2 xenpm: clean up print messages
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2011-07-08 08:33:01 +01:00
Kevin Tian 32cdcb2a24 cpuidle: initialize default Cstate information
C0/C1 should be always available when cpuidle is enabled in Xen.
When there's case that Dom0 doesn't register ACPI Cstate information,
e.g. due to BIOS issue or acpi processor module  is not installed,
this patch provides basic C0/C1 information available to xenpm tool.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2011-07-08 08:32:37 +01:00
Paul Durrant 80ecb40362 x86/hvm: Don't expose CPUID time leaf when not using PVRDTSCP
Some versions of Oracle's Solaris PV drivers make a check that the
maximal Xen hypervisor CPUID leaf is <= base leaf + 2 and refuse to
work if this is not the case.  The addition of the time leaf makes the
maximal leaf == base leaf + 3 so this patch introduces a workaround
that obscures the time leaf unless PVRDTSCP is in operation.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
2011-07-08 08:31:10 +01:00
Christoph Egger f128d21688 nestedsvm: allow l1 guest to use OSXSAVE
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2011-07-08 08:30:56 +01:00
Liu, Jinsong 6f8f53cc64 x86 cpu: Fix bug: unify cpu_dev attr as __cpuinitdata
Currently different x86 cpu define different attr for cpu_dev.
Some cpu define as __initdata, this would be risk under cpu hotplug.
This patch fix the bug, unify them as __cpuinitdata, as what AMD cpu
define now.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
               Shan, Haitao <haitao.shan@intel.com>
2011-07-08 08:30:41 +01:00
Ian Jackson a49c86dd62 libxl: fix incorrect return of ERROR_INVAL from disk_try_backend
disk_try_backend is supposed to return 0 or the disk backend format.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-07-07 12:35:05 +01:00