xen.git
18 years ago[IA64] Remove dorfirfi completely
awilliam@xenbuild2.aw [Tue, 16 Jan 2007 18:48:43 +0000 (11:48 -0700)]
[IA64] Remove dorfirfi completely

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Add privilege check back for hypercall
awilliam@xenbuild2.aw [Tue, 16 Jan 2007 18:22:44 +0000 (11:22 -0700)]
[IA64] Add privilege check back for hypercall

hypercall is allowed when cpl=2

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Change vCPU initialization to avoid domVTi privregs memory leak
awilliam@xenbuild2.aw [Tue, 16 Jan 2007 17:40:37 +0000 (10:40 -0700)]
[IA64] Change vCPU initialization to avoid domVTi privregs memory leak

1) This patch moved some processing from vcpu_initialise() and
   added a new function vcpu_late_initialise().
   It executes the following initializations for VCPU of
   dom0/domU.
    - Allocate the VHPT
    - Allocate the privregs area and assign these pages into
      guest pseudo physical address space.
    - Set the tlbflush_timestamp.

   It is executed in the following sequence.

   dom0:
     start_kernel()
       ->domain_create()
       ->alloc_vcpu(VCPU0)
         ->alloc_vcpu_struct(VCPU0)
         ->vcpu_initialise(VCPU0)
       ->vcpu_late_initialise(VCPU0)

       ->construct_dom0
         ->alloc_vcpu(othe VCPUs)
           ->alloc_vcpu_struct(other VCPUs)
           ->vcpu_initialise(other VCPUs)

     ia64_hypercall(FW_HYPERCALL_IPI)
       ->fw_hypercall_ipi(XEN_SAL_BOOT_RENDEZ_VEC)
         ->arch_set_info_guest(other VCPUs)
           ->vcpu_late_initialise(other VCPUs)

   domU:
     do_domctl(XEN_DOMCTL_createdomain)
       ->domain_create()

     do_domctl(XEN_DOMCTL_max_vcpus)
       ->alloc_vcpu(all VCPUs)
         ->alloc_vcpu_struct(all VCPUs)
         ->vcpu_initialise(all VCPUs)

     do_domctl(XEN_DOMCTL_setvcpucontext)
       ->set_info_guest(VCPU0)
         ->arch_set_info_guest(VCPU0)
           ->vcpu_late_initialise(VCPU0)

     ia64_hypercall(FW_HYPERCALL_IPI)
       ->fw_hypercall_ipi(XEN_SAL_BOOT_RENDEZ_VEC)
         ->arch_set_info_guest(other VCPUs)
           ->vcpu_late_initialise(other VCPUs)

2) This patch modified the domain_set_shared_info_va().
   Currently, initialization of arch.privregs->interrupt_mask_addr
   of all VCPUs is executed in domain_set_shared_info_va().
   However, allocation of privregs area is late by modified of 1).
   Therefore, this patch modified initialization of
   arch.privregs->interrupt_mask_addr to the following sequence.

   dom0 and domU:
     ia64_hypercall(FW_HYPERCALL_SET_SHARED_INFO_VA)
       ->domain_set_shared_info_va()
         Initialize interrupt_mask_addr of VCPU0

     ia64_hypercall(FW_HYPERCALL_IPI)
       ->fw_hypercall_ipi(XEN_SAL_BOOT_RENDEZ_VEC)
         ->arch_set_info_guest(other VCPUs)
           ->vcpu_late_initialise(other VCPUs)
           Initialize interrupt_mask_addr of other VCPUs

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agomerge with xen-unstable.hg
awilliam@xenbuild2.aw [Mon, 15 Jan 2007 22:15:26 +0000 (15:15 -0700)]
merge with xen-unstable.hg

18 years ago[MINIOS] Clean up final link stage of the build.
kaf24@firebug.cl.cam.ac.uk [Mon, 15 Jan 2007 12:25:04 +0000 (12:25 +0000)]
[MINIOS] Clean up final link stage of the build.

Allow extra application objects to be linked against a partial link of
minios with non-global names localised. For now we assume that global
names ill be assigned a xenos_ prefix in due course. We may decide to
choose a different prefix.

Those who wish to finish the link from an external Makefile can link
their own objects against mini-os.o (which must be first in link
order!) and specify the appropriate architecture linker script.

Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix clean build after cset 13345:648e58e31c26
Steven Hand [Mon, 15 Jan 2007 10:53:06 +0000 (10:53 +0000)]
Fix clean build after cset 13345:648e58e31c26

Signed-off-by: Steven Hand <steven@xensource.com>
18 years ago[IA64] Fix save/restore
awilliam@xenbuild2.aw [Mon, 15 Jan 2007 05:18:38 +0000 (22:18 -0700)]
[IA64] Fix save/restore

Using the new hypercall path, scratch registers are not saved/restored.

So after returning from hypercall, r20 may contain garbage data.
This triggered General Exception.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Fix multicall hypercall
awilliam@xenbuild2.aw [Sun, 14 Jan 2007 21:58:51 +0000 (14:58 -0700)]
[IA64] Fix multicall hypercall

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[XEN] Emulate BSF/BSR. Fix ARPL emulation.
kaf24@localhost.localdomain [Sun, 14 Jan 2007 17:22:24 +0000 (17:22 +0000)]
[XEN] Emulate BSF/BSR. Fix ARPL emulation.
Fix building POPA emulation on x86/32.
Fix asm constraints for in-memory operands.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Emulate AMD-defined two-byte NOP opcodes with ModRM.
kaf24@localhost.localdomain [Sun, 14 Jan 2007 16:12:42 +0000 (16:12 +0000)]
[XEN] Emulate AMD-defined two-byte NOP opcodes with ModRM.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Emulate PUSHA/POPA/ARPL/BOUND.
kaf24@localhost.localdomain [Sun, 14 Jan 2007 16:00:19 +0000 (16:00 +0000)]
[XEN] Emulate PUSHA/POPA/ARPL/BOUND.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Fix some e820 start-of-day issues by clipping all E820_RAM
kaf24@localhost.localdomain [Sun, 14 Jan 2007 13:15:13 +0000 (13:15 +0000)]
[XEN] Fix some e820 start-of-day issues by clipping all E820_RAM
regions to be page-sized and -aligned.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Emulate MUL/DIV. Tweak test suite build.
kaf24@localhost.localdomain [Sun, 14 Jan 2007 12:03:31 +0000 (12:03 +0000)]
[XEN] Emulate MUL/DIV. Tweak test suite build.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[TESTS] Fix native jump to 1MB absolute address in emulator test.
kaf24@localhost.localdomain [Sat, 13 Jan 2007 21:36:31 +0000 (21:36 +0000)]
[TESTS] Fix native jump to 1MB absolute address in emulator test.
Fix typo in emulator comment.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Clean up long division code, fix for C99-mandated
kaf24@localhost.localdomain [Sat, 13 Jan 2007 20:55:39 +0000 (20:55 +0000)]
[XEN] Clean up long division code, fix for C99-mandated
truncation-towards-zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[IA64] Implement hyper_get_psr
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 20:01:25 +0000 (13:01 -0700)]
[IA64] Implement hyper_get_psr

Mov from psr is used frequently by xeno.

Signed-of-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Fix xencomm_arch_hypercall_suspend
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 19:56:20 +0000 (12:56 -0700)]
[IA64] Fix xencomm_arch_hypercall_suspend

This hypercall is changed to new hypercall mechanism

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Simplify lazy cover algorithm
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 19:11:11 +0000 (12:11 -0700)]
[IA64] Simplify lazy cover algorithm

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[XEN] 'd' key dumps both host and guest state.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 17:39:26 +0000 (17:39 +0000)]
[XEN] 'd' key dumps both host and guest state.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoExtend emulator testing.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 17:16:45 +0000 (17:16 +0000)]
Extend emulator testing.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[PATCH] kexec/kdump: allow zero start for crashkernel
Ian Campbell [Fri, 12 Jan 2007 16:03:33 +0000 (16:03 +0000)]
[PATCH] kexec/kdump: allow zero start for crashkernel

Some architectures, notably ia64, can automatically place
the crash kernel into an appropriate place if the start
address for crashkernel is specified as zero or omitted.

E.g. crashkernel=256M or crashkernel=256M@0

While xen does not actually have support for ia64 kexec,
I am working on it. And in any case this change should be harmless.
Just a small bit of infastructure that will make things easier in the
future.

This should also be possible on x86, now relocatable kernels
are reloacatble on x86. So once xen moves up to using linux ~2.6.19
it would make sense to look into implementing this.

The patch does 3 things.

* Firstly, parse_crashkernel() is modified to allows the size and start elements of kexec_crash_area
  to be set to any value, including zero. Previously if either size or
  start were specified as zero, they would both end up as zero.

* Secondly, when kexec_get() is called, if either the size or start
  elements of kexec_crash_area are zero, then zero is passed
  back to the hypercall caller for both values.

  This gives the same behaviour as having parse_crashkernel() set
  size and start to zero if either of them are zero, but it allows
  architecture sepcific code called between the invocation of
  parse_crashkernel() and kexec_get() to modify start (and size if
  there was a reason). In particular, this allows the
  architecture specific code to find a good start point if 0 is
  specified.

* Lastly, it ads an additional check to the x86 setup code.
  As this code currently does not know how to deal with a
  0 start address, it doesn't reserve memory if start is 0.

  This is neccessary as previously if start was specified as zero,
  parse_crashkernel() would set size to zero, but that is
  no longer the case, so a stronger check is needed.

I would really appreciate it if this patch was merged,
as I don't believe it harms anything, and it does allow
a nice path for moving forwards.

Signed-off-by: Simon Horman <horms@verge.net.au>
18 years agolinux: Add trivial forwarding of dma_{,un}map_page when not using highmem
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:35:52 +0000 (15:35 +0000)]
linux: Add trivial forwarding of dma_{,un}map_page when not using highmem

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>
18 years agolinux: Reduce restrictions on address width for DMA operations
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:34:30 +0000 (15:34 +0000)]
linux: Reduce restrictions on address width for DMA operations

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>
18 years ago[MINIOS] Update __XEN_INTERFACE_VERSION__
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:27:09 +0000 (15:27 +0000)]
[MINIOS] Update __XEN_INTERFACE_VERSION__
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[LINUX] ipv6: Disable addrconf on Xen bridge device
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:23:07 +0000 (15:23 +0000)]
[LINUX] ipv6: Disable addrconf on Xen bridge device

The ipv6-no-autoconf patch didn't disable IPv6 addrconf completely.
This means that the Xen bridge device still interfered with normal
IPv6 operation by engaging the IPv6 network with a bogus MAC address.

For details please refer to
        https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200360

The following patch completely disables IPv6 on the Xen bridge device
by temporarily setting the MTU to a value less than the minimum
allowed for IPv6.

Upstream will provide a cleaner way to disable IPv6 addrconf in
future, possibly in the form of a proc sysctl.  Of course if the Xen
loopback device is removed it would render this change unnecessary.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years agomerge
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:19:23 +0000 (15:19 +0000)]
merge

18 years ago[MINIOS] Implement a network frontend driver.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:18:24 +0000 (15:18 +0000)]
[MINIOS] Implement a network frontend driver.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
18 years ago[MINIOS] Fix grant-entry freelist maintenance.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:16:05 +0000 (15:16 +0000)]
[MINIOS] Fix grant-entry freelist maintenance.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
18 years ago[MINIOS] Support xenbus watches.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 15:15:25 +0000 (15:15 +0000)]
[MINIOS] Support xenbus watches.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
18 years agoMake get-fields.sh really get run by bash rather than default /bin/sh.
Alastair Tse [Fri, 12 Jan 2007 14:53:13 +0000 (14:53 +0000)]
Make get-fields.sh really get run by bash rather than default /bin/sh.

Also fix some bashisms in the script.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years agoFix xencomm_copy_{from, to}_guest.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:51:27 +0000 (14:51 +0000)]
Fix xencomm_copy_{from, to}_guest.
It should not call paddr_to_maddr() with invalid address.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64]: noreturn cannot be used if function may return
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:50:01 +0000 (14:50 +0000)]
[IA64]: noreturn cannot be used if function may return

The functions die_if_kernel and vmx_die_if_kernel can certainly
return.  This disqualifies them from using the noreturn keyword
which is reserved for functions that never return.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
18 years agox86/PAE linux: don't restrict upper half of page table entries to 3 bits
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:48:06 +0000 (14:48 +0000)]
x86/PAE linux: don't restrict upper half of page table entries to 3 bits
when dumping the page table contents during an oops.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoFix trivial bug in xentop main loop.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:46:21 +0000 (14:46 +0000)]
Fix trivial bug in xentop main loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoAdd vfb config examples.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:43:50 +0000 (14:43 +0000)]
Add vfb config examples.
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoParse Solaris VTOCs in pygrub.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:42:07 +0000 (14:42 +0000)]
Parse Solaris VTOCs in pygrub.

Signed-off-by: John Levon <john.levon@sun.com>
18 years ago[PV-on-HVM] Allow platform interrupt to be used for entropy.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:40:13 +0000 (14:40 +0000)]
[PV-on-HVM] Allow platform interrupt to be used for entropy.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: properly handle LOCK prefix in privileged PV opcode emulation
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:38:30 +0000 (14:38 +0000)]
x86: properly handle LOCK prefix in privileged PV opcode emulation

- include LOCK prefix presence in calculation of which CR/DR is being
  targeted by moves to/from these registers
- fail any other opcodes when beingused with lock prefix

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoFix xc_ptrace() for PAE.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:33:36 +0000 (14:33 +0000)]
Fix xc_ptrace() for PAE.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoFix udev check.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:32:41 +0000 (14:32 +0000)]
Fix udev check.

Quiesce 'which' invocation, and allow expanding variables in error
message.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years ago[XEN] Fix guest-access macros.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 14:22:28 +0000 (14:22 +0000)]
[XEN] Fix guest-access macros.
From: Christoph Egger <Christoph.Egger@amd.com>

18 years ago[XEN] Default to 80x50 VGA text console.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:48:46 +0000 (10:48 +0000)]
[XEN] Default to 80x50 VGA text console.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[LINUX] swiotlb: eliminate KM_SWIOTLB and thus the need for a Xen-specific kmap_types.h.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:31:16 +0000 (10:31 +0000)]
[LINUX] swiotlb: eliminate KM_SWIOTLB and thus the need for a Xen-specific kmap_types.h.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agolinux/i386: allow CONFIG_HIGHPTE on i386
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:28:54 +0000 (10:28 +0000)]
linux/i386: allow CONFIG_HIGHPTE on i386

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>
18 years ago[LINUX] x86/64: Sync pagetable management with i386 Xen code.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:22:36 +0000 (10:22 +0000)]
[LINUX] x86/64: Sync pagetable management with i386 Xen code.

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>
18 years ago[XEN] Consistent assumption that PTEs contain MFNs in both ptwr
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:13:25 +0000 (10:13 +0000)]
[XEN] Consistent assumption that PTEs contain MFNs in both ptwr
page-fault handler and ptwr emulation handler.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Replace mfn_to_page(lXe_get_pfn()) by lXe_get_page().
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:10:28 +0000 (10:10 +0000)]
[XEN] Replace mfn_to_page(lXe_get_pfn()) by lXe_get_page().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years ago[HVM] Fix timer interrupt delivery on x64 Vista.
kfraser@localhost.localdomain [Fri, 12 Jan 2007 10:08:38 +0000 (10:08 +0000)]
[HVM] Fix timer interrupt delivery on x64 Vista.

x64 SMP Vista HVM guest uses HPET as the main system timer, and it
uses physical destination mode with broadcast to deliver the interrupts
generated by HPET. In current code, timer interrupts are injected only
to VCPU0 in vioapic.c, but this doesn't satisfy x64 SMP Vista -- when
it boots, it complains "a clock interrupt was not received on a
secondary processor within the allocated time interval" with Bug Check
0x101.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
18 years ago[IA64] Hypercall optimizations
awilliam@xenbuild2.aw [Thu, 11 Jan 2007 23:56:58 +0000 (16:56 -0700)]
[IA64] Hypercall optimizations

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>
18 years ago[IA64] merge increment_iip
awilliam@xenbuild2.aw [Thu, 11 Jan 2007 21:42:24 +0000 (14:42 -0700)]
[IA64] merge increment_iip

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Can't inject event, when guest is executing rfi
awilliam@xenbuild2.aw [Thu, 11 Jan 2007 21:27:39 +0000 (14:27 -0700)]
[IA64] Can't inject event, when guest is executing rfi

Can't inject event, when guest is executing rfi, and both
both PSCB(v, ifs) and regs->ifs are valid

It's very rare case, but I did catch it.
It caused domain0 crash

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
18 years ago[IA64] Use original itir when inserting into the single-entry TLB
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 19:52:54 +0000 (12:52 -0700)]
[IA64] Use original itir when inserting into the single-entry TLB

http://lists.xensource.com/archives/html/xen-ia64-devel/2006-11/msg00349.html

The real VHPT insertion is done based on the machine PTE returned from
translate_domain_pte, which does the appropriate offset calculations.

However, the insertion into the one-entry TLB uses the original PTE, but
the page size has been reset to PAGE_SIZE [1].  Thus the entry in the
one-entry TLB incorrectly maps the PAGE_SIZE sub-page which was faulted
on to the PAGE_SIZE sub-page at the bottom of the superpage.

I think it makes most sense to simply use the original itir when
inserting into the single-entry TLB, as per attached patch.  I've moved
the vcpu_set_tr_entry calls up a level into vcpu_itc_d and vcpu_itc_i;
the third caller previously used the 4 flag to specify "don't do that".

[1] In fact, this is enforced twice, once in translate_domain_pte and
again in vcpu_itc_no_srlz.

Signed-off-by: Matthew Chapman <matthewc@cse.unsw.edu.au>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Make crash command happy
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 19:14:05 +0000 (12:14 -0700)]
[IA64] Make crash command happy

As Dave requested, call unw_init_running() and save ksp before SHUTDOWN_crash.

Signed-off-by: Dave Anderson <anderson@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Resolve a race in tlb_track_search_and_remove()
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 19:03:38 +0000 (12:03 -0700)]
[IA64] Resolve a race in tlb_track_search_and_remove()

When tlb_track_search_and_remove() is about to remove a found entry,
another cpu might update p2m entry and insert the entry right before that.
It must be aware of it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] fix domain_flush_vtlb_all()
awilliam@xenbuild2.aw [Fri, 12 Jan 2007 00:03:25 +0000 (17:03 -0700)]
[IA64] fix domain_flush_vtlb_all()

It might called by another domain's vcpu.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[XEN] Add LOOP{,Z,NZ} and CBW/CWD/... emulation.
kfraser@localhost.localdomain [Thu, 11 Jan 2007 19:01:28 +0000 (19:01 +0000)]
[XEN] Add LOOP{,Z,NZ} and CBW/CWD/... emulation.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoThis patch does the following:
Ewan Mellor [Thu, 11 Jan 2007 19:00:35 +0000 (19:00 +0000)]
This patch does the following:

- renames the XenManagedDomain.py file to XenAPIDomain.py, since this
name better reflects its functionality/purpose
- adds domain tracking to the XenAPIDomain class so that xend-managed
domains can be deleted in an 'atexit' handler upon test case termination
- adds one basic xapi-related test which is part of the grouptests
'xapi'
- refactors the vtpm-related test using xen-api and adds it to the
grouptest 'xapi'
- adds documentation to the README for how to configure xm and xend to
use XML-RPC or Xen-API for communication

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoI added a parameter '-md' to 'runtest.sh' for running the xm test suite
Ewan Mellor [Thu, 11 Jan 2007 18:56:59 +0000 (18:56 +0000)]
I added a parameter '-md' to 'runtest.sh' for running the xm test suite
in a mode where all created domains a created as xend-managed domains.

This patch also fixes a problem related to calling 'xm domid' on a
currently suspended domain if that domain is a managed domain. In that
case a 'None' is returned by Xend, which I default to '-1'.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoSource a file called 'vtpm-impl.alt' if it exists.
Ewan Mellor [Thu, 11 Jan 2007 18:55:18 +0000 (18:55 +0000)]
Source a file called 'vtpm-impl.alt' if it exists.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoThis fixes the xen-api documentation latex-compilation.
Ewan Mellor [Thu, 11 Jan 2007 18:54:09 +0000 (18:54 +0000)]
This fixes the xen-api documentation latex-compilation.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years ago[XEN] Fix/implement JMP/CALL/RET emulation.
kfraser@localhost.localdomain [Thu, 11 Jan 2007 17:47:13 +0000 (17:47 +0000)]
[XEN] Fix/implement JMP/CALL/RET emulation.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEND] Device update should handle SXP without 'device' as first
Alastair Tse [Thu, 11 Jan 2007 17:03:11 +0000 (17:03 +0000)]
[XEND] Device update should handle SXP without 'device' as first
param.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEND] Fix broken block-configure.
Alastair Tse [Thu, 11 Jan 2007 16:36:46 +0000 (16:36 +0000)]
[XEND] Fix broken block-configure.

Signed-off-by: Alastair Tse <atse@xensource.com>
18 years ago[XEN] Use local var instead of current->domain in two places.
kfraser@localhost.localdomain [Thu, 11 Jan 2007 15:50:28 +0000 (15:50 +0000)]
[XEN] Use local var instead of current->domain in two places.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years ago[HVM][VMX] Some simplifications, particularly to vmx_load/save_cpu_regs.
kfraser@localhost.localdomain [Thu, 11 Jan 2007 15:43:38 +0000 (15:43 +0000)]
[HVM][VMX] Some simplifications, particularly to vmx_load/save_cpu_regs.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] More emulator fixes and emulate BSWAP.
kfraser@localhost.localdomain [Thu, 11 Jan 2007 11:41:44 +0000 (11:41 +0000)]
[XEN] More emulator fixes and emulate BSWAP.
Better handling of LOCK prefix.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Update comments in elfnote.h interface header.
Ian Campbell [Thu, 11 Jan 2007 10:36:41 +0000 (10:36 +0000)]
[XEN] Update comments in elfnote.h interface header.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years ago[IA64] Clean up build warnings
awilliam@xenbuild2.aw [Wed, 10 Jan 2007 17:37:41 +0000 (10:37 -0700)]
[IA64] Clean up build warnings

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Move cmdline.c to linux-xen
awilliam@xenbuild2.aw [Wed, 10 Jan 2007 17:35:24 +0000 (10:35 -0700)]
[IA64] Move cmdline.c to linux-xen

Need to clean up some build warnings.  Probably should have been moved
last time it was modified.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Add empty nmi.h
awilliam@xenbuild2.aw [Wed, 10 Jan 2007 15:48:50 +0000 (08:48 -0700)]
[IA64] Add empty nmi.h

Necessary to build

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Remove bogus linux/kernel.h include
awilliam@xenbuild2.aw [Wed, 10 Jan 2007 15:47:36 +0000 (08:47 -0700)]
[IA64] Remove bogus linux/kernel.h include

This seems to be an extraneous include and causes problems when
pulled into asm files.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agomerge with xen-unstable.hg
awilliam@xenbuild2.aw [Wed, 10 Jan 2007 15:40:47 +0000 (08:40 -0700)]
merge with xen-unstable.hg

18 years ago[IA64] Clean up VTi memory initialization logic
awilliam@xenbuild2.aw [Wed, 10 Jan 2007 15:00:50 +0000 (08:00 -0700)]
[IA64] Clean up VTi memory initialization logic

This patch makes the logic in setup_guest() more clear.
domain_translate_gpfn_list() is now gone, so we can make
memory initializtion code simple.
Xend passes memory size which is a sum of normal memory
size and GFW memory to QEMU and Libxc. This patch fixes
this issue.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
18 years ago[XEN] Remove bogus BUG_ON() which breaks the build with gcc 4.2.0.
kfraser@localhost.localdomain [Wed, 10 Jan 2007 11:09:21 +0000 (11:09 +0000)]
[XEN] Remove bogus BUG_ON() which breaks the build with gcc 4.2.0.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[PATCH] kexec/kdump: remove unnecessary incusion of asm/fixmap.h
Ian Campbell [Wed, 10 Jan 2007 09:39:24 +0000 (09:39 +0000)]
[PATCH] kexec/kdump: remove unnecessary incusion of asm/fixmap.h

I think this a legacy of an older revision of this code,
but asm/fixmap.h does not seem to be needed in
asm-x86/x86_32/kexec.h or asm-x86/x86_64/kexec.h

That is, neither of these incarntations of kexec.h seem
to do anything related to fixmap directly or indirectly.

Signed-off-by: Simon Horman <horms@verge.net.au>
18 years ago[LINUX] Clarify comment in xen_machine_kexec_setup_resources().
Ian Campbell [Wed, 10 Jan 2007 09:39:24 +0000 (09:39 +0000)]
[LINUX] Clarify comment in xen_machine_kexec_setup_resources().

Noticed by Horms.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years ago[HVM] Ignore evtchn_upcall_mask and initialise to zero.
kfraser@localhost.localdomain [Tue, 9 Jan 2007 17:43:13 +0000 (17:43 +0000)]
[HVM] Ignore evtchn_upcall_mask and initialise to zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoUpdate sched-credit test to match new format from xm sched-credit.
Ewan Mellor [Tue, 9 Jan 2007 17:38:48 +0000 (17:38 +0000)]
Update sched-credit test to match new format from xm sched-credit.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years agoThis simple patch allows domains created in the xm-test suite to be
Ewan Mellor [Tue, 9 Jan 2007 17:25:28 +0000 (17:25 +0000)]
This simple patch allows domains created in the xm-test suite to be
created as managed domains using either a parameter to the
XenTestDomain() constructor or by setting the environment variable
XM_MANAGED_DOMAINS and running the tests with it.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoAdd needed modules to the ramdisk if the modules exist on the current system.
Ewan Mellor [Tue, 9 Jan 2007 17:23:22 +0000 (17:23 +0000)]
Add needed modules to the ramdisk if the modules exist on the current system.
(i.e. the current system contains a modularized kernel)

Signed-off-by: Lynn Bendixsen <lbendixs@novell.com>
18 years agomerge
Ian Campbell [Tue, 9 Jan 2007 17:17:05 +0000 (17:17 +0000)]
merge

18 years ago[XEN] Kexec: Make some variables static.
Ian Campbell [Tue, 9 Jan 2007 17:15:29 +0000 (17:15 +0000)]
[XEN] Kexec: Make some variables static.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years ago[XEN] Kexec: Clean up ELF note construction to avoid multiply nested
Ian Campbell [Tue, 9 Jan 2007 17:15:28 +0000 (17:15 +0000)]
[XEN] Kexec: Clean up ELF note construction to avoid multiply nested
struct/unions and the packed keyword.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years ago[LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading.
Ian Campbell [Tue, 9 Jan 2007 17:14:28 +0000 (17:14 +0000)]
[LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years ago[TEST] Fix x86_emulate tests on x86/64 host.
kfraser@localhost.localdomain [Tue, 9 Jan 2007 17:11:46 +0000 (17:11 +0000)]
[TEST] Fix x86_emulate tests on x86/64 host.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[XEN] Emulate DAA/DAS the hard way. We cannot execute the instruction
kfraser@localhost.localdomain [Tue, 9 Jan 2007 16:59:52 +0000 (16:59 +0000)]
[XEN] Emulate DAA/DAS the hard way. We cannot execute the instruction
directly within the emulator as it is unavailable if the emulator runs
in x86/64 mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[HVM] Remove unnecessary write barriers
Tim Deegan [Tue, 9 Jan 2007 16:49:16 +0000 (16:49 +0000)]
[HVM] Remove unnecessary write barriers
Using a volatile pointer saves us from the compier reordering these
writes, and the processor won't let them appear out of order.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
18 years agoWhen booting via xm, only run the bootloader if it's in non-interactive mode:
Tim Deegan [Tue, 9 Jan 2007 13:24:45 +0000 (13:24 +0000)]
When booting via xm, only run the bootloader if it's in non-interactive mode:
otherwise we lose the user's named kernel and try to bootload the temporary
file pygrub returned.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoFix xm create direct call to XendBootloader
Tim Deegan [Tue, 9 Jan 2007 13:24:44 +0000 (13:24 +0000)]
Fix xm create direct call to XendBootloader

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoFix bootloader = "pygrub" via 'xm create'.
Tim Deegan [Tue, 9 Jan 2007 13:24:43 +0000 (13:24 +0000)]
Fix bootloader = "pygrub" via 'xm create'.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoFix auto-bootloading via 'xm create'.
Tim Deegan [Tue, 9 Jan 2007 13:24:42 +0000 (13:24 +0000)]
Fix auto-bootloading via 'xm create'.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoSniff for Solaris if not specified. This allows Solaris domU's to automatically
Tim Deegan [Tue, 9 Jan 2007 13:24:41 +0000 (13:24 +0000)]
Sniff for Solaris if not specified. This allows Solaris domU's to automatically
boot correctly without fiddling with domain configs.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoPass in kernel/ramdisk settings to pygrub; if specified, don't try to use
Tim Deegan [Tue, 9 Jan 2007 13:24:40 +0000 (13:24 +0000)]
Pass in kernel/ramdisk settings to pygrub; if specified, don't try to use
grub.conf; this allows hands-off bootloading in the absence of a grub.conf.
It's also useful for specifying temporary changes etc.

Signed-off-by: John Levon <john.levon@sun.com>
18 years agoFix for pygrub path on Solaris.
Tim Deegan [Tue, 9 Jan 2007 13:24:40 +0000 (13:24 +0000)]
Fix for pygrub path on Solaris.

Signed-off-by: John Levon <john.levon@sun.com>
18 years ago[XEN] Fill in some more opcode space in the emulator.
kfraser@localhost.localdomain [Tue, 9 Jan 2007 12:04:41 +0000 (12:04 +0000)]
[XEN] Fill in some more opcode space in the emulator.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoDo not call refreshShutdown in XendDomain for VM-list operations, as this
Ewan Mellor [Tue, 9 Jan 2007 11:52:15 +0000 (11:52 +0000)]
Do not call refreshShutdown in XendDomain for VM-list operations, as this
is unnecessary and expensive.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
18 years ago[HVM] Fix shadow memory tracking
Tim Deegan [Tue, 9 Jan 2007 10:50:46 +0000 (10:50 +0000)]
[HVM] Fix shadow memory tracking
Fixes a missing free from cset 13275, and a missing prealloc.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
18 years agoUse strstr() to look for "bimodal" string in ELF notes, to allow guests to use
john.levon@sun.com [Mon, 8 Jan 2007 20:54:41 +0000 (12:54 -0800)]
Use strstr() to look for "bimodal" string in ELF notes, to allow guests to use
"yes,bimodal", so they are correctly identified as PAE on older hypervisors.

Signed-off-by: John Levon <john.levon@sun.com>
18 years ago[XEN] More emulator fixes:
kfraser@localhost.localdomain [Thu, 11 Jan 2007 10:10:16 +0000 (10:10 +0000)]
[XEN] More emulator fixes:
 1. Emulate LAHF/SAHF instructions
 2. #GP if instruction is longer than 15 bytes
 3. Accept any number of prefix bytes (up to
    15-byte total instruction length)
 4. Repeated addr/data-size overrides are sticky
    rather than toggling.

2,3,4 are based on a patch from Jan Beulich.

Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[HVM] Allow a dom to have nonsense m2p entries when building the p2m
Tim Deegan [Thu, 11 Jan 2007 10:08:14 +0000 (10:08 +0000)]
[HVM] Allow a dom to have nonsense m2p entries when building the p2m
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>