Commit Graph
17701 Commits
Author SHA1 Message Date
Keir Fraser cf6e75bd08 stubdom: support constructors and destructors
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:09:08 +01:00
Keir Fraser 178dcab520 ioemu: drop unused shared_vram variable
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:08:48 +01:00
Keir Fraser 90ac793688 shadow: check for gfn_to_mfn returning INVALID_MFN
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-22 15:08:14 +01:00
Keir Fraser b6615aaac9 hvmloader: Fix pci_setup() to not skip BAR remapping for virtual VGA devices.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 11:04:02 +01:00
Keir Fraser 6055fb83ae x86: Change a local label in asm entry stubs to really be local.
This prevents it appearing in crash traces, where it can be a bit confusing.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 10:41:49 +01:00
Keir Fraser 5df6162403 x86: Remove 32-bit non-PAE code from dom0 builder, and avoid use of
get_page_type() on pagetable pages (pending support for preemptive
get_page_type(), as dom0 builder would be an awkward place to deal
with preemption).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-22 10:40:40 +01:00
Keir Fraser 2ce4e98c30 libxc, x86: Fix CPUID inline asm for x86/64.
Must save all 64 bits of RBX, not just the EBX sub-part.

Based on bug diagnosis and patch by Juergen Keil <jk@tools.de>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 16:55:11 +01:00
Keir Fraser e6b2e11c90 hvmloader: Lay out memory a bit differently -
* Cleanly define a scratch area for temporary storage
 * Raise Etherboot ROM out of the way of larger VGA BIOSes

Also detect virtual VGA adaptors more cleanly.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:23:03 +01:00
Keir Fraser e3bfa63c44 vgabios: Support VESA power management extensions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:19:41 +01:00
Keir Fraser 1357edf0df Handle IOMMU pagetable allocations when set_p2m_entry is called with
non-zero page order.
Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 11:07:23 +01:00
Keir Fraser 1a3f428d36 Intel EPT: Add page shattering logic for EPT when a super-page gets partially freed.
Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
2008-05-21 11:02:51 +01:00
Keir Fraser f219d911b7 Add statistic interface for cx.
Implement statistic interface for cx via sysctl & libxc. Provide a
easy way to collect processor cx info within dom0.

Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-05-21 10:59:49 +01:00
Keir Fraser c8ddf206ac x86: Make cx key handler print simpler but formatted info.
Signed-off-by: Wei Gang <gang.wei@intel.com>
2008-05-21 10:59:00 +01:00
Keir Fraser da61293b33 xend: Remove XendLogging dependency from a couple of generally useful
support modules.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
2008-05-21 10:57:08 +01:00
Keir Fraser f505be0a58 x86: Fix lapic timer stop issue in deep C state
Local APIC timer may stop at deep C state (C3/C4...) entry/exit. this
patch add the logic that use platform timer (HPET) to reenable local
APIC timer at C state entry/exit.

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-21 10:38:57 +01:00
Keir Fraser 306921aa6f xend: Support HVM S3 resume.
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:50:45 +01:00
Keir Fraser 232cae0f1c hvm: rombios interface for HVM S3
- add S3 package in ACPI DSDT table. Guest OS will get S3 value from
   this package and write the value to PM1A control register to
   trigger S3 suspend.
 - Add S3 resume logic in rombios post code. the CMOS shutdown register
   is used to indicate if this is a S3 resume.
 - if it is s3 resume, rombios will get wakeup vector from ACPI FACS
   table and jump to wakeup vector. Per ACPI spec, the wakeup vector
   jumping must be the forms CS:IP, in which CS=3D(wakeup vector>>4)
   IP=3D(wakeup vector)&0xF, for example, for vector=3D0x12345,
   CS:IP=3D0x1234:0x5

Note: clobber_entry_point will clobber the post entry, which make S3
resume not work. We will directly jmp to POST Entry if it in S3
Resume path.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:36:05 +01:00
Keir Fraser 367722ab70 ioemu: HVM virtual S3
- add S3 suspend logic in PM1A control register. when guest write
    specific value to this register,
    QEMU will trigger S3 sleep by
    * reset all qemu device
    * set CMOS shutdown status as S3 resume, so that rombios will do
      S3 resume later
    * request Xen to S3-suspend the guest

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Liping Ke <liping.ke@intel.com?
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:28:19 +01:00
Keir Fraser 4f050d52f5 xend: Fix bugzilla bug #1253.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-20 14:18:32 +01:00
Keir Fraser 509529e991 x86 hvm: Xen interface and implementation for virtual S3
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-20 14:17:15 +01:00
Keir Fraser cc62c82dd2 Merge with ia64 2008-05-20 09:55:50 +01:00
Keir Fraser 07a57a397e xm migrate: Better error report when attempt to migrate non-running domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-20 09:43:02 +01:00
Keir Fraser 7087fca7e1 ioemu: Fix interpretation of missing or zero vfb videoram
Changeset 17289:d97e61001d81: introduced vfb configuration parameter
videoram, defaulting to zero.  Value zero was interpreted as
unlimited.  Changeset 17630:53195719f762 accidentally dropped the
special case for zero, which broke guests that don't specify videoram,
or specify videoram=0.  Restore the old behavior.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2008-05-20 09:41:52 +01:00
Isaku Yamahata f1734953c7 merge with xen-unstable.hg 2008-05-20 11:33:15 +09:00
Keir Fraser 8ef19bcf73 svm: Better handling of NMI injection -- avoid nested NMIs.
We do this by emulating the NMI mask which blocks NMI delivery until
next IRET on native hardware.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-19 10:03:26 +01:00
Keir Fraser a7b0dfd0b3 Fix showing of CPU Affinity by xm vcpu-list
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-19 09:46:02 +01:00
Keir Fraser e70a0fa88c x86: Fix kexec reservation
The reservation of space for the kexec area in
kexec_reserve_area is incorrect. It specifies the
start address and size to reserve_e820_mem when
the args should be start and end.

Bug found and fixed by Dave Anderson.

Signed-off-by: Bill Burns <bburns@redhat.com>
2008-05-19 09:43:42 +01:00
Keir Fraser c1ab310e08 ioemu: Fix load of PCI-device IRQ state after save/restore.
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-19 09:42:18 +01:00
Keir Fraser ff66eaed97 stdvga: handle 64bit io operations
Handle 64bit operations in stdvga instead of throwing away the
upper 32bits.

This fixes some noisy xen messages like "invalid io size: 8".

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-05-19 09:40:53 +01:00
Isaku Yamahata 90f9f79f98 [IA64] compilation fix of 17669:d0817f08599a
compilation fix of 17669:d0817f08599a.
The change set needs the definition of do_get_pm_info().
Define the stub function.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-16 22:25:47 +09:00
Isaku Yamahata 2bf251e2db merge with xen-unstable.hg 2008-05-16 21:59:38 +09:00
Keir Fraser 2950bd57c1 Provide Px statistic data to user through libxc
Sampling and collecting dynamic Px statistic data, including
Px state value, Px count, Px residency time, Px transition
matrix, etc. Provide Px statistic data to user through libxc.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-05-16 09:37:19 +01:00
Keir Fraser 652c2b9174 [IA64] trivial compilation error fix for 17645:8d18e52a1b23.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-16 09:31:03 +01:00
Keir Fraser d4c079bdc5 ioemu: serial save/load fix
This patch fixes several bugs in serial.c
 (1) A typo in serial_save() where qemu_get_8s is called (should be
     qemu_put_8s)
 (2) No support provided in serial_load() for version_id == 1 (should
     unmarshal a 1 byte s->divider and should provide a default value
     for s->fcr)
 (3) Call serial_ioport_write() to initialize s->fcr. It is not
     sufficient to load its value; other hidden values (such as
     s->recv_fifo.itl) must be re-initialized.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
2008-05-16 09:30:10 +01:00
Keir Fraser b93de169c3 xend: Device configurations of suspended virtual machines are inaccessible
The device configurations of suspended virtual machines are
inaccessible even though for example the UUIDs of the VIFs and VBDs
are known and returned when VM.get_VIFs()/get_VBDs() is called, though
when trying to access their records for example, then handle is
reported as being invalid. This patch fixes this.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-05-15 16:40:51 +01:00
Keir Fraser 65e7eed196 ioemu: Do not try to guess backing file format when using qcow vbds.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2008-05-15 15:10:05 +01:00
Keir Fraser ff635e12aa x86, hvm: Support 2MB superpage allocations for HVM guests.
Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Li Xin, B <xin.b.li@intel.com>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-15 11:09:16 +01:00
Keir Fraser 30193253a0 x86: Fix an S3 bug caused by x_firmware_waking_vector
According to ACPI spec., x_firmware_waking_vector in FACS is for
waking up in protected mode and firmware_waking_vector is for in real
mode. Xen once use x_firmware_waking_vector which can make S3 failed
on some platform. This patch fixed the bug by using non-x one.

Signed-off-by: Huacai Chen <huacai.chen@intel.com>
2008-05-15 09:38:00 +01:00
Keir Fraser a2388da52d ioemu: Fix PVFB backend to limit frame buffer size
The recent fix to validate the frontend's frame buffer description
neglected to limit the frame buffer size correctly.  This lets a
malicious frontend make the backend attempt to map an arbitrary amount
of guest memory, which could be useful for a denial of service attack
against dom0.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2008-05-15 09:36:38 +01:00
Isaku Yamahata 3084062300 merge with xen-unstable.hg 2008-05-15 16:23:56 +09:00
Isaku Yamahata eab9c05c43 [IA64] Build new infrastructure for fast fault handling path.
1. use jump table to dispatch virtualization faults.
2. for virtualization faults, handler is executed with psr.i=0, psr.ic=0,
   psr.bn=0. less context switch.
3. use register stack instead of memory stack to switch context.
4. Use C code to handle faults as possible, to reduce maintanance efforts,
	remove assembly handlers for rsm , ssm, mov to psr, mov to rr.
5. add fast path C handler for rsm, ssm, mov to psr, rfi.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2008-05-15 14:53:48 +09:00
Isaku Yamahata 5d8bb4c835 [IA64] fix sal emulation.
fix sal emulation, SAL_SET_VECTORS, SAL_MC_SET_PARAMS.
It allowed any domains to change system wide state. But only
dom0 is able to change it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-15 14:18:38 +09:00
Isaku Yamahata 8d22fa96c8 [IA64] remove warnings in replace_grant_host_mapping()
This patch removes warnings in replace_grant_host_mapping().
> mm.c: In function 'replace_grant_host_mapping':
> mm.c:2194: warning: 'new_page_mfn' may be used uninitialized in this function
> mm.c:2190: warning: 'old_pte.pte' may be used uninitialized in this function
> mm.c:2188: warning: 'cur_pte.pte' may be used uninitialized in this function

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-15 14:18:38 +09:00
Isaku Yamahata e6d04af593 [IA64] remove warning in vmx_final_setup_guest()
This patch removes the warning in vmx_final_setup_guest()
> vmx_init.c:497: warning: unused variable 'sw'

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-05-15 14:18:38 +09:00
Keir Fraser 3b17e1a5e9 x86: Make MSI-X work with 64-bit BARs
The code for working out the base address of a 64-bit BAR currently
puts the two halves together in the wrong order and leaves the type
bits in the resulting value.   It also treats
PCI_BASE_ADDRESS_MEM_TYPE_64 as a flag rather than an enumeration
value.

Signed-off-by: Neil Turton <nturton@solarflare.com>
2008-05-14 14:12:53 +01:00
Keir Fraser d6f001cb91 x86: Implement cpufreq ondemand policy
Based on initialized cpufreq infrustructure, setup a timer on
each PSD domain, periodicly sample cpu load and driver cpu to
some Px state according to cpu load and cpu coordination.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-05-14 13:55:26 +01:00
Keir Fraser fb7a4925f3 x86: Setup cpufreq infrasturcture, driver and tools
Initializing basic Px data structure, setup cpufreq infrastructure:
* cpufreq data structure initializing, including freq table and policy;
* basic driver and tools, to measure freq or drive to Px target;
* setup _PSD domain to coordinately work;

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-05-14 13:55:11 +01:00
Keir Fraser 2fa7bee0a0 Get ACPI Px from dom0 and choose Px controller
Add platform op hypercall case to get ACPI Px info from dom0.
Chose Px controller from dom0 (cpufreq=dom0-kernel)
or hypervisor (cpufreq=xen).

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-05-14 13:50:46 +01:00
Keir Fraser a295f2a1c6 ia64: fix domain restore
A domain fails to restore on IA64 since cset 17524:18727843db60.
This patch fixes it temporarily. Guest CPUID configuration for IA64
might be implemented in the future.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-05-14 13:25:19 +01:00
Keir Fraser 830c460dc6 Fix XEN_SYSCTL_physinfo to handle NUMA info properly.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-14 09:52:25 +01:00