whether a domain has been introduced to the store. Added a separate message
XS_IS_DOMAIN_INTRODUCED and API for that (xs_is_domain_introduced) to determine
whether the domain has really been introduced. This change means that the
tools can determine the correct domain path earlier in the domain creation
process, which is particularly a factor with live migration, as it allows us
to create the devices earlier in the process, and unpause the new domain before
performing the introduce. Until recently we already had these features, but
the simplification of the interface between xend and xenstored caused breakage.
No longer clear out the domain path when a domain is introduced -- this was a
hack to work around the recent problematic semantics of GetDomainPath.
Do not write the contents of the info block to the store. All the configuration
info is written to the /vm path, and anything else in the info block is either
dealt with explicitly or is ephemeral and has no place in the store.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
/local/domain/0/backend/<devclass>/<dom>/<devid>/error, write them instead to
/local/domain/0/error/backend/<yada>. This is not the best place for them
perhaps, but it moves them out of the backend directory, on which the drivers
have a watch. This fixes the problem whereby writing an error will trigger a
watch, causing the error message to be written again, and repeat. Fixes bug
#286.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
1) enable ACPI in VMXAssist by default.
2) do nothing when emulating wbinvd instruction in VMXAssist.
3) use MACRO in cpu number setting/getting code.
4) remove useless parameter flags from xc_vmx_build.
5) remove usage of dsi.v_start in xc_vmx_build when not handling
vmxloader elf.
6) unmap shared_page_va when destroy VMX domain.
7) change virtual_platform_def to vmx_platform.
8) remove useless code in vmx_setup_platform.
9) change parameter of vmx_setup_platform from vcpu to domain.
10) in xen HV, vmx domain get domain processor number from the reserved
E820 area.
11) in domain.c, don't define some functions when on i386 platform or no
CONFIG_VMX.
Also removed some ugly tailing space.
Signed-off-by: Xin Li <xin.b.li@intel.com>
disabled by workaround 7468:17a9f111fa93. We additionally need to set the
FD_CLOEXEC flag on the status fd given to SrvServer when spawning the network
script, as at least on some platforms this causes xend to fail to start
properly.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
hotplugging stuff was introduced (block-*, console-port-base, console-address)
and introducing entries for options that have been present for ages
(xend-{http,unix,relocation}-server, xend-unix-path, xend-relocation-address,
enable-dump). Remove vif-antispoof, as Vifctl no longer passes this option
down.
Made the xend-relocation-server default to no, as this is a potential security
hole and so must be turned on explicitly.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
antispoof parameters from Vifctl.network -- these are already handled by the
script, so it is redundant to have a separate override for these parameters
coming from outside. Don't use xen.util.process.runscript, because we don't
need to return the output, and therefore can just use os.spawnl.
Remove XendRoot.get_vif_antispoof, matching change above.
Prefix XendRoot.network_script_dir onto the return value for
XendRoot.get_network_script(), removing that burden from callers.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Store the uuid in string form inside XendDomainInfo, to aid this.
Add restart-squelching logic to ensure that runaway domains to restart
indefinitely. The logic here could be cleverer, say including a backoff for
retrying, in case a network block device has gone away, but for now this will
do to stop the pathological behaviour. Fixes bug #275.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This is Kurt Garloff's reworked network-bridge script:
* we got rid of ifconfig
* it works for netdev != eth0
* arp on and off are symmetric as are ifdown and ifup
* ifup will be passed the ifcfg config file name if needed
(the ifup may otherwise figure that the veth0 hardware is
NOT the same as the original ${netdev} and not use the same
config -- this happens on SUSE. Charles Coffing tracked this
one down.)
Plus Kurt's avoid-dash patch:
the network setup scripts on SUSE have trouble with the bridge
name xen-br0; they don't expect the '-'.
Arguably this should be fixed.
But I assume there's more scripts out there which may not like it,
so I suggest the following patch to rename xen-br0 to xenbr0.
Plus Charles Duffy's patch to support multiple bridges:
The attached patch allows the network-bridge script to be used to
generate multiple bridges corresponding to different physical
interfaces. It adds a new parameter, "vifnum", used to refer both to
the loopback interface to be used and to set defaults regarding the
physical interface and bridge name.
Thus, if one wishes to start xenbr0 on eth0 and xenbr1 on eth1, one
need only call:
network-bridge start ## vifnum is 0 by default
network-bridge start vifnum=1
...well, that and set loopback.nloopbacks=2 in the Dom0 kernel
parameters.
Plus renaming of virtnum to vifnum in Charles' patch, as requested by Ian Pratt.
Plus a fix to DevController to allocate vif IDs starting from 0 (i.e. vif2.0
is now domain 2's first vif, as opposed to vif2.1 in the recent past).
Plus tidying up inside network-bridge using some helper variables.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
recreation semantics.
Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo. This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.
Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.
TODO: Split the domain introduction into two so that the domain path is
available earlier. At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.
Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef. Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.
Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path. With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.
Fix the printf statement in xenstored in verbose mode that details the
messages being written. This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
simply creates a CPU on every physical CPU. Other domains
read the initial VCPU configuration from xenstore.
Signed-off-by: Keir Fraser <keir@xensource.com>
that loop completely -- the xc_init_store, initDomainStore calls can all go.
Have xenstored understand where the local domain information goes. Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later. There is still some work required to tidy this up.
Change the uuid module to generate uuids as lists of bytes, not in the
stringified form. Added a unit test for that module.
Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block. The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.
Added a usage statement to xenstored.
Some of this code is by Steven Hand.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
longs. Thi sensures appropriate alignment for architectures
that require it, and also allows us to naturally support up
to 4096 event channels per 64-bit guest.
Moved 'n_vcpu' field from shared_info to start_info. Really it
ought to disappear altogether as the info can be derived from
xenstore.
Fix a weird bug in XendDomainInfo where 'vcpus' information for
a domain defaults to floating point value 1.0 rather than integer
1. This looks like a Python bug to me, but in any case it is
'fixed' by explicitly converting the default value to an integer.
Signed-off-by: Keir Fraser <keir@xensource.com>
which sets the number of active CPUs. Xend then toggles the VCPUs to ensure a
contiguous group of them are enabled.
Added a server command to get VCPU information, and use this info to fix
xm vcpu-list. That xm command now has extra information, too. CPU == -1 is no
longer used as an indicator for a VCPU that is disabled -- a separate state
field is available, and the CPU is set merely to '-'. Individual CPU time is
now available.
Deprecated xm list -v. -v is conventionally used for --verbose, so using it
to list vcpus is confusing. Furthermore, we already have an equivalent command
xm vcpu-list.
Tidied up the horrendous xm list / xm vcpu-list code.
Removed the vcpus field from the dict returned by xc_domain_getinfo, and the
vcpu_to_cpu map from the sxpr returned for xm list.
Move the dom0_enforce_vcpus code into XendDomain.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).
TODO: Remove 'vcpus' entry in getdomaininfo Python
dictionary.
TODO: Don't represent 'cpumap' as a bitmap in Python.
It would be more sensible to represent as a list
of integer CPU numbers.
Signed-off-by: Keir Fraser <keir@xensource.com>
creation, allow it to be changed after creation via
DOM0_SETDOMAINHANDLE operation (and libxc
xc_domain_sethandle, and via Pyhton wrapper fn).
Signed-off-by: Keir Fraser <keir@xensource.com>
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.
Signed-off-by: Keir Fraser <keir@xensource.com>
was working around bugs that have gone, and is now more dangerous than useful
-- deadlock is a possibility with this code now.
Signed-off-by: Ewan Mellor <ewan@xensource.com>