[HVM][DM] Cleaner way of clearing VGA memory on mode changes (thanks to
Fabrice Bellard on the QEMU project). This patch clears the
memory in the BIOS call rather than when the Cirrus Logic register changes,
which more closely matches what happens on the real hardware.
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
[LIBXC] Convert all printf/fprintf uses to use a macro instead.
Thus all can be disabled at compile time. It would be easy to
make enabling/disabling a run-time option too. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVMLOADER] Revert to uniprocessor MPS table in rombios.
Advertising more CPUs than the guest is allocated hangs boot
of Windows XP (selects wrong HAL). The correct fix here is
to dynamically generate the MPS table (at least the CPU
entries) from hvmloader binary. Signed-off-by: Keir Fraser <keir@xensource.com>
Use explicitly-sized types in the dom0_ops and privcmd structures.
As discussed previously, the these operations are not performance-sensitive, so
the additional cache footprint shouldn't be an issue.
Represent PFNs with their own type, rather than 'unsigned long'.
('long' changes size and alignment between 32- and 64-bit ABIs.) Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
[NET] front: Turn grant-ref error into a fatal bug. That's the best we
can do until we have a backend driver recovery method. Signed-off-by: Keir Fraser <keir@xensource.com>
[X86EMUL] Mark MOV instruction as not needing writeback.
Fix the test harness for x86/64 -- map emulated addresses
to low 4GB of address space. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM][VMX] Interrupts must be kept disabled when entering Xen for
external interrupt processing. Remove code that immediately
reenabled interrupt delivery on VMEXIT. Signed-off-by: Seteven Smith <sos22@cam.ac.uk> Signed-off-by: Keir Fraser <keir@xensource.com>
This patch adds scatter-and-gather transmission support to the frontend.
This allows the MTU to be raised right now and the potential for TSO in
future.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This patch adds scatter-and-gather support to the backend. It also
advertises this fact through xenbus so that the frontend can detect
this and send through SG requests only if it is supported.
SG support is required to support skb's larger than one page. This
in turn is needed for either jumbo MTU or TSO. One of these is
required to bring local networking performance up to a level that
is acceptable.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[VMXASSIST] Extensions to vmxassist to handle additional mode switch cases.
Extends vmxassist to handle two cases related to mode switching found
while experimenting with different boot loaders.
The first case is use of the JMP instruction with memory location
operands to complete a switch to protected mode. This patch adds
emulation for this form of the JMP instruction to vmxassist.
The second case is where boot loader code does not save/restore a
non-zero SS register across a protected mode traversal.
Zeroing the SS register in vmxassist results in all sorts of problems
in the domU after returning back to real mode. This patch stores
segment register values before entering protected mode and correctly
restores the old values (instead of an incorrect zero value) when
reentering real mode.
Signed-off-by: Kevin Tronkowski <ktronkowski@virtualiron.com>
[NET] back: fix synchronisation of access to deallocation buffer ring.
Must ensure ring is written to before producer index is incremented.
Bug diagnosed by Ky Srinivasan <ksrinivasan@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Extend callback-registration hypercall to take a flags argument.
This can currently be used to request that event delivery be
disabled during callback processing. Signed-off-by: Keir Fraser <keir@xensource.com>
Create new vmassist type 'pae_extended_cr3'. Only advertise
pae_pgdir_above_4gb tp guests that have enabled this vmassist.
Control tools ensure all PAE page directories are below 4GB
unless the vmassist is enabled (triggered via an extended-cr3
option in guest Elf header). Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX][X86_64] Destroy initial page-table mappings to avoid overlap with modules.
The temporary mappings needed to set up the 1:1 mappings must be torn
down after use; otherwise they may trigger the
WARN_ON() in vmap_pte_range() (namely if the chunk allocated to hold
kernel and initial page tables gets close to or
exceeds 128Mb, or if a sufficiently high mem= argument causes the
static allocations to grow beyond 128Mb, which in
either case means these mappings extend into the modules area).
Just like the standard loopback device, SG support here is innate.
So all we need to do is mark it as such and zero the change_mtu method
so that the MTU can be changed at will.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Add backing support for HDIO_GETGEO ioctl to blkfront.
Inspired by an earlier patch from Charles Coffing. Signed-Off-By: Jan Beulich <jbeulich@novell.com>
[PAE] Fix support for pgdirs above 4GB. Requires an interface change so that %cr3
is extended to include high-order address bits at bottom of %cr3 value.
Guests who understand this interface change publish the fact by setting the
option 'PAE=yes[extended-cr3]' in their __xen_guest section. Signed-off-by: Keir Fraser <keir@xensource.com>
[IA64] Fix Xen running on IA64. Some function prototypes were
moved to domain.h and hence undefined in some source files.
This meant that some return types defaulted to int, resulting
in corruption. Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Fix pagetable accessor macros in Xen to have better names and to
preserve top bits of PAE pgdirs situated above 4GB. Signed-off-by: Keir Fraser <keir@xensource.com>
Allow all trace-buffer hypercalls to be executed even when tracing is currently disabled.
From: George Dunlap Signed-off-by: Keir Fraser <keir@xensource.com>
The temporary mappings needed to set up the 1:1 mappings must be torn down after use; otherwise they may trigger the
WARN_ON() in vmap_pte_range() (namely if the chunk allocated to hold kernel and initial page tables gets close to or
exceeds 128Mb, or if a sufficiently high mem= argument causes the static allocations to grow beyond 128Mb, which in
either case means these mappings extend into the modules area).
[HVM] Allow more dynamic use of the qemu serial lines by allowing the Summagraphics port to float.
qemu will emulate up to 4 serial lines (COM1 - COM4). One of these
lines supports a Summagraphics protocol. This has changed recently,
and it's now always COM2. This patch allows the user to specify
to qemu which lines should be serial lines, and the code will place
the Summagraphics compatible line at just above the last specified
serial line. qemu defaults serial line 0 (COM1) to be "vc", resulting
in the Summagraphics support residing on COM2. This is in keeping
with the current behavior.
The results, via qemu command line, are:
<none> COM2
-serial x COM2
-serial x -serial x COM3
-serial x -serial x -serial x COM4
-serial x -serial x -serial x -serial x <none>
The results are deterministic, and allow the use of up to 4 serial
lines including none with Summagraphics support. There is no
change from current behavior, unless requested.
[SECURITY] Allow domid and ssidref args to get_decision in
util/security.py to be either strings or ints (previously only strings
would work due to the underlying call to lowlevel.acm).
Signed-off-by: Bryan D. Payne <bdpayne@us.ibm.com> Signed-off-by: Reiner Sailer <sailer@us.ibm.com>
[LINUX] Converge ia64 versions of xen/drivers Makefiles with general versions.
This patch converges the ia64-specific and general versions of
xen/drivers/Makefile and xen/drivers/core/Makefile, using Kconfig
settings instead to control whether specific pieces are built.
Fix negation of unsigned quantities in the Xen x86 emulator.
This fixes the problems left behind by c/s 10171. Again pointed
out by Jan Beulich; and again different from his suggested patch.
Hopefully this one will be less embarrassing.
This test imports a ram disk device as a physical device into a domU.
The domU initialises the ram disk with data from /dev/urandom and
calculates the md5 checksum of the data (using tee as it is written so as to
avoid reading it back from the device which might potentially mask
problems).
The domU is stopped and the md5 checksum of the data on the device is
calculated by dom0. The test succeeds if the checksums match, indicating
that all the data written by domU was sucessfully committed to the
device.
This patch also enables tee in BusyBox on the ramdisk and increments the
xm-test version number to 0.8.0.
The patch also installs the block-integrity tests in the default test
set so they get executed.
Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com> Signed-off-by: Ewan Mellor <ewan@xensource.com>
network-bridge: Fall back to eth0/xenbr0 if no default route.
From: Dave Lively <dave.lively@gmail.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[IA64] preparation for vga acceleration of VTI domain
This patch fixes several minor issues, as a prepare step to support VGA
acceleration for VTI domain:
- shared vram buffer needs to be mapped as WB in both sides, because
the shared vram is the true WB memory though VTI domain is told as UC
- Introduced a new pte_mem to indicate p2m entry containing valid mfn
when replace p2m entry. Pte_none doesn't work for VTI case, since IO
type is encoded into p2m entry which however doesn't contain valid mfn.
After above change, guest_physmap_add/remove_page is available to
be used by qemu to setup linear buffer for VTI domain.
The xm dmesg command wasn't taking the -c/--clear options because of
incorrect values to arg_check(). Patch simply allows for the possible
option with arg_check().
Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
[VTPM_TOOLS] Updated vtpm for new release of the tpm_emulator.
New emulator includes AIK, DAA, and Transport Sessions Signed-off-by: Vinnie Scarlata <Vincent.r.scarlata@intel.com>
1. Make Mini-OS start from 0x0.
2. Fixes the pagetable builder to handle half full, but already mapped
pt frames.=20
3. Add a bounds check to ensure than Mini-OS does not try to use Xen
virtual space.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk> Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>
[SVM] Fix virtualization of the CPUID NX bit, and clean up other CPUID bits. Signed-off-by: Tom Woller <thomas.woller@amd.com> Signed-off-by: Wei Huang <wei.huang2@amd.com>
[ACM] Add a hypervisor call macro to the linux kernel; it
completes the alignment of the ACM call interface with the other Xen
hypervisor call interfaces. This macro is used to call from the a guest
kernel directly into the ACM hypervisor module.
Fix PAE debug builds to avoid shadowing shadow-mode pgdirs below 4GB.
The current shadow mode is not aware of this extra level of shadowing
and gets rather confused. Furthermore it *always* ensures that its
PAE pgdirs are below 4GB so there is no need for the extra shadowing
logic to be invoked.
Now xen drivers use is_running_on_xen() to check whether it runs on
xen or bare metal. There remains many if (running_on_xen) in ia64
specific codes. This patch replaces running_on_xen with is_running_on_xen()
Define halt() and safe_halt() properly for Linux-on-Xen. Remove duplicated
code for initial bringup of secondary VCPUs. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] Fix a bug in the emulation of the xchg instruction.
This bug has prevented us from booting fully virtualized SMP guests
that write to the APIC using the xchg instruction (when
CONFIG_X86_GOOD_APIC is not set). On 32 bit platforms, sles 10 kernels
are built without CONFIG_x86_GOOD_APIC not set and hence we have had
problems booting fully virtualized SMP sles 10 guests.
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
[BALLOON] Remove the static lower bound on memory target from balloon driver.
Experimentation an discussion on xen-devel concludes that a dynamic method
for determining safe balloon size will be required. Signed-off-by: Keir Fraser <keir@xensource.com>
Fix the support for PAE pgdirs above 4GB that was introduced in
changeset 10173:954f4dea9da6336aaa35d0706aed55fde7909644. Signed-off-by: Keir Fraser <keir@xensource.com>
Fix SMP boot for kernels without CONFIG_HOTPLUG_CPU.
The function cpu_is_allowed() appears that it should return a boolean
but in fact returns zero on success and an errno on failure. Thus
rename it to the more vague cpu_up_check(), in line with its return
value and thge fact it has unspecified side effects.
Fix the macro definition of cpu_up_check() when building non-hotplug
kernel to return zero rather than one (which always failed secondary
cpu bringup!).
[PAE] Allow pgdirs above 4GB for paravirt guests.
**NOTE**: This obviates the need for lowmem_emergency_pool.
Unpriv guests no longer need to be able to allocate memory
below 4GB for PAE PDPTs. Signed-off-by: Keir Fraser <keir@xensource.com>