Commit Graph
12192 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 7ffcc43b02 [XEN] Extend dom0_mem syntax to support min/max clamps.
dom0_mem=[min:<min_amt>,][max:<max_amt>,][<amt>]

<min_amt>: The minimum amount of memory which should be allocated for dom0.
<max_amt>: The maximum amount of memory which should be allocated for dom0.
<amt>:     The precise amount of memory to allocate for dom0.

Notes:
 1. <amt> is clamped from below by <min_amt> and from above by available
    memory and <max_amt>
 2. <min_amt> is clamped from above by available memory and <max_amt>
 3. <min_amt> is ignored if it is greater than <max_amt>
 4. If <amt> is not specified, it is calculated as follows:
    "All of memory is allocated to domain 0, minus 1/16th which is reserved
     for uses such as DMA buffers (the reservation is clamped to 128MB)."

Each value can be specified as positive or negative:
 If +ve: The specified amount is an absolute value.
 If -ve: The specified amount is subtracted from total available memory.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-01 11:18:29 +00:00
Ewan Mellor aeade7ad12 Merge.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-01 10:41:44 +00:00
Ewan Mellor fb2358c250 Merge xen-api.hg changeset 142:d75413e65ba319d577c764be6c13efa5eae6da1c.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-01 10:40:46 +00:00
Tim Deegan 3369945812 [XEN] Prefetch multiple shadow entries per pagefault
Also, clean up the shadow *_propagate/fault routines.
This allows us to quickly dispatch some guest-not-present faults
and most MMIO accesses without taking the shadow lock.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-11-01 10:31:11 +00:00
kfraser@localhost.localdomain 4861255f5c [XEN] Fix building on OpenBSD.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-01 10:02:00 +00:00
kfraser@localhost.localdomain a34ae4f0ce [XEN] Fix deadlock in printk().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-01 09:55:43 +00:00
kfraser@localhost.localdomain 2004d63d13 Stop enforcing -g for some of the tools.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-31 18:24:57 +00:00
kfraser@localhost.localdomain f0d0046d31 [XEND] Improve error message for unparsed disk modes.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-31 18:24:44 +00:00
Tim Deegan 9e0d4d34f3 [HVM] Use correct types for guest physical addresses
Guest physical addresses are not guaranteed to fit in either a pointer
or an unsigned long int; use paddr_t for them.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-10-31 16:42:46 +00:00
kfraser@localhost.localdomain 342c7011f6 [HVM] Add support for 'add r8,m8' instruction to memory-mapped I/O.
Signed-off-by: Kevin Tronkowski <ktronkowski@virtualiron.com>
Signed-off-by: Ben Thomas <bthomas@virtualiron.com>
2006-10-31 16:22:39 +00:00
kfraser@localhost.localdomain 27c01325d4 [NET] front: Clean up error handling. This eliminates earlier
workaround patch for an observed crash.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 16:18:07 +00:00
kfraser@localhost.localdomain fc229c860b Clean up recent changes to reboot code. This fixes PV save/restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 15:54:03 +00:00
kfraser@localhost.localdomain e85c592548 Update .hgignore 2006-10-31 15:04:05 +00:00
kfraser@localhost.localdomain d138c1c2c1 [HVM] vlapic: Synchronously determine PPR register value whenevr it is needed.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 14:39:50 +00:00
kfraser@localhost.localdomain 779aa4f538 [VMX] Replace vmx_load_cr2() with direct write to %cr2.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 13:26:49 +00:00
kfraser@localhost.localdomain 883236e49a [HVM] ACPI: Clean up table definitions, move under hvmloader/
directory pending tighter integration of table generation
into hvmloader. This patch also includes the TPM TIS SSDT
generator from Stefan Berger at IBM.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 12:42:50 +00:00
Steven Smith 69ff2305bb Merge. 2006-10-31 11:44:47 +00:00
Steven Smith 80cc85d437 [XEN] Add a warning to the i8259 if we generate spurious IRQs. Tidy up
a little while I'm here.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-10-31 11:44:28 +00:00
Steven Smith 47132af16f [PV-ON-HVM] Don't generate lots of spurious interrupts when using event
channel upcalls.

The issue here was that the Xen platform PCI interrupt is only updated
when you return from the hypervisor into guest context, and so remained
asserted for a short interval after the interrupt handler ran.  If
it happened that the first subsequent trap to the hypervisor was
for unmasking the 8259 interrupt again, the unmasking caused the interrupt
to be reinjected.  This caused an edge on the chaining interrupt from
the slave PIC to the master.  The platform interrupt on the slave
would then be cleared as we returned to the guest, and so you
eventually end up injecting an interrupt on the master chained
interrupt with nothing pending on the slave, which shows up as
a spurious interrupt in the guest.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-10-31 11:38:55 +00:00
Steven Smith 937f23487a [NETFRONT] Make sure we don't crash if the backend goes to state
Closing before we have a chance to connect.  This can happen if
there's an error while connecting.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-10-31 11:31:34 +00:00
Steven Smith 98f201b0e5 Merge. 2006-10-31 10:12:35 +00:00
Steven Smith 111a11e5f5 [HVM][LINUX][TOOLS] Split control/reboot_module into control/feature-reboot
and control/feature-sysrq.  This is more consistent with the other
PV device protocols.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-10-31 10:11:53 +00:00
Emmanuel Ackaouy bcaf50a458 [XEN] Cleanup and optimize layout of credit scheduler stats.
Also carve out per VCPU stats for clarity and add per-VCPU
migration counter.
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2006-10-31 10:10:17 +00:00
Steven Smith 65ae4fc8cd [HVM][LINUX][TOOLS] Make xm {shutdown|reboot} do something sensible for HVM
domains with PV drivers loaded.  This patch creates a new PV-on-HVM
module, reboot.ko, which, when loaded, creates control/reboot_module
in the store.  The tools notice this, and disable the watch which would
normally destroy HVM domains which are the target of an xm shutdown
command, allowing the reboot module to shut the domain down cleanly.

Signed-off-by: Tetsu Yamamoto <yamamoto.tetsu@jp.fujitsu.com>

(Checkin comments by Steven Smith <sos22@cam.ac.uk>)
2006-10-31 09:54:49 +00:00
kfraser@localhost.localdomain f99eaa7a3b [NET] back: Remove warning about non-zero tx queue length.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-31 09:49:31 +00:00
Emmanuel Ackaouy 87410b08dc [XEN] Cleanup and improve accuracy of credit scheduler accounting code
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2006-10-30 17:35:11 +00:00
kfraser@localhost.localdomain 11b39cba56 [LINUX] Fix build breakage from previous patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-30 14:28:29 +00:00
kfraser@localhost.localdomain 3d91901864 [LINUX] Use CONFIG_XEN_COMPAT_030002 where possible.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:14:46 +00:00
kfraser@localhost.localdomain fa088340b4 [LINUX] Declare structs as 'static __initdata' where possible.
Probably still not catching all possible cases, but using static
(where not already the case) makes the code size smaller, and using __initdata
has the usual advantages.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:09:13 +00:00
kfraser@localhost.localdomain 8ba0049cfc [LINUX] privcmd: Range-check hypercall index.
Otherwise, bugs in e.g. libxc may bring the kernel down.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2006-10-30 14:04:44 +00:00
kfraser@localhost.localdomain f7c8af3a64 [XEN] HVM: Clean up and simplify vlapic device-model code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-30 13:53:09 +00:00
kfraser@localhost.localdomain 30c8005e6e [HVM][VMX] Enable VMX TPR shadow feature.
x64 Windows uses CR8 to access TPR very frequently. This patch enables
TPR shadow and allows mov-from/to-CR8 to access it directly; tests
indicates it can boost greatly the performance of x64 Windows 2003.

Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2006-10-30 10:42:27 +00:00
kfraser@localhost.localdomain a75394cc81 [HVM] Fix Qemu-dm serial issues:
1. Retry transmit via a polling timer if a byte cannot be written
    immediately to its destination.
 2. Turn off output processing of raw serial lines.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-30 09:45:17 +00:00
Ewan Mellor ad0cc56145 Fix handling of SXP for devices through device_add -- this solves the
Invalid device (uname) problem that breaks just about everything once you've
done xm block-attach.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-10-29 19:28:26 +00:00
kaf24@firebug.cl.cam.ac.uk 8ec9ef184c [XEN] Add implicit "\n" back into MEM_LOG(). Removed by mistake.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-28 12:30:38 +01:00
kaf24@localhost.localdomain df82928d90 [XEN] Some cleanups to the log-level stuff. Largely this
is a rename and slight interface change to DPRINTK (now
replaced by dprintk() and gdprintk()). Also shuffle some
log-level definitions around and tweak the semantics of
the upper threshold.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-27 23:47:30 +01:00
kaf24@localhost.localdomain 9bbcb18fab [QEMU] Add a TIS device model compliant to the 1.2 TPM specification.
It implements all registers necessary to make the Linux TIS driver
work (tpm_tis.c). All of the basic registers supported by this type of
device are implemented. Also the locality selection has been
implemented, but has not been tested. The legacy registers as
described in the specification are not supported.

Current caveat: The device has so far not yet been integrated with the
virtual TPM available in the repository. It will require changes to
the virtual TPM spawned by the vTPM manager to offer an additional message
interface. The TIS interface itself then needs to have an additional
transport implemented. (see vTPMTransmit array).

The relevant specification for the device model can be found here:
https://www.trustedcomputinggroup.org/groups/pc_client/TCG_PCClientTPMSpecification_1-20_1-00_FINAL.pdf

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-27 19:15:48 +01:00
kaf24@localhost.localdomain 72f529665d [QEMU] Helper functions to interface with the xenstore and read device information from it.
- detect what types of devices a domain has or whether a domain has a
   device of a certain type
 - read the content of a variable related to a device, i.e.,
   hotplug-status
 - subscribe to changes of the hotplug status of a device for not
   having to poll the status

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-10-27 19:13:51 +01:00
kaf24@localhost.localdomain 45e3a175ec [XEN] Logging parameters for ia64 code.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-27 18:57:02 +01:00
kaf24@localhost.localdomain ccfeaa384f [XEN] Logging parameters for powerpc code.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-27 18:56:44 +01:00
kaf24@localhost.localdomain 8eda7b87ab [XEN] Logging parameters for x86 code.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-27 18:56:24 +01:00
kaf24@localhost.localdomain 3d4d4e683a [XEN] Logging parameters for common code.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-27 18:55:16 +01:00
kaf24@localhost.localdomain 909fc98287 [XEN] Implement log levels. It adds the thresholds and code to printk
to implement the thresholds.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-27 18:52:55 +01:00
kaf24@localhost.localdomain 26cf03554a [XEN] Implement rate-limited logging.
Taken from Andi Kleen's rate limit in the Linux kernel.

This keeps large amounts of prints in the HV down.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2006-10-27 18:46:20 +01:00
kaf24@localhost.localdomain 25884d981b [XEND] Do not delete VNC password from configuration.
Fixes reboot of HVM guest when VNC authentication is in use.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-27 18:15:14 +01:00
kaf24@localhost.localdomain 9033715d28 [XEND] Do not delete VNC password from configuration.
Fixes reboot of HVM guest when VNC authentication is in use.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-27 18:15:14 +01:00
kaf24@localhost.localdomain 98781cd038 [XEN] perf counters: Fix NULL-pointer check. Should happen later.
Signed-of-by: Kouya Shimura <kouya@jp.fujitsu.com>
2006-10-27 18:10:37 +01:00
kaf24@localhost.localdomain 0fd9a9f411 [HVM] Ensure that, if AP is blocked, it is woken by interrupt delivered by IOAPIC.
This fixes 64-bit SMP Windows 2k3 boot.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-10-27 18:02:40 +01:00
kaf24@localhost.localdomain ee82b836b3 [HVM] Fix SMP timer issues:
* Sync AP TSCs with BP at startup
 * Only halt BP TSC when descheduled
 * Correctly handle IPIs on timer vector
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
2006-10-27 18:00:03 +01:00
kaf24@localhost.localdomain 94c50cc02b [QEMU] ne2000: Stop memory access beyond buffer
As a program that runs in dom0 which serves users from guests,
the qemu drivers need to be vigilant to the input that comes
from the guests since they may be malicious.

As it is there are multiple ways to get ne2000 to read/write
memory beyond the 48K buffer that it has allocated for each
adapter.

This patch checks the addresses and prevents this from occuring.

The boundary is checked each time since it's changed for every
packet received while the other parameters are only changed
(by the guest) during setup.

Signed-off: Herbert Xu <herbert@gondor.apana.org.au>
2006-10-27 17:50:40 +01:00