Commit Graph
17897 Commits
Author SHA1 Message Date
Keir Fraser 65daf3ef4e vt-d: Minor fixing of interrupt remapping
When ir_ctrl->iremap_index == -1, it means there is no remap
entry. So it needn't to convert from remap format to normal ioapic
format.

Signed-off-by: Weidong Han <weidong.han@intel.com>
2008-06-27 14:11:41 +01:00
Keir Fraser c8af9ce961 tapdisk: Fix qcow2 for images > 2 GB
Signed-off-by: Kevin Wolf <kwolf@suse.de>
2008-06-27 14:03:52 +01:00
Keir Fraser 6ee2f5693f x86, shadow: Fix OOS bug on domain teardown.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-06-27 13:45:55 +01:00
Keir Fraser 40f4c996cd PV-GRUB: fix reiserfs 64bit support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-20 18:42:45 +01:00
Keir Fraser d067e4b077 Out-of-sync L1 shadows: always unsync pages on guest writes.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-06-20 18:41:50 +01:00
Keir Fraser 047782fa01 Out-of-sync L1 shadows: OOS snapshot.
Make snapshots of guest pages on unsync to allow faster revalidation
of OOS pages.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-06-20 18:41:09 +01:00
Keir Fraser 7ee9469202 Out-of-sync L1 shadows: Fixup Tables
This patch implement a very simple non complete reverse map for OOS
pages writable mappings to avoid shadow brute-force search on resyncs.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
2008-06-20 18:40:32 +01:00
Keir Fraser 3c7fba7fd8 Out-of-sync L1 shadows: OOS base
This patch implements the basic mechanisms to get pagetables out of
sync and back in sync again.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2008-06-20 18:39:45 +01:00
Keir Fraser 63043beac5 PV-GRUB: compilation fix caused by 17880
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-20 18:37:29 +01:00
Keir Fraser fd9d7bdc9e AMD PowerNow! in Xen
This patch set moves support for AMD's PowerNow! technology from
dom0 into the hypervisor, now that there is support for
transferring ACPI data to the hypervisor.  It will only work for
AMD processors that support the architectural P-state driver,
such as 3rd generation Opterons, Phenoms, and Turion Ultras.

This patch creates the Architectural P-state driver inside
of the Xen hypervisor and hooks it into the Xen code.  It
has been tested at AMD with a variety of para- and fully-
virtualized guests for a week without regressions.

Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Acked-by: Conny Seidel <conny.seidel@amd.com>
2008-06-20 18:02:46 +01:00
Keir Fraser 639f3f1a22 minios: fix add_id_to_freelist(0)
add_id_to_freelist(0) would make get_id_from_freelist() always return 0.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-20 17:45:23 +01:00
Keir Fraser 0e05d6cdd8 minios: do not systematically free the page under shared info, as the
guest booted by PV-GRUB will need it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-20 17:44:50 +01:00
Keir Fraser e0dd5c3b38 Clean up domain_create() interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-20 15:21:26 +01:00
Keir Fraser 767332506f x86 acpi: Clean up output tracing. Ensure it is synced to serial line
before entering Sx state.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-20 15:21:04 +01:00
Keir Fraser 947835578c [IA64] compilation fix caused by 17880:d3a87899985d
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-20 12:26:23 +01:00
Keir Fraser a1b2027c86 Compilation fix for x86_64 caused by 17880:d3a87899985d.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-20 12:18:10 +01:00
Keir Fraser 50bddc9307 libxc: The following patch replace the libxc interface to use
vcpu_guest_context_any_t (which is both 32 and 64 bits) instead of
vcpu_guest_context_t.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-19 16:15:05 +01:00
Keir Fraser c385f786c2 vmx: Clean up and fix guest MSR load/save handling:
1. msr_bitmap/msr_area/msr_host_area must be freed when a vcpu is
    destroyed
 2. vmx_create_vmcs()/vmx_destroy_vmcs() are only ever called once,
    and can hence be simplified slightly
 3. Change vmx_*_msr() interfaces to make it crystal clear that they
    operate only on current (hence safe against vmwrite() and also
    against concurrency races).
 4. Change vmx_add_*_msr() implementation to make it crystal clear
    that msr_area is not dereferenced before it is allocated.

Only (1) is a bug fix. (2)-(4) are for code clarity.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-19 11:09:10 +01:00
Keir Fraser d9a2559fc4 x86: Must use a softirq to defer dom0 NMI
notification. tasklet_schedule() contains a spinlock and is unsafe in
NMI context.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-18 14:17:10 +01:00
Keir Fraser 8da3809869 ioemu: Fix usbdevice parameter to encode vbd type.
usbdevice = "disk:<filename>"
expect a raw device (as this probably is the most usual case) and
   usbdevice = "disk-qcow:<filename>"
expect a COW image (autodetected, probably qcow2).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-06-18 11:55:34 +01:00
Keir Fraser 19d9892b3d x86: Intel wants the TSS busy flag set when we do a vmentry.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-18 09:46:36 +01:00
Keir Fraser cc5871d6da ioemu: generic PCI device config-space emulation
This patch is an extension for qemu-dm to enable emulation of generic
PCI devices. The information for the PCI devices can be passed by
command line parameter.

The command line parameter is "-pciemulation" followed by the
information which contains a label and hex value of the configuration
registers separated by ":".

The configuration registers for each PCI device are below.
vendorid
deviceid
command
status
revision
classcode
headertype
subvendorid
subsystemid
interruputline
interruptpin

This is an example of command line parameter.

 -pciemulation hba1:1240:0780:0002:0:0:010000:0:10b5:0777:05:1

Signed-off-by: Shinji Matsumoto <smatsumoto@marathontechnologies.com>
2008-06-18 09:40:39 +01:00
Keir Fraser 0a8346854e ioemu: Disable format auto-probing in monitor command change
Format auto-probing of writable images is a security hole.  The last
known remaining instance is monitor command change.  Disable probing
there and use raw.  This breaks change for images in all other
formats.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2008-06-18 09:39:14 +01:00
Keir Fraser 030c31dd18 minios: fix gnttab allocation boundary
The gnttab_sem is already fed during initialization's put_free_entry
loop.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:38:11 +01:00
Keir Fraser 5201eb72cb doc: Describes a generic 686 via the cpuid configure.
Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
2008-06-18 09:37:40 +01:00
Keir Fraser a2c7db64f5 Add PV-GRUB
This fetches GRUB1 sources, applies the {graphical, print function,
save default, and ext3_256byte} patches from debian, and applies a
patch to make it work on x86_64 and port it to Mini-OS.  By using
libxc, PV-GRUB can then "kexec" the loaded kernel from inside the
domain itself, hence permitting to avoid the security-concerned
pygrub.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:36:47 +01:00
Keir Fraser 7074b13cee minios: fix declaration after code
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:35:06 +01:00
Keir Fraser f37c7b6f6a mm.c: use local variable domain pointer
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-18 09:34:26 +01:00
Keir Fraser 0a9b2d786b stubdom: fix using minios frontends directly when libc is actived
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-18 09:32:50 +01:00
Keir Fraser dbd56b5c30 minios,stubdom: Add OBJ_DIR parameter to compile outside sources,
which permits to easily compile mini-os in various flavors. Also clean
some parts of stubdom build.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-17 09:36:25 +01:00
Keir Fraser 96d7365113 ioemu: move xenfb frontend (used by stubdom) to its own file, since it
does not really belong to hw/, but to /, like sdl.c and vnc.c.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-06-17 09:35:36 +01:00
Keir Fraser 459d650b0a [IA64] trivial compilation fix caused by c/s 17847:8a0415fac759.
This patch fixes the following compilation error caused
by c/s 17847:8a0415fac759.

machine_kexec.c: In function 'arch_crash_save_vmcoreinfo':
machine_kexec.c:201: error: 'frametable_pg_dir' undeclared (first use in this function)
machine_kexec.c:201: error: (Each undeclared identifier is reported only once
machine_kexec.c:201: error: for each function it appears in.)

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-16 16:35:17 +01:00
Keir Fraser 31192a56d0 vmx: Allow restore of context from a non-Intel processor. In
particular, VMX requires segment 'granularity' to be set correctly, so
we force it if need be in vmx_set_segment_register().

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-16 15:22:41 +01:00
Keir Fraser 7280aab360 amd svm: Do not touch (non-existent) attr and selector fields for GDTR
and IDTR in the VMCB in svm_set_segment_register(). This is just for
clarity of code and to prevent any issues in the future.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-16 15:21:49 +01:00
Keir Fraser 3224311e2a vt-d: Quieten down overzealous logging.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-16 11:49:15 +01:00
Keir Fraser 516863bfc1 x86_emulate: Fix the segment-load function
Fix the non-conforming type check and uses the consistent method to
fetch the cpl value as function get_cpl().

Also make sure vm86 mode is properly handled when determining whether
in real mode or protected mode -- in various respects vm86 mode can
act like both.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-16 11:24:17 +01:00
Keir Fraser 7ea5efa136 32-on-64: Fix compat-access macros to use correct underlying HVM accessors.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 16:10:50 +01:00
Keir Fraser 665d7a5c3d pv-on-hvm: Fix panic-handler code to work on wider range of kernels.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 15:31:35 +01:00
Keir Fraser 2754857001 Bring back console_start_log_everything() as a milder alternative to
console_start_sync(). Revert keyhandler logic to use it. The
difference now is that serial logic is updated to not drop characters
if inb a log_everything region. Still this is milder than a sync
region since the async buffer must be filled before we start to
busy-wait on each character.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 14:15:00 +01:00
Keir Fraser 8b53284ae7 [ACM] Pass uuid to created policy
A UUID needs to be passed to the created policy.

Signed-off-by: stefan Berger <stefanb@us.ibm.com>
2008-06-13 13:55:50 +01:00
Keir Fraser 639bf0b3c7 [ACM] Enable labeling of resources as inaccessible
Enable the labeling of (disk-type) resources with the special label
__INACCESSIBLE__ to prevent unlabeled domains from accessing them.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2008-06-13 13:55:19 +01:00
Keir Fraser d46f3d3ab1 hvm, 32-on-64: Allow a 32-bit x86 hvm guest access to any memory_op().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 13:50:23 +01:00
Keir Fraser faef567a6b Introduce guest_handle_subrange_okay() for checking sub-sections of an
argument array. Needed where a compat shim is splitting up a 32-bit
guest's larger argument array, and only the currently-active part of
the translated array is contained within the compat_arg_xlat_area.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 13:49:56 +01:00
Keir Fraser a01be666f1 32-on-64: Fix is_compat_arg_xlat_range().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 13:48:13 +01:00
Keir Fraser 6c6d249dd5 32-on-64: Fix error handling for XENMEM_decrease_reservation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 13:47:28 +01:00
Keir Fraser bf291c0fbc Improve serial output when dropping characters to drop them in big
batches. Printing one character in one thousand is not useful!

Also make debug handlers all print synchronously.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 11:39:42 +01:00
Keir Fraser be5b11f388 kexec: Fix the 32-bit build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 11:21:58 +01:00
Keir Fraser a1d529a86b hvm: Fix the realmode live migration issue with Intel EPT
The patch save/restore the HVM_PARAM_IDENT_PT parameter, then the live
migration during real mode with EPT may work fine.

Signed-off-by: Xiaohui Xin <Xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-13 10:13:25 +01:00
Keir Fraser 4565fb811d hvm: Fix max_mapped_pfn when using 2MB super pages.
Fixes booting Linux guest allocated more than 4G memory.
  - The p2m table will track the max_mapped_pfn, and while doing
    p2m_gfn_to_mfn(), if the gfn is higher than max_mapped_pfn, the
    function will return _mfn(INVALID_MFN). This makes the Linux guest
    kernel panic.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
2008-06-13 09:56:49 +01:00
Keir Fraser 65ce603cc1 extract vmcoreinfo from /proc/vmcore for Xen
- the machine address and the size of the vmcoreinfo area is returned
  via the kexec_op(get_range) hypercall
- fill the vmcoreinfo data when the kexec_op(crash load) hypercall
  is called

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
2008-06-13 09:54:03 +01:00