Commit Graph
26 Commits
Author SHA1 Message Date
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).

Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.

There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.

All libxc callers have been adjusted accordingly.

Also update QEMU_TAG for corresponding qemu change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:30:19 +01:00
Keir Fraser bc43f6118d blktap/fs-back: Build fixes for Fedora 13
1. Some files use stat, mkfifo, mkdir etc. without including
sys/stat.h

2. Some programs link against libpthread without a -lpthread compile
option. The compile used to work if this library happened to be used
by one of the other libraries that was being linked against, but
Fedora 13 has stopped allowing this.

From: M A Young <m.a.young@durham.ac.uk>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-03-15 17:08:29 +00:00
Keir Fraser d900060b28 Fix for fs-backend crash when xend was not started after system boot.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
2010-02-22 10:06:21 +00:00
Keir Fraser 4baca0b560 fs-backend: add a backend cleanup function
This patch implements a backend cleanup function in fs-backend so that
when the connection to the frontend is closed we don't leak nodes on
xenstore.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-12-08 07:45:15 +00:00
Keir Fraser 6d821524b1 fs-back: better error handling in fs-backend
Currently most of the error checking in fs-backend is done by the use
of asserts that would terminate the daemon in case of a single error
on a single request.  This patch replaces the asserts with debugging
messages and terminates the connection on which the error occurred.
With this patch applied I was able to complete successfully over 1000
live migrations with stubdoms.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-07-08 10:58:09 +01:00
Keir Fraser b3dac9ec91 fs-backend: fix default export and filename checks
This patch changes fs-backend to use /var/lib/xen as default export
and check all the file names and paths given by the frontend against the
export path, so that the frontend can only operate under the export
directory.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-06-27 10:47:38 +01:00
Keir Fraser 6f1d3ce238 Introduce mechanism to check standard conformance of headers
While pretty simplistic, it appears to serve the purpose at the moment
(i.e. it spotted two places where a GNU extension was used withou
proper preprocessor conditionals). The "simplistic" here includes that
the checking gets only done for native builds, and ia64 gets excluded
due to its arch-specific header intentionally (for whatever reason)
checking that anonymous struct/unions can be used.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2009-06-17 07:21:03 +01:00
Keir Fraser 9c2e145d68 fs-back: unmapp all shared ring pages when a domain dies
This bug causes some pages not to be properly freed by xen, hence
after a cycle of 50 save\restore we don't have enough spare memory to
start 2 VMs any more. This patch fixes the issue properly unmapping
all the pages needed by the shared ring.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-20 08:43:53 +00:00
Keir Fraser b832b2b46c fs-back: build fixes
Remove some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-18 13:25:25 +00:00
Keir Fraser 655d4f2e58 fs-backend.c misses the unistd.h include for read() and write().
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2009-03-18 11:51:30 +00:00
Keir Fraser a26e304487 fs-back: Fixes and cleanups
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2009-03-17 14:28:33 +00:00
Keir Fraser 9f8501582f Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything.  This was done
in 19010:275abe1c5d24 for the hypervisor.

In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/.  Specifically:
 * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
 * Remove -Wp,-MD... from every other Makefile
 * Remove setting of DEPS from every other Makefile
 * Ensure that every Makefile says -include $(DEPS)
 * Ensure that every Makefile's clean target removes $(DEPS)

Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP.  The variable name is now standardised in
Rules.mk as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:16:05 +00:00
Keir Fraser 61c632064b fs-back: build fix for BSD
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-08-05 09:59:01 +01:00
Keir Fraser e5ba23a1d9 FSIF: extend protocol to multi-grant requests and multi-page ring
To improve throughput and inline the stat response.

Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-01 09:37:10 +01:00
Keir Fraser bfd0dbdd08 fs-back: build fixes for BSD and cleanups.
Signed-of-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-28 11:39:32 +01:00
Keir Fraser 2406df9ada fs-backend: fix FD allocation for file creation
The creation operation also opens a file, we need to allocate a
virtual fd for that too.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-25 09:49:06 +01:00
Keir Fraser 76db343592 fs-back: fix compilation error.
XC_PAGE_SIZE and XC_PAGE_MASK should be used instead of PAGE_SIZE
and PAGE_MASK.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-07-22 08:00:43 +01:00
Keir Fraser c278e4f7bf fs-backend: do not expose file descriptors to frontend
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-16 11:13:21 +01:00
Keir Fraser bdfd5fc7d1 fs-backend: fix ioctl(BLKGETSIZE) call on 64bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-15 18:00:13 +01:00
Keir Fraser 3123fe0fc4 fs-backend: Fix freelist implementation
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-15 17:59:31 +01:00
Keir Fraser 461990971f tools: replace sprintf with snprintf where applicable
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-12 15:41:15 +01:00
Keir Fraser 67bfbd67d1 libxenctrl headers should not pollute macro namespace with
mb/rmb/wmb. Instead add a xen_ prefix. Modify Xen's public headers to
expect the prefixed names instead of bare mb/rmb/wmb, but gate this
expectation on a bump of __XEN_INTERFACE_VERSION__.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-12 11:37:45 +00:00
Keir Fraser 3faece79e4 Define CFLAGS and LDFLAGS for libxenstore.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:58:15 +00:00
Keir Fraser ad44c013ec Define CFLAGS and LDFLAGS for libxenctrl.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:57:14 +00:00
Keir Fraser 93e3de7b94 Add SBINDIR. Use it always.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:35:02 +00:00
Keir Fraser be33e2333a Add FS backend/frontend drivers (frontend in minios only).
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
2008-01-18 13:33:37 +00:00