Keir Fraser [Tue, 17 Mar 2009 14:53:05 +0000 (14:53 +0000)]
x86: Fix APIC 0x40 error when CPU online and Host s3 resume
disable_APIC_timer actually is not useful here. Actually it will
trigger a local APIC error when masking the LVT entry when vector is
zero (before timer is inited) on Intel P6 family. This APIC error(40)
appears when online the offlined CPU and Host S3 resume.
Signed-off-by: Liping Ke <liping.ke@intel.com> Signed-off-by: Gang Wei <gang.wei@intel.com>
xen-unstable changeset: 19335:dc5441bf3ddcfb14045333c9992fd919c5d79a24
xen-unstable date: Thu Mar 12 11:16:54 2009 +0000
Keir Fraser [Mon, 2 Mar 2009 14:18:33 +0000 (14:18 +0000)]
acm: Return a valid buffer
This patch reverts a previous patch trying to fix a memory, even
though I don't think there was any. Now return a valid buffer. All
functions calling this function do free the buffer.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
xen-unstable changeset: 19248:6f207d1eee5c21452d4527fe202c5a3f4d2b815c
xen-unstable date: Mon Mar 02 10:31:16 2009 +0000
Keir Fraser [Mon, 2 Mar 2009 14:17:50 +0000 (14:17 +0000)]
x86, hvm: gcc44 build fix.
Broken constrain in inline asm. Bytewise access works with a, b, c, d
registers only, thus "r" is wrong, it must be "q". gcc 4.4 tries to
use the si register, which doesn't work and thus fails the build.
From: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 19243:e5c696aaf2a6e8805231c0c0f1414560262e7005
xen-unstable date: Sun Mar 01 14:58:07 2009 +0000
Keir Fraser [Mon, 2 Mar 2009 14:17:28 +0000 (14:17 +0000)]
xenstored: fix use-after free bug
Problem: Handling requests for one connection can not only zap the
connection itself, due to socket disconnects for example. It can also
zap *other* connections, due to domain release requests. Especially
it can zap the connection we have saved a pointer to in the "next"
variable.
From: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 19242:226031d62fc53d92df1aa7ba5565e887fa925318
xen-unstable date: Sun Mar 01 14:50:04 2009 +0000
Keir Fraser [Mon, 2 Mar 2009 14:17:05 +0000 (14:17 +0000)]
x86, time: fix S3 suspend error
platform_time_calibration() is invoked in S3 when irq is disabled,
which causes ASSERT() error in spin_lock_irq(). spin_lock_irqsave()
saves us.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
xen-unstable changeset: 19240:9af46734ce70fcc7e89f3af1ace876652ec9478f
xen-unstable date: Sun Mar 01 14:30:35 2009 +0000
Keir Fraser [Mon, 2 Mar 2009 14:16:42 +0000 (14:16 +0000)]
x86, ioapic: Fix S3 suspend error.
Invoke ioapic_pm_state_alloc() earlier,
thus avoiding check_lock() BUG_ON() in spin_lock().
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
xen-unstable changeset: 19239:9cad48ba52b0dd83dfeae014aaac7a16af0585dc
xen-unstable date: Sun Mar 01 14:17:08 2009 +0000
Keir Fraser [Mon, 2 Mar 2009 11:26:44 +0000 (11:26 +0000)]
xen: backport of microcode updates from xen-unstable
18406 x86: constify microcode hypercall argument
18475 x86: microcode update support for AMD CPUs
18481 x86: Fix 32-bit build after AMD microcode update patch.
18483 x86, microcode: Clean up for Xen coding style, and disable for now
18485 x86, microcode: More code cleanups.
18487 x86, microcode: Do not run microcode update in IRQ context.
18488 x86, microcode: Free microcode_info struct at end of hypercall.
18509 x86: Allow continue_hypercall_on_cpu() to be called from within
an existing continuation handler. This fix is needed for the new
method of microcode re-programming.
18519 x86,amd,microcode: fix hypercall return code
19059 x86: update microcode support
From: Hans Rosenfeld <hans.rosenfeld@amd.com> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Keir Fraser [Fri, 20 Feb 2009 17:03:57 +0000 (17:03 +0000)]
xenconsole: Fix pty handling
I printed the terminal attributes after openpty() and they were
garbage on the first console, valid on the second etc.
openpty() gets garbage in (uninitialized attributes MODIFIED by
cfmakeraw()). It sets the slave to the attributes requested. Using
uninitialized data for cfmakeraw->openpty results in pty attributes
that may even have the receiver disabled. Closing the slave just hides
the bug as these attributes disappear and hope the slave will be
reopened and initialized.
From: Juergen Hannken-Illjes <hannken@netbsd.org> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset: 19238:f8187a343ad2bdbfe3166d7ee7e3d55a9f157fdc
xen-unstable date: Fri Feb 20 17:02:36 2009 +0000
Keir Fraser [Fri, 20 Feb 2009 11:42:30 +0000 (11:42 +0000)]
vt-d: workaround for Mobile Series 4 Chipset
Incorporated VT-d workaround for a sighting on Intel Mobile Series 4
chipset found in Linux iommu. The sighting is the chipset is not
reporting write buffer flush capability correctly.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
xen-unstable changeset: 19230:bd991b0431aad9a0e8631a09da138a4961117ef3
xen-unstable date: Thu Feb 19 10:59:43 2009 +0000
Keir Fraser [Fri, 20 Feb 2009 11:41:44 +0000 (11:41 +0000)]
pygrub: fix for NetBSD
Signed-off-by: Frank van der Linden <frank.vanderlinden@sun.com> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset: 19229:0c61a377c6278c0d124617a86abfa37eba201d17
xen-unstable date: Thu Feb 19 10:53:46 2009 +0000
Keir Fraser [Fri, 20 Feb 2009 11:36:25 +0000 (11:36 +0000)]
xenapi: Correct some syntax errors in xen/xend/XendAPI.py
- usage of undefined variables in error cases (invalid handle
specified) in methods VBD_create, VTPM_destroy, event_unregister
- not imported module 'uuid' in method debug_create results in an
exception
Keir Fraser [Fri, 20 Feb 2009 11:33:59 +0000 (11:33 +0000)]
x86 hvm: Allow restore of old images with different segment attribute format. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset: 19204:e6f1c66874d55fcf76ebdd4130ba55a3c8952b55
xen-unstable date: Fri Feb 13 09:29:52 2009 +0000
Keir Fraser [Thu, 12 Feb 2009 11:07:15 +0000 (11:07 +0000)]
x86: recover pat value for bsp after S3 resume.
host pat is set to cover all memory types by Xen, which is
necessary to support guest mtrr/pat, especially when device
is passthroughed with VT-d. However pat on bsp is not=20
recovered which could make assigned device defunct after S3
resume
Signed-off-by Kevin Tian <kevin.tian@intel.com>
xen-unstable changeset: 19167:8303bd33d0304ed4f4edc94960c874eabad60563
xen-unstable date: Thu Feb 05 12:14:09 2009 +0000
Keir Fraser [Thu, 12 Feb 2009 11:05:54 +0000 (11:05 +0000)]
x86: Clean up PV guest LDT handling.
1. Do not touch deferred_ops in invalidate_shadow_ldt(), as we may
not always be in a context where deferred_ops is valid.
2. Protected the shadow LDT with a lock, now that mmu updates are not
protected by the per-domain lock.
Keir Fraser [Wed, 4 Feb 2009 13:13:16 +0000 (13:13 +0000)]
x86-64: don't generate dependency files when building compat headers
The generated dependency files weren't correct (as their names get
derived only from the base name of the target file, and there are
public headers with the same base name in different directories), not
needed (as the makefile already listed all necessary dependencies
explicitly), and resulted in the first re-build in an already built
tree to be an almost full re-build since the *.c files explicitly
mentioned in the .*.d result in make not considering them as
intermediate anymore, thus triggering re-generation of the headers,
and hence re-building of almost the entire tree.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset: 19102:dbf53b739af0434adff50172fc071f718b57b450
xen-unstable date: Tue Jan 27 11:54:22 2009 +0000
Keir Fraser [Wed, 4 Feb 2009 13:11:22 +0000 (13:11 +0000)]
hvmloader: ACPI compiler is not to be built and installed on target system.
Since it is a build prerequisite (in some cases) simply fail the build
if it is not found when it turns out to be required. Just as we would
for any other tool-chain prereq.
Keir Fraser [Tue, 27 Jan 2009 16:06:29 +0000 (16:06 +0000)]
etherboot: Apply upstream patch to fix TFTP block wrap.
Build eb-roms.h rather than keeping a version in the repository. To
that end, modify CFLAGS such that etherboot builds correctly
(-std=gnu89 -fno-stack-protector).
Keir Fraser [Mon, 12 Jan 2009 16:17:09 +0000 (16:17 +0000)]
Do not print `***' when compiling unless we fall over
This has finally bugged me enough to do something about it:
make prints `***' when it stops due to an error. With make -j, and/or
with automated build systems, this error marker can be in the middle
of a large logfile. It is useful to be able to search for it.
Therefore change occurrences of `*' to `=' for information and warning
messages. `***' is reserved for cases where the build stops.
A corresponding change is being applied to qemu-xen-unstable.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 19026:59d511c4a8d8ba451afc6ebd88e049fa2addf9f5
xen-unstable date: Mon Jan 12 10:17:12 2009 +0000
Keir Fraser [Mon, 12 Jan 2009 16:16:33 +0000 (16:16 +0000)]
Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything. This was done
in 19010:275abe1c5d24 for the hypervisor.
In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/. Specifically:
* Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
* Remove -Wp,-MD... from every other Makefile
* Remove setting of DEPS from every other Makefile
* Ensure that every Makefile says -include $(DEPS)
* Ensure that every Makefile's clean target removes $(DEPS)
Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP. The variable name is now standardised in
Rules.mk as DEPS.
I have done a test build with this change, on Debian etch.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 19025:bd78714b8594f5c86a78e5d5cd16879487bbd048
xen-unstable date: Mon Jan 12 10:16:05 2009 +0000
Keir Fraser [Mon, 12 Jan 2009 16:05:19 +0000 (16:05 +0000)]
Download external tarballs from xenbits.xensource.com
I have copied the tarballs that the xen-unstable build downloads to
xenbits.xensource.com (which also hosts our hg and git). This patch
changes the download URLs to use that location.
That way the build will depend on only one external machine, under one
administration, rather than many. Also it means that the build won't
break if these sites become permanently unavailable or are rearranged
and we don't run a risk of having to panic and beg if a file should go
missing.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 18969:d6889b3b64231dd4c2cd86ca6e66d0a4ef2d5dfc
xen-unstable date: Mon Jan 05 11:19:16 2009 +0000
Keir Fraser [Fri, 19 Dec 2008 15:14:35 +0000 (15:14 +0000)]
xend: Actually restrict a domU's access to xenstore when we mean to --
this means that in some cases it cannot be owner of its own xenstore
nodes.
This bug was pointed out by Daniel Berrange at Red Hat. This patch is
my own more generic fix that automatically covers a range of callers
(albeit the patch is arguably a bit of a hack ;-).
Keir Fraser [Thu, 11 Dec 2008 13:34:43 +0000 (13:34 +0000)]
Fix BUILD_BUG_ON()
As was noticed on the Linux side, using an array here isn't
appropriate
if the condition is not a compile time constant - gcc allows such
arrays, and hence the intended effect of producing a compiler error is
not achieved in that case. Bit field widths do not know similar
language extensions, and hence always produce a compiler error.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset: 18899:1419a73316e1d75d3e5d7c1530ac6ae7e7bc7fb4
xen-unstable date: Thu Dec 11 11:19:01 2008 +0000
Keir Fraser [Wed, 10 Dec 2008 14:31:29 +0000 (14:31 +0000)]
libxc: Fix memory leak in zlib usage
Any call to inflate() must be followed by inflateEnd(), otherwise the
internal zlib state is leaked.
Signed-off-by: Kevin Wolf <kwolf@suse.de>
xen-unstable changeset: 18892:b73f3646a17fa5fb9fa8edd0a5a4d70dd3353c15
xen-unstable date: Wed Dec 10 13:14:13 2008 +0000
Keir Fraser [Wed, 10 Dec 2008 14:22:52 +0000 (14:22 +0000)]
Fix existence check for MMIO-mapped 16550 UARTs
Changeset 982e6fce0e47 added an existence test for UARTs.
Unfortunately, the existence test happens before MMIO UARTs are
ioremapped, therefore it may not be probing where it thinks it's
probing. Rather than moving more code around, I think it's probably
safe to assume the arch code knows what it's doing if it passes in an
MMIO UART.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
xen-unstable changeset: 18861:cb289056b5233b6a7799633cefdae41a91f8e071
xen-unstable date: Thu Dec 04 11:36:18 2008 +0000
Keir Fraser [Wed, 10 Dec 2008 14:22:12 +0000 (14:22 +0000)]
xend: Remember bootloader settings in xenstore
When xend is restarted, bootloader settings of all running domains are
lost. The attached patches fixes this by saving bootloader and
bootloader_args to xenstore database.
Keir Fraser [Wed, 10 Dec 2008 14:20:47 +0000 (14:20 +0000)]
AMD IOMMU: Fix event log interrupt handling
Reset EventLogInt bit in iommu status register(MMIO offset 2020h) in
event log interrupt handler, to show software has handled the
interrupt. Completion wait interrupt is disabled.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
xen-unstable changeset: 18855:5c121966ad9acb91a850f491b98655b255c9924d
xen-unstable date: Wed Dec 03 15:55:32 2008 +0000
Keir Fraser [Wed, 10 Dec 2008 14:19:29 +0000 (14:19 +0000)]
x86: No need for short jmp before long hjmp when setting CR0.PE Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 18850:28d485613eb3666b7e060c10eee9777a93b9eded
xen-unstable date: Wed Dec 03 11:21:34 2008 +0000
Keir Fraser [Wed, 10 Dec 2008 14:18:59 +0000 (14:18 +0000)]
Fix Xen panic with oprofile
The attached patch fixes a Xen panic when a domain is shutdown before
oprofile is stopped. Without this patch, free_xenoprof_pages() is
called before the domain is destroyed and that, in turn, prevents
oprofile from cleaning up pages shared with guests. Shutting down a
domain without terminating oprofile therefore causes a Xen panic at a
later point in time.
Keir Fraser [Wed, 10 Dec 2008 14:17:45 +0000 (14:17 +0000)]
xend: Fix device release for tap devices
I saw an error message when I shut down a domain. The error
message showed that release of device(vbd/51712) failed. But the
device was tap, was not vbd. I think that a cause of the error
message is
because _releaseDevices() calls destroyDevice() by wrong device class.