]> xenbits.xensource.com Git - people/vhanquez/xen.git/log
people/vhanquez/xen.git
17 years agotools/examples/block better use of losetup -r
Keir Fraser [Thu, 24 Jan 2008 14:58:25 +0000 (14:58 +0000)]
tools/examples/block better use of losetup -r

Use losetup -r when the vbd is specified to be readonly, but only if
-r is supported (rather than always creating a writeable losetup
mapping if possible).

This was inspired by (but not derived from) a diff from the Fedora 8
patchset which uses -r iff the vbd is specified as readonly.  We need
to be cleverer upstream because not all systems have losetup -r.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   16642:643ab64d12d5ce57e5f1e08f85ab4bb7fbc136ae
xen-unstable date:        Wed Dec 19 15:05:15 2007 +0000

17 years agoEnable loopback disk image files on readonly nfs filesystem.
Keir Fraser [Thu, 24 Jan 2008 14:57:57 +0000 (14:57 +0000)]
Enable loopback disk image files on readonly nfs filesystem.

When we losetup a file on readonly nfs filesystem, it fails with:
# losetup /dev/loop7 /data/vm/xen_el5_i386_para/system.raw
/data/vm/xen_el5_i386_para/system.raw: Permission denied

New version of losetup has add a "-r" option for readonly loop, which
Linux kernel has supported for a long time. Some distribution (EL5
update, Fedora 8, etc.) have shipped it. This patch benefit this
option while doesn't break the old versions of losetup.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
xen-unstable changeset:   16330:fbe7ed173314723f80f105e7e60fddd0bed77e5b
xen-unstable date:        Wed Nov 07 09:22:31 2007 +0000

17 years agoioemu: fix xc_handle declaration
Keir Fraser [Thu, 24 Jan 2008 14:53:46 +0000 (14:53 +0000)]
ioemu: fix xc_handle declaration

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
xen-unstable changeset:   16865:019f5bd23ea5aae89bc4e39d49d7bb838333fcbc
xen-unstable date:        Wed Jan 23 18:03:52 2008 +0000

17 years agoioemu: fix phys_ram_addr parameter usage
Keir Fraser [Thu, 24 Jan 2008 14:53:24 +0000 (14:53 +0000)]
ioemu: fix phys_ram_addr parameter usage

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com
xen-unstable changeset:   16864:f98a26b5b3982cc517169d38551b946319b8fc65
xen-unstable date:        Wed Jan 23 18:03:25 2008 +0000

17 years agoioemu: cache the BlockDriverState pointer
Keir Fraser [Thu, 24 Jan 2008 14:52:57 +0000 (14:52 +0000)]
ioemu: cache the BlockDriverState pointer
This actually fixes a bug in the scsi case.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
xen-unstable changeset:   16863:6496ad18c3e286d03dc5f3b80588d06deec7c39f
xen-unstable date:        Wed Jan 23 18:02:48 2008 +0000

17 years agoblkback/blktap: Check for kthread_should_stop() in inner loop,
Keir Fraser [Tue, 22 Jan 2008 11:33:40 +0000 (11:33 +0000)]
blkback/blktap: Check for kthread_should_stop() in inner loop,
mdelaay() should be msleep(), and these changes belong in blktap as
well as blkback.
Based on comments and patches from Jan Beulich and Steven Smith.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset:   392:7070d34f251c3e0c411022a5d365aea9804114a7
linux-2.6.18-xen date:        Mon Jan 21 11:43:31 2008 +0000

blkback: Request-processing loop is unbounded and hence requires a
yield point. Also, bad request type is a good cause to sleep for a
short while as the frontend has probably gone mad.

Patch by Steven Smith <steven.smith@eu.citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset:   391:77f831cbb91ddca3a7539fa9197d4abc2d2bfcf9
linux-2.6.18-xen date:        Fri Jan 18 16:52:25 2008 +0000

17 years agoSupport pselect/ppoll in ia32entry-xen.S.
Keir Fraser [Tue, 22 Jan 2008 11:32:49 +0000 (11:32 +0000)]
Support pselect/ppoll in ia32entry-xen.S.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset:   382:47916bd012c6a0a17a350a4247aa0dff9f42868f
linux-2.6.18-xen date:        Fri Jan 18 13:37:53 2008 +0000

17 years agoAvoid allocations causing swap activity on the resume path by allowing
Keir Fraser [Tue, 22 Jan 2008 11:32:23 +0000 (11:32 +0000)]
Avoid allocations causing swap activity on the resume path by allowing
such allocations to access the emergency pools otherwise a
save/restore/migration of a guest which is low on memory can
deadlock.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
linux-2.6.18-xen changeset:   377:e8b49cfbdac0c5ee680cd9ec3d693ed0e2d42432
linux-2.6.18-xen date:        Mon Jan 14 15:52:23 2008 +0000

17 years agoxend: On block-attach, remove device information when VmError occurs.
Keir Fraser [Tue, 22 Jan 2008 11:27:43 +0000 (11:27 +0000)]
xend: On block-attach, remove device information when VmError occurs.

I tested xm block-attach command with a wrong
parameter(file:). Naturally a command error occurred. Then I retested
xm block-attach command with a correct parameter(phy:). But a command
error occurred again. The second command error occurred because Xend
did not remove device information from self.info when the first
command error occurred.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
xen-unstable changeset:   16777:6f3fb3f86b68182bb61a661e81f346f653005852
xen-unstable date:        Tue Jan 22 09:51:49 2008 +0000

17 years agohvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.
Keir Fraser [Tue, 22 Jan 2008 11:27:18 +0000 (11:27 +0000)]
hvm, ioemu: Fix the ide/cdrom emulation error on FC7 guest.

The new libata-eh in the Linux kernel is throwing a fit over the QEMU
cdrom device for two reasons:

1) DRQ can be set with ERR_STAT set.  This is a violation of the ATAPI
state machine.

2) After a TEST_UNIT_READY ATAPI command is sent ERR_STAT is getting
   set
which is correct.  But, when the OS issues another ATAPI command
ERR_STAT is still set.  Which is bad since the next expected command
from the OS is REQUEST_SENSE to find out why ERR_STAT is set.

bug this fixes: https://bugzilla.novell.com/show_bug.cgi?id=3D291775

Signed-off-by: Brandon Philips <bphilips@suse.de>
Porting this qemu fix to xen.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
xen-unstable changeset:   16776:2af5fb3e34e54e96d0c58e0e4557ee1240df9ce8
xen-unstable date:        Tue Jan 22 09:50:06 2008 +0000

17 years agoxend: Handle unspecified timer_mode domain platform parameter.
Keir Fraser [Tue, 22 Jan 2008 11:26:45 +0000 (11:26 +0000)]
xend: Handle unspecified timer_mode domain platform parameter.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16764:3f26758bcc020c741fdae010f969115064b577c2
xen-unstable date:        Fri Jan 18 22:27:51 2008 +0000

17 years agoUpdate version to 3.1.3-rc2-pre
Keir Fraser [Tue, 22 Jan 2008 11:26:13 +0000 (11:26 +0000)]
Update version to 3.1.3-rc2-pre

17 years agoAdded tag 3.1.3-rc1 for changeset 222ac4a1e0ae77e666f7c9c1f329ef8bbf17f4f8
Keir Fraser [Fri, 18 Jan 2008 13:54:44 +0000 (13:54 +0000)]
Added tag 3.1.3-rc1 for changeset 222ac4a1e0ae77e666f7c9c1f329ef8bbf17f4f8

17 years agoUpdate version to 3.1.3-rc1 3.1.3-rc1
Keir Fraser [Fri, 18 Jan 2008 13:54:29 +0000 (13:54 +0000)]
Update version to 3.1.3-rc1

17 years agohvm: Allocate an unmapped guard page to separate ordinary low RAM
Keir Fraser [Fri, 18 Jan 2008 13:54:11 +0000 (13:54 +0000)]
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16728:be960a84e492c1baa0a2dfa76b1a770d0df5e433
xen-unstable date:        Thu Jan 17 12:59:10 2008 +0000

17 years agolibxen: Fix function prototype.
Keir Fraser [Fri, 18 Jan 2008 13:53:38 +0000 (13:53 +0000)]
libxen: Fix function prototype.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   16721:b953c358d0adc75f77cfa1991b5fc15da2b5b0a2
xen-unstable date:        Tue Jan 15 18:48:32 2008 +0000

17 years ago[IA64] Fix security vulnerability
Keir Fraser [Fri, 18 Jan 2008 13:53:12 +0000 (13:53 +0000)]
[IA64] Fix security vulnerability

DomU can map any other domain's memory.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen-unstable changeset:   16719:235bef53d5bd04b4ac3b0c443369fa09d5d99e48
xen-unstable date:        Tue Jan 15 07:07:01 2008 -0700

17 years agoUpdate to Linux 2.6.18.8.
Keir Fraser [Thu, 17 Jan 2008 15:05:38 +0000 (15:05 +0000)]
Update to Linux 2.6.18.8.
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
--HG--
rename : patches/linux-2.6.18/allow-i386-crash-kernels-to-handle-x86_64-dumps-fix.patch => patches/linux-2.6.18.8/allow-i386-crash-kernels-to-handle-x86_64-dumps-fix.patch
rename : patches/linux-2.6.18/allow-i386-crash-kernels-to-handle-x86_64-dumps.patch => patches/linux-2.6.18.8/allow-i386-crash-kernels-to-handle-x86_64-dumps.patch
rename : patches/linux-2.6.18/blktap-aio-16_03_06.patch => patches/linux-2.6.18.8/blktap-aio-16_03_06.patch
rename : patches/linux-2.6.18/fix-ide-cd-pio-mode.patch => patches/linux-2.6.18.8/fix-ide-cd-pio-mode.patch
rename : patches/linux-2.6.18/fixaddr-top.patch => patches/linux-2.6.18.8/fixaddr-top.patch
rename : patches/linux-2.6.18/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch => patches/linux-2.6.18.8/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
rename : patches/linux-2.6.18/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch => patches/linux-2.6.18.8/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
rename : patches/linux-2.6.18/git-5ee7737379b1d7f0c977c0f1661fbaf01a8d4721.patch => patches/linux-2.6.18.8/git-5ee7737379b1d7f0c977c0f1661fbaf01a8d4721.patch
rename : patches/linux-2.6.18/git-c06cb8b1c4d25e5b4d7a2d7c2462619de1e0dbc4.patch => patches/linux-2.6.18.8/git-c06cb8b1c4d25e5b4d7a2d7c2462619de1e0dbc4.patch
rename : patches/linux-2.6.18/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch => patches/linux-2.6.18.8/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch
rename : patches/linux-2.6.18/i386-mach-io-check-nmi.patch => patches/linux-2.6.18.8/i386-mach-io-check-nmi.patch
rename : patches/linux-2.6.18/linux-2.6.18-xen-375-748cd890ea7f => patches/linux-2.6.18.8/linux-2.6.18-xen-375-748cd890ea7f
rename : patches/linux-2.6.18/linux-2.6.18-xen-376-353802ec1caf => patches/linux-2.6.18.8/linux-2.6.18-xen-376-353802ec1caf
rename : patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch => patches/linux-2.6.18.8/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
rename : patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch => patches/linux-2.6.18.8/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
rename : patches/linux-2.6.18/net-csum.patch => patches/linux-2.6.18.8/net-csum.patch
rename : patches/linux-2.6.18/net-gso-5-rcv-mss.patch => patches/linux-2.6.18.8/net-gso-5-rcv-mss.patch
rename : patches/linux-2.6.18/pmd-shared.patch => patches/linux-2.6.18.8/pmd-shared.patch
rename : patches/linux-2.6.18/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch => patches/linux-2.6.18.8/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
rename : patches/linux-2.6.18/series => patches/linux-2.6.18.8/series
rename : patches/linux-2.6.18/softlockup-no-idle-hz.patch => patches/linux-2.6.18.8/softlockup-no-idle-hz.patch
rename : patches/linux-2.6.18/x86-elfnote-as-preprocessor-macro.patch => patches/linux-2.6.18.8/x86-elfnote-as-preprocessor-macro.patch
rename : patches/linux-2.6.18/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch => patches/linux-2.6.18.8/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
rename : patches/linux-2.6.18/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch => patches/linux-2.6.18.8/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
rename : patches/linux-2.6.18/xen-hotplug.patch => patches/linux-2.6.18.8/xen-hotplug.patch
rename : patches/linux-2.6.18/xenoprof-generic.patch => patches/linux-2.6.18.8/xenoprof-generic.patch

17 years agoFix typo in 15598:d381e9278086085586.
Keir Fraser [Thu, 17 Jan 2008 14:35:38 +0000 (14:35 +0000)]
Fix typo in 15598:d381e9278086085586.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Remove broken and unnecessary numa code from smpboot.c.
Keir Fraser [Thu, 17 Jan 2008 14:00:54 +0000 (14:00 +0000)]
x86: Remove broken and unnecessary numa code from smpboot.c.
This was trampling on random memory when node==NUMA_NO_NODE.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   15246:4eb223694d0aa8dc6266621ead1eb590f1aa29cc
xen-unstable date:        Sun Jun 10 18:07:58 2007 +0100

17 years agoCleanup xenstore after console device teardown
Keir Fraser [Tue, 15 Jan 2008 11:19:14 +0000 (11:19 +0000)]
Cleanup xenstore after console device teardown

After the changes in 13616:b111908dd70b, DevController was leaking
xenstore entries every time we took down a console device, as there
was no equivalent to 'xenstore-rm -t' used in the hotplug scripts for
"real" devices. Implement the moral equivalent whenever removal is
forced.

Signed-off-by: John Levon <john.levon@sun.com>
17 years agovmx: Stupid typo in BUG_ON() stmt.
Keir Fraser [Tue, 15 Jan 2008 11:16:18 +0000 (11:16 +0000)]
vmx: Stupid typo in BUG_ON() stmt.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   15527:ff51ff907f8cce9d10296507e6c4c666cf603876
xen-unstable date:        Tue Jul 10 23:42:13 2007 +0100

17 years agohvm: Improve in-Xen PIO emulation to better handle string PIO
Keir Fraser [Sat, 12 Jan 2008 11:26:47 +0000 (11:26 +0000)]
hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16709:9862217f3c34
xen-unstable date:        Sat Jan 12 11:13:57 2008 +0000

17 years agosvm: Properly mask unsupported bits in CPUID_80000001_ECX.
Keir Fraser [Sat, 12 Jan 2008 09:38:25 +0000 (09:38 +0000)]
svm: Properly mask unsupported bits in CPUID_80000001_ECX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16708:a30aabe3c84a
xen-unstable date:        Sat Jan 12 09:29:38 2008 +0000

17 years agoSync cpufeature.h with xen 3.2 branch.
Keir Fraser [Sat, 12 Jan 2008 09:37:57 +0000 (09:37 +0000)]
Sync cpufeature.h with xen 3.2 branch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovmx: Never use physical addresses above 4GB for VMCS state on i386.
Keir Fraser [Sat, 12 Jan 2008 09:35:06 +0000 (09:35 +0000)]
vmx: Never use physical addresses above 4GB for VMCS state on i386.

Thsi requires special allocation of the vlapic regs page, but does let
us get rid of some top-half writes to a few VMCS fields.

Assert a few more facts about the VMX_BASIC_MSR.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   15526:25a42f826a63
xen-unstable date:        Tue Jul 10 23:37:42 2007 +0100

17 years agox86_emulate: Near JMP (Grp5 /3) shoudl not write back to its operand.
Keir Fraser [Fri, 11 Jan 2008 11:08:52 +0000 (11:08 +0000)]
x86_emulate: Near JMP (Grp5 /3) shoudl not write back to its operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm: hpet: Tidy up hpet_to_ns_limit calculation.
Keir Fraser [Fri, 11 Jan 2008 11:07:53 +0000 (11:07 +0000)]
hvm: hpet: Tidy up hpet_to_ns_limit calculation.
Suggested by Haitao Shan @ Intel.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16707:51aa2f884f6446b7e376a749ead8038359b70ec1
xen-unstable date:        Fri Jan 11 11:01:36 2008 +0000

17 years agovmxassist: Emulate CLTS.
Keir Fraser [Fri, 11 Jan 2008 11:07:11 +0000 (11:07 +0000)]
vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16706:f2b4779623d26e30ebd693a1cfccfe1162243191
xen-unstable date:        Fri Jan 11 10:59:48 2008 +0000

17 years agox86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
Keir Fraser [Fri, 11 Jan 2008 11:06:22 +0000 (11:06 +0000)]
x86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
vmexit handling, before IO-APIC can be EOIed or unmasked and resample
the fake INTx line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16705:e4fd457a3dd5eebf059b49340bb7f3aea1239d8f
xen-unstable date:        Fri Jan 11 10:53:44 2008 +0000

17 years agox86_emulate: Certain opcodes are only valid with a memory operand.
Keir Fraser [Thu, 10 Jan 2008 22:58:05 +0000 (22:58 +0000)]
x86_emulate: Certain opcodes are only valid with a memory operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16703:c86025f569cb
xen-unstable date:        Thu Jan 10 22:52:40 2008 +0000

17 years agoFix network-bridge shell quoting.
Keir Fraser [Thu, 10 Jan 2008 15:31:27 +0000 (15:31 +0000)]
Fix network-bridge shell quoting.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   16702:850ec55df0dc9f831091155012bba0c613759470
xen-unstable date:        Thu Jan 10 15:30:46 2008 +0000

17 years agox86 hvm: Tolerate failure to complete INTACK cycle on an
Keir Fraser [Thu, 10 Jan 2008 11:54:59 +0000 (11:54 +0000)]
x86 hvm: Tolerate failure to complete INTACK cycle on an
interrupt. Failure can occur because we do not hold locks between
detecting a pending interrupt and acknowledging it. Satte can change
between these two points.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm: Fix evtchn-to-fake-pci interrupt propagation.
Keir Fraser [Thu, 10 Jan 2008 11:49:19 +0000 (11:49 +0000)]
hvm: Fix evtchn-to-fake-pci interrupt propagation.

Previously the evtchn_upcall_pending flag would only ever be sampled
on VCPU0, possibly leading to long delays in deasserting the
fake-pci-device INTx line if the interrupt is actually delivered to
other than VCPU0.

Diagnosed by Ian Jackson <ian.jackson@eu.citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16692:9865d5e82802fda2ac842c0c28a0833f2126551f
xen-unstable date:        Tue Jan 08 15:55:29 2008 +0000

17 years agox86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
Keir Fraser [Thu, 10 Jan 2008 11:43:21 +0000 (11:43 +0000)]
x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16696:b5b3e27f1af3f709a7795d407b567a7b4db533f0
xen-unstable date:        Wed Jan 09 10:11:31 2008 +0000

x86_emulate: Fix handling of RIP-relative addressing.
The handling of SHLD/SHRD introduced in 16696:b5b3e27f1af3f7 was
incorrect; thanks to Gary Grebus @ Virtual Iron for spotting it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16699:7e400607cdd8aa810b96a832eaf8989f48dd6646
xen-unstable date:        Wed Jan 09 22:21:28 2008 +0000

17 years agoFix x86_emulate() handling of imul with immediate operands.
Keir Fraser [Thu, 10 Jan 2008 11:42:36 +0000 (11:42 +0000)]
Fix x86_emulate() handling of imul with immediate operands.

This fixes a repeatable crash in RHEL 4.2 ext2 filesystem during boot.

Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
xen-unstable changeset:   16695:4c1a0d2a318d5cd404f5411e31ba425f223a0e66
xen-unstable date:        Wed Jan 09 10:09:04 2008 +0000

17 years agox86: Fix a comment in get_page_type().
Keir Fraser [Thu, 10 Jan 2008 11:41:26 +0000 (11:41 +0000)]
x86: Fix a comment in get_page_type().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16694:15cfd1f8fa3897817baf7b6f8f4fffc738eb2690
xen-unstable date:        Tue Jan 08 16:45:08 2008 +0000

17 years agohvm: hpet: Clamp period to sane values to prevent excessive looping in
Keir Fraser [Thu, 10 Jan 2008 11:40:11 +0000 (11:40 +0000)]
hvm: hpet: Clamp period to sane values to prevent excessive looping in
hpet_timer_fn(), or excessive numbers of set_timer() callbacks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16697:1b2be7cf0b7b4b639b7d6f027545930021ebe1e0
xen-unstable date:        Wed Jan 09 10:32:13 2008 +0000

17 years agohvm: hpet: Fix overflow when converting to nanoseconds.
Keir Fraser [Thu, 10 Jan 2008 11:39:23 +0000 (11:39 +0000)]
hvm: hpet: Fix overflow when converting to nanoseconds.

Currently in hpet_tick_to_ns, the approach is multiplying first, which
easily causes overflow when tick is quite large. The patch cannot
handle arbitratry large ticks duo to the precision requirement and
64bit's value range. But by optimize the equation, a larger ticks than
current code can be supported. Also an overflow check is added before
the calculation.

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16693:9ff64d045e61e7db6844b3db473e660e8c7e0551
xen-unstable date:        Tue Jan 08 16:20:04 2008 +0000

17 years agohvm: time: Fixes to 'SYNC' (no_missed_ticks_pending) timer handling.
Keir Fraser [Thu, 10 Jan 2008 11:38:10 +0000 (11:38 +0000)]
hvm: time: Fixes to 'SYNC' (no_missed_ticks_pending) timer handling.
Based on a patch by Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16690:01adaec882d4ea62aede17926716d122b084dd94
xen-unstable date:        Tue Jan 08 14:31:23 2008 +0000

17 years agohvm: hpet: Fix per-timer enable/disable.
Keir Fraser [Thu, 10 Jan 2008 11:37:32 +0000 (11:37 +0000)]
hvm: hpet: Fix per-timer enable/disable.

The enable/disable per timer interrupt bit is wrongly used as per
timer enable/disable. According to spec, comparator value should
constantly increasing when HPET is globally enabled, no matter
whether the timer interrupt is enabled or not.

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16689:66db23ecd5628d87890abe0744ae3dc20b62bced
xen-unstable date:        Tue Jan 08 13:57:45 2008 +0000

17 years agoHandle netdev secondary addresses and labels
Keir Fraser [Thu, 10 Jan 2008 11:35:34 +0000 (11:35 +0000)]
Handle netdev secondary addresses and labels

Fix the network-bridge logic to correctly transfer secondary IP
address from $netdev to $bridge.

e.g. if you add an secondary address/label/alias with:

  $> ip addr add 172.31.0.200/24 dev eth0 label eth0:00

then, "ip addr show dev eth0" gives e.g.:

  inet 172.31.0.10/24 brd 172.31.0.255 scope global eth0
  inet 172.31.0.200/24 scope global secondary eth0:00

and transfer_addrs() tries to execute:

  ip addr add 172.31.0.10/24 brd 172.31.0.255 scope global dev
  tmpbridge
  ip addr add 172.31.0.200/24 scope global secondary dev tmpbridge:00

which causes the sript to fail because:

  1) The device tmpbridge:00 doesn't exist
  2) The "secondary" flag isn't valid

This patch fixes the sed commands to instead give:

  ip addr add 172.31.0.10/24 brd 172.31.0.255 scope global dev
  tmpbridge label tmpbridge
  ip addr add 172.31.0.200/24 scope global dev tmpbridge label
  tmpbridge:00

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
xen-unstable changeset:   16680:7b7700a30e5280d57ecb9a284ee943aa80ae37f0
xen-unstable date:        Tue Jan 08 09:43:44 2008 +0000

17 years agoHVM vif without bridge.
Keir Fraser [Thu, 10 Jan 2008 11:34:38 +0000 (11:34 +0000)]
HVM vif without bridge.
When using xen without a bridge but NAT or routing, HVM domains can't
boot, and qemu-dm-n.log contains:

config qemu network with xen bridge for  tap0 xenbr0
bridge xenbr0 does not exist!

That's because the qemu-ifup script always tries to add the vif to
a default-named xenbr0 bridge. On the contrary, PV domains just work
fine with the same configuration file except HVM parameters.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
xen-unstable changeset:   16679:60440a7e7a40c0cfe94f7abcbde82ea2c6e123fe
xen-unstable date:        Tue Jan 08 09:40:33 2008 +0000

17 years agoppoll/pselect x86/64 support.
Keir Fraser [Thu, 10 Jan 2008 11:32:19 +0000 (11:32 +0000)]
ppoll/pselect x86/64 support.

x86_64: Add ppoll/pselect syscalls (from upstream Linux)

Needed TIF_RESTORE_SIGMASK first

Signed-off-by: Andi Kleen <ak@suse.de>
linux-2.6.18-xen changeset:   376:353802ec1caf399143e48713a04cedd37a106347
linux-2.6.18-xen date:        Wed Jan 09 22:12:32 2008 +0000

x86_64: Add TIF_RESTORE_SIGMASK (from upstream Linux)

We need TIF_RESTORE_SIGMASK in order to support ppoll() and pselect()
system calls. This patch originally came from Andi, and was based
heavily on David Howells' implementation of same on i386. I fixed a
typo which was causing do_signal() to use the wrong signal mask.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andi Kleen <ak@suse.de>
linux-2.6.18-xen changeset:   375:748cd890ea7f56752311e519e80eece9d850c01a
linux-2.6.18-xen date:        Wed Jan 09 22:12:04 2008 +0000

17 years agoxen vtpm: Initialize the comms ring with zeroes.
Keir Fraser [Thu, 10 Jan 2008 11:28:03 +0000 (11:28 +0000)]
xen vtpm: Initialize the comms ring with zeroes.

Initialize the ring with zeroes on the backend side and on the
frontend set the 'unused' member to zeroes.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
linux-2.6.18-xen changeset:   374:fedc10fba9f1d5ec0c72dbcbca87e508222b4c48
linux-2.6.18-xen date:        Tue Jan 08 09:55:29 2008 +0000

17 years agovmx: Fix crash during domain destruction after apic-access cleanup patch.
Keir Fraser [Fri, 28 Dec 2007 16:00:43 +0000 (16:00 +0000)]
vmx: Fix crash during domain destruction after apic-access cleanup patch.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoRename uintN_t guest handles to uintN, to avoid nameclash with uintN_t
Keir Fraser [Fri, 28 Dec 2007 15:52:50 +0000 (15:52 +0000)]
Rename uintN_t guest handles to uintN, to avoid nameclash with uintN_t
macros during the handle definitions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16674:ad0f20f5590a
xen-unstable date:        Fri Dec 28 15:44:51 2007 +0000

17 years agoIn C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
Keir Fraser [Fri, 28 Dec 2007 15:47:10 +0000 (15:47 +0000)]
In C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
said to be undefined if the value to be put is n can't fit.  I guess
we can safely consider that the same applies to printf.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
xen-unstable changeset:   16671:19f549449cb5
xen-unstable date:        Fri Dec 28 15:23:28 2007 +0000

17 years agovmx: Do not allow emulated accesses to the vlapic mmap'ed 'magic
Keir Fraser [Thu, 27 Dec 2007 22:57:41 +0000 (22:57 +0000)]
vmx: Do not allow emulated accesses to the vlapic mmap'ed 'magic
page'.

This is the equivalent of:
xen-unstable changeset:   16663:d5f0afb58589
xen-unstable date:        Thu Dec 27 12:03:02 2007 +0000

17 years agoSimplify APIC_ACCESS VMX support.
Keir Fraser [Thu, 27 Dec 2007 22:50:59 +0000 (22:50 +0000)]
Simplify APIC_ACCESS VMX support.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   15186:96a59a5ae656
xen-unstable date:        Wed May 30 17:01:26 2007 +0100

17 years agox86, hvm, rombios: INT13 LBA48 support for disks bigger than 128GB.
Keir Fraser [Thu, 27 Dec 2007 22:34:52 +0000 (22:34 +0000)]
x86, hvm, rombios: INT13 LBA48 support for disks bigger than 128GB.
The new limit should be 2TB.

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
xen-unstable changeset:   16669:7fbc521b07a9
xen-unstable date:        Thu Dec 27 13:00:40 2007 +0000

17 years agoFix pygrub handling of many kernels
Keir Fraser [Thu, 27 Dec 2007 22:34:26 +0000 (22:34 +0000)]
Fix pygrub handling of many kernels

If there are a large number of kernel images configured in grub.conf
there will be too many to fit in the limited size pygrub display. This
patch fixes this so that the list of kernels scrolls as needed.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
xen-unstable changeset:   16668:50bd5d2c15cf
xen-unstable date:        Thu Dec 27 12:56:32 2007 +0000

17 years agoFix xend xenstore handling.
Keir Fraser [Thu, 27 Dec 2007 22:33:47 +0000 (22:33 +0000)]
Fix xend xenstore handling.

xend can get into a situation where two processes are attempting to
interact with the xenstore socket, with disastrous results. Fix the
two bad users of xstransact, add a big warning, and fix the destructor
so future mistakes will be detected earlier.

Signed-off-by: John Levon <john.levon@sun.com>
xen-unstable changeset:   16664:9fe92a88912b
xen-unstable date:        Thu Dec 27 12:27:34 2007 +0000

17 years agohvm: For functions which translate virtual addresses to machine
Keir Fraser [Thu, 27 Dec 2007 22:32:24 +0000 (22:32 +0000)]
hvm: For functions which translate virtual addresses to machine
addresses, page faults should only be raised when the gva->gfn
translation fails. These should be distinguished from gfn->mfn
translation failures.

The main effect of this is to change the behaviour of functions
derived from __hvm_copy(), which now returns a three-way enumeration,
and also can automatically inject #PF when the gva->gfn translation
fails.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16662:e818c24cec03
xen-unstable date:        Thu Dec 27 12:00:30 2007 +0000

17 years agohvm: Register fields CS,DS,ES,FS,GS,SS,etc. are all undefined during
Keir Fraser [Thu, 27 Dec 2007 21:55:38 +0000 (21:55 +0000)]
hvm: Register fields CS,DS,ES,FS,GS,SS,etc. are all undefined during
HVM execution as they are not saved/restore on vmexit/vmentry. To
prevent accidental usage of these fields, poison them with 16-bit
value 0xbeef (debug builds only).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16660:2324110ef2c6
xen-unstable date:        Thu Dec 27 10:39:04 2007 +0000

17 years agohvm: More physaddrs in unsigned longs.
Keir Fraser [Thu, 27 Dec 2007 21:46:32 +0000 (21:46 +0000)]
hvm: More physaddrs in unsigned longs.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   16657:3f0f0bd3f1c1
xen-unstable date:        Fri Dec 21 21:59:50 2007 +0000

x86: Fix PAE build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16659:717f0dce76e7
xen-unstable date:        Sat Dec 22 10:27:26 2007 +0000

17 years agoxend: Clean up hvm_build Python wrapper. Python code can get/set hvm
Keir Fraser [Thu, 20 Dec 2007 14:57:03 +0000 (14:57 +0000)]
xend: Clean up hvm_build Python wrapper. Python code can get/set hvm
params directly.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16116:1f893d055c6f79d719199d6eac139165295713a0
xen-unstable date:        Tue Oct 16 10:27:55 2007 +0100

17 years agoFix UP unprivileged x86/64 build.
Keir Fraser [Thu, 20 Dec 2007 11:07:03 +0000 (11:07 +0000)]
Fix UP unprivileged x86/64 build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
linux-2.6.18-xen changeset:   371:06b826b4f71e74f016767aa2f26232239839bee3
linux-2.6.18-xen date:        Thu Dec 20 11:05:16 2007 +0000

17 years agoFix serial output of carriage return when using high-bit stream muxing.
Keir Fraser [Thu, 20 Dec 2007 10:29:07 +0000 (10:29 +0000)]
Fix serial output of carriage return when using high-bit stream muxing.
Original patch by Dan Doucette.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16641:b0c85bc56f9ef08a354499afea584c4b048068a3
xen-unstable date:        Wed Dec 19 15:02:05 2007 +0000

17 years agohvm: Fix mistake in timer cleanup.
Keir Fraser [Thu, 20 Dec 2007 10:25:52 +0000 (10:25 +0000)]
hvm: Fix mistake in timer cleanup.
Spotted by Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16601:2ebced8f8bafe196b5c6e7097d98d77e93e254af
xen-unstable date:        Thu Dec 13 09:29:21 2007 +0000

hvm: Reduce vpt.c dependencies on external timer details.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16600:4553bc1087d9f73e5c27f5511c1d4c724b4dbccf
xen-unstable date:        Wed Dec 12 15:41:20 2007 +0000

hvm: Fix destroy_periodic_time() to not race destruction of one-shot
timers.

This bug was tracked down by Dexuan Cui <dexuan.cui@intel.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16595:f2f7c92bf1c15206aa7072f6a4e470a132d528e2
xen-unstable date:        Wed Dec 12 11:08:21 2007 +0000

hvm: Split no_missed_tick_accounting into two modes:
 * no_missed_ticks_pending ('SYNC')
 * one_missed_tick_pending ('MIXED')

This is based on a patch by Dave Winchell <dwinchell@virtualiron.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16545:0f9b5ab59579e8b980e231bfd3fdf5ab8a74e005
xen-unstable date:        Thu Dec 06 11:56:51 2007 +0000

x86, hvm: Clean up periodic timer code a little. This leads naturally
to a no-missed-tick-accounting mode which is a combination of ticks
delivered 'off beat' immediately upon re-scheduling when ticks are
missed, then reverting to delivering ticks 'on beat' as usual.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16341:8ff5bb70136dbb8ae4a725400334f4bff3643ba8
xen-unstable date:        Thu Nov 08 10:33:18 2007 +0000

x86, hvm: Fix typo in no-missed-tick-accounting timer mode.
From: Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16334:644e7577f6ee00f746a63a63ca16284cc31f9ee8
xen-unstable date:        Wed Nov 07 14:53:32 2007 +0000

x86, hvm: More fixes to no-missed-tick-accounting mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16315:070da619e65e87b69b2d99794840d84998fdf083
xen-unstable date:        Mon Nov 05 10:09:10 2007 +0000

hvm: Timer fixes:
 1. Do not record more than one pending interrupt in
 no-missed-tick-accounting mode. We do not stack up missed interrupts
 in this timer mode.
 2. Always record all missed ticks when we are in a
 missed-tick-accounting mode. Do not have a ceiling for this as it
 simply causes guests to lose track of wall time.
 3. General bits of cleanup and simplification.
From: Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16312:838e77a41a3c53a54428e642cb0440a8a6f8912b
xen-unstable date:        Fri Nov 02 16:34:54 2007 +0000

x86, hvm: Fix 'no_missed_tick_accoutning' timer mode.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16277:eaa8014ef7796d267d6b9e9f05a64025b7b16118
xen-unstable date:        Wed Oct 31 09:14:49 2007 +0000

x86, hvm: New timer mode 'no missed-tick accounting'.
From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16274:44dde35cb2a663aef3fc27cc326766276cb393e8
xen-unstable date:        Tue Oct 30 16:11:47 2007 +0000

hvm, x86: Allow virtual timer mode to be specified.

In HVM config file:
timer_mode=0 # Default: virtual time is delayed when timer ticks are
             # missed dur to preemption
timer_mode=1 # Virtual time always equals wall time, even while missed
             # ticks are pending

From: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16237:b5a2cbca39308bc28c0c27cc9fd5375e3b41ad13
xen-unstable date:        Fri Oct 26 09:56:54 2007 +0100

17 years agox86: AMD Fam10/11 adjustments
Keir Fraser [Wed, 19 Dec 2007 15:58:28 +0000 (15:58 +0000)]
x86: AMD Fam10/11 adjustments
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   16093:0d7d6804af2204dece108959f4fa40764bd2734f
xen-unstable date:        Thu Oct 11 12:11:54 2007 +0100

17 years ago[IA64] Fix vulnerability of copy_to_user in PAL emulation
Keir Fraser [Wed, 19 Dec 2007 09:56:28 +0000 (09:56 +0000)]
[IA64] Fix vulnerability of copy_to_user in PAL emulation

There is a security vulnerability in PAL emulation since alt-dtlb
miss handler of HVM absolutely inserts a identity-mapped TLB when
psr.vm=0.  HVM guest can access an arbitrary machine physical
memory with this security hole.  Actually windows 2008 destroys
the content of machine physical address 0x108000.

I think this patch is enough for normal usage.  Please see SDM
Vol2 11.10.2.1.3 "Making PAL Procedure Calls in Physical or
Virtual Mode".  If the caller has a responsibility of providing
DTR or DTC mapping, xencomm for PAL might be unnecessary.

I confirmed there is no problem in linux, windows 2003, windows
2008 with this patch.

As for PV domain, the same logic can't be used due to only one
vTLB. This patch only checks that the buffer never points VMM
address, that would avoid the vulnerability.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen-unstable changeset:   16622:e6069a715fd7ef15bb72f5c17e8e7db4e8128f32
xen-unstable date:        Fri Dec 14 10:25:03 2007 -0700

17 years agoxend: Prevent XenD touching externally managed bridges
Keir Fraser [Sat, 15 Dec 2007 19:03:44 +0000 (19:03 +0000)]
xend: Prevent XenD touching externally managed bridges

With current XenD 3.0.4 or later try the following:

    brctl addbr demo
    ifconfig demo up

    /etc/init.d/xend start
    /etc/init.d/xend stop

    ifconfig demo down
    brctl delbr demo

Now, start XenD again....

    /etc/init.d/xend start

And watch in horror as it re-creates your 'demo' bridge.

The problem is that the 'XendNetwork' class does not distinguish
between bridge devices that it is managing (ie those created via
XenAPI) and those which it does not manage (ie those created by OS
distro init scripts, or by apps like  libvirt).

While initially I thought I could just make XenD ignore
externally-managed bridges completely, it seems to needs to know about
them otherwise it can't hook up guest VIFs to them correctly. So the
attached patch adds a 'managed' flag to the XendNetwork
class. Externally managed bridges have this set to False. At startup
XenD will now only re-create bridge devices which have the 'managed'
flag set to 'True'  - ie those created via XenAPI.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
xen-unstable changeset:   16625:44a98411d230b3214be49b42e66d7c42e01ab59f
xen-unstable date:        Sat Dec 15 18:26:52 2007 +0000

17 years agox86: Fix e820 walk and allocator initialisation.
Keir Fraser [Sat, 15 Dec 2007 19:03:00 +0000 (19:03 +0000)]
x86: Fix e820 walk and allocator initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16624:257ca4017b416b26120f4a271cf608a23cf23468
xen-unstable date:        Sat Dec 15 18:23:13 2007 +0000

17 years agoSVM: Treat the vlapic's tpr as the master copy and sync the vtpr to it
Keir Fraser [Fri, 14 Dec 2007 12:05:31 +0000 (12:05 +0000)]
SVM: Treat the vlapic's tpr as the master copy and sync the vtpr to it
before every vm entry.  This fixes HVM save/restore/migrate, as the
vtpr value was only being synced on guest TPR writes before.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   16618:966a6d3b74087474df337e00b31cbecf495b442a
xen-unstable date:        Fri Dec 14 11:50:24 2007 +0000

17 years agohvm: Remove duplicate assignment of __HYPERVISOR_grant_table_op in
Keir Fraser [Fri, 14 Dec 2007 11:58:37 +0000 (11:58 +0000)]
hvm: Remove duplicate assignment of __HYPERVISOR_grant_table_op in
hypercall demux tables.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16617:cb0ce96c02defc429ca09e1a33f972f2ee09a61b
xen-unstable date:        Fri Dec 14 11:39:02 2007 +0000

17 years agox86: When emulating PV RDMSR/WRMSR, only look at low 32 bits of RCX.
Keir Fraser [Fri, 14 Dec 2007 11:57:21 +0000 (11:57 +0000)]
x86: When emulating PV RDMSR/WRMSR, only look at low 32 bits of RCX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This is based on part of:
xen-unstable changeset:   16616:136f80d219588b5e45a5d13e19dd51a2401504f5
xen-unstable date:        Fri Dec 14 11:37:02 2007 +0000

17 years agohvm: Remove guest-triggerable assertions from vlapic emulation.
Keir Fraser [Fri, 14 Dec 2007 11:55:51 +0000 (11:55 +0000)]
hvm: Remove guest-triggerable assertions from vlapic emulation.

Currently our VLAPIC will happily deliver interrupts on vectors <
16. This could be emulated better, but probably does not matter.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16615:3ee37b6279b76c58f49a056c44f413bf8cc030a9
xen-unstable date:        Fri Dec 14 10:48:18 2007 +0000

17 years agosvm: Greatly reduce total number of CR8 intercepts
Keir Fraser [Fri, 14 Dec 2007 11:52:01 +0000 (11:52 +0000)]
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).

Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   15844:924c153e0cf90e7c6f9033842d702d0fbc122d29
xen-unstable date:        Mon Sep 10 16:13:13 2007 +0100

17 years agoFix gdb debugging of hypervisor.
Keir Fraser [Wed, 12 Dec 2007 14:42:41 +0000 (14:42 +0000)]
Fix gdb debugging of hypervisor.

This patch:
  * enables the gdbstubs to properly access hypervisor memory;
  * prevents an assertion failure in __spurious_page_fault's call
    to map_domain_page if such accesses fail, by testing in_irq();
  * prints some additional helpful messages;
  * fixes the endianness of register transfers from the gdbstubs
    so that gdb is much less confused.
  * fixes the documentation in docs/misc/crashdb.txt

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset:   16596:514d450ad7295c16c5e4b6bf3716aac7bd838bd4
xen-unstable date:        Wed Dec 12 11:27:15 2007 +0000

17 years ago[HVM] Don't count "missed ticks" on one-shot timers.
Keir Fraser [Wed, 12 Dec 2007 14:41:39 +0000 (14:41 +0000)]
[HVM] Don't count "missed ticks" on one-shot timers.
It's not clear what it would mean, and it leads to division by zero.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen-unstable changeset:   15943:c0d1825f51899b329495efb2078dd15e0fb3b479
xen-unstable date:        Mon Sep 24 13:44:29 2007 +0100

hvm: Fix one-shot timers. Do not disable until the interrupt has been
latched by the target VCPU.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   16125:b4278beaf3549f410a5a6086dbd8af93c495aeac
xen-unstable date:        Wed Oct 17 13:12:03 2007 +0100

hvm: Fix destroy_periodic_time() to not race destruction of one-shot
timers.

This bug was tracked down by Dexuan Cui <dexuan.cui@intel.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16595:f2f7c92bf1c15206aa7072f6a4e470a132d528e2
xen-unstable date:        Wed Dec 12 11:08:21 2007 +0000

17 years agohvm: Fix is_isa_irq_masked().
Keir Fraser [Wed, 12 Dec 2007 14:32:10 +0000 (14:32 +0000)]
hvm: Fix is_isa_irq_masked().

Incorrectly it was not checking whether the vlapic is masking the pic.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
xen-unstable changeset:   16594:686b75b31f3cc10453119dd23eac4e7ac3f9e9ad
xen-unstable date:        Wed Dec 12 10:40:02 2007 +0000

17 years agoMatch version naming in xen-unstable: 3.1.3-rc1-pre
Keir Fraser [Wed, 12 Dec 2007 14:30:35 +0000 (14:30 +0000)]
Match version naming in xen-unstable: 3.1.3-rc1-pre

17 years agoUpdate version tag to 3.1.3-rc1-devel (nearly ready for -rc1).
Keir Fraser [Sat, 8 Dec 2007 17:23:05 +0000 (17:23 +0000)]
Update version tag to 3.1.3-rc1-devel (nearly ready for -rc1).

17 years agox86: Respect e820 map even below 16MB.
Keir Fraser [Sat, 8 Dec 2007 17:20:02 +0000 (17:20 +0000)]
x86: Respect e820 map even below 16MB.

NB. Even with this patch, x86/32 still statically allocates the range
1MB-12MB. This can be changed if there really are platforms that need
stuff to persist in that range after the OS starts to boot.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16563:d4a3479e68ce
xen-unstable date:        Fri Dec 07 18:24:33 2007 +0000

17 years agox86: force DMI table to not be in E820 RAM region
Keir Fraser [Sat, 8 Dec 2007 17:18:06 +0000 (17:18 +0000)]
x86: force DMI table to not be in E820 RAM region

In order for Dom0 to be able to map the DMI table, it must not be in
E820 RAM; since some BIOS versions apparently fail to set the type
correctly for the page(s) containing this table, adjust it before
starting to consume memory.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
xen-unstable changeset:   15964:80277ff19c9c
xen-unstable date:        Wed Sep 26 14:14:16 2007 +0100

17 years agox86: Fix management support on HP ProLiant systems.
Keir Fraser [Sat, 8 Dec 2007 17:07:56 +0000 (17:07 +0000)]
x86: Fix management support on HP ProLiant systems.

Adds support to allow host-platform-specific handling of I/O port
traps. Specifically adds support to handle an HP ProLiant I/O port in
a special way.

Signed-off-by: Mike Garrett <michael.garrett@hp.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16542:1936e6a79f85
xen-unstable date:        Thu Dec 06 11:23:04 2007 +0000

x86: Change proliant io emulation stub to use pushf/popf instead of pushfw/popfw.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16562:35890b260971
xen-unstable date:        Fri Dec 07 17:05:15 2007 +0000

17 years ago[IA64] Fix TLB insertion for subpaging
Keir Fraser [Fri, 7 Dec 2007 12:45:57 +0000 (12:45 +0000)]
[IA64] Fix TLB insertion for subpaging

Without this patch, Longhorn is sure to hang up.  .NET application
might hit this bug.  itc.i instruction is repeated forever, because
TLB entry with smaller page size is volatile.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen-unstable changeset: 16177:52d9f5028397081990791e633aa12e112bfe2677
xen-unstable date: Fri Oct 12 14:49:37 2007 -0600

17 years ago[IA64] Fix wrong insertion of TLB entry in region 0
Keir Fraser [Fri, 7 Dec 2007 12:45:37 +0000 (12:45 +0000)]
[IA64] Fix wrong insertion of TLB entry in region 0

On PV domain with metaphysical mode, emulation of itc.d in region 0
doesn't work well and inserts an wrong TC entry.
Because set_one_rr() doesn't set the machine region register.
i.e. metaphyisical_rr0 is used instead of guest's rr[0].

This bug causes Dom0/U crash when an application uses region 0.
Actually I met the crash when I was building open GFW (java uses
region 0).

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen-unstable changeset: 16042:2d1b8ae1548d139f9f8532c90a1e61fc199a3394
xen-unstable date: Mon Oct 01 09:57:50 2007 -0600

17 years agoxc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()
Keir Fraser [Fri, 7 Dec 2007 00:55:00 +0000 (00:55 +0000)]
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>
xen-unstable changeset:   15837:9071521d48646d247efafcf230ea0a4a2b6f0efa
xen-unstable date:        Fri Sep 07 11:39:10 2007 +0100

17 years agox86: Remove bogus variables on construct_dom0()
Keir Fraser [Thu, 6 Dec 2007 17:49:00 +0000 (17:49 +0000)]
x86: Remove bogus variables on construct_dom0()

The check for supervisor_mode_kernel feature bit was being done on the
dom0_features_{supported,required} variables, but they are always set
to zero.

The feature bits are stored on elf_dom_parms struct, not on those
variables.

From: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16553:b240698146a250d7f7cd5309325d743e9ec6f4d8
xen-unstable date:        Thu Dec 06 17:47:53 2007 +0000

17 years agolinux/x86: fix initial GDT setup
Keir Fraser [Thu, 6 Dec 2007 17:45:41 +0000 (17:45 +0000)]
linux/x86: fix initial GDT setup

cpu_gdt_init() can be static, can have its argument point to const,
and the number of descriptors should be calculated from one more than
the table's limit.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
linux-2.6.18-xen changeset:   349:d43906ea0e9c136e9ec28df30f94c225536d588c
linux-2.6.18-xen date:        Thu Dec 06 15:59:52 2007 +0000

17 years agoxen smpboot: Fix a merge oversight.
Keir Fraser [Thu, 6 Dec 2007 17:45:05 +0000 (17:45 +0000)]
xen smpboot: Fix a merge oversight.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
linux-2.6.18-xen changeset:   340:69bb553015ce4ef88e33bd296a3f1a38011c7fa3
linux-2.6.18-xen date:        Thu Dec 06 15:44:05 2007 +0000

17 years agoOn pirq enable/disable we fully unregister/reregister with Xen. This
Keir Fraser [Thu, 6 Dec 2007 17:44:35 +0000 (17:44 +0000)]
On pirq enable/disable we fully unregister/reregister with Xen. This
causes the underlying IRQ to be properly masked/unmasked, thus
avoiding deadlock scenarios if the IRQ is not EOIed.
Based on a patch by Chris Lalancette <clalance@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
linux-2.6.18-xen changeset:   313:51b2b0d0921c3aefb18e16a2eda68a5c3133e949
linux-2.6.18-xen date:        Wed Nov 21 09:41:11 2007 +0000

17 years agopvfb: PVFB frontend can send bogus screen updates
Keir Fraser [Thu, 6 Dec 2007 17:44:12 +0000 (17:44 +0000)]
pvfb: PVFB frontend can send bogus screen updates

The PVFB frontend can get confused and send a screen update to the
backend when the screen is actually clean.  Such an update asks for
the impossible rectangle (x1, x2, y1, y2) = (INT_MAX, 0, INT_MAX, 0).
Fix by setting the dirty flag in the obvious place: when the dirty
rectangle is grown.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
linux-2.6.18-xen changeset:   311:ca05cf1a9bdc2c7604b95fd085fa5abe067c969a
linux-2.6.18-xen date:        Fri Nov 16 16:55:46 2007 +0000

17 years ago32-on-64: Fix domain address-size clamping, implement
Keir Fraser [Thu, 6 Dec 2007 17:41:12 +0000 (17:41 +0000)]
32-on-64: Fix domain address-size clamping, implement
copy-on-grant-transfer, and eliminate 166GB memory limit for x86/64
Xen.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16548:cd5e1e76d0bc66440a04122baa27860f5d763b5b
xen-unstable date:        Thu Dec 06 13:39:19 2007 +0000

32-on-64: Fixes to previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16549:baf90ee3c1dab65f4a386521be6e108920622866
xen-unstable date:        Thu Dec 06 13:56:00 2007 +0000

17 years agoxc ptrace: Fix a couple of bugs in page-table walking.
Keir Fraser [Thu, 6 Dec 2007 17:36:07 +0000 (17:36 +0000)]
xc ptrace: Fix a couple of bugs in page-table walking.
Signed-off-by: John Zulauf <john.zulauf@intel.com>
xen-unstable changeset:   16544:d7a0a73e5dca64466843a420a3975ecf665d4762
xen-unstable date:        Thu Dec 06 11:29:18 2007 +0000

17 years ago[XEN, 32on64]: Correct continuation translation for large
Keir Fraser [Thu, 6 Dec 2007 17:35:41 +0000 (17:35 +0000)]
[XEN, 32on64]: Correct continuation translation for large
compat_mmuext hypercalls.

At the point where we translate the continuation "nat_ops" points to
the beginning of the batch of "i" entries, therefore it must be
incremented by the number of entries processed "i - left". At the same
point "cmp_uops" points to the end of the batch of entries and must
therefore be decremented by "left".

The new count value has already been set by do_mmuext_op to "left" and
therefore it is correct to add "count - i" since that is the number of
entries that remain after this batch.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
xen-unstable changeset:   16543:46776e65e6796f7751a15649f275b78e848d7ed5
xen-unstable date:        Thu Dec 06 11:24:02 2007 +0000

17 years agoFix x86 build.
Keir Fraser [Thu, 6 Dec 2007 17:35:04 +0000 (17:35 +0000)]
Fix x86 build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agohvm: Initialize vlapic->timer_last_update.
Keir Fraser [Thu, 6 Dec 2007 17:34:47 +0000 (17:34 +0000)]
hvm: Initialize vlapic->timer_last_update.

Without the fix, before the first vlapic timer interrupt is injected,
the "vlapic->timer_last_update" in vlapic_get_tmcct()  is always 0,
causing a wrong value of counter_passed.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
xen-unstable changeset:   16536:89e7031e153c62b9ce223a58a7ba49df285784a7
xen-unstable date:        Wed Dec 05 14:01:39 2007 +0000

17 years agox86_64: Do not leak trampoline mapping into dom0's initial address
Keir Fraser [Thu, 6 Dec 2007 17:31:45 +0000 (17:31 +0000)]
x86_64: Do not leak trampoline mapping into dom0's initial address
space.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16535:c67d024fdd2d3527ccd08e513ca3ed3c9dcb4b68
xen-unstable date:        Wed Dec 05 13:49:19 2007 +0000

17 years agox86: Sync cpu/common.c with Linux 2.6.18.
Keir Fraser [Thu, 6 Dec 2007 17:31:08 +0000 (17:31 +0000)]
x86: Sync cpu/common.c with Linux 2.6.18.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16524:3dc3a5feeb6038546710d95cec0a3774a4f41157
xen-unstable date:        Wed Dec 05 09:56:17 2007 +0000

17 years agox86 domain builder: Propagate x86_compat return code.
Keir Fraser [Thu, 6 Dec 2007 17:30:40 +0000 (17:30 +0000)]
x86 domain builder: Propagate x86_compat return code.
Signed-off-by: Elizabeth Kon <eak@us.ibm.com>
xen-unstable changeset:   16523:9cc381efbc29105d0874b4c878ff11ffccedb98e
xen-unstable date:        Wed Dec 05 09:46:55 2007 +0000

17 years agoFix xenctl_cpumap_to_cpumask.
Keir Fraser [Thu, 6 Dec 2007 17:30:14 +0000 (17:30 +0000)]
Fix xenctl_cpumap_to_cpumask.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16519:62451388f63065af4aeff966a856b925b4cca052
xen-unstable date:        Tue Dec 04 11:52:10 2007 +0000

17 years agodocs: Fix interface manual to correctly reference
Keir Fraser [Thu, 6 Dec 2007 17:29:46 +0000 (17:29 +0000)]
docs: Fix interface manual to correctly reference
update_va_mapping_otherdomain.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16517:62717554d4cb72eac230b67054e844c18ab918d7
xen-unstable date:        Tue Dec 04 11:16:41 2007 +0000

17 years agox86: Move get_page/put_page out of header file, and only print on
Keir Fraser [Thu, 6 Dec 2007 17:29:12 +0000 (17:29 +0000)]
x86: Move get_page/put_page out of header file, and only print on
get_page() failure if the domain is not dying.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16492:8e3d42fdb8e784b947fbd998d9a6df0ebf771718
xen-unstable date:        Tue Dec 04 09:56:10 2007 +0000

17 years agohvm: Fix 2 type mismatches in vlapic.h and hpet.c for 32-bit build Xen
Keir Fraser [Thu, 6 Dec 2007 17:03:17 +0000 (17:03 +0000)]
hvm: Fix 2 type mismatches in vlapic.h and hpet.c for 32-bit build Xen

For 32-bit build of Xen:
1) the first mismatch (in hpet_read(), length is 4)  makes guest think
the HPET DM is buggy (we return 0 for HPET_CFG.COUNTER_CLK_PERIOD to
guest), so guest wouldn't use HPET at all.
2) the second one: if tmict is 62500000 and timer_divisor is 16
(Fedoar7's installer uses the values at some time), 10 * 62500000 * 16
= 0x2540BE400 -- it's too big to be held in uint32_t.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
xen-unstable changeset:   16486:c00f31f27de6eb69b4d79f7aa330b1e4aba6f45f
xen-unstable date:        Wed Nov 28 13:13:51 2007 +0000

17 years agohvm: Inject #UD for un-emulated instructions rather than crash guest
Keir Fraser [Thu, 6 Dec 2007 17:02:47 +0000 (17:02 +0000)]
hvm: Inject #UD for un-emulated instructions rather than crash guest

The CrashMe stress test (a process repeatedly forks child processes,
and
the child processes initialize a buffer with random numbers, then
treat
the buffer as code, and execute it) can crash 32-bit HVM RHEL5.1 guest
easily; this is because we haven't emulated all the instructions in
handle_mmio() yet.

The CrashMe process runs with root rights, and can access MMIO space
in
an unknown way ("strace -f" shows the random codes running at CPL=3D3
don't call mmap(), and don't open any special files in /dev/ "); the
gpa
may look like 0xa**** or  0xb****, or 0xfee0****. =20

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16485:c76a9aa12d2e37ed5c6c2a3562c755ec3828af8a
xen-unstable date:        Wed Nov 28 13:04:47 2007 +0000

17 years agoFix string length check for vsnprintf() in debugtrace_printk().
Keir Fraser [Thu, 6 Dec 2007 17:02:12 +0000 (17:02 +0000)]
Fix string length check for vsnprintf() in debugtrace_printk().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen-unstable changeset:   16484:bb31c9325d5f86629de342a6515c6f28b92cf782
xen-unstable date:        Wed Nov 28 12:50:24 2007 +0000

17 years agox86-64: access only 4 bytes a the reset vector location on smpboot.
Keir Fraser [Thu, 6 Dec 2007 17:01:46 +0000 (17:01 +0000)]
x86-64: access only 4 bytes a the reset vector location on smpboot.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset:   16422:db98e4676d3ffe4a609b29ddef4a8e08016e4a43
xen-unstable date:        Thu Nov 22 14:12:47 2007 +0000