- use MAP_ANON, that is what both (BSD-)Unix and Linux have
- change last_error handling to use pthreads
- round mlock() parameters to page alignment
- cleanup: No need to include <xen/sys/privcmd.h>
a second time in xg_private.h
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
hvm: Always keep canonical copy of RIP/RSP/RFLAGS in
guest_cpu_user_regs(). Reduces complexity at little or no performance
cost (except on really old Intel P4 hardware where VMREAD/VMWRITE are
silly expensive). Signed-off-by: Keir Fraser <keir@xensource.com>
Ian Campbell [Wed, 19 Sep 2007 11:12:49 +0000 (12:12 +0100)]
Using "make install" causes a distro specific script
(/sbin/installkernel) to be called since linux-2.6.18-xen.hg
211:c1f5d027adf7.
Unfortunately on some distros this script is broken for non-root
use. Our needs are pretty simple anyway so just open code the
installation of the kernel.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
George Dunlap [Wed, 19 Sep 2007 10:58:04 +0000 (11:58 +0100)]
[shadow] Be smarter about what we check to avoid unnecessary brute-force searches
The old code checked only if the page was still a pagetable before
doing a brute-force search, rather than checking if it was still
shadowed as the type indicated. This meant that if a page was shadowed
as two different types, it was guaranteed to do a full brute-force search
even if all references could be found by up-pointers.
This checks the proper thing so that it will only do a brute-force if
necessary.
It also re-orders the unshadows so that higher levels are done first. In
many cases, lower-level shadows will be destroyed in the process of
higher-level shadows being destroyed, again saving brute-force searches.
hvm: hvm_{load,store}_cpu_guest_regs() does not touch segment
selectors. We have separate accessors for that now. It is now an
invariant that guest_cpu_user_regs()->{cs,ds,es,fs,gs,ss} are invalid
for an HVM guest. Signed-off-by: Keir Fraser <keir@xensource.com>
This fixes a build error for PV guests (OpenBSD, NetBSD) where the use
of XEN_GUEST_HANDLE_64(uint8_t) leads to a build error because uint8_t
is a #define and not a typedef.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
If vtpm_managed is started with the same vtpm instance, the following
error occurs.
++++++++++++
Loading NVM.
Sending LoadNVM command
INFO[VTSP]: Unbinding 256 bytes of data.
ERROR in VTSP_Unbind at vtsp.c:719 code: TPM_BAD_PARAMETER.
ERROR in envelope_decrypt at securestorage.c:156
code:TPM_BAD_PARAMETER.
ERROR[VTPM]: Failed to envelope decrypt data
.ERROR in VTPM_Handle_Load_NVM at securestorage.c:284 code:
TPM_BAD_PARAMETER.
ERROR[VTPM]: Failed to load NVM
.INFO[VTPM]: [VTPM Listener]: VTPM Listener waiting for messages.
Reading LoadNVM header
++++++++++++
I have added CONFIG_PASSTHROUGH in ioemu/Makefile.target and
ioemu/hw/pc.c in attached vtd_tools2.patch. This should turn off
libpci usage by default until user specifically enables it.
This can be safely check-in without breaking builds for people who do
not care about pass-through devices. I will try to think of a better
way to enable this.
Signed-off-by: Allen Kay <allen.m.kay@intel.com> Signed-off-by: Guy Zana <guy@neocleus.com>
I don't know how significant this is (most of the NUMA node data seems
unused at this point), but anyway: enable proper operation of NUMA
emulation and the fake NUMA node in case there's no SRAT table on
x86-32. This will at least make the "Faking node ..." message not
print confusing information anymore.
Generic and VT-d specific Xen header changes for PCI passthru. Signed-off-by: Allen Kay <allen.m.kay@intel.com> Signed-off-by: Guy Zana <guy@neocleus.com>
James Bulpin [Tue, 11 Sep 2007 18:11:02 +0000 (19:11 +0100)]
[xm-test] Set "console=xvc0" for xm-test guests on Intel architecture platforms.
Tests have been failing because the console for the test ramdisk wasn't using
xvc0 so testcases were not able to interact with it.
I found that xend's memory usage grows considerably when running a
script such as
while true; do xm new foo ; sleep 2s; xm delete foo ; sleep 2s; done
XendAPIStore maintains a list of class instances and in the case of
new/create operation, an associated VMMetrics object is stashed in the
list but never removed on delete/shutdown. This patch removes the
instance by invoking XendBase.destroy() method.
This patch adds 'type vnc' to vfb device sexpr for HVM guests. PV
guests already contain this entry in sexpr, e.g.
(device
(vfb
(vncunused 1)
...
(type vnc)
...
)
)
Some tools, such as libvirt, look for device/vfb/type in sexpr before
publishing VNC port. More importantly, this patch provides
consistency in vfb device sexpr between HVM and PV guests.
x86: Clean up asm keyword usage (asm volatile rather than __asm__
__volatile__ in most places) and ensure we use volatile keyword
wherever we have an asm stmt that produces outputs but has other
unspecified side effects or dependencies other than the
explicitly-stated inputs.
Also added volatile in a few places where its not strictly necessary
but where it's unlikely to produce worse code and it makes our
intentions perfectly clear.
The original problem this patch fixes was tracked down by Joseph
Cihula <joseph.cihula@intel.com>.
x86: Cleanup system restart code, and wait 10ms for APs to offline. Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
svm: Greatly reduce total number of CR8 intercepts
This patch reduces the number of CR8 intercept to a fraction of the
number of CR8 intercepts without. First, CR8 read intercepts are
completely disabled since the SVM vTPR is kept kept in sync with the
HVM vLAPIC TPR. Second, CR8 write intercepts are enabled and disabled
based upon certain conditions. Most of the time, CR8 write intercepts
are disabled. They are enabled only when there is a pending interrupt
that can't be delivered because of either the current ISR or TPR (aka
PPR) because this is the only time the TPR matters.
With this patch, the number of CR8 intercepts dropped from around
10,000,000 to around 6,000 during boot of Windows 2003 Server 64-bit
(this is a rough estimate).
Tim Deegan [Mon, 10 Sep 2007 13:42:30 +0000 (14:42 +0100)]
[HVM] Add type information to the p2m map.
This is a base for memory tricks like page sharing, copy-on-write, lazy
allocation etc. It should also make pass-through MMIO easier to
implement in the p2m. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()
xc_map_foreign_batch() can succeed partially. It is awkward to use
when you're only interested in complete success. Provide new
xc_map_foreign_pages() convenience function for that kind of use.
Also convert two obvious calls to use it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Fix error message and wait time for xm block-detach command.
- Wait time
When xm requests a block device detach to xend, xm makes two
requests. At first, xm requests the block device detach by device
class 'vbd'. Next, xm requests the block device detaching by
device class 'tap'.
As a result, the wait time is 200 seconds because each of
the block device detaching requests causes time-out.
- Misleading error message
Because the last request is by device class 'tap' to xend,
the keyword "(tap)" is included in the error message.
This patch fixes the number of times of the block device detaching
request to one time. At first, xm makes inquiries about device
class of a detaching target device to xend. Then xm requires the
block device detaching by xend returned device class. The wait
time becomes 100 seconds because the block device detaching request
is one time. And the error message is also fixed.
The type of "TRIGGER_TYPE" is dictionary. domain_send_trigger()
refers to the keys of "TRIGGER_TYPE" without using keys() currently.
This patch adds keys() there.
PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.
smp_call_function() compiles to nothing on non-SMP, so we had a
defined-but-not-used static function.
Based on an original patch by: Signed-off-by: Ben Guthro <bguthro@virtualiron.com> Signed-off-by: Robert Phillips <rphillips@virtualiron.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[XSM] correctly rename, relocate and patch the security.py file
This patch corrects an error in the original XSM tools patch. The
original patch did not rename, relocate and patch the security.py file
from changeset 15730:256160ff19b7. This patch addresses this issue as
well as any updates made to security.py in xen-staging during the
merge of XSM.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
[XSM] correctly located update_va_mapping hook within x86 ifdefs
The following patch addresses the issue where the XSM update_va_mapping
hook was not correctly located inside the x86 ifdefs. Included are
updates for the dummy and flask modules which are also effected by
this issue.
- update_va_mapping ifdef fix for xsm
- update_va_mapping ifdef fix for dummy module
- update_va_mapping ifdef fix for flask module
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
Alex Williamson [Thu, 6 Sep 2007 15:05:26 +0000 (09:05 -0600)]
[IA64] Supress warning of __assign_domain_page().
On Tiger, the following memory region triggers a warning.
It seems a false-positive warning caused by c/s 13123:90db0f68b121.
so suppress the warning in such a case.
Implement x86 continuable domain destroy.
This patch addresses the following bug report.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1037 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xend: Always build lowlevel security modules, as there are some
dependencies on these from with xend proper. Signed-off-by: Keir Fraser <keir@xensource.com>
Print the following error when you give a wrong disk type to xm commands:
# xm create /xen/vm1.conf disk='tap:xxx:/xen/root-vm1.img,hda1,w'
Using config file "/xen/vm1.conf".
Error: tap:xxx not a valid disk type
# xm block-attach vm2 tap:yyy:/xen/second.img hdb1 w
Error: tap:yyy not a valid disk type
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode>
[BackDomain]