[qemu] Fix PCI config header space writes and set Subsystem-Vendor ID fields.
Fix failure in Windows HCT's PCI-Compliance-Test by invalidating the
writing to read-only/reserved fields in PCI configuration space header
and giving Subsystem-Vendor-ID field a valid value via copying Vendor-ID
field into it.
[XEND] Move all of the various log files created by xen to
be under /var/log/xen instead of under /var/log directly. This has
the advantage of cleaning things up a little and also can make it
easier to restrict the permissions needed by xend.
[HVM] [SMBIOS] Duplicate UUID into serial number in SMBIOS tables.
Windows zeroes out the UUID in the SMBIOS tables, but the identifier
is often needed by systems management code. Duplicating the UUID
as the virtual system's serial number should help.
The following patch fixes a bug where xenconsoled will can SEGV
because it uses FD_ISSET(-1,xxx). Since the code is written that any
ring/tty handler can set d->tty_fd to -1 it has to be checked
_every_time_.
[TOOLS] Remove Gentoo-specific workaround in networking
scripts -- apparently it is not needed (reported by
Tuan Van <lang.thang@gmail.com>). See bugzilla issue #741
for more details.
[TOOLS] Clean up routed vifs quietly on domain destruction.
I have experienced that the vif-route script does not work as expected
when deleting a virtual interface (Redhat FC5). Both of the commands
"ifdown" and "ip route" cause an early vif-route script exit and
therefore will cause skipping of the later script commands (such as
cleaning up iptables entries for the default 'antispoof'). The
vif-route
script creates the following syslog error entry:
"/etc/xen/scripts/vif-route failed; error detected."
It appears that both of the problematic commands are actually
redundant
when destroying domains:
1. the interface is already gone (I assume because the domain frontend
is gone already) --> ifdown does not do anything
2. the route is gone as well since the interface has disappeared -->
ip
route del does not do anything
Executing those redundant commands with "do_without_error" ensures
that
the script completes and cleans up iptables rules. The attached
RFC-patch only masks those commands when bringing down an interface,
so
that domain creation continues to fail in case of vif setup problems
(intended behavior).
Having the iptables cleanup called correctly by vif-route is important
to keep the iptables rule-set clean, otherwise antispoof rules
accumulate with every vif creation.
Alex Williamson [Sun, 27 Aug 2006 05:56:01 +0000 (06:56 +0100)]
[PATCH] fix null pointer dereference in xen_guest_lookup()
The latest ELF changes have a null pointer dereference bug when you
have neither an elf notes section nor a __xen_guest_string. This patch
checks for the existence of the __xen_guest_string prior to using it.
Please apply. Thanks,
Alex
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
---
Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the
hardware platform (e.g., MTRR access, microcode update, platform
quirks, ...)
2. domctl -- used by management tools to control a specified domain
3. sysctl -- used by management tools for system-wide actions
Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).
From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].
[LINUX] Remove hypercall permission checks from privcmd driver.
This will allow the tools management to be revised independently
of dom0 kernel interfaces. Currently tools cannot be 'smarter'
than the kernel in terms of hypercalls they know about, because
the kernel disallows access to any hypercalls it does not know
about.
1) Fixed HCT test "Unreported Memory and I/O Port test" for memory
range 0xC0000~0xFFFFF and IO 0x378
2) Make consistent with non-acpi OS by enabling LPT1, remove com2
which conflicts with usb mouse
3) Fixed the USB HID-Compliant mouse when set
usbdevice='tablet'/'mouse'
4) Fixed Vista boot by removing old NIC "resourceConsumer"
Signed-off-by: Winston Wang <winston.l.wang@intel.com>
Ian Campbell [Thu, 24 Aug 2006 09:58:41 +0000 (10:58 +0100)]
[POWERPC] Remove references to xen_guest_string from ppc dom0 builder.
The xen_guest_string should not be examined directly and the ppc code
doesn't use it yet anyway.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
This supercedes 11243:51a98a6c2c054bfc37c90a5a3f29929f2347bda8
which was incorrect because the data operand type codes in
the opcode table are not correct for some special cases: one
of these happens to be PUSH, which is the instruction we
particularly need to fix!
[XEN] Fix the x86 emulator to safely fail when it turns out the
faulting memory access was to/from an implicit memory operand
(typically either an instruction fetch or stack access).
Rationalise use of macros for page fault error code flags.
This patch supercedes the fix in changeset 11242. Signed-off-by: Keir Fraser <keir@xensource.com>
Steven Hand [Wed, 23 Aug 2006 16:25:11 +0000 (17:25 +0100)]
Don't emulate faulting writes to stack. May fix a number of recent hvm
bugs with the new shadow code. A more complete clean-up of the emulation
code will follow.
[TOOLS] Remove the 'cpuperf' misc tool. Xenoprof is the
correct tool to use for hardware perfctr monitoring now.
Also remove unused xc_msr MSR accessor functions from libxenctrl. Signed-off-by: Keir Fraser <keir@xensource.com>
Ian Campbell [Wed, 23 Aug 2006 13:41:05 +0000 (14:41 +0100)]
[XEN/LINUX] Define Xen ELF notes in kernel header and update dom0 builder.
ELF notes provide a cleaner interface for passing Xen specific
information from the kernel to the domain builder than the existing
__xen_guest section string. The __xen_guest string is retained in
kernels built with 3.0.2 compatability for domU however dom0 requires
the new interface.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
[XEN] Fix pirq_guest_unbind(). Remove unnecessary code
(in fact flush_all_pending_eoi() was broken!).
Based on a patch from Steven Rostedt <srostedt@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[SHADOW] Clean up the DOM0_SHADOW_OP interface.
Also bump the dom0 interface version for tools (but
not for dom0 kernel!). Signed-off-by: Keir Fraser <keir@xensource.com>
[x86_64] Guests no longer set _PAGE_USER on kernel mappings.
This may allow guest kernels to be run outside ring 3 in future, and
also provides scope for optimisations today (e.g., using global bit on
user mappings).
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Make add_to_bridge() always leave the device up even when it bails out due to the device already being present on the bridge.
This makes the script more idempotent if run twice (e.g. from hotplug and udev), since the second time the device will be taken down and not brought up again, leaving the host without networking.
[XEN] Clean up some x86 bootstrap code. Replace some CPU iterators
with for_each_cpu() -- we want to ensure that per_cpu areas are
accessed only for cpus in cpu_possible_map. Signed-off-by: Keir Fraser <keir@xensource.com>
The patch sets the format to value '2' to indicate that we're on the version
with the new style HVM configuration for CDROM devices. The old style having
implicitly been version '1'.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
[qemu] hdparm tunable IDE write cache for HVM
qemu 0.8.2 has a flush callback to the storage backends, so now it is
possible to implement hdparm tunable IDE write cache enable/disable for
guest domains, allowing people to pick speed or data consistency on a
case by case basis.
As an added benefit, really large LBA48 IOs will now no longer be broken
up into smaller IOs on the host side.
From: Rik van Riel <riel@redhat.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[qemu] Allow booting from more than one device.
The rombios supports trying to boot from more than one device and then
falling back. Set 'boot=dc' in your config file to try booting first
from the CD and then the hard drive.
Based on a patch from: Jeremy Katz <katzj@redhat.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[XEN] More shadow2 cleanups -- primarily moving arch vcpu/domain
fields into separate shadow2-specific structures.
Also rename shadow2_entry_points to shadow2_paging_mode.
Remove VCPUF_shadow2_translate_mode and replace with a better-named
field in vcpu.arch.shadow2 Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Clarify x86 hypercall ABI in public header comments.
In particular: x86/64 *does* clobber its ragument registers
(just like i386). This happens in debug builds, and if a
continuation is created. Signed-off-by: Keir Fraser <keir@xensource.com>
[XENBUS] Allow user of xenbus_read_driver_state() to distinguish
absence of state field in xenstore by returning XenbusStateUnknown
rather than XenbusStateClosed. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM][VMX] Don't update the EIP on debug register accesses
On debug register accesses, the EIP should not be updated.
Because of the way that lazy save/restore of the debug
registers is implemented, this initial debug register access
is lost.
[NET] front: Fix receive path for auto-translated guests, so that
driver balloon allowance is properly accounted. Signed-off-by: Keir Fraser <keir@xensource.com>
[XENBUS] Cleanup correctly on suspend, unregister watches.
Again needed for domU kexec, so the next kernel instance can register
watches without running into -EBUSY.
[NET/BLK] back: Change the netback and blkback device drivers to allow
and handle frontend state transition from "Closing" to "Initialising".
Instead of destroying the backend device then they wait for a
reconnect from the frontend. Needed for domU kexec support, to hand over
devices from one kernel instance to the next.
[XENBUS] A few cleanups.
* move function prototypes to the top of the file.
* uses the "struct bus_type" function pointers instead
of overwriting the "struct device_driver" ones for
xenbus_dev_probe() and xenbus_dev_remove().
[XEN] Remove shadow2 dependencies from common code.
Disable debugtrace functionality even in debug builds:
it's currently only used by shadow2 maintainers. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] Fix the APM BIOS to ensure that interrupts are enabled when it
executes an idling HLT. This allow us to re-enable the 'shutdown on
HLT-with-interrupts-disabled' heuristic.
[XEN] Work around a Linux PAE issue where it sometimes sets
the top half of a PTE without first clearing the bottom half
(to make the PTE not-present) hence the PTE fails validation
checks.
Also remove dead revalidation function after shadow2 checkin.
[qemu] Support HVM guests with more than 3.75G memory.
Changes are:
1) M2P table and e820 table are changed to skip address space from
HVM_RAM_LIMIT_BELOW_4G to 4G.
2) shared io page location, when less than HVM_RAM_LIMIT_BELOW_4G
memory, it's the last page of RAM as today, or it's the last page of
HVM_RAM_LIMIT_BELOW_4G RAM.
3) in qemu-dm address space from HVM_RAM_LIMIT_BELOW_4G to 4G are
stuffed with mfns starting from 4G, so the 1:1 mapping can still works.
This is ugly, but another limit check patch as changeset 10757 will
prevent qemu-dm to access this range. This ugly stuffing will be
removed when the patch to remove 1:1 mapping from qemu-dm gets accepted
in the future.
Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[XEN] Fix page-fault handler to fall back to shadow-mode fault path if
writable pagetable logic fails to fix up a fault. Signed-off-by: Keir Fraser <keir@xensource.com>