This is needed for 32-on-64 support. Right now there are three
protocols: native, x86_32 and x86_64. If needed it can be extended.
Interface changes (io/blkif.h)
* Define the x86_32 and x86_64 structs additionally to the native
version.
* Add helper functions to convert them requests to native.
Backend changes:
* Look at the "protocol" name of the frontend and switch ring
handling accordingly. If the protocol node isn't present it
assumes native protocol.
* As the request struct is copied anyway before being processed (for
security reasons) it is converted to native at that point so most
backend code doesn't need to know what the frontend speaks.
* In case of blktap this is completely transparent to userspace, the
kernel/userspace ring is always native no matter what the frontend
speaks.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
32on64 supports 168Gb for 32-bit guests, hence at least 38 bits must
be specified here. The foreign frame bit is MFN bit 31, so the maximum
valid value here would be 43.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Don't destroy xenstore watches on suspend, and only recreate them when
resuming in a new domain. Likewise, only invoke frontend device resume
code when in a new domain (the resume functions all tear down the
existing function and wait for the backend to negotiate a new one,
which does not happen in the source domain).
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir@xensource.com>
Use non-trivial dma_{un,}map_page only when CONFIG_HIGHMEM, allowing
to not compile swiotlb_{un,}map_page in that case, which in neither
case need exporting.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Use address width needed by device rather than dma_bits in
dma_alloc_coherent().
Probe supported address width in swiotlb initialization.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
While, as discussed, the performance impact of this option is
certainly higher than on native Linux, the option should not be
entirely disallowed if people want to sacrifice performance for less
lowmem pressure.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
PUDs,PMDs,PTEs are all marked as ForeignPage so that they can be
grabbed from tlb_remove_page() at the appropriate time and freed in a
special way.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
provide hypercall the same path with system
most of scrach registers don't need to be saved/restored
it is good for performance
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
remove the requirement (vpsr.ic==0) from hyperprivop
There two reasons for this.
1. make xen-parse code more readable.
2. a little bit performance improvement
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
The recent change to use a default DMA bit width of 30 bits (required
by chips like the b44) only converted the streaming DMA primitives.
The coherent mappings are still hard-coded to 31 bits. This means
that b44 still doesn't work under Xen.
This patch makes the io_tlb_dma_bits variable global and uses it for
coherent memory mappings.
Thanks to Calvin Webster for providing a machine with a b44 and 2G
of memory I've been able to verify that this finally makes the b44
work under Xen.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Rename 'io_tlb_dma_bits' to the more correct 'dma_bits'. This also
affects the name of the boot parameter, which is now 'dma_bits='.
Signed-off-by: Keir Fraser <keir@xensource.com>
Check we are running under Xen before trying to dereference
xen_start_info! xen_start_info is NULL on ia64 if running raw
hardware. Based on patch by Jes Sorensen <jes@sgi.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Since we had changed to use event callback to deliver interrupts,
1. The pending_interruption is changed to pending_event.
2. get_ivr, set_tpr, get_trp and set_eoi are not used or only used
in the initialization phase. There is no need to write this code
in assembly. This code is deleted.
3. hyper_ssm_i needs to be rewritten to jump to entchn_callback_handler
instead of iva+0x3000 interrupt handler. I will do this later.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Rename xen_machine_kexec() to just machine_kexec() and only compile in
the Xen or native version as appropriate.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
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>
required if CONFIG_VT is enabled but the domain isn't currently
configured to use the PV framebuffer. Put it back in, in a slightly
more palatable form.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Compile xenoprof perfmon related hypercall even when
CONFIG_PERFMON, CONFIG_OPROFILE, CONFIG_OPROFILE_MODULE are disabled.
They should be compiled in vmlinux unconditionally because they
might be called by other modules in theory.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
This patch contains the x86_64 implementation of Kexec / Kdump for Xen.
Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
Signed-Off-By: Simon Horman <horms@verge.net.au>
This patch contains the x86_32 implementation of Kexec / Kdump for Xen.
Signed-Off-By: Magnus Damm <magnus@valinux.co.jp>
Signed-Off-By: Simon Horman <horms@verge.net.au>
1. Balloon driver does not need to set M2P entry.
This is done by the populate_physmap hypercall.
2. Xen now translates foreign mappings from GMFN->MFN.
Tools are simplified because of this.
Signed-off-by: Keir Fraser <keir@xensource.com>
Updated patches/linux-2.6.16.32/net-gso-0-base.patch due to changes in
net/core/dev.c and net/core/skbuff.c and update the following in the sparse
tree:
include/linux/skbuff.h
mm/memory.c
mm/mmap.c
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
If audit is enabled or the child process is ptraced,
non-paravirtualized code path is executed.
Thus paravirtualized ifs is left unmodifed so that the child process
crashes after clone2().
paravirtualize ia64_ret_from_clone() to fix it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
The original /dev/mem (linux/drivers/char/mem.c) is aware of IA64
specific issues. On the other hand paravirtualized /dev/mem
(linux-2.6-xen-sparse/drivers/xen/char/mem.c) is simplifed not to be
aware of IA64. This patch makes it IA64-aware to use X on domain0/IA64.
With this patch and ia64-specific patches, X server can boot on domain0/IA64.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>