Commit Graph
13380 Commits
Author SHA1 Message Date
awilliam@xenbuild.aw cd1496c790 [IA64] Check CPL for break 0x80001 case
This is a patch which intends for fixing ltrace problem.  When I
execute a command "ltrace ps" on dom0, it makes dom0 hung.  It comes
from "break 0x80001" is shared by ltrace(CPL=3) and hpsim(CPL=2).
To avoid this problem, I just add check CPL in ia64_break_fault code.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2006-12-01 11:12:00 -07:00
Alastair Tse 77f0ea8ba8 Merge 2006-12-01 17:43:18 +00:00
Alastair Tse f83b348cf8 Merge 2006-12-01 17:42:39 +00:00
Ewan Mellor 468c5c0084 Use the new xen-api.sock for the calls to the Xen-API server.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 17:40:07 +00:00
Alastair Tse 0f07569d15 [XEND] Re-add vtpm device support in XendConfig
This patch re-adds a recently removed vTPM device handling code.
I am also removing that one code part in the test script that does not
work.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-01 17:37:42 +00:00
Ewan Mellor cebaab7c6b This patch provides XmTestManagedDomain and XenManagedDomain classes
similar to the XmTestDomain and XenDomain classes. I have wrapped the
xen-api for VM configuration creation, starting and stopping of VMs and
destruction of the VM configuration in the XenManagedDomain class's
methods. No device-related functions are provided through the class.

The managed domains' UUIDs are tracked and all created VMs are destroyed
upon failure or skipping of the test or by calling
xapi.vm_destroy_all().

I am adding a new grouptest 'xapi' for running xen-api tests.

Only caveat: I am using an empty username and password
(XmTestList/xapi.py) with Xend's authentication deactivated to run these
tests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-01 17:37:09 +00:00
Alastair Tse c88422678e Merge 2006-12-01 17:31:50 +00:00
Alastair Tse 0ee9d7cc29 [XENAPI] Add extra param for VM.start and fix case for printing out
the output of VM.get_record.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 17:31:30 +00:00
Alastair Tse 486d848417 [XEND] Proper importing of Xen API VM Struct into new XendConfig
Use a smarter method of importing the Xen API VM struct when adding to
XendConfig.

Also add a commented __setitem__ override for XendConfig to type check
certain configuration values.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 17:30:39 +00:00
kfraser@localhost.localdomain 1016756b1d [XEN] Allow shutdown code to be set at most once per domain.
SIgned-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 17:29:04 +00:00
Alastair Tse 123c8f3d8c [XEND] Fix case mismatch in VM.get_record for Xen API
Also make VM.get_all return halted domains too.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 17:21:19 +00:00
Andrew Warfield ed6af790ae Fix a number of flaws in the blktap userspace daemon when dealing
with I/O errors.

There are a number of flaws in the blktap userspace daemon when dealing
with I/O errors.

 - The backends which use AIO check the io_events.res member to determine
  if an I/O error occurred. Which is good. But when calling the callback
  to signal completion of the I/O, they pass the io_events.res2 member

  Now this seems fine at first glance[1]

    "res is the usual result of an I/O operation: the number of bytes
     transfered, or a negative error code. res2 is a second status
     value which will be returned to the user"

  Except that

     "currently (2.6.0-test9), callers of aio_complete() within the
      kernel always set res2 to zero."

  And this hasn't changed anytime since 2.6.0, so by passing through
  the status from 'res2', the callback thinks the I/O operation succeeded
  even when it failed :-(

  The fix is simple instead of passing 'res2', just pass

     ep->res == io->u.c.nbytes ? 0 : 1

  This would solve the error reporting to the guest, except that there
  is a second flaw...

 - The tapdisk I/O completion callback checks the status parameter
  passed in, syslog's it and then returns. It never bothers to send
  the I/O completion response back to the blktap kernel driver when
  a failure occurrs.

  Fortunately the fix for this is also simple. Instead of returning
  from the callback when dealing with an error, we simply toggle the
  status field for the pending response to BLKIF_RSP_ERROR and then
  continue with the normal codepath. So the error eventually gets
  back to the guest.


The scenario I used to discover the problem and test the patch is thus:

 - In dom0  create a filesystem with only 200 MB of free space
 - Create a 1 GB sparse file on this volume.
 - Configure the guest so this sparse file appears as /dev/xvdb
 - In the domU create a single partition on /dev/xvdb and format
  it with ext3.
 - In the DomU, mount /dev/xvdb1 on /mnt and then run

     dd if=/dev/zero of=/mnt/data.bin bs=1GB count=1


Without this patch, the 'dd' command would succeed in writing 1 GB of data
even though the underlying disk in Dom0 was only 200 MB in size. More complex
tests of copying a whole directory heirarchy across resulted in catastrophic
data corruption of the filessytem itself. Manual fsck was needed to fixup
the filesystem & there were many very bad errors needing fixing.


With this patch applied the DomU sees the I/O failures and kernel  logs
messages

Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 722127
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 730327
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 738527
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 746727
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 754927
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 763127
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 771327
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 779527
Dec  1 11:02:53 dhcp-5-203 kernel: end_request: I/O error, dev xvdc, sector 792399

It will retry the I/O operation until it runs out of sectors to try, and then
fail the operation. The filesystem is not seriously damaged - ext3 journal
recovery will trivially cleanup if the guest is rebooted after the disk in
Dom0 is enlarged.

  Signed-off-by: Daniel P. Berrange <berrange@redhat.com>


[1] http://lwn.net/Articles/24366/
2006-12-01 09:01:04 -08:00
Alastair Tse 916bea06a7 [XEND] Fix outputting device SXPs when domain is halted.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 16:31:36 +00:00
kfraser@localhost.localdomain c7f32070ae [HVM] Cache segment-register contents during PTE-update emulations.
Also clean up page-fault propagation to inject the correct error
code and CR2 value.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 15:45:59 +00:00
Alastair Tse b331298825 [TOOLS] Checks for libvncserver-dev and libsdl-dev.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 15:12:48 +00:00
Alastair Tse feeb19b8cb [XEND] Fix missing vncpasswd option for HVM domains.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 14:35:33 +00:00
kfraser@localhost.localdomain 11ae19768d Update hgignore list. 2006-12-01 14:30:42 +00:00
kfraser@localhost.localdomain 99d29a0c3f [XEN] Remove uses of 'extern inline'.
Original patch by Christoph Egger at AMD.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 14:29:32 +00:00
kfraser@localhost.localdomain fcad36eb80 [LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().
Add a comment clarifying how this function differs from
xc_evtchn_alloc_unbound().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 14:25:36 +00:00
kfraser@localhost.localdomain 2aba25fee2 [XEN] Emulate XADD instruction.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 13:57:46 +00:00
Alastair Tse ea1248436a [XEND] Reapply fix for ever expanding kernel_args in XendConfig
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 13:55:28 +00:00
Alastair Tse 2e23acca55 [XEND] Ensure config value types in XendConfig
Add definitions of what we expect the types to be for the values in
XendConfig and apply them when parsing SXP where all values are either
strings or list.

Also fix missing stdvga in HVM config.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 13:53:04 +00:00
kfraser@localhost.localdomain 65ade46c57 [LINUX] dev/mem: Rename Xen's mmap_mem to xen_mmap_mem to
avoid conflict with the definition (which still exists and
is used) in drivers/char/mem.c.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 13:44:33 +00:00
Ewan Mellor 4bdbd7644a Actually return something from bool0.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:25:33 +00:00
Ewan Mellor 4dc8c41b11 Update README to reflect moved library.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:09:30 +00:00
Steven Smith e812bdf5c4 Merge. 2006-12-01 13:12:41 +00:00
Steven Smith 4ffdeb2ddc [PVFB][TOOLS] Don't unwatch the framebuffer frontend's state node just
because it want to state Closed.  Otherwise, we don't notice when
the node gets deleted, and can't reliably shut the backend down.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 13:11:53 +00:00
Ewan Mellor 7be5d5173c Set localtime, enable_audio, clock_offset, and std_vga back to being bools, not
ints.  This is a recent breakage.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:08:36 +00:00
Ewan Mellor 2f61385eed Added log message for when a VM is deleted.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:07:19 +00:00
Ewan Mellor c7a44ef04b Include the rotated xend.log.X in the bug report.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 13:06:15 +00:00
Steven Smith e9167464c4 [PVFB][TOOLS] Fix save/restore for domains with PV framebuffers.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:38:41 +00:00
Ewan Mellor 91e35907b2 Link test/test_bindings against libxenapi in the new location.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 12:24:42 +00:00
Steven Smith 4ae8d4056e [TOOLS][PVFB] Avoid zombie framebuffer backends.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:20:12 +00:00
Steven Smith f44748c2b6 [TOOLS] Remove some dead code.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:09:10 +00:00
Steven Smith becaa718c2 Merge. 2006-12-01 12:03:38 +00:00
Steven Smith 14dc449130 [PVFB] Make sure that framebuffer backend goes away when the domain
terminates, and that it cleans up its area of xenstore.

Tidy up argument parsing a little while I'm here.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 12:03:15 +00:00
kfraser@localhost.localdomain 43bcc64d99 [XEN] Quieten down HVM debug output.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 11:54:53 +00:00
Steven Smith 3c78f2e5d7 [LINUX] The removal of the console_use_vt hack was premature: it's still
required if CONFIG_VT is enabled but the domain isn't currently
configured to use the PV framebuffer.  Put it back in, in a slightly
more palatable form.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 11:52:33 +00:00
Steven Smith 6bebf0edee [PVFB][TOOLS] Change the configuration syntax for PVFB backends to more
closely match that of other devices.

This involves moving the logic for backend creation out of the image
handlers and in to the device handler, which is a much more sensible
place for it.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
2006-12-01 11:49:30 +00:00
Ewan Mellor eb1eb71059 Tidy up the creation of directories that Xend needs. This avoids potential
races in this creation.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-01 11:32:32 +00:00
Alastair Tse d60a8ce29f merge 2006-12-01 11:08:34 +00:00
Alastair Tse bd8806fb71 [XEND] More fixes for HVM device configuration parsing
Removed duplicated acpi option, added missing stdvga option. Do not
output empty configurations in image sxp. Remove bug with vcpus
passing in device model.

Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 11:07:22 +00:00
kfraser@localhost.localdomain e4022aef8e [HVM] Add canonical address checks and generally clean up.
Based on a patch from Jan Beulich <jbeulich@novell.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 11:04:27 +00:00
Alastair Tse 515db7a43a [XEND] Fix missing serial and localtime args in device model for HVM
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 10:47:57 +00:00
kfraser@localhost.localdomain fefaf21f9d [XENOPROF] Fix oprofile for AMD SVM guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 09:59:56 +00:00
kfraser@localhost.localdomain f5bf5c9120 [HVM][VMX] Rename io.c -> intr.c.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 09:51:13 +00:00
Steven Smith a5ae44fcdf This is Anthony Liguori's virtual framebuffer forward ported and
extensively hacked based on feedback from xen-devel.

Its architecture is comparable to the common split device driver
architecture: xenfb and xenkbd modules serve as frontend in domU, and
the user space vncfb or sdlfb process serves as backend in dom0.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-12-01 09:48:32 +00:00
kfraser@localhost.localdomain 5ccf78fdd9 [HVM][VMX] Fix for CR8 acceleration on 64bit guest.
For current CR8 acceleration, we do not call update_tpr_threshold() at
every VMEXIT. But at some situations, we cannot inject guest
interrupts in time. And at some critical time, it will bring up a blue
screen to 64bit Windows guest.

Now, we select to call update_tpr_threshold() at very VMEXIT
time. It's safe, and we do not see clear performance downgrade so
far.

Signed-off-by: Xiaohui Xin xiaohui.xin@intel.com
2006-12-01 09:48:18 +00:00
Tim Deegan b4f5b27478 [XEN] Fix error paths in p2m insertion code
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2006-12-01 09:28:14 +00:00
awilliam@xenbuild.aw 0ff991fda3 [IA64] Make do_ssc() not fall into an infinite loop
Instead, call panic_domain().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-30 15:58:21 -07:00