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.
- Move MTRR MSR initialisation into hvmloader.
- Simplify initialisation logic by overlaying UC on default WB rather
than vice versa.
- Clean up hypervisor HVM MTRR/PAE code's interface with rest of
hypervisor.
stubdom: make use of PVFB resize event
which with the offset support also permits to expose the VGA vram and
non-shared vram throught PVFB at the same time, switching between both
as appropriate.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
ioemu: drop reschedule of handle_buffered_io on I/O reqs
Rescheduling the call to handle_buffered_io costs the system call to
qemu_get_clock(), which is very expensive considering the the latency
we would like to achieve for I/O reqs, so we should avoid it.
That means that handle_buffered_io may be called as often as every
0.1s, but that's not so costly.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
minios: simplify schedule()
- Merge the search, wakeup, and timeout loops.
- Avoid unnecessarily switching to the idle thread.
- Perform stack release _after_ we get out of it.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
stubdom: sparse application's BSS by linking it separately first, put
markers at its beginning and end, and then link with mini-os.
That permits to stick a bit more to upstream qemu.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
x86: Fix emulation of PCI access register at I/O port 0xcf8.
The register is only visible for DWORD accesses. Furthermore, some
chipsets place other registers in the range 0xf8-0xcfb for sub-DWORD
accesses.
x86, hvm: If an MMIO handler returns X86EMUL_RETRY we must still
complete the dummy I/O request-response cycle. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>