This patch is a big cleanup to irq.c, with only real
necessary interfaces kept now. The irq subsystem of
xen is very simple since most external devices are
controlled by dom0. Also especially there's no need
to keep CONFIG_XEN everywhere, since this file is
already out of sync of linux version for a long time.
Actually xen defines irq related structures differently
and it's worthy of creating a xen specific version here.
Another change of this patch is to remove ugly check
upon timer/ipi within irq handler. Instead now we'll
check IRQ_GUEST flag of irq_desc to decide whether
to deliver irq to guest. Now all vectors un-registered
are set with IRQ_GUEST enabled, which is identical to
current assumption. Later this flag should be set only
per guest's request. Then Xen_do_irq is not reuqired
as the result of this change.
The maximum instruction length for both x86-32 and
x86-64 is 15 bytes (including all prefixes, opcode,
ModRM, SIB, displacement, and immediate bytes).
This patch adjusts the MAX_INST_LEN to the correct
value. This should reduce the size of some variables
in the hypervisor code. This patch also does some
minor code clean-up in the vm exit handler for VMX.
When running test 5 in Memtest86+ v1.65, I got a "this opcode is not
supported", so I decided to add it. It's a compare operation, and it's
just the opposite of the already supported one (opcode 0x39), so it's
nothing spectacular. Why there's a page-fault when this instruction gets
executed, I haven't got a clue, but I have a feeling that Memtest86 is
doing something wrong :-( However, this fix may help some other code to
run too...
With this, Test 5 passes all the way through without crashing. I did see
some occassional memory errors in some other tests, and I'm not 100%
sure whether those are caused by the system or they are "real" memory
errors. At some time in the future I may get round to memory testing my
target system...
Signed off by: Mats Petersson (mats.petersson@amd.com).=20
Make event_pending() architecture-specific.
PowerPC needs this because the domain can directly modify the hardware's
"interrupts enabled" bit, and we don't want to patch Linux to replace
all those accesses to use evtchn_upcall_mask instead.
As we know, the mechanism for hypervisor to pass parameter through pointer
is not complete. Hypervisor use copy_from/to_user functions to copy parameter
to hypervisor and copy result to user, if there is a tlb miss happening and
hypervisor can't handled this. This hypercall fails, there is no mechanism to
handle this failure, that may cause domain crash. Get_pfn_list hypercall copy
large data from hypervisor to user, it is easy to trigger this issue when
creating VTI-domain.
If fails, Get_pfn_list returns the number of pfn entries, and this patch will
Dummy access parameter memory block to cause this tlb mapping tracked by
Hypervisor, then continue to do get_pfn_list.
It's a workaround before we design a new mechanism of passing parameter thr
pointer.
Before injecting fault to guest, VMM need to setup
guest itir by using guest region register.
But the lowest two bits of itir are reserved. VMM need
to reset these two bits.
Add a new config option for all backend drivers. This has two benefits:
1. All backend drivers can be disabled or modularised via
one config option.
2. Backend helper routines that are not specific to any particular driver
can be disabled or modularised based on this config option. In
particular this may allow backend drivers plus the service module
to be upgraded separate from the kernel core as and when the backend
interfaces change (and they will).
Fix the test inside all_devices_ready, and move it from xenbus_probe (a
postcore_initcall) to a new late_initcall, so that it happens after the
drivers have initialised.
If the 'cdrom=' option is specified in the definition file but media is
not found in the CD drive then main() in vl.c exits and the guest appears
to hang. This patch modifies vl.c slightly to check for the presents of
media. If the cdrom cannot be opened then the cd entry is removed from
hd_filename[] and bs_table[] allowing the guest to continue initializing.
If the guest requires the CD media then the guest should report, gracefully
or otherwise, that it's missing.
* Move .PHONY directives next to targets,
this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...
In the case where XEN_PYTHON_NATIVE_INSTALL is in effect,
if DESTDIR is not set then the install will go into a relative
directory rather than under the default prefix (usually /usr).
An alternate solution would be to update the fragments
that do the python install to use $(DESTDIR)/ instead of
$(DESTDIR). This is not an incredible burden as there
are only two such fragments in the tree. However, it
seems prone to error as new makefiles are created
in the future.
build: Remove iptables and python loging helper targets
These targets don't really fit into the build infastructure,
for instance there is no faclilty for them to be removed
on make distclean. I posted a patch that fleshed out the targets,
but Christian Limpach suggested to me that removing them
would be a better idea.
I used the wrong operator in a couple places for putting together some
error messages out of format strings. This patch corrects those
operators and fixes the strings.
Introduce page_to_bus() and use it in pci-dma-xen.c and swiotlb.c. On
xen/ia64 with the P2M/VP model pseudo physical address(gpaddr) is
fully virtualized so it defines
xen_features(XENFEAT_auto_translated_physmap) = 1. In this case
page_to_phys(page) should return pseudo physical address like
pfn_to_mfn() and its families. However dma is not virtualized, it
can't be used for pci-dma-xen.c, swiotlb.c.
Robustify and add tracing to the IO-APIC update hypercall.
If this patch, and any others that follow it, fix some of the
prblems that various users have been seeing then they may
be good candidates for backporting to 3.0.2 (assuming no
regressions for other users).
Do not disable spurious irq debugging in i386 xenlinux. It may
be masking underlying problems, and the problem it was intended
to work around should be fixed properly.
Do not accept empty definition of __XEN_INTERFACE_VERSION__
in xen-compat.h. It leads to building a broken kernel image
where the kernel sources end up using an unexpected interface
version. In the case of Linux, the kernel expects to use
the new sched_op() hypercall but ends up calling the
legacy hypercall -- this breaks poll, reboot, and save/restore.
A more acceptable patch would be to detect the empty
definition in xen-compat.h and give a reasonable #error message
to fail the build: the current error message is confusing.
Support __XEN_INTERFACE_VERSION__ defined to the empty string.
This can happen when building Linux with an old .config file which
doesn't have a value for CONFIG_XEN_INTERFACE_VERSION.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Do not create blkback vbd kernel thread until fully connected
to frontend driver. Otherwise the kernel thread may crash trying
to access the non-existent shared ring.
Add code to make handling domain poweroff/reboot symmetrical between
paravirtualized and fully virtualized. This approach uses the new
sched_op to handle other domains than the current domain. The new
code, SCHEDOP_remote_shutdown, is very much like SCHEDOP_shutdown, but
is called with the id of the domain which is to be shut down. This
allows fully virtualized shutdown and para-virtualized shutdown to be
identical from that point forward.
A paravirtualized domain uses sched_op to shut down and set the reason
code. This will send a VIRQ_DOM_EXC, which can be handled in dom0 by
control software. In some ways, this resembles SIGCHILD/waitpid, and
is a reasonable model.
The fully virtualized case has qemu invoke xm directly. This is a
different path than paravirtualized. It also removes decision and
policy making choices from the rest of the control software and places
it within qemu. When any dom0 logic eventually gets a VIRQ_DOM_EXC,
the information about the domain is gone having been destroyed by xm.
A libxenctrl wrapper, xc_shutdown_domain has been added and qemu now
calls it.
As a freebie, #if 0 some very verbose logging code in qemu. Totally
unrelated, but as long as I was there...
Add new hypercall "set_callback" taking a callback identifier and the
callback address.
This new hypercall incorporates the functionality of the existing set_callbacks
hypercall in a more flexible manner. set_callbacks is retained for compatibility.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
More simplifications to blkback:
1. Remove blkif->status field as it's really not needed.
2. Simplify connection logic.
3. Get rid of atomic_t io_pending. There's no need for
atomic r-m-w updates to the work-to-do flag, so replace
with an integer and add barriers where serialisation is
required.
Allow CONFIG_DEBUG_INFO to be specified when building
x86/64 XenLinux. Builds and boots fine. Leave the option
disabled by default, as with all other defconfigs.
Fix a problem that was caused by recent changes to the xenbus's
behavior that cause the .remove function not to be called anymore
during suspend. Due to that the driver allocated one more interrupt on
every suspend/resume cycle. Otherwise some code reformatting,
cleanups and improvements on allocation and freeing of data structure.
Update the user manual appendix to describe bow to get a mouse working
properly in a VNC window. Also add 'pae' configuration introduction for
HVM guests.
Signed-off-by: You, Yongkang <yongkang.you@intel.com> Signed-off-by: Dugger, Donald D <donald.d.dugger@intel.com>
Use PAGE_OFFSET instead of __PAGE_OFFSET in netfront.c.
__PAGE_OFFSET is not defined on all platforms.
Linux/ia64 and Linux/ppc don't have __PAGE_OFFSET definition.
Further workarounds for the broken string marshalling in xmlrpclib. Regardless
of the encoding used, one still may not include non-printable characters in an
XML document. When a dmesg contains a ^D character, something seen on one of
our test machines, an invalid XML document is generated.
Use a trick by David Mertz to work around this -- escape the string using
Python's repr function.
Backtrack on the new interface for reserved event-channel
ports, as binding them in user space via the evtchn driver
would be a pain. Instead extend VIRQs so they can be
classified as 'global' or 'per vcpu'. The former can only
be allocated once per guest, but can be re-bound to
an arbitrary VCPU.