Keir Fraser [Tue, 6 May 2008 09:19:10 +0000 (10:19 +0100)]
x86, hvm: stdvga cache always on
currently the hypervisor vga cache (stdvga.c) enables itself only in
graphical mode and in the a0000h-affffh range. However there is no
reason for this: it already allocates enought memory to map the whole
vram. I am attaching a patch that implements the bank switching
mechanism in stdvga.c, allowing the cache to be always enabled when
the emulated graphic card is in VGA mode.
Keir Fraser [Tue, 6 May 2008 09:05:52 +0000 (10:05 +0100)]
xend: Refactor security.on() call
I am refactoring the security.on() call to return the actual type of
the security module that is found to be enabled rather than just
returning True or False.
Keir Fraser [Fri, 2 May 2008 14:08:27 +0000 (15:08 +0100)]
shadow: track video RAM dirty bits
This adds a new HVM op that enables tracking dirty bits of a range of
video RAM. The idea is to optimize just for the most common case
(only one guest mapping, with sometimes some temporary other
mappings), which permits to keep the overhead on shadow as low as
possible.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Fri, 2 May 2008 12:47:46 +0000 (13:47 +0100)]
ioemu: pump SDL events on resize
When sdl_resize resizes the SDL window, some window manager send back
a ConfigureNotify event, which triggers a SDL_VIDEORESIZE event. That
event, however, is seen only much later, on the next VGA refresh
round. If the guest quickly switches to another resolution in between,
the SDL_VIDEORESIZE event makes us erroneously rescale that new
resolution into the old one.
This patch makes us pump that window manager event, so that no
SDL_VIDEORESIZE event is generated.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Depending on environments, zfs libfsimage support doesn't compile.
This patch fixes it.
ia64-linux-gnu-gcc -DPIC -O2 -fomit-frame-pointer
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wno-unused-value -Wdeclaration-after-statement
-I/usr/ia64-linux-gnu/
sys-root/usr/include -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -I../../../tools/libfsimage/common/ -Werror
-Wp,-MD,.zfs_lzjb.opic.d -fPIC -c -o zfs_lzjb.opic zfs_
lzjb.c
In file included from fsys_zfs.h:41,
from zfs_lzjb.c:25:
zfs-include/zfs_acl.h:29: error: redefinition of typedef uid_t
/usr/ia64-linux-gnu/sys-root/usr/include/sys/types.h:82: error:
previous declaration of uid_t was here
This depends on how __uid_t is defined in the system header.
No file under the zfs directory uses uid_t so that just removing
the definition in the zfs_acl.h looks reasonable.
Keir Fraser [Fri, 2 May 2008 12:46:16 +0000 (13:46 +0100)]
libxc foreign address translation bug
In the xc_translate_foreign_address function from libxc, there is a
check on the page directory entry to see if the page is 4K or 4M.
However, the check is looking at bit 3, when it should be looking at
bit 7. This patch fixes the problem.
Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
Keir Fraser [Thu, 1 May 2008 15:38:56 +0000 (16:38 +0100)]
Add ZFS libfsimage support patch
Add support to pygrub and libfsimage to boot ZFS root filesystems.
Boot argument of zfs-bootfs is set to describe ZFS root pool and
boot filesystem object number. Boot argument bootpath is set to
describe the virtual device root mirror components.
Signed-off-by: Susan Kamm-Worrell <susan.kamm-worrell@sun.com>
Keir Fraser [Thu, 1 May 2008 15:35:28 +0000 (16:35 +0100)]
Accept decimal block device IDs
Solaris uses a simple indexing scheme for block devices. Parts of xend
translate them as hexadecimal (such as block-attach), and decimal, or
unconverted, elsewhere (such as block-detach). Harmonise these
interfaces by allowing decimal specifications.
Keir Fraser [Thu, 1 May 2008 15:08:36 +0000 (16:08 +0100)]
x86 hvm cpuid: fix some problem with the hvm's cpuid configuration.
- When we overwrite a cpuid's input, apply the default policy
for the other registers.
- For the python binding, get unsigned long instead long.
- Fix the multiple inputs cpuid's configuration parsing.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Keir Fraser [Thu, 1 May 2008 09:50:09 +0000 (10:50 +0100)]
x86: Add TSC stop support for Deep C state
TSC may stop at deep C state (C3/C4...) entry/exit. this patch add the
logic that save and restore TSC during deep C state entry/exit, by
using platform timer (PIT/HPET)
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Tian Kevin <kevin.tian@intel.com> Signed-off-by: Wei Gang<gang.wei@intel.com>
Keir Fraser [Thu, 1 May 2008 09:46:59 +0000 (10:46 +0100)]
Add acpi C3 support for x86.
C3 & deep C state will need to do ARB_DIS or cache flush. ARB_DIS
should be done within the last cpu which is ready for C3. Bus master
activities are checked and recorded for C state promotion/demotion
judgement.
C3 is disabled by default, till TSC/APIC stop issues resolved.
Adding cmdline option "max_cstate=3" can enable C3.
Keir Fraser [Thu, 1 May 2008 09:40:01 +0000 (10:40 +0100)]
Add basic acpi C-states based cpu idle power mgmt in xen for x86.
It includes:
1. hypercall definition for passing ACPI info.
2. C1/C2 support.
3. Mwait support, as well as legacy ioport.
4. Ladder policy from Linux kernel.
Keir Fraser [Thu, 1 May 2008 09:00:00 +0000 (10:00 +0100)]
xemnstored: Fix xenstored abort when connection dropped.
If a connection is dropped with pending input and output data then the
connection will be dereferenced by both handle_input and handle_output
resulting in a double free when the main loop dereferences the
connection.
Fix this issue by taking/releasing a reference over the calls to
handle_input and handle_output separately and checking the result of
talloc_free to see if the connection went away.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Thu, 1 May 2008 08:55:45 +0000 (09:55 +0100)]
[Xend/ACM] Provide explicit initialization function for bootloader class
This patch refactors the initialization code for the bootloader class
and puts it into an explicit initialization function that is called
from another class.
Keir Fraser [Thu, 1 May 2008 08:55:06 +0000 (09:55 +0100)]
[Xend/ACM] Embed the policy schema in the python file
This patch embeds the ACM policy's schema in the python file where the
schema is being accessed for verifying the policy XML. This way also
programs that cannot access a protected directory where the schema may
be located in can use this class.
Keir Fraser [Thu, 1 May 2008 08:45:44 +0000 (09:45 +0100)]
x86 time: Read platform time before locally-extrapolated time during
calibration and frequency changes. This places the variable delay
(acquiring the platform_timer_lock) safely as the very first thing we
do, avoiding a variable delay /between/ computing the two timestamps.
Problem diagnosed by Dave Winchell <dwinchell@virtualiron.com>
vmx: Fix address of EPT identity-map pagetable that is passed from the
domain builder down to the hypervisor. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Otherwise, ioemu can be out of sync with the hypervisor after
restoring guest state, if INTx lines were asserted when the state was
saved. This prevents ioemu from setting the line to zero in Xen
(because it thinks the line is already zero). This can allow th eguest
to enter an endless IRQ loop and hang.
blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.
New boot parameter 'serial_tx_buffer=<size>' to change serial
transmit buffer size from default of 16kB. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
ACM: Put hash of XML policy into binary policy to tie them together
This patch extends the ACM binary policy format with an embedded hash
of the corresponding XML policy in order to tie them together. This
allows xend to determine whether it has the correct XML policy in its
repository and react appropriately if it does not have it.
vt-d: Clean up and fix dom0 initialisation.
Based on a patch by Weidong Han <weidong.han@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
blktap: Automatically start tapdisk-ioemu on demand
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.
1. We cannot rely on BSF/BSR leaving the destination register intact
if the source is zero (according to Intel manuals)
2. We race clear_bit() in find_first_bit(), which may occur after
SCAS but before BSF. So we must handle zero input to BSF.
console: Provide option to stall the inter-domain console ring rather
than discard characters in the console daemon buffers.
New option: -o, --overflow-data=discard|keep
This option changes the behaviour when dealing with data that overflow
the max capacity of the buffer. If overflow-data is set to discard
(the default), the current behaviour is used: we discard some data in
the middle of the buffer.
If overflow-data is set to keep, we stop listening to the ring until
we free some space in the buffer. This can cause the ring to fill up
and the guest kernel internal buffer to fill up as well. When this
happens the guest kernel stops reading characters from the console
device so the application generating data hangs. When xenconsoled
resumes reading from the ring, the guest kernel will be able to resume
reading from the console device as well. At that point the guest
application will be allowed to continue.
The risk of making this behaviour the default is that existing kernel
drivers may assume they can rely on timely ring updates by the console
daemon and thus themselves block on the ring being emptied.
If a hang-up of a guest OS occurs, we will restart the guest OS by
using
the following commands.
1. xm destroy
2. xm create or xm start
To reduce the number of xm commands to use, this patch adds a new
command. The command is "xm reset". The command executes destruction
of a domain, and then creation of the domain.
Cache figlet output across builds, and provide src-tarball target
which creates figlet output and then deletes figlet itself (which is
not licensed under GPL).
Added undocumented fields and methods for default_netmask and
default_gateway to the Network class. Remove an unimplemented method
from the XSPolicy class and remove the 'optional' from 'oldlabel'
parameters.
changeset e1962ac0fb1c breaks cross-builds because it assumes the
system strip tool applies to the generated binaries. This assumption
isn't made anywhere else in the xen tools build.
x86_emulate: Emulate certain FPU instructions by building the opcode
on the stack. This allows us to add emulation for a number of extra
FPU opcodes without inflating the executable code size. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
x86_emulate: Implement a more dynamic interface for handling FPU
exceptions, which will allow emulation stubs to be built dynamically
in a future patch. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
MSI interrupt will be triggered on IO page fault and the fault address
will be written into an in-memory event log buffer automatically by
hardware. This patch handles the MSI interrupt simply by reading event
log entry and printing out the parsed result.