Commit Graph
480 Commits
Author SHA1 Message Date
Keir Fraser 907e0a6046 hvm, vt-d: Add memory cache-attribute pinning domctl for HVM
guests. Use this to pin virtual framebuffer VRAM as attribute WB, even
if guest tries to map with other attributes.
Signed-off-by: Disheng Su <disheng.su@intel.com>
2007-10-23 14:38:47 +01:00
Keir Fraser de91f88afe vt-d: Fix PCI=device parsing.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-22 14:26:45 +01:00
Keir Fraser 808c9bd490 ia64: make buffered pio aware of save/restore.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-22 09:42:49 +01:00
Keir Fraser 88561d3058 hvm: Fix PCI-passthru string parsing.
Fixes crash of xend during HVM domain ccreation.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-20 09:30:00 +01:00
Keir Fraser 15f1e5e394 vt-d: Detect and report failure to assign a pass-thru PCI device.
Signed-off-by: Weidong Han <weidong.han@intel.com>
2007-10-19 09:31:03 +01:00
Keir Fraser cefbbff3f5 tools: Remove bogus external uses of xc_private.h. Clean up libflask.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-18 15:12:03 +01:00
Keir Fraser a5ed18b7c4 ioemu: Allow xvd* to co-exist with hd*.
- Whether hdN is defined first is checked.
 - If hdN is defined, xvdN is not replaced with hdN.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-10-16 09:40:08 +01:00
Keir Fraser 055562320a ioemu: Add keymap definitions to the Dutch Belgium keymap file.
Signed-off-by: Pat Campbell <plc@novell.com>
2007-10-15 14:03:08 +01:00
Keir Fraser 77b1ee94c3 ioemu: Allow blktap to be able to be booted as system volume for PV-on-HVM
- All xvdN disk is looked like hdN.
 - All tap disks are checked.(tap:aio, tap:sync, tap:vmdk, etc.)

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-10-15 12:24:35 +01:00
Keir Fraser 925bd0e8f7 Fix ioemu compile on Solaris
Solaris doesn't have RLIMIT_RSS at least; don't try to set rlimits.
Signed-off-by: John Levon <john.levon@sun.com>
2007-10-02 09:29:23 +01:00
Keir Fraser 67c97dc9f7 ioemu: Fixes for BSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-27 16:36:23 +01:00
Keir Fraser b85210e23c ioemu: security fixes for not-built or not-default-configured subsystems.
Patches originally proposed by S. Caglar Onur and cleaned up for
xen-unstable by Robert Buchholz <rbu@gentoo.org>.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-26 09:19:12 +01:00
Keir Fraser 563517920c [VTD] dynamically determines whether to link with libpci or not in QEMU.
This patch to ioemu/Makefile.target dynamically decides whether to
link with libpci or not base on the existence of /usr/include/pci
directory.

If /usr/include/pci exists, PCI passthrough is enabled.  Otherwise, it
is disabled.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
2007-09-20 09:40:49 +01:00
kfraser@localhost.localdomain 9e6ca368e2 PCI passthru: tools changes (generic and vt-d)
I have added CONFIG_PASSTHROUGH in ioemu/Makefile.target and
ioemu/hw/pc.c in attached vtd_tools2.patch.  This should turn off
libpci usage by default until user specifically enables it.

This can be safely check-in without breaking builds for people who do
not care about pass-through devices.  I will try to think of a better
way to enable this.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
2007-09-14 16:39:27 +01:00
kfraser@localhost.localdomain d068e61167 qemu-dm: fix block-raw io debug print
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
2007-09-14 16:08:39 +01:00
kfraser@localhost.localdomain 0ade6785a7 [QEMU] Enhance raw io reliability
For raw block device only :
log any I/O error and perform automatic read retry for CDrom
(improves MediaCheck with old installers).

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
2007-09-11 17:02:03 +01:00
kfraser@localhost.localdomain 4b7f2195f3 qemu: Backport qemu vnc/event-loop fix from upstream.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-09-11 17:00:25 +01:00
kfraser@localhost.localdomain 05cf544b87 xc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()
xc_map_foreign_batch() can succeed partially.  It is awkward to use
when you're only interested in complete success.  Provide new
xc_map_foreign_pages() convenience function for that kind of use.
Also convert two obvious calls to use it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2007-09-07 11:39:10 +01:00
kfraser@localhost.localdomain af6a326c1a qemu: Allow more IDE power management.
Made the QEMU IDE disk tolerate more power-mgmt commands, specifically:
        WIN_SETFEATURE(EN_AAM)  - enable automatic acoustic mgmt
        WIN_SETFEATURE(DIS_AAM) - disable automatic acoustic mgmt
        WIN_SETFEATURE(DIS_APM) - disable automatic power mgmt
        WIN_STANDBY
        WIN_SETIDLE1
        WIN_SLEEPNOW1
        WIN_STANDBY2
        WIN_SETIDLE2
        WIN_SLEEPNOW2
        WIN_STANDBYNOW2
These are all essentially no-ops, like existing support for EN_RLA
(enable read lookahead) and WIN_STANDBYNOW1.

This fixes a crash in the SLES9-SP3 64bit kernel when the powersaved
was started (with ACPI or ACM).  This guest really only needs EN_AAM,
DIS_APM, and WIN_SETIDLE1 support, but the others seemed sensible to
include.

I've excluded EN_APM since I'm unsure of what that's agreeing to do.
It's probably ok to include.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: David Lively <dlively@virtualiron.com>
2007-08-30 16:41:57 +01:00
kfraser@localhost.localdomain 6236121d5f qemu: Remove mapcache lock - we no longer have multiple threads in core qemu code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-30 15:35:10 +01:00
kfraser@localhost.localdomain 067b09326e ioemu: Avoid unaligned guest memory accesses on ia64.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-08-29 15:47:55 +01:00
kfraser@localhost.localdomain 72885c0fa3 ioemu: Avoid struct members clashing with POSIX apis
The TPM code in tools/ioemu/hw/tpm_tis.c has a struct containing a
number of function pointers with names open, close, read, write which
are the same as various POSIX apis already #included in the
file. POSIX allows these functions to be defined as macros and latest
GCC/glibc does indeed define them as macros depending on compiler
flags. This causes compile errors when deferencing the struct
members. The solution is either to change calls like   ctx->open () to
be (* ctx->open) (), or simply to rename the struct members. Since
this struct was only used inside that one file I simply renamed them.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2007-08-28 16:13:35 +01:00
kfraser@localhost.localdomain de01426fdf ioemu: error checkin when setting up the Cirrus Logic video device.
set_mm_mapping() may fail because of xc_domain_populate_physmap().  In
this case, we should not blindly go on; the xc_map_foreign_batch()
that follows will cause a page fault and, at best, get mapped in a
zeroed page from the dom0 (which is not what we want).  While I'm in
here, fix a memory leak on an error path.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2007-08-28 16:08:38 +01:00
Tim Deegan 3e3989b612 [HVM] Live-migration fixups after 15639:c585f993385c
Use the same xenstore area for log-dirty commands as for save/continue,
and avoid a race condition by acking the save command after the save.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-24 15:47:36 +01:00
Tim Deegan f6c12fc6b6 [HVM] Control qemu's state-save via xenstore, instead of SIGUSR1
This lets us verify that qemu has indeed stopped processing before
we start saving guest memory.  Also allow qemu to continue processing
after the save has happened, instead of exiting immediately.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-24 14:52:16 +01:00
kfraser@localhost.localdomain c5b151445d [IOEMU] Fix shift key for graphical vnc display
There is a problem in the input of the key in the VNC connection on
the HVM domain. When client's keyboard is not the same as the kind of
the keyboard of qemu-dm and GuestOS, it is not possible to input it
correctly.

   VNC client     qemu-dm & GuestOS
--------------+-----------------------
    ja             en-us               ==> NG
    en-us          en-us               ==> OK

Originally, the same keysym-code between client and qemu-dm is
transmitted. However, even if it is the same character, the state of
shift is different according to the kind of keyboard.

ex.
   "=" charactor
---------------------
en-us :  "="
ja    :  shift + "-"

Therefore, it is necessary to handle the state of the shift by setting
qemu-dm and GuestOS. There is information on whether shift is
necessary for each key for the keymap of qemu-dm.

ex.
 VNC client        : ja
 qemu-dm & GuestOS : en-us
 input key         : "="
 event client to qemu-dm :
  shift(push) >> "="(push) >> "="(release) >> shift(release)
 event qemu-dm to guest :
  shift(push) >> shift(release) >> "="(push) >> "="(release) >>
 shift(push) >>
shift(release)

This patch handled the state of shift from the set keymap.
When client's keyboard is not same as the kind of qemu-dm/GuestOS,
it is possible to input it correctly.
It was confirmed to input it correctly mutually with this patch
between en-us and ja.

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
2007-07-23 10:02:37 +01:00
Tim Deegan d0706d17dd [HVM] Qemu rtl8139: correct rx CRC calculation
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-16 14:28:54 +01:00
Tim Deegan e7cd1bdfea [HVM] Qemu rtl8139: correct ring-buffer wrapping.
The rx DMA should never overrun when it hits the end of a 64k buffer
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-16 14:27:12 +01:00
kfraser@localhost.localdomain 7263c43515 Merge with ia64 xen tree. 2007-07-12 09:53:58 +01:00
kfraser@localhost.localdomain ffc3f3c3db hvm: Re-introduce LPT1 device in ACPI tables.
Once the presence of LPT1 is baked into a Windows guest, it gets upset
if it is subsequently removed. Hence we add the 'LTP1' device object
back into the ACPI DSDT, and remove IRQ 7 from the list of IRQs usable
by the PCI-ISA links.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-11 13:49:11 +01:00
kfraser@localhost.localdomain fd0ba51b6e Make QEMU consistently report write caching support for emulated IDE
drives to fix a hang during SLES 9 HVM guest installation.

Without this, the SLES 9 installer kernels (32 and 64 bit) were
getting inconsistent information from QEMU as to whether the
(emulated) IDE drives support write caching (which they do).  So part
of the kernel thought write caching was enabled (and enabled the usage
of barrier writes) and part of it didn't, which triggered a bug in
which the same barrier write is submitted over and over again ...

Fixed by setting another bit in the WIN_IDENTIFY (IDE drive "identify"
command) response to indicate we really, truly support write caching.

Signed-off-by: David Lively <dlively@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-07-11 10:48:15 +01:00
Alex Williamson 2cae8465ac merge with xen-unstable.hg 2007-07-10 08:39:26 -06:00
kfraser@localhost.localdomain 3432f42875 hvm: Fix memcpy_words() asm in ioemu.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-10 14:42:23 +01:00
kfraser@localhost.localdomain 8d374ca1d1 Revert 15471:7ac7f147241405af83e7a9d748cf7b01279734fc
Block-device specifiers in ioemu can contain colons, so skipping
always past the first colon is not a good idea. Better solutions are
in the pipeline to solve the blktap issues.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 15:01:20 +01:00
kfraser@localhost.localdomain c33d399a6b hvm: Fix vnc keymap for Japanese keyboards.
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
2007-07-06 14:37:47 +01:00
kfraser@localhost.localdomain 48859c62ec hvm: Allow blktap to be able to be booted as system volume for PV-on-HVM
When blktap was booting system volume, PV-on-HVM domain was not able
to be  started.

The configuration file is specified as follows.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ]

The error occurred by the initialization of system volume in qemu-dm.
qemu: could not open hard disk image 'aio:/xen/test/rhel5ga_full.img'

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 14:22:59 +01:00
kfraser@localhost.localdomain afc6d44afb hvm: Fix keymap for Windows keys.
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
2007-07-03 10:06:48 +01:00
Alex Williamson 63ac5a7944 [IA64] Typo fix
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-07-02 14:29:36 -06:00
Alex Williamson 19472a02dd merge with xen-unstable.hg 2007-07-02 12:19:26 -06:00
Alex Williamson f563c36712 [IA64] Fix NVRAM data cannot be saved when guest execute "reboot"
Also fix "xm reboot" instruction in Xend.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2007-07-02 09:38:51 -06:00
kfraser@localhost.localdomain 837eceb667 ioemu: Fix ifdef __x86_64__
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-25 16:52:39 +01:00
kfraser@localhost.localdomain d5efa0e4b7 hvm: Fix ioemu Qcow support.
Normally by default, SIGUSR2 is not blocked, so the signal masks of
SIGUSR2 in all threads is unblocked.

When creating HVM guest, if we use the Qcow format image file, in the
main thread, Qcow uses SIGUSR2 to be notified of the completion of the
request after it issues an AIO request; in tools/ioemu/block.c:
bdrv_read_em(), in some point between bdrv_aio_read() and
qemu_aio_wait(), Dom0 may send a SIGUSR2 to Qemu immediately to
indicate the completion of an AIO request -- since at the moment
SIGUSR2 in main thread is blocked by qemu_aio_wait_start(), the signal
may be delivered to one non-main thread, causing the signal handler of
SIGUSR2 is invoked, then the main thread hangs in
qemu_aio_wait()->syswait()...

This patch blocks SIGUSR2 at the beginning of Qemu's main(), so it
ensures SIGUSR2 is blocked by default when a new thread is created,
then only the threads that use the signal unblock it.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2007-06-20 14:36:11 +01:00
kfraser@localhost.localdomain 0edf82adb3 ioemu: Assembler memcpy() for x86, and lowest-common-denominator
memcpy() function for all others, avoiding noisy longword copies on
ia64.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-19 16:08:15 +01:00
Tim Deegan 157a1a47c0 [QEMU] Fix up ioemu timer save/restore after version changes.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-06-11 14:56:50 +01:00
Keir Fraser ebb19b1cc8 hvm: e820 public header cleanup.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-10 19:49:44 +01:00
kfraser@localhost.localdomain 0da9d71b9c ioemu: save file name is snprintf()ed into a plenty big enough buffer.
From: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-08 19:22:08 +01:00
Steven Hand c056297fe7 Avoid using /tmp for qemu state files since an unprivileged user
in dom0 could potentially exploit the fact.

Thanks to Dan Berrange <berrange@redhat.com>

Signed-off-by: Steven Hand
2007-06-08 17:37:58 +01:00
kfraser@localhost.localdomain 30f01d9011 ioemu: Tiny indentation fix.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-07 11:15:24 +01:00
kfraser@localhost.localdomain c3a5cde516 tools: Fix some type issues GCC 4.1.0 warnings.
FC5's gcc 4.1.0 can't make some files in tools/ due to its stronger
type checking.

From: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-07 11:02:23 +01:00
kfraser@localhost.localdomain 40727faf6a qemu: Fix vnc port offset in xenstore
The new version of qemu uses 5900 instead of 0 as the port.
There is no need to offset it by 5900 when writing out the
console/vnc-port entry.

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
2007-06-06 20:25:58 +01:00