[HVM] Simplify relationship between VIOAPIC and VLAPICs.
It's not really dynamic since there is always exactly
one VLAPIC per VCPU. Signed-off-by: Keir Fraser <keir@xensource.com>
Ewan Mellor [Wed, 8 Nov 2006 12:56:45 +0000 (12:56 +0000)]
Don't complain about name non-uniqueness if one domain is dying. This happens
across a reboot regularly. Inside _refresh, there is the occasion for new
domains to appear, if an existing domain reboots itself. In this case, we
need to get the list of running domains from Xen again.
Ewan Mellor [Wed, 8 Nov 2006 11:13:50 +0000 (11:13 +0000)]
Refresh the domain list on domain_start or domain_create. We need to do this
so that the list of running domains is up-to-date for the name-uniqueness
check.
[HVM] Remove bogus free of vlapic structure.
It is incorrect now that vlapic is embedded inside
the vcpu structure. Signed-off-by: Keir Fraser <keir@xensource.com>
Ewan Mellor [Wed, 8 Nov 2006 09:50:09 +0000 (09:50 +0000)]
This patch addresses bugzilla #649, enabling `xm list' to display the
actual amount of memory allocated by a guest. Also this patch:
- makes it more apparent that 'xm mem-set' has no effect on HVM's.
- show's that memory is changing if 'xm list' is issued while guest is
ballooning (w/o touching balloon driver)
Ewan Mellor [Wed, 1 Nov 2006 08:38:22 +0000 (08:38 +0000)]
The XenDomain class does not respect the arch defaults where
as XmTestDomain does. This part of the patch forces both HVM and
non-HVM tests to use XmTestDomain. With appropriate changes to the
extraConfig arg.
On PPC we need to use the arch defaults to get the console setup
correctly.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
[XEN] Put the non-GPL license text in each public header file.
This excludes arch-powerpc.h and xencomm.h which require
confirmation from the original authors that the existing GPL
text can be removed and replaced.
Original patch from: Mark Johnson <mark.johnson@sun.com> Signed-off-by: Keir Fraser <keir@xensource.com>
This required fiddling the asm constraints of the atomic bitops. It
seems gcc isn't entirely happy with "+m": the manual says that the
'+' modifier should be used only when a register constraint is
available.
[HVM] Replace shared-memory PIC state with a set-irq-level hypercall.
This simplifies the IRQ logic significantly and avoids the bogus
hvm_pic_assist() on domain resume path.
There is more work to be done here. At least:
1. set-irq-level should really be set-interrupt-wire-level. Wire
state needs to be distinguished from PIC (in particular, PIC IRR)
state.
2. Hypercalls can be batched in qemu and pushed down in one
multicall.
[BLKTAP] avoid race between tapdisk and xvd daemon with ufe_ring.
- Tapdisk updates rsp_cons by ioctl(). on the other hand xvd daemon
reads rsp_cons in do_block_io_op() with RING_FULL().
Copy request and memory barrier before updating rsp_cons.
- Tapdisk access req_prod_pvt with select(). on the other hand xvd
daemon updates it in do_block_io_op().
[BLKTAP] Various cleanups necessary for ia64 support.
- remove magic number 8 and 64.
page size / sector size is 8 on x86, however on ia64 page size is
16kb.
blkring size is 64 on x86. however it's 128 on ia64.
- replace 0xFFFF with INVALID_GRANT_HANDLE
- don't map io ring into user space with uncachable.
kernel access the page with cacable and tapdisk uses memory barrier
so that it isn't necessary.
- remove printk warning and inserted new line.
- remove unused variable, page.
- add one BUG()
[XENAPI] Add 'image' field to xen_vbd_record, allowing an image to be
associated with the vbd. xend supports this field and the client
bindings need it to support existing images that are not under
control of an SR.
[NET] back: Fix wrap to zero in transmit credit scheduler.
This could happen when credit_bytes == ~0UL (i.e., scheduling is 'disabled'). Signed-off-by: Kirk Allan <kallan@novell.com>
[HVM] MAke HVM hypercall table NR_hypercalls entries big.
Otherwise a buggy/malicious HVM guest can cause us to read
off the end of the table. Signed-off-by: George Dunlap <gdunlap@xensource.com>
Trivial change to look in correct location for qemu-dm when using the debug wrapper on a 64 bit system. Signed-off-by: Ben Thomas <ben@virtualiron.com>
PV-on-HVM: Fix PV-on-HVM drivers need maddr.h included for defn of maddr_t. Signed-off-by: Takanori Kasai <Kasai.Takanori@jp.fujitsu.com> Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
[HVM][SVM] Start moving SVM launch code to domain/vcpu initialisation.
This first patch is just enough to get SVM guests working again after
I broke SVM support earlier today. Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Initial support for multi-core and multi-threaded CPU scheduling.
In multi-core and multi-threaded systems, not all idling "CPUs" are
equal: When there are idling execution vehicles, it's better to spread
VCPUs across sockets and cores before co-scheduling cores and threads. Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
[XEN] Optimize credit scheduler load balancing logic
When looking for remote work, only look at or grab a remove CPU's
lock when this CPU is not idling. Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
[HVM] Replace relinquish_resources() destructor hook with
separate vcpu and domain destructors that are called at the
point the domain is finally destroyed. Signed-off-by: Keir Fraser <keir@xensource.com>
[VMX] Get rid of special vm_launch schedule tail.
This required various hacking, including getting rid
of implicit vcpu==current assumption in __vmwrite()
and a couple of tweaks to the shadow code. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] Move VMX VMCS initialisation to vcpu-initialisation time.
Simplify context initialisation (e.g., no need for selectors to
be given dummy non-zero values). Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Re-jig VCPU initialisation -- VMX init requires generic VCPU
fields to already be allocated. This has led to a general cleanup of
domain and vcpu initialisation and destruction. Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX] Don't use uint64_t parameter to gnttab_set_{,un}map_op() when
the upper 32 bits will never be used (i.e., i386 non-pae). Signed-off-by: Jan Beulich <jbeulich@novell.com>
[XEN] Replace hvm_setup_platform() with hvm_domain_initialise()
and extra code in hvm_vcpu_initialise(). Remove 'apic' config
option -- HVM CPUs will always have an APIC (which should be
set up in virtual wire mode for backward compatibility, just as
in a real system). Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Simplify domain shutdown -- no need to synchronously halt execution.
This avoids a possible deadlock on the per-domain 'big lock'.
No control tools depend on synchronous halting of execution (e.g.,
save/restore already expect that secondary CPUs were halted
synchronously under the control of the guest itself). This makes the
code rather less complex.
[XEN] Avoid taking domain biglock in the page-fault handler.
This avoids deadlock situation with the shadow_lock. Signed-off-by: Keir Fraser <keir@xensource.com>
[LINUX] Clean up header includes (gnttab.h from fixmap.h).
include/asm-{i386,x86_64}/mach-xen/asm/fixmap.h was needlessly
including include/xen/gnttab.h. Removing this made necessary explicit
inclusion of that header in tpm_xen.c, the build of which should not
have succeeded on non-x86 architectures before.
[XEN] Fix log-level printk logic for multi-line and partial-line printks.
Add support for switching to print-all mode, and use this for
debug-key output. Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Remove VGCF_hvm_guest, replace with XEN_DOMINF_hvm_guest.
Rename DOMFLAGS_* to XEN_DOMINF_*.
Clean up tools to deal with flags changes. Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Add 'loglvl' and 'guest_loglvl' boot parameters.
<lvl> := none|error|warning|info|debug|all
loglvl=<lvl_print_always>[/<lvl_print_ratelimit>]
<lvl_print_always>: log level which is always printed
<lvl_print_rlimit>: log level which is rate-limit printed
'loglvl' applies to non-guest-related messages.
'guest_loglvl' applies to guest-related messages.
Alastair Tse [Thu, 2 Nov 2006 18:51:23 +0000 (18:51 +0000)]
[XEND] Reverting self.domains UUID indexing
Due to localhost migration, it is possible to have two VMs with the
same UUID on the same host. So instead, we revert back to XendDomain
where there are two lists, a "domains" of active domains indexed by
domid and a "managed_domains" which is a list of all domains whose
lifecycle is managed by Xend.
[HVM] Clean up VCPU initialisation in Xen. No longer
parse HVM e820 tables in Xen (add some extra HVM parameters as a
cleaner alternative). Lots of code removal. Signed-off-by: Keir Fraser <keir@xensource.com>
Alastair Tse [Thu, 2 Nov 2006 14:26:01 +0000 (14:26 +0000)]
[XEND][XM] Fixes for xm list output
Do not output image, security if they are empty
Change xm list slightly to be more informative about state.
Add back store_mfn and console_mfn to the SXP so save/restore can work
again.
Ian Campbell [Thu, 2 Nov 2006 11:56:26 +0000 (11:56 +0000)]
PV-on-HVM: Conditionally disable checksum offload for receive on some
older kernels.
On some older kernels the CHECKSUM_UNNECESSARY flag on received
skbuffs is not honoured by all subsystems, specifically netfilter
under 2.6.9-42.EL
To work around this we need to ensure that the correct checksum is
calculated at some point. We can cause the backend to do this for us
by advertising to the backend that we cannot support checksum offload.
The correlation of this issue with the presence of NETIF_F_TSO is not
100% but it is a good first approximation.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>