]> xenbits.xensource.com Git - xenclient/ioemu.git/log
xenclient/ioemu.git
16 years ago sci implementation for ioemu.
Jean Guyader [Wed, 19 Nov 2008 12:24:51 +0000 (12:24 +0000)]
  sci implementation for ioemu.

16 years ago Add touchpad support for dom0_driver
Jean Guyader [Wed, 19 Nov 2008 12:23:34 +0000 (12:23 +0000)]
  Add touchpad support for dom0_driver
  Improve the switching in intel driver

16 years ago Add blktap support.
Jean Guyader [Tue, 11 Nov 2008 12:40:35 +0000 (12:40 +0000)]
  Add blktap support.

16 years agoMerge branch 'rossp'
Jean Guyader [Mon, 10 Nov 2008 16:27:30 +0000 (16:27 +0000)]
Merge branch 'rossp'

16 years agoWorkaround to support HP/Lenovo WLAN cards.
Ross Philipson [Mon, 10 Nov 2008 14:31:23 +0000 (14:31 +0000)]
Workaround to support HP/Lenovo WLAN cards.

Modified the PCI emulation code to allow the Device ID and
Subsystem ID to be changed for HP/Lenovo WLAN cards to allow
them to be passed through.

Committer: Ross Philipson <ross.philipson@citrix.com>

On branch wlanpt
Changes to be committed:
   modified:   hw/pass-through.c

16 years agoMerge branch 'blktap'
Jean Guyader [Mon, 10 Nov 2008 11:15:14 +0000 (11:15 +0000)]
Merge branch 'blktap'

16 years agoMerge branch 'intel_driver'
Jean Guyader [Tue, 4 Nov 2008 22:21:17 +0000 (22:21 +0000)]
Merge branch 'intel_driver'

16 years agoMerge branch 'intel_driver' into blktap
Jean Guyader [Fri, 31 Oct 2008 13:29:49 +0000 (13:29 +0000)]
Merge branch 'intel_driver' into blktap

16 years agoMerge branch 'master' of /home/vhanquez/ioemu
Jean Guyader [Fri, 31 Oct 2008 12:17:57 +0000 (12:17 +0000)]
Merge branch 'master' of /home/vhanquez/ioemu

16 years ago Fix intel driver
Jean Guyader [Fri, 31 Oct 2008 12:15:55 +0000 (12:15 +0000)]
  Fix intel driver

16 years ago - Import vbe3 patch
Jean Guyader [Wed, 15 Oct 2008 17:20:23 +0000 (18:20 +0100)]
  - Import vbe3 patch

16 years ago - Map the legacy monocrome VGA ioport (vista needs it).
Jean Guyader [Wed, 15 Oct 2008 17:01:52 +0000 (18:01 +0100)]
  - Map the legacy monocrome VGA ioport (vista needs it).

16 years ago - Fix pv-on-hvm compilation.
Jean Guyader [Wed, 15 Oct 2008 17:01:05 +0000 (18:01 +0100)]
  - Fix pv-on-hvm compilation.
  - Remove the pass through for the Top of Memory register of the DRAM.

16 years ago pv-on-hvm-ioemu/ioemu-fixed-port-unplug
Jean Guyader [Mon, 13 Oct 2008 13:03:32 +0000 (14:03 +0100)]
  pv-on-hvm-ioemu/ioemu-fixed-port-unplug

16 years ago pv-on-hvm-ioemu/ioemu-fixed-port-unplug
Jean Guyader [Mon, 13 Oct 2008 13:03:13 +0000 (14:03 +0100)]
  pv-on-hvm-ioemu/ioemu-fixed-port-unplug

16 years ago pv-on-hvm-ioemu/CA-5941
Jean Guyader [Mon, 13 Oct 2008 13:02:55 +0000 (14:02 +0100)]
  pv-on-hvm-ioemu/CA-5941

16 years ago hvm-log-to-dom0
Jean Guyader [Mon, 13 Oct 2008 13:02:33 +0000 (14:02 +0100)]
  hvm-log-to-dom0

16 years ago Fix dom0_driver
Jean Guyader [Mon, 13 Oct 2008 13:01:54 +0000 (14:01 +0100)]
  Fix dom0_driver

16 years ago support-hvm-pv-drivers-ioemu-support
Jean Guyader [Mon, 13 Oct 2008 13:00:32 +0000 (14:00 +0100)]
  support-hvm-pv-drivers-ioemu-support

16 years ago - Call the init of dom0_driver
Jean Guyader [Mon, 13 Oct 2008 10:20:38 +0000 (11:20 +0100)]
  - Call the init of dom0_driver
  - Add dm-ready product patch

16 years ago - Call the init of dom0_driver
Jean Guyader [Mon, 13 Oct 2008 10:20:38 +0000 (11:20 +0100)]
  - Call the init of dom0_driver
  - Add dm-ready product patch

16 years ago - Fixe the xenstore headers.
Jean Guyader [Thu, 9 Oct 2008 17:15:59 +0000 (18:15 +0100)]
  - Fixe the xenstore headers.

16 years ago - Make the vgabios writable.
Jean Guyader [Thu, 9 Oct 2008 17:13:02 +0000 (18:13 +0100)]
  - Make the vgabios writable.

16 years ago - Add the dom0_input qemu driver
Jean Guyader [Thu, 9 Oct 2008 17:12:30 +0000 (18:12 +0100)]
  - Add the dom0_input qemu driver

16 years ago - Add some useful function to write into xenstore.
Jean Guyader [Thu, 9 Oct 2008 16:53:57 +0000 (17:53 +0100)]
  - Add some useful function to write into xenstore.

16 years ago - Add the option vga-passthrough and dom0-input.
Jean Guyader [Thu, 9 Oct 2008 16:53:37 +0000 (17:53 +0100)]
  - Add the option vga-passthrough and dom0-input.

16 years ago - Disable the cirrus graphic card when we passthrough a graphic card as a
Jean Guyader [Thu, 9 Oct 2008 16:52:23 +0000 (17:52 +0100)]
  - Disable the cirrus graphic card when we passthrough a graphic card as a
    primary in the guest.

16 years ago - Pass through some value of the real host in case of intel graphic
Jean Guyader [Thu, 9 Oct 2008 16:51:19 +0000 (17:51 +0100)]
  - Pass through some value of the real host in case of intel graphic
    card. The graphic card need the know how much merroy has been stolen
    from the physical RAM.

16 years ago - Change the VSLOT_START to keep the same BDF for intel graphic card
Jean Guyader [Thu, 9 Oct 2008 16:50:13 +0000 (17:50 +0100)]
  - Change the VSLOT_START to keep the same BDF for intel graphic card
    passthrough.

16 years ago - Add some pci function to read pci register value on the host's pci
Jean Guyader [Thu, 9 Oct 2008 16:45:11 +0000 (17:45 +0100)]
  - Add some pci function to read pci register value on the host's pci
    bus.
  - Map and unmap the legacy ioport/iomem when we attach/detach the device.

16 years agoBattery management - disable for stubdom
Ian Jackson [Thu, 23 Oct 2008 09:26:02 +0000 (10:26 +0100)]
Battery management - disable for stubdom

The battery management arrangements do not compile for stubdom as they
use direct IO, so for the moment I have stubbed them out.

16 years agoBattery management - compilation fixes
Ian Jackson [Thu, 23 Oct 2008 09:21:41 +0000 (10:21 +0100)]
Battery management - compilation fixes

 * xenstore_refresh_battery_status declaration and definition
   was missing void (interpreted in C as K&R syntax)
 * a couple of functions returning int returned NULL on failure

16 years agoBattery Management
Ian Jackson [Wed, 22 Oct 2008 17:38:26 +0000 (18:38 +0100)]
Battery Management

qemu side change for battery support within HVM guest.
(as revised by Kamala `rev1' Tue, 21 Oct 2008 19:15:41 GMT)

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
16 years agoMerge branch 'dom0_driver' into intel_driver
Jean Guyader [Tue, 21 Oct 2008 15:07:23 +0000 (16:07 +0100)]
Merge branch 'dom0_driver' into intel_driver

Conflicts:

dom0_driver.c

16 years ago - Fix dom0_driver
Jean Guyader [Mon, 20 Oct 2008 10:53:10 +0000 (11:53 +0100)]
   - Fix dom0_driver

16 years ago - Intel driver works.
Jean Guyader [Fri, 17 Oct 2008 13:04:07 +0000 (14:04 +0100)]
  - Intel driver works.

16 years ago - Intel driver, still not fixed.
Jean Guyader [Thu, 16 Oct 2008 14:16:47 +0000 (15:16 +0100)]
  - Intel driver, still not fixed.

16 years agocirrus vga save/restore and lfb_addr/lfb_end
Ian Jackson [Thu, 16 Oct 2008 17:31:04 +0000 (18:31 +0100)]
cirrus vga save/restore and lfb_addr/lfb_end

Cirrus VGA save and restore functions cast lfb_addr into an uint64_t
pointer while lfb_addr is only an unsigned long.
Same thing happened to lfb_end, causing pci_dev to be partially
overwritten by mistake.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 16 Oct 2008 14:22:32 +0000 (15:22 +0100)]
Merge branch 'qemu'

16 years agoenable usb uhci save/restore
Ian Jackson [Thu, 16 Oct 2008 09:29:00 +0000 (10:29 +0100)]
enable usb uhci save/restore

enables the usb uhci save and restore functions that
for some reasons were commented out.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ These were commented out in 1e4146791b46f0a798589c58a09f18b2841a9212
  aka svn://svn.savannah.nongnu.org/qemu/trunk@3609
  c046a42c-6fe2-441c-8c8c-71466251a162
  apparently by mistake.  This commit reverts 1e414679
  -Ian Jackson ]

16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 16 Oct 2008 09:37:49 +0000 (10:37 +0100)]
Merge branch 'qemu'

16 years agoenable usb uhci save/restore
Ian Jackson [Thu, 16 Oct 2008 09:29:00 +0000 (10:29 +0100)]
enable usb uhci save/restore

enables the usb uhci save and restore functions that
for some reasons were commented out.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[ These were commented out in 1e4146791b46f0a798589c58a09f18b2841a9212
  aka svn://svn.savannah.nongnu.org/qemu/trunk@3609
  c046a42c-6fe2-441c-8c8c-71466251a162
  apparently by mistake.  This commit reverts 1e414679
  -Ian Jackson ]

16 years agofix cirrus_vga_load
Ian Jackson [Thu, 16 Oct 2008 09:22:00 +0000 (10:22 +0100)]
fix cirrus_vga_load

Fixes a problem in cirrus_vga_load introduced by the "use
main memory for video memory" patch.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years ago - Import the intel rendering driver.
Jean Guyader [Wed, 15 Oct 2008 17:15:24 +0000 (18:15 +0100)]
  - Import the intel rendering driver.

16 years ago - Import vbe3 patch origin/vbe3
Jean Guyader [Wed, 15 Oct 2008 17:20:23 +0000 (18:20 +0100)]
  - Import vbe3 patch

16 years agoMerge branch 'master' of /home/t_jeang/ioemu.git/
Jean Guyader [Wed, 15 Oct 2008 17:03:00 +0000 (18:03 +0100)]
Merge branch 'master' of /home/t_jeang/ioemu.git/

16 years ago - Map the legacy monocrome VGA ioport (vista needs it).
Jean Guyader [Wed, 15 Oct 2008 17:01:52 +0000 (18:01 +0100)]
  - Map the legacy monocrome VGA ioport (vista needs it).

16 years ago - Fix pv-on-hvm compilation.
Jean Guyader [Wed, 15 Oct 2008 17:01:05 +0000 (18:01 +0100)]
  - Fix pv-on-hvm compilation.
  - Remove the pass through for the Top of Memory register of the DRAM.

16 years agoFix blktap device backend patch check
Ian Jackson [Tue, 14 Oct 2008 10:46:53 +0000 (11:46 +0100)]
Fix blktap device backend patch check

Regarding http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1367,
it appears that the expected backend path check is too strict for'
blktap devices.  Therefore if the devtype is `vbd' we allow the
backend to be `tap'.

Thanks to report and inspiration from Yosuke Iwamatsu.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years ago pv-on-hvm-ioemu/ioemu-fixed-port-unplug
Jean Guyader [Mon, 13 Oct 2008 13:03:32 +0000 (14:03 +0100)]
  pv-on-hvm-ioemu/ioemu-fixed-port-unplug

16 years ago pv-on-hvm-ioemu/ioemu-fixed-port-unplug
Jean Guyader [Mon, 13 Oct 2008 13:03:13 +0000 (14:03 +0100)]
  pv-on-hvm-ioemu/ioemu-fixed-port-unplug

16 years ago pv-on-hvm-ioemu/CA-5941
Jean Guyader [Mon, 13 Oct 2008 13:02:55 +0000 (14:02 +0100)]
  pv-on-hvm-ioemu/CA-5941

16 years ago hvm-log-to-dom0
Jean Guyader [Mon, 13 Oct 2008 13:02:33 +0000 (14:02 +0100)]
  hvm-log-to-dom0

16 years ago Fix dom0_driver
Jean Guyader [Mon, 13 Oct 2008 13:01:54 +0000 (14:01 +0100)]
  Fix dom0_driver

16 years ago support-hvm-pv-drivers-ioemu-support
Jean Guyader [Mon, 13 Oct 2008 13:00:32 +0000 (14:00 +0100)]
  support-hvm-pv-drivers-ioemu-support

16 years ago - Call the init of dom0_driver
Jean Guyader [Mon, 13 Oct 2008 10:20:38 +0000 (11:20 +0100)]
  - Call the init of dom0_driver
  - Add dm-ready product patch

16 years ago - Call the init of dom0_driver
Jean Guyader [Mon, 13 Oct 2008 10:20:38 +0000 (11:20 +0100)]
  - Call the init of dom0_driver
  - Add dm-ready product patch

16 years ago - Fixe the xenstore headers.
Jean Guyader [Thu, 9 Oct 2008 17:15:59 +0000 (18:15 +0100)]
  - Fixe the xenstore headers.

16 years ago - Make the vgabios writable.
Jean Guyader [Thu, 9 Oct 2008 17:13:02 +0000 (18:13 +0100)]
  - Make the vgabios writable.

16 years ago - Add the dom0_input qemu driver
Jean Guyader [Thu, 9 Oct 2008 17:12:30 +0000 (18:12 +0100)]
  - Add the dom0_input qemu driver

16 years ago - Add some useful function to write into xenstore.
Jean Guyader [Thu, 9 Oct 2008 16:53:57 +0000 (17:53 +0100)]
  - Add some useful function to write into xenstore.

16 years ago - Add the option vga-passthrough and dom0-input.
Jean Guyader [Thu, 9 Oct 2008 16:53:37 +0000 (17:53 +0100)]
  - Add the option vga-passthrough and dom0-input.

16 years ago - Disable the cirrus graphic card when we passthrough a graphic card as a
Jean Guyader [Thu, 9 Oct 2008 16:52:23 +0000 (17:52 +0100)]
  - Disable the cirrus graphic card when we passthrough a graphic card as a
    primary in the guest.

16 years ago - Pass through some value of the real host in case of intel graphic
Jean Guyader [Thu, 9 Oct 2008 16:51:19 +0000 (17:51 +0100)]
  - Pass through some value of the real host in case of intel graphic
    card. The graphic card need the know how much merroy has been stolen
    from the physical RAM.

16 years ago - Change the VSLOT_START to keep the same BDF for intel graphic card
Jean Guyader [Thu, 9 Oct 2008 16:50:13 +0000 (17:50 +0100)]
  - Change the VSLOT_START to keep the same BDF for intel graphic card
    passthrough.

16 years ago - Add some pci function to read pci register value on the host's pci
Jean Guyader [Thu, 9 Oct 2008 16:45:11 +0000 (17:45 +0100)]
  - Add some pci function to read pci register value on the host's pci
    bus.
  - Map and unmap the legacy ioport/iomem when we attach/detach the device.

16 years agoFix open_disk for blktap disks to use real bdrv_new
Ian Jackson [Thu, 9 Oct 2008 13:50:51 +0000 (14:50 +0100)]
Fix open_disk for blktap disks to use real bdrv_new

If blktap drives are registered properly, qemu code is much less likely
to get confused by them. Use bdrv_new(), assign a device name and create
an entry in drives_table for them.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
16 years ago[ia64] Fix memory size calculation on VT-i over 3GB memory
Ian Jackson [Thu, 9 Oct 2008 13:46:16 +0000 (14:46 +0100)]
[ia64] Fix memory size calculation on VT-i over 3GB memory

VT-i domains have two memory holes: VGA I/O (under 1MB) and MMIO
(3GB-4GB). This patch calculates the correct memory size with them.

This is based on xen-unstable 10936:a0b3cf802d99.

Original patch by Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
16 years agoAvoid trusting client-controlled areas of xenstore.
Ian Jackson [Thu, 2 Oct 2008 13:22:41 +0000 (14:22 +0100)]
Avoid trusting client-controlled areas of xenstore.

Various parts of xenstore, specifically /local/GUEST/devices, are
writeable by the guest.  Information from these areas must be used
with care, to avoid the guest tricking qemu-dm into improperly using
its privileged access to dom0 resources.

To this end:
 * Variables and functions referring to client-controlled data have
   had `danger' added to their names.
 * There is a new sanitisation/checking arrangement for getting
   backend paths and information about the configuration of device
   backends, given the frontend information.  This is so that when
   qemu is providing a data path which is parallel to the PV
   frontend/backend arrangements, it only uses the configuration from
   a genuine backend which is really configured to serve qemu's own
   guest.
 * For information which should be read from or written to the `vm'
   tree, we obtain the guest's uuid from the hypervisor (the `label'
   as the hypercall interface calls it) rather than reading it from
   the guest-controlled areas of xenstore.
 * The `phantom vbd' feature is disabled.  It relies on
   guest-controlled xenstore areas indicating device paths on the
   guest.  We do not believe this feature is currently very relevant.
 * We _do_ allow the guest of a stubdom qemu to mess up the
   correspondence between pv backends and emulated devices, in the
   sense that we don't mind if the guest directs qemu to use a `wrong'
   frontend.

16 years agoMerge branch 'qemu'
Ian Jackson [Wed, 1 Oct 2008 12:54:40 +0000 (13:54 +0100)]
Merge branch 'qemu'

16 years agohw/serial.c: Avoid integer multiply overflow in token generation calculation
Ian Jackson [Wed, 1 Oct 2008 12:54:16 +0000 (13:54 +0100)]
hw/serial.c: Avoid integer multiply overflow in token generation calculation

If calls to serial_get_token are too far apart then delta.tv_sec may
be too large to multiply by 1E9.  So we clamp delta to 2s.

16 years agovnc integer overflow check fix overzealous zero checking
Ian Jackson [Wed, 1 Oct 2008 11:12:57 +0000 (12:12 +0100)]
vnc integer overflow check fix overzealous zero checking

In a83c1174b942d0f0f0e05927eb5b69fe8489b7ab, we arranged to avoid
integer overflow and calls to realloc(nonzero,0).  However
vs->depth==0 is legitimate on entry to vnc_dpy_resize_shared.

We need to move the check for vs->depth until after vnc_colourdepth.

16 years agovnc and xenfb integer overflow and division by zero vuln fixes
Ian Jackson [Fri, 26 Sep 2008 14:40:11 +0000 (15:40 +0100)]
vnc and xenfb integer overflow and division by zero vuln fixes

row_stride_div0.patch: a malicious frontend can send row_stride==0 and force
qemu-dm to perform division by 0
vnc_resize_doublecheck.patch: there is an unchecked multiplication when
calculating framebuffer size. Cs 17630 sanitizes framebuffer dimensions
passed by the frontend, so most probably no integer overflow can happen, but
there should be a check for overflow close to the actual computation (to
make code review easier and to cope with other codepaths in the future).

(Patches submitted by Rafal Wojtczuk <rafal@invisiblethingslab.com>
against xen-3.2 ioemu; adapted for xen-unstable by Ian Jackson and also
edited to actually compile and do be correct.)

Contributed-by: Rafal Wojtczuk <rafal@invisiblethingslab.com>
Modified-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoRemove some obsolete temporary files used during merging.
Ian Jackson [Thu, 25 Sep 2008 09:42:36 +0000 (10:42 +0100)]
Remove some obsolete temporary files used during merging.

16 years agoSet QEMU_ROOT to .. in tests/Makefile
Ian Jackson [Mon, 22 Sep 2008 12:04:50 +0000 (13:04 +0100)]
Set QEMU_ROOT to .. in tests/Makefile

Thanks to report from Stefano Stabellini.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Fri, 19 Sep 2008 16:57:51 +0000 (17:57 +0100)]
Merge branch 'qemu'

16 years agokeymaps: Correct Japanese Windows keys
Ian Jackson [Fri, 19 Sep 2008 16:57:35 +0000 (17:57 +0100)]
keymaps: Correct Japanese Windows keys

According to
 http://lists.xensource.com/archives/html/xen-devel/2007-07/msg00028.html
the translations for Super_R and _L are wrong.

This change, which was cross-ported from xen-unstable
 15446:f85252ce203e5cc05d959641f141aa1d885d8cfb
fixes this.

Signed-off-by: Takanori Kasai <kasai.takanori@xxxxxxxxxxxxxx>
Signed-off-by: Junko Ichino <ichino.junko@xxxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Wed, 17 Sep 2008 11:02:28 +0000 (12:02 +0100)]
Merge branch 'qemu'

16 years agofew compile time warnings removed
Ian Jackson [Wed, 17 Sep 2008 11:02:13 +0000 (12:02 +0100)]
few compile time warnings removed

Few small changes to remove some compile time warnings:

- we are not initializing the qemu_alarm_timer pointer in
init_timer_alarm, so I am adding a NULL initialization;

- in the headers include code, we are doing something like:

/* BSD stuff */
/* linux stuff */
/* sun stuff */

that works most of the times but it fails when you try to compile qemu
on mini-os, that is posix but it doesn't define either __sun__ or
__linux__, so I am changing it to:

/* BSD stuff */
/* linux stuff */
/* sun stuff */

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoadding few missing header includes
Ian Jackson [Tue, 16 Sep 2008 15:41:47 +0000 (16:41 +0100)]
adding few missing header includes

Adding two missing header includes that cause some warning when
compiling qemu-remote with stubdomains.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agovram_addr is 64-bit so print it that way in log messages
Ian Jackson [Fri, 12 Sep 2008 15:35:04 +0000 (16:35 +0100)]
vram_addr is 64-bit so print it that way in log messages

Various log messages would print it as %lx.  We add a cast to unsigned
long long and use %llx, which makes the output accurate and gets rid
of some warnings.

16 years agoAdd missing include of qemu-xen.h.
Ian Jackson [Fri, 12 Sep 2008 15:34:12 +0000 (16:34 +0100)]
Add missing include of qemu-xen.h.

Without this, we miss the prototype of xen_vga_stolen_vram_addr and
the compiler passes it a uint32 when it needs a uint64.

16 years agoBetter error reporting when failed to map vram
Ian Jackson [Fri, 12 Sep 2008 14:51:40 +0000 (15:51 +0100)]
Better error reporting when failed to map vram

The error message was rather brief.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agocpu_get_phys_page_debug returning value
Ian Jackson [Thu, 11 Sep 2008 16:33:15 +0000 (17:33 +0100)]
cpu_get_phys_page_debug returning value

this change was originally made by Samuel as part of the patch to
compile qemu-remote as a stubdomain.

The return value of cpu_get_phys_page_debug in helper2.c should be a
target_phys_addr_t.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoFix to exec-all.h for stubdom
Ian Jackson [Thu, 11 Sep 2008 16:30:36 +0000 (17:30 +0100)]
Fix to exec-all.h for stubdom

I (iwj) mistakenly dropped this patch which is in fact necessary for
stubdom.

(This these changes was originally written by Samuel for an older
 version of qemu-remote.)

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoxenfbfront headers
Ian Jackson [Thu, 11 Sep 2008 15:53:10 +0000 (16:53 +0100)]
xenfbfront headers

Adding xenfb_* functions to qemu-xen.h and importing this header
wherever the xenfbfront functions are used (xenstore.c and cirrus_vga.c)

(Most of these changes were originally written by Samuel for an older
 version of qemu-remote.)

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoFixes to source files to compile as a stubdomain
Ian Jackson [Thu, 11 Sep 2008 15:51:06 +0000 (16:51 +0100)]
Fixes to source files to compile as a stubdomain

Various fixes to some source files to compile as a stubdomain.

(Most of these changes were originally written by Samuel for an older
 version of qemu-remote.  Patch to exec-all.h dropped in this checkin
 by iwj.)

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoFixes to the build system to compile as a stubdomain
Ian Jackson [Thu, 11 Sep 2008 15:45:53 +0000 (16:45 +0100)]
Fixes to the build system to compile as a stubdomain

Various fixes to the build system to compile as a stubdomain.

(Most of these changes were originally written by Samuel for an older
 version of qemu-remote.)

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoioemu: various fixes to `Use main memory for video memory'
Ian Jackson [Thu, 11 Sep 2008 11:44:33 +0000 (12:44 +0100)]
ioemu: various fixes to `Use main memory for video memory'

- fix ioemu segv with old firmware
  Without notifying ioemu of address, ioemu will segv.

- fix qemu-dm segv with malicous firmware
  If notifying ioemu more than once, ioemu will segv.

Usually such cases don't happen, but malicious guest can
do it intentionally.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
(Cross-ported from xen-unstable
 18449:33d907ff2b043c4bff5c265737dab0bb52d6f773
this is a fix to the patch
 0844825b76924eac7719875b3886072b74e19397
which itself was cross-ported from xen-unstable
 18383:dade7f0bdc8d6b36b1914598d83c616ee5ce97cb

There were no conflicts or problems with patch -l.)

16 years agohvm: Use main memory for video memory.
Ian Jackson [Thu, 11 Sep 2008 11:41:14 +0000 (12:41 +0100)]
hvm: Use main memory for video memory.

qemu allocates video memory, the extra 8MB memory ballooning is not
available any more, because it got consumed by the other domain.

This fixes it by taking video memory from the main memory:

- make hvmloader use e820_malloc to reserve some of the main memory
  and notify ioemu of its address through the Xen platform PCI card.
- add XENMAPSPACE_mfn to the xen_add_to_physmap memory op, to allow
  ioemu to move the MFNs between the original position and the PCI
  mapping, when LFB acceleration is disabled/enabled
- add a remove_from_physmap memory op, to allow ioemu to unmap it
  completely for the case of old guests with acceleration disabled.
- add xc_domain_memory_translate_gpfn_list to libxc to allow ioemu to
  get the MFNs of the video memory.
- have xend save the PCI memory space instead of ioemu: if a memory
  page is there, the guest can access it like usual memory, so xend
  can safely be responsible to save it.  The extra benefit is that
  live migration will apply the logdirty optimization there too.
- handle old saved images, populating the video memory from ioemu if
  really needed.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Cross-ported from xen-unstable
 18383:dade7f0bdc8d6b36b1914598d83c616ee5ce97cb
using patch -l, with only one fixup needed: [un]set_mm_mapping needed
to be removed from hw/cirrus_vga.c rather than vl.c

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoFix map cache low/high/low bug
Ian Jackson [Tue, 9 Sep 2008 13:02:03 +0000 (14:02 +0100)]
Fix map cache low/high/low bug

This small patch fixes an issue leading to a crash (segfault, although
with earlier changesets I was seeing sigbus - not sure what changed)
in qemu-dm when the following conditions occur:

1. A valid mapping for a bucket on a low address exists

2. Immediately after accessing memory mapped in this bucket, an access
occurs to a high (beyond assigned ram) address beyond the 1GB limit
for 32bit map cache wrapping around to the previous bucket's entry
number.

3. The next call to map cache again accesses the low address.

In this scenario, the guest mem for the low bucket has been unmapped
by the remap_bucket caused by 2., but because the valid_mapping
bit-test fails, map_cache returns before last_address_index has been
updated. The subsequent call to map_cache therefore never remaps the
low, valid bucket and instead returns a vaddr pointing to memory that
has failed to get mapped.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
16 years agoremove QEMU_OPTION_pci
Ian Jackson [Mon, 8 Sep 2008 16:04:58 +0000 (17:04 +0100)]
remove QEMU_OPTION_pci

QEMU_OPTION_pci is no longer handled in the switch() in vl.c and is
therefore obsolete.  Therefore remove it.  QEMU_OPTION_direct_pci is
the current mechanism.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agofix offset of MSI-X memory mapped table.
Ian Jackson [Fri, 5 Sep 2008 09:32:49 +0000 (10:32 +0100)]
fix offset of MSI-X memory mapped table.

This patch fixes offset of MSI-X memory mapped table.

Current code does not set dev->msix->table_off variable.
The offset of MSI-X memory mapped table is treated as 0.
The wrong region is unmapped from guest physical memory space.
As a result, guest device driver can't access memory mapped resource.

The patch fixes this issue. My MegaRAID SAS assigned to guest domain
becomes working with the patch.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agosupport PCI Express Capability Structure version 1
Ian Jackson [Wed, 3 Sep 2008 10:26:06 +0000 (11:26 +0100)]
support PCI Express Capability Structure version 1

Suppport PCI Express Capability Structure version 1.  The format of
PCI Express Capability Structure is different between version 1 and
version 2.  Current code supports only version 2.  This might cause
conflict with other capability structure if device implement
version 1.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agofix multiple pci-attach/pci-detach by removing meaningless irq_index
Ian Jackson [Mon, 1 Sep 2008 09:34:37 +0000 (10:34 +0100)]
fix multiple pci-attach/pci-detach by removing meaningless irq_index

For HVM guest, we can't do pci-attach/pci-detach for >64 times due to
the meaningless checking in pci_register_device(). This patches
removes it.

With the patches, I [Dexuan] made a test of 300 times of attach/detach
and everything works well.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 28 Aug 2008 17:01:18 +0000 (18:01 +0100)]
Merge branch 'qemu'

16 years agoNicer fix for spurious messages from configure when GCC3 is missing.
Ian Jackson [Tue, 22 Jul 2008 15:28:06 +0000 (16:28 +0100)]
Nicer fix for spurious messages from configure when GCC3 is missing.

This reverts b5123e05cce4be4c6c8c822fad0f0df4c053da06 and replaces it
with a nice simple change, namely to change  test ... -a ...  with
test ... && test ... .  That provides shortcut evaluation.

Thanks to Andre Przywara who provided this one-line change as an
update to the previous commit.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 28 Aug 2008 14:46:36 +0000 (15:46 +0100)]
Merge branch 'qemu'

16 years ago[passthrough] make upper field of 64 bit bar writable
Ian Jackson [Thu, 28 Aug 2008 14:41:23 +0000 (15:41 +0100)]
[passthrough] make upper field of 64 bit bar writable

This patch makes upper field of 64 bit base address register writable.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoDon't compile translate-all.c.
Ian Jackson [Thu, 28 Aug 2008 14:40:46 +0000 (15:40 +0100)]
Don't compile translate-all.c.

We do not need the translation / code emulator for Xen.
Disabling it makes it possible to build qemu-xen on ia64.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>