Make domctl/sysctl interfaces 32-/64-bit invariant.
This kills off a fair amount of unpleasant CONFIG_COMPAT shimming and
avoids needing to keep the compat paths in sync as these interfaces
continue to develop. Signed-off-by: Keir Fraser <keir@xensource.com>
Alastair Tse [Wed, 24 Jan 2007 15:57:10 +0000 (15:57 +0000)]
[XEND] Move decorate() to XendAPI.__new__ and have a static flag to
ensure it only runs at instantiation time, and only once per Xend
instance. Otherwise, decorate() runs on every invocation of
/usr/sbin/xend, even if it is xend stop.
Alastair Tse [Wed, 24 Jan 2007 15:47:31 +0000 (15:47 +0000)]
[XEND] Add support for multiple storage repositories.
Splits XendStorageRepository into a helper class and
XendQCowStorageRepo as the QCoW File backed repository. This gives us
the opportunity to introduce a pseudo storage repository to represent
the old way of specifying block devices. This is the
XendLocalStorageRepo.
Note that this still introduces a non-Xen API 'uri' attribute to VDIs
in order to support querying VDIs for their actual location relative
to the Xen host.
The QCoW backed repository is now named QCoW, and the pseudo-SR is
named Local.
This removes the 'image' attribute backwards-compat hack in VBDs in
the Xen API.
[QEMU] Clear TD status field explicitly when it's fetched.
In current Qemu-dm, UHC will set some status bits of TD in status
updating stage, but never process the status bit if relevant condition
does not occur, leaving it as it is. When a TD is fetched with some
status bits are set to 1, it will return to Guest OS with these bits
set to 1 even this TD is executed successfully. Some Windows OS,
e.g. Windows 2000, will check status bits of TD in UHC interrupt
routine, treat it as a unsuccessful one if some status bits are set to
1 and discard the data. Other Windows OS just check USBSTS of UHC,
ignoring status field of TD unless the value of USBSTS indicates
occurrence of error.
With this patch, USB mouse/tablet in Windows 2000 works correctly.
This is needed for 32-on-64 support. Right now there are three
protocols: native, x86_32 and x86_64. If needed it can be extended.
Interface changes (io/blkif.h)
* Define the x86_32 and x86_64 structs additionally to the native
version.
* Add helper functions to convert them requests to native.
Backend changes:
* Look at the "protocol" name of the frontend and switch ring
handling accordingly. If the protocol node isn't present it
assumes native protocol.
* As the request struct is copied anyway before being processed (for
security reasons) it is converted to native at that point so most
backend code doesn't need to know what the frontend speaks.
* In case of blktap this is completely transparent to userspace, the
kernel/userspace ring is always native no matter what the frontend
speaks.
Make xc_linux_save() wait for the frame_list_list MFN to be updated by the
domain before trying to use it. Make Linux set the top-level MFN /after/
updating the other MFN lists.
[LIBXC] Provide weak stub default implementations of xc_hvm_save() and
xc_hvm_restore() for architectures with no full implementation. Signed-off-by: Keir Fraser <keir@xensource.com>
linux: Fix enable_irq() crash by removing a BUG_ON() assumption in our
event-channel retrigger() function. Also clean up bitmap usages. Signed-off-by: Keir Fraser <keir@xensource.com>
Alastair Tse [Mon, 22 Jan 2007 17:23:53 +0000 (17:23 +0000)]
[XEND] Fix get_dev_property_by_uuid
This patch replaces calls to get_dev_property() by calls to
get_dev_property_by_uuid() in XenAPI.py and fixes the implementation
of get_dev_property_by_uuid.
I am adding a test case to the xapi grouptests to verify the fixes.
There's a FIXME note in the test case which should be looked at.
Fix failure to localise xm by preventing cd from writing to stdout
which gets incorrectly captured as a value for the bash for loop. Signed-off-by: Keir Fraser <keir@xensource.com>
32on64 supports 168Gb for 32-bit guests, hence at least 38 bits must
be specified here. The foreign frame bit is MFN bit 31, so the maximum
valid value here would be 43.
Implement clean return from save/restore failure (so that original
domain can continue execution). Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
[SVM] Remove ASID logic. Errata prevent this feature being used
reliably in current SVM processor implementations. Signed-off-by: Keir Fraser <keir@xensource.com>
Tim Deegan [Mon, 22 Jan 2007 11:49:14 +0000 (11:49 +0000)]
[PYGRUB] Plumb bootloader I/O through xenconsole.
- xend forwards console traffic between the running bootloader and a pty
which it writes to the store so the xenconsole client can see it.
- the xenconsole client handles the domain's console pty changing.
- xm create no longer runs the bootloader.
- pygrub gets '-i' option to explicitly request an interactive session.
- xend unlocks the domain list during bootloading so that "xm console"
can see the domain and attach to its console pty.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Sat, 20 Jan 2007 11:17:38 +0000 (11:17 +0000)]
[HVM] Save/restore cleanups 01: PIT
Define public structure for the saved PIT data and use it instead
of a series of explicit loads and stores.
Don't save ephemeral Xen timer structs; rebuild them instead. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
[LIBXC] Refactor xc_domain_resume() into its own source file.
The idea is that this file is where we will have two implementations
of 'suspend cancellation': one which the guest is aware of (and is
faster) and the other which does more work to avoid requiring guest
modifications.
Don't destroy xenstore watches on suspend, and only recreate them when
resuming in a new domain. Likewise, only invoke frontend device resume
code when in a new domain (the resume functions all tear down the
existing function and wait for the backend to negotiate a new one,
which does not happen in the source domain).
[LIBXC] Convert between byte-based and 64-bit bitmap arrays. Use this
for conversion of the domctl_cpumap.
Original patch from Jimi Xenidis <jimix@watson.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Convert between long-based and byte-based bitmap arrays.
Use this for conversion of the domctl_cpumap type on big-endian
systems.
Original patch from Jimi Xenidis <jimix@watson.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] Fix slow wallclock in x64 Vista. This is due to confusing a
timeout in the past vs. a timeout in the future when looking at a
32-bit HPET comparator. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>