Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
[modified to use existing cpu_halt() function in linux-xen files] Signed-off-by: Alex Williamson <alex.williamson@hp.com>
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>
---
Only use one page for stubs and tables instead of 2MB.
Create struct fw_tables to make code more understandable.
Many comments added.
Correctly compute sal systab checksum.
Introduce HVMOP_setup_shared_info_page
- A page allocated on HVM-guest OS is swapped original shared_info
page with this hypercall.
- In x86 code, original shared_info page is used after pv-on-hvm
setup with remapping feature in arch depend HYPERVISOR_memory_op.
But, we can't implement same feature for IPF, thus we select to
implement with this method.
Introduce HVMOP_setup_gnttab_table
- Pages allocated on HVM-guest OS is swapped original grant_table
page frames with this hypercall.
- Same above.
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com> Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.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().