Commit Graph
4651 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain 03b88d5789 [VTPM][HVM] Transmit the locality in which the command was sent in the
highest 3 bits of the 4 bytes prepended to each packet.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-07 11:17:28 +00:00
kfraser@localhost.localdomain a490953a59 [HVM] Fix reboot failure when configured 'cdrom', i.e. bug 832.
Signed-off-by : Xinmei Huang <xinmei.huang@intel.com>
2006-12-07 11:16:17 +00:00
kfraser@localhost.localdomain 58cd802d51 merge 2006-12-07 11:14:21 +00:00
kfraser@localhost.localdomain 56e9db683b [HVM] qemu: Add guest address-space mapping cache.
On IA32 host or IA32 PAE host, at present, generally, we can't create
an HVM guest with more than 2G memory, because generally it's almost
impossible for Qemu to find a large enough and consecutive virtual
address space to map an HVM guest's whole physical address space.
The attached patch fixes this issue using dynamic mapping based on
little blocks of memory.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-07 11:12:52 +00:00
Alastair Tse 59a3344cac [XEND] Update vcpu_avail when parsing configuration.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 11:12:05 +00:00
Alastair Tse dc960266aa [XEND] Fix reboot for HVM domains if cdrom is empty.
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-07 10:54:43 +00:00
Ewan Mellor 556d54c7ce Added Xen-API implementations for xm pause, xm unpause, xm destroy, xm rename,
and fix xm suspend and xm delete.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 11:25:51 +00:00
Ewan Mellor 2420eb41c5 Implement VM.set_name_label.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 11:24:37 +00:00
Ewan Mellor 8edc7b1c06 Added support for configuration file for xm, and use that to specify
contact and authentication details for the Xen-API server.

The default behaviour is still to use the existing legacy XML-RPC server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 11:02:32 +00:00
Ewan Mellor 6455e182f2 Added server proxy and session manager for Xen-API clients.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:47:31 +00:00
Ewan Mellor 5ef203e373 Fix server reloading when the HTTP server is enabled.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:37:10 +00:00
Ewan Mellor 81f605d9cb Don't trace inside SrvServer.py -- it's doing a one-second sleep in a loop, so
it just fills the trace with useless clutter.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:13:46 +00:00
Ewan Mellor 1d68773ad2 Move the actual call routed by do_legacy_api_with_uuid out of the scope of
the domains_lock.  The call itself is already locking as necessary, and it
is important for domain_start to be able to release the lock across the scope
of waitForDevices.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:12:39 +00:00
Ewan Mellor 6e66f078d4 Fix HTTP server.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-06 10:10:06 +00:00
awilliam@xenbuild2.aw 75890339a9 [IA64] Fix Vti
Use new foreign page mapping interface

Signed-off-by: Xu Anthony <Anthony.xu@intel.com>
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-12-06 02:34:46 -07:00
awilliam@xenbuild.aw 0013d074cd [IA64] changed foreign domain page mapping semantic.
x86 foreign HVM domain page mapping semantic was changed to use gmfn
instead mfn.  It applies to domains with auto_translated_mode enabled,
and all ia64 domains enable auto_translated_mode.  This patch changes
ia64 foreign domain page mapping to use gmfn and fixes ia64 domU buidler.
However this patch breaks domain save/restore/dump-core.
They should also be fixed-up

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-12-05 10:59:32 -07:00
awilliam@xenbuild.aw 9d64d3ff83 merge with xen-unstable.hg 2006-12-05 10:01:15 -07:00
awilliam@xenbuild.aw 04d0fece67 [IA64] Fix VTi domain creation
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2006-12-05 09:44:24 -07:00
awilliam@xenbuild.aw f77ef48c1d [IA64][LIBXC] prep for fixes
Groundwork for real fixes to follow

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-12-05 09:09:44 -07:00
Ewan Mellor ec168504b9 Fix error message.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-05 15:47:43 +00:00
Ewan Mellor 89ebc69e6a This adds a recently added parameter to the vm.start call.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2006-12-04 19:13:55 +00:00
Ewan Mellor bb34321ece Tidy.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 18:05:32 +00:00
Ewan Mellor 4a0a4459e9 Fix numpad handling in QEMU's VNC server. The keymaps that we have include
information on which keys change depending upon the numlock setting, but
this isn't being used.  By forcing numlock on and off as necessary, when
receiving these keysyms through the VNC connection, we ensure that the
server's numlock status is the same as the client's.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 17:52:33 +00:00
awilliam@xenbuild.aw 793cb77839 merge with xen-unstable.hg 2006-12-04 08:24:41 -07:00
Ewan Mellor 549aad081d Close the server when instructed, so that we can reload on the same port, and
diagnose a server that fails to start.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:57:18 +00:00
Ewan Mellor bcf6d372d8 Diagnose a failing server, rather than just locking up the whole daemon.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:56:27 +00:00
Ewan Mellor d529c3d93b Added rudimentary "xend reload" functionality. This allows you to reconfigure
the services offered by Xend, without restarting the daemon itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 13:37:53 +00:00
Ewan Mellor aeb915bbac Tidy error message.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 10:27:23 +00:00
Ewan Mellor 3dca648478 More capitalisation fixes.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 10:24:54 +00:00
Ewan Mellor 78bc404b6b With PERMISSIVE turned on, diagnose missing Enums and Bools, and improve the
diagnosis of missing structure values.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-04 10:20:56 +00:00
kfraser@localhost.localdomain a52cacaef9 [QEMU] Error reporting in IDE device model.
Following on from my patch to make blktap report I/O errors back to
guest OS, a similar problem exists in the QEMU codebase. The IDE
driver never reports I/O errors during read/write operations back to
the guest OS. Instead all I/O operations are reported as
succesfull. If, for example, the host FS holding the disk image fills
up, then writes may fail due to lack of space. Since the guest OS
never sees these failures, it assumes all is well & will continue
writing. Eventually this can lead to severe & unrecoverable filesystem
corruption.

The attached patch fixes QEMU ide driver such that any failure of a
read or write operation sets the appropriate IDE status/error
registers. Having read the ATA-6 spec I think the most compliant
behaviour is to set the status register to 'READY_STAT | ERR_STAT',
and the error register to ABRT_ERR. There is already a convenience
function ide_abort_command() in the QEMU codebase which does just
this, so the attached patch simply calls that function.

With this patch the guest OS sees the I/O failure & the kernel logs
IDE errors and then retries the operation. This at least ensures that
the guest can be shutdown the out of space issue in the host corrected
and the guest restarted, without any serious filesystem damage having
occurred.

From: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-04 09:29:26 +00:00
kfraser@localhost.localdomain b3fba4e07b Remove useless segments push/pop in VMXAssist.
According to Intel Spec, segments registors are cleared when exiting
virtual-8086 mode through trap or interrupts gate, so it's no need to
save their values in stack.
Signed-off-by: Xin Li <xin.b.li@intel.com>
2006-12-04 09:20:12 +00:00
kaf24@localhost.localdomain df69bc8551 [XEN] Add 'insn_fetch' memory operation to the x86_emulator.
This can be used to perform correct access checks, provide appropriate
error codes when injecting faults, and to implement an
instruction-stream prefetch cache (which is included here for HVM PTE
update emulations).

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-03 17:15:48 +00:00
Ewan Mellor 43bbe5bc96 Revert the change to destroy all VMs when skipping or failing tests -- this
needs more thought, because people shouldn't need to set up their Xen-API server
to run the non-Xen-API bits of the test, and at the moment, you get
authentication failures on every SKIP.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-03 13:30:23 +00:00
awilliam@xenbuild.aw c293efbc16 [IA64] update xc_set_hvm_param(), add xc_get_hvm_param()
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-12-02 15:19:50 -07:00
Ewan Mellor 7169017f84 Make the xenfb tools an optional part of the build, as they introduce new
dependencies (libvncserver and libsdl devel packages).  Enable them with
XENFB_TOOLS=y.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-12-02 16:39:53 +00:00
awilliam@xenbuild.aw d8b39738aa [IA64] Change to new interrupt deliver mechanism.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2006-12-01 11:40:57 -07:00
Alastair Tse f24b8a3348 [XEND] Fix mis-types in XendConfig
Signed-off-by: Alastair Tse <atse@xensource.com>
2006-12-01 18:35:19 +00:00
Alastair Tse 63f6456e92 Merge 2006-12-01 18:33:11 +00: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
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