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>
[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>