[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>
[NET] front: Allow driver to be built against kernels which do not
have extended checksum-offload info fields in teh skbuff structure.
Based on a patch from Steven Smith <ssmith@xensource.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] Avoid accessing start_info from xenbus as far as possible, since
HVM domains do things slightly differently. Signed-off-by: Steven Smith <ssmith@xensource.com>
[XEN] Fix x86/64 bug where a guest application can crash the
guest OS by setting AC flag in RFLAGS. This wasn't being
cleared on entry to the guest kernel, causing unwanted faults
because the kernel runs in ring 3 on Xen. Signed-off-by: Keir Fraser <keir@xensource.com>
[qemu] Default monitor/serial ports to /dev/null if -nographic.
qemu-dm runs daemonized and the default for -nographic is to redirect
the monitor and serial ports to stdio which causes qemu-dm to busy
read from stdin. Change the default for -nographic to redirect the
monitor and serial ports to /dev/null.
Based on a patch from: Steven Smith <sos22-xen@srcf.ucam.org> Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
The first fragment is used to store the pending_idx of the leading
txreq if it doesn't fit in the head area. When it does fit into
the head we need to ensure that the first fragment contains a value
that is not equal to pending_idx as that's what we use to distinguish
between the two cases in a a number of places.
This patch sets the first fragment to ~0 which is not equal to any
valid pending_idx. Without this initialisation, we may double-free
a pending_idx if the first fragment happened to contain a value
equal to it (this usually happened with pending_idx 0).
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[XEN] vga code cleanups and additions for other architectures.
Based on patches from Hollis Blanchard and Alex Williamson. Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX] Update the hvm_op wrapper now that the return value of get_param is in
the parameter structure rather than the hypercall return value. Signed-off-by: Steven Smith <ssmith@xensource.com>
[NET] front: Allow packets to be copied on the receive path instead of flipped. Signed-off-by: Steven Smith <ssmith@xensource.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[NET] back: Change 'copyall' xenstore node to 'request-rx-copy', which
is slightly more informative and mirrors the 'feature-rx-copy' name
which communicates the feature in the other direction (back->front). Signed-off-by: Keir Fraser <keir@xensource.com>
[NET] back: Support copying packets to the frontend on receive path. Signed-off-by: Steven Smith <ssmith@xensource.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[NET] front: Fix features on resume when csum is off
When the netfront driver is resumed the features are renegotiated with
the backend. However, I forgot take into account the status of the TX
checksum setting. When TX checksum is disabled by the user, we cannot
enable SG or TSO since both require checksum offload. This patch
makes
xennet check the checksum setting before renegotiating SG or TSO.
This bug was fixed thanks to a report from Anton Burtsev.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[HVM] Fix the issue that the HVM 64bit guest cannot boot with 32G memory.
It enlarges the PGT_mfn_mask to support 27bit, and also remove the
score stuff on x86-64.
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
This is a small patch that makes a cross compiler successfully compile
the sources under the tools directory. This patch became necessary
after qemu-dm is updated to a newer version.
[XEND] xc_save/xc_restore open the libxc interface independently
of their parent. This is required now that the interface fd is
marked for close-on-exec. Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Add tracing to slow path in setting new guest %cr3 value.
Also, allow x86/64 user cr3 value to be reset to zero. Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
[HVM] Ensure the read-only M2P table is mapped without _PAGE_GLOBAL
otherwise context switch to shadow-mode-translate guests does not
work properly (they reuse that area of virtual address space). Signed-off-by: Keir Fraser <keir@xensource.com>
Don't copy all incoming fragmented packets.
Some drivers (ie the e1000) hand up packets with the header in
the main area and the data in a fragment. Unless there are
multiple references on any of the data, we don't need to
make a full copy of those packets. Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
Clean up vga.c and change default font slot to zero, as other
slots are not supported by ATI video cards. Signed-off-by: Keir Fraser <keir@xensource.com>
Adjust truesize in netfront to more closely reflect real data payload
plus supervisor overheads but keeping out gross hypervisor overheads. Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
[XEND] Apply the domain cpumask fully to every vcpu in the domain.
Apply the domain cpumask to each vcpu rather than mapping vcpus to
cpus in the list. This is more inline with the comments for the
cpus parameter and also allows the credit scheduler to balance
vcpus within the domain cpumask.
This patch fixes 2 vmxassist bugs to boot Vista:
1) When switching from VM86_REAL_TO_PROTECTED to VM86_PROTECTED,
protected_mode() sets return eip to switch_to_protected_mode and
segments to vmxassist's. But in later set_mode(), it still consides
these segments are guest's (Bios at this time) and use its gdt table
to calculate address(), which results in segment limitation fault. 2) In
current vmxassist, when entering VM86_PROTECTED_TO_REAL, we need to
decode every instruction manually until we catch instructions like
jmpl to reset cs to really return to real mode. Vista boot manager uses
more instructions.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Add a series file to order the patches in patches/linux-<version>
The initial ordering is the same as produced by the previous shell
globbing method.
The series file is a simple list of patch files relative to the
patches/linux-<version>/ directory. We do not support comments,
trailing directives (e.g. "-pN") or blank lines. Apart from these
restrictions the series file should be compatible with patch queue
management tools such as quilt.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Hollis Blanchard [Mon, 14 Aug 2006 20:22:22 +0000 (15:22 -0500)]
[POWERPC] Support console=comX option for Xen console.
Let Xen/PPC support the console=comX option that Xen/x86 uses, so one
need simply supply CMDLINE="console=com2" on the make invocation to get
proper use of the physical serial port on a JS21.
We do this by pruning all serial devices from the device tree, and then
initializing both com1 and com2 (like arch/x86/setup.c does).
Note that `setenv direct-serial? true; nvupdate' should in theory help
with this, but it does not work at present, and will only be supported
in some future version of SLOF. Regardless, it is useful to support the
console=comX option, since there will always be environments where it is
difficult to get access to the firmware console.
This patch gets ia64 building again on xen-unstable.hg due to the
addition of the uint64_t type in public/arch-ia64.h. I also cleaned
up directly including this file versus public/xen.h as ia64 seems to be
the only arch using it directly.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
[VMXASSIST] Fix linker script to define start/end section labels
in the usual idiomatic way. This avoids some BSS symbols being
defined oustide of range _sbss/_ebss.