]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/log
qemu-xen-4.1-testing.git
16 years agopassthrough: Fix duplicated MAC addr when multi-port NIC assigned to HVM domain
Ian Jackson [Tue, 31 Mar 2009 10:45:38 +0000 (11:45 +0100)]
passthrough: Fix duplicated MAC addr when multi-port NIC assigned to HVM domain

This patch fixes duplicated MAC address when multi-port NIC is
assigned to HVM domain.

Currently multi-function device is shown as two single function
devices. e1000e driver and igb driver for linux add 1 to MAC address of
second port of multi-port NIC. But they don't add 1 to MAC address of
second port if NIC is single-function device. Because of this, the MAC
addresses of the first port and the second port are duplicated.

The patch make Header Type register passthrough-type. This means a
multi-function device is shown as two multi-function devices which
implement only one function. So e1000e driver and igb driver add 1 to
MAC address of second port.

When we use windows guest, the same issue occurs, the patch fix it.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoioemu: Read pass-through vslot from xend
Ian Jackson [Tue, 31 Mar 2009 10:41:09 +0000 (11:41 +0100)]
ioemu: Read pass-through vslot from xend

This reads the vslot information supplied by xend, and should be
the final piece for this feature on the ioemu side.

There is also a xend portion of this patch which I will post separately.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agoioemu: allow xend to specify the slot for pass-through devices
Ian Jackson [Tue, 31 Mar 2009 10:40:30 +0000 (11:40 +0100)]
ioemu: allow xend to specify the slot for pass-through devices

Currently a slot may be specified for a hot-plug device,
but not for a pass-through device that is inserted at boot time.
This patch adds support for the latter.

The syntax is:
     BUS:DEV.FUNC[@VSLOT]
e.g: 0000:00:1d:0@7

This may be important as recent changes that allow any free PCI
slot to be used for pass-through (and hotplug) may case pass-through
devices to be assigned in different locations to before. Amongst
other things, specifying the slot will allow users to move them
back, if there is a need.

There is also a xend portion of this patch, which will be posted separately.

Signed-off-by: Simon Horman <horms@vereg.net.au>
16 years agoioemu: Do slot parsing inside of next_bdf
Ian Jackson [Tue, 31 Mar 2009 10:38:55 +0000 (11:38 +0100)]
ioemu: Do slot parsing inside of next_bdf

Currently only hotplug provides vslot information from xend.
A subsequent patch will have xend provide this information
for boot-time inserted pass-through devices too.

With this in mind, this patch makes some infrastructure
to parse bdf + slot information.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agopassthrough: fix buffer overflow of vslots
Ian Jackson [Wed, 25 Mar 2009 11:38:29 +0000 (11:38 +0000)]
passthrough: fix buffer overflow of vslots

Assuming we assign n devices, strlen(direct_pci) can be 13n and the
length of the old 'vslots' is 13n/3 which is smaller than 5n+1 (1
slot_str takes 5 bytes).  So we have to malloc a bigger buffer for
vslots.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agopassthrough: Register dpci_infos.php_devs.pt_dev in a common location
Ian Jackson [Wed, 25 Mar 2009 11:35:42 +0000 (11:35 +0000)]
passthrough: Register dpci_infos.php_devs.pt_dev in a common location

Currently power_on_php_slot() sets dpci_infos.php_devs[i].pt_dev itself
after the call to register_real_device(). While pt_init relies on
power_on_php_slot() to set this pointer.

It seems sensible to use the same behaviour for both callers.

There are no other callers of register_real_device()

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agoioemu: call xenstore_store_serial_port_info() for xm console
Ian Jackson [Wed, 25 Mar 2009 11:29:54 +0000 (11:29 +0000)]
ioemu: call xenstore_store_serial_port_info() for xm console

call xenstore_store_serial_port_info() for xm console.
Without this patch, xm console doesn't work for hvm domain.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
[ Bug was introduced by me during most recent merge from upstream -iwj ]

16 years agoioemu: make more of passthrough.c and piix4acpi.c static
Ian Jackson [Wed, 25 Mar 2009 11:25:32 +0000 (11:25 +0000)]
ioemu: make more of passthrough.c and piix4acpi.c static

Make more of passthrough.c and piix4acpi.c static

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agopassthrough: unmap INTx interrupt on hot-remove
Ian Jackson [Tue, 24 Mar 2009 18:24:14 +0000 (18:24 +0000)]
passthrough: unmap INTx interrupt on hot-remove

This patch unmaps INTx interrupt on hot-remove.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agopassthrough: fix pt_chk_bar_overlap
Ian Jackson [Tue, 24 Mar 2009 18:23:29 +0000 (18:23 +0000)]
passthrough: fix pt_chk_bar_overlap

This patch fixes pt_chk_bar_overlap.

Current pt_chk_bar_overlap does not distinguish memory resources and
io resources. They are placed in different address space. So
pt_chk_bar_overlap should distinguish them.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agopassthrough: Fix MSI/MSI-X capability structure virtualization code
Ian Jackson [Tue, 24 Mar 2009 18:22:30 +0000 (18:22 +0000)]
passthrough: Fix MSI/MSI-X capability structure virtualization code

This patch fixes MSI/MSI-X capability structure virtualization code.

Currently, xen does not support multiple message (multiple vector).
So multiple message capable field should be emulated and fixed to 0
(single vector).

With the patch, my FC-HBA works when I assign it to guest domain where
windows 2008 runs.

In addition to this, initial values of emulated registers should be
the same with initial values defined in PCI spec. If initial values
are not defined, they should be 0. The emulated field mask and
read-only field mask are also fixed.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agocirrus: Do not clear vram area to 0xff when not yet allocated.
Ian Jackson [Tue, 24 Mar 2009 18:12:39 +0000 (18:12 +0000)]
cirrus: Do not clear vram area to 0xff when not yet allocated.

When restoring, the vram data pointer is not valid until (depending on
the version of the savefile) the guest has informed us what memory to
use.  Thus vram_ptr may be NULL.  In this patch we avoid attempting to
clear the video ram in this case.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoFix getting the configuration of PCI pass-through from xenstore
Ian Jackson [Tue, 24 Mar 2009 13:31:27 +0000 (13:31 +0000)]
Fix getting the configuration of PCI pass-through from xenstore

This patch fixes getting the configuration of PCI pass-through from xenstore.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Acked-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agoioemu: emulate No_Soft_Reset in PMCSR
Ian Jackson [Tue, 24 Mar 2009 13:30:10 +0000 (13:30 +0000)]
ioemu: emulate No_Soft_Reset in PMCSR

When pci_power_mgmt=0, the No_Soft_Reset field in power
management control/status register of a PCI device needs to be
emulated and fixed to 1. This bit indicates that devices
transitioning from D3 to D0 because of PowerState commands do not
perform an internal reset.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoDisable xen platform PCI device when xen_platform_pci=0 is specified
Ian Jackson [Mon, 23 Mar 2009 17:27:08 +0000 (17:27 +0000)]
Disable xen platform PCI device when xen_platform_pci=0 is specified

This patch is the ioemu side of the series.

- Alias the "platform_flags" byte of the ioport BAR to fixed byte port
  0x10, and don't remove existing "platform_flags" byte.

- Disable xen platform PCI device if "disable_pf" entry is 1. If there
  is not "disable_pf" entry, xen platform PCI device is enabled.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agosupport SR-IOV Virtual Function passthrough
Ian Jackson [Mon, 23 Mar 2009 17:19:30 +0000 (17:19 +0000)]
support SR-IOV Virtual Function passthrough

Emulate the Memory Space Enable bit in the Command register because it's
hardwired to 0 for the Virtual Function.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoqemu-xen: do not use pipe with stubdom
Ian Jackson [Mon, 23 Mar 2009 17:16:08 +0000 (17:16 +0000)]
qemu-xen: do not use pipe with stubdom

This patch allows stubdoms to start after the recent merge.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agofix stubdomain after DisplayState changes
Ian Jackson [Mon, 23 Mar 2009 17:15:12 +0000 (17:15 +0000)]
fix stubdomain after DisplayState changes

this patch fixes few stubdom issues arised after the recent DisplayState
changes (not yet pushed to qemu-xen-unstable).
The main problem is that we need to touch the newly allocated pages
before sharing them, because minios allocates on first write.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoFix passthrough regression
Ian Jackson [Mon, 23 Mar 2009 17:00:50 +0000 (17:00 +0000)]
Fix passthrough regression

pt_init() iterates through the PHP slots independantly of
the assignment that occurs inside __insert_to_pci_slot
which is called by register_real_device(). It assumes
that vslots are assigned in order sarting at PHP_SLOT_START.

This was valid before my change, although why it didn't take the
simpler option of just checking what value had been assigned to
pt_dev->dev.devfn in register_real_device() is a mystery to
me [Simon].  Its also a mystery to what valid circumstance could lead
to pt_init() using 0 (a.k.a. unknown?) as the vslot.

My patch made one the assumptions that pt_init() made about slot numbers
invalid. That is, they don't start at PHP_SLOT_START, they start
wherever there is a free device.

A simple solution seems to be to use the value assigned to
pt_dev->dev.devfn in register_real_device().

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agoFixes for git ioemu tree from Christoph Egger
Ian Jackson [Mon, 23 Mar 2009 16:47:35 +0000 (16:47 +0000)]
Fixes for git ioemu tree from Christoph Egger

 Make ioemu build w/o CONFIG_PASSTHROUGH
- Make ioemu build w/ TAPGIFNAME defined
- Make pci_emulation_add non-static as it is used in different files
- remove redundant variable re-declarations/re-definitions
- Make xenstore functions static. They have no prototypes and aren't used
  elsewhere
- Initialize xenpv_machine correctly (xen_init_pv didn't match what
  QEMUmachine expected)
- Misc compiler warning fixes

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
16 years agoxen_machine_pv.c: kill unused variables
Ian Jackson [Mon, 23 Mar 2009 16:42:03 +0000 (16:42 +0000)]
xen_machine_pv.c: kill unused variables

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
16 years agouse uint32_t for xen_domid
Ian Jackson [Mon, 23 Mar 2009 16:39:54 +0000 (16:39 +0000)]
use uint32_t for xen_domid

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
16 years agoFixup dummy cpu setup.
Ian Jackson [Mon, 23 Mar 2009 16:39:29 +0000 (16:39 +0000)]
Fixup dummy cpu setup.

Passing NULL to cpu_init() doesn't work in upstream qemu.
Also make sure the dummy cpu is in halted mode.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
16 years agoxen_machine_pv.c: delete pointless comment.
Ian Jackson [Mon, 23 Mar 2009 16:39:09 +0000 (16:39 +0000)]
xen_machine_pv.c: delete pointless comment.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
16 years agoxen_machine_pv.c: switch to C99 initializers
Ian Jackson [Mon, 23 Mar 2009 16:38:45 +0000 (16:38 +0000)]
xen_machine_pv.c: switch to C99 initializers

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
16 years agoCorrect compilation error in bdf_to_slow
Ian Jackson [Mon, 23 Mar 2009 16:35:27 +0000 (16:35 +0000)]
Correct compilation error in bdf_to_slow

This commit:
    commit 3fcc8c62058a60a31d762da627d4325137eea813
make __insert_to_pci_slot idempotent
Signed-off-by: Simon Horman <horms@verge.net.au>
has a trivial compilation error which I now fix.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomake __insert_to_pci_slot idempotent
Ian Jackson [Mon, 23 Mar 2009 16:31:57 +0000 (16:31 +0000)]
make __insert_to_pci_slot idempotent

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agoAllow any unused PCI device to be used for pass-through
Ian Jackson [Mon, 23 Mar 2009 16:30:41 +0000 (16:30 +0000)]
Allow any unused PCI device to be used for pass-through

Allow any unused PCI device to be used for pass-through.
This includes allowing these devices to be used for hotplug.

There are companion xend and hvmloader patches.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agoUse test_pci_slot() to test if a php slot is valid, in use or free
Ian Jackson [Mon, 23 Mar 2009 16:28:07 +0000 (16:28 +0000)]
Use test_pci_slot() to test if a php slot is valid, in use or free

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agoMore stubdom build fixes.
Ian Jackson [Mon, 23 Mar 2009 15:58:28 +0000 (15:58 +0000)]
More stubdom build fixes.

* Do not fail to build stubdom if the compiler fails to optimise out
  never-called static functions containing undefined references.
* Properly disable stubdom ioemu docs build.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoFix the build for CONFIG_PASSTHROUGH=''
Ian Jackson [Fri, 20 Mar 2009 17:02:10 +0000 (17:02 +0000)]
Fix the build for CONFIG_PASSTHROUGH=''

There was a misplaced #endif (mistake made during the merge).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoxen-setup-stubdom: Actually plumb through XEN_ROOT
Ian Jackson [Fri, 20 Mar 2009 15:58:24 +0000 (15:58 +0000)]
xen-setup-stubdom: Actually plumb through XEN_ROOT

We need to explicitly pass XEN_ROOT into the generated
config-host.mak.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoFix some syntax problems in xen-setup-stubdom
Ian Jackson [Fri, 20 Mar 2009 11:10:46 +0000 (11:10 +0000)]
Fix some syntax problems in xen-setup-stubdom

The location of my test build directory had accidentally crept into
the hardcoded settings.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoPost-merge compilation fixes for stubdom
Ian Jackson [Wed, 18 Mar 2009 16:32:53 +0000 (16:32 +0000)]
Post-merge compilation fixes for stubdom

Much of this is very ugly.  Sadly that's a consequence of the stubdom
and upstream build systems and nothing much can be done about it.

However on the upside with this change we discontinue use of the
upstream `configure' script for stubdom (as it gives wrong answers),
in favour of a new xen-setup-stubdom script.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agopassthrough: msi/msix clean up on hotplug remove
Ian Jackson [Mon, 16 Mar 2009 18:15:47 +0000 (18:15 +0000)]
passthrough: msi/msix clean up on hotplug remove

The passthrough MSI/MSI-X should be unbound and unmapped when
unregister_real_device is called, this patch fix this.

Signed-off-by: Qing He <qing.he@intel.com>
16 years agopassthrough: fix pci-dettach issue
Ian Jackson [Mon, 16 Mar 2009 18:04:35 +0000 (18:04 +0000)]
passthrough: fix pci-dettach issue

Commit 8c771eb6294afc5b3754a9e3de51568d4e5986c2 breaks guest PCI hotplug:

Before pt_config_delete() ->
qemu_free_timer(ptdev->pm_state->pm_timer), we should invoke
qemu_del_timer(), otherwise, qemu_run_timers() would access a
qemu_free_timer()-ed timer.  The below patch fixes the issue.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agopassthrough: make management of PCI D-states by guest optional
Ian Jackson [Mon, 16 Mar 2009 18:03:23 +0000 (18:03 +0000)]
passthrough: make management of PCI D-states by guest optional

Commit 8c771eb6294afc5b3754a9e3de51568d4e5986c2 enables the guest OS
to program D0-D3hot states of the assigned device, however,
D3hot state in some PCI devices causes the failure of domain
creation/destruction.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agoxenfb shared buffer
Ian Jackson [Mon, 16 Mar 2009 17:25:35 +0000 (17:25 +0000)]
xenfb shared buffer

After the recent DisplayState changes is now possible to share the xenfb
backend buffer with the display frontend (sdl, vnc), avoid a memcpy for
each screen update.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoAdd missing #include <assert.h>
Ian Jackson [Mon, 16 Mar 2009 16:53:15 +0000 (16:53 +0000)]
Add missing #include <assert.h>

exec-dm.c now has an assert.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoqemu-dm: Provide bounce-buffer based cpu_physical_memory_map
Ian Jackson [Mon, 16 Mar 2009 16:52:21 +0000 (16:52 +0000)]
qemu-dm: Provide bounce-buffer based cpu_physical_memory_map

The xc_map_foreign_batch version was slow (and also apparently buggy).
The bounce buffer version works nicely, although we have to
clone-and-hack a bunch of stuff from exec.c.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoCompile pstrcpy_targphys on CONFIG_DM too
Ian Jackson [Mon, 16 Mar 2009 16:51:21 +0000 (16:51 +0000)]
Compile pstrcpy_targphys on CONFIG_DM too

This was accidentally turned off during the merge.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
16 years agoFix option parsing; override upstream `-d' option for `domain'.
Ian Jackson [Mon, 16 Mar 2009 16:50:49 +0000 (16:50 +0000)]
Fix option parsing; override upstream `-d' option for `domain'.

Pending change to xend to pass arguments differently, we need to
suppress the -d logfile parameter.  Also we accidentally dropped
HAS_ARG from -vcpus during the merge.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoIntroduce piecemeal VGA reset from upstream.
Ian Jackson [Mon, 16 Mar 2009 16:49:39 +0000 (16:49 +0000)]
Introduce piecemeal VGA reset from upstream.

This fixes null pointer dereference bugs introduced by the merge.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoPost-merge compilation fixes
Ian Jackson [Mon, 16 Mar 2009 13:47:18 +0000 (13:47 +0000)]
Post-merge compilation fixes

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'stefano.display-changes'
Ian Jackson [Fri, 13 Mar 2009 12:30:22 +0000 (12:30 +0000)]
Merge branch 'stefano.display-changes'

Conflicts:

curses.c
hw/cirrus_vga.c
hw/g364fb.c
hw/g364fb_template.h
hw/integratorcp.c
hw/jazz_led.c
hw/mips.h
hw/mips_jazz.c
hw/musicpal.c
hw/nseries.c
hw/omap_lcdc.c
hw/palm.c
hw/pc.h
hw/pl110.c
hw/ppc_oldworld.c
hw/sun4m.c
hw/vmware_vga.c
qemu-char.h
qemu-common.h
vl.c
vnchextile.h

16 years agoMerge branch 'master' of ../../1/qemu-iwj
Ian Jackson [Fri, 13 Mar 2009 12:09:06 +0000 (12:09 +0000)]
Merge branch 'master' of ../../1/qemu-iwj

Conflicts:

block-raw-posix.c

16 years agoIntroduce and use qemu_paio_fsync
Ian Jackson [Fri, 13 Mar 2009 12:04:21 +0000 (12:04 +0000)]
Introduce and use qemu_paio_fsync

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoMerge branch 'upstream'
Ian Jackson [Thu, 12 Mar 2009 19:18:57 +0000 (19:18 +0000)]
Merge branch 'upstream'

Conflicts:

.gitignore
Makefile.target
block-vpc.c
console.c
console.h
hw/cirrus_vga.c
hw/ide.c
hw/pc.c
hw/pc.h
hw/pci.h
hw/vga.c
hw/vga_int.h
sdl.c
target-ppc/translate_init.c
vl.c
vnc.c

16 years agoMinor post-merge compilation fixes.
Ian Jackson [Thu, 12 Mar 2009 17:33:51 +0000 (17:33 +0000)]
Minor post-merge compilation fixes.

It still does not compile, and we are going to merge up again before
we fix that.

16 years agoMerge branch 'qemu'
Ian Jackson [Thu, 12 Mar 2009 17:29:18 +0000 (17:29 +0000)]
Merge branch 'qemu'

Conflicts:

.gitignore
Makefile
Makefile.target
block-raw-posix.c
bswap.h
console.c
hw/cirrus_vga.c
hw/ide.c
hw/iommu.c
hw/lsi53c895a.c
hw/ne2000.c
hw/pc.c
hw/pc.h
hw/pci.c
hw/ppc_chrp.c
hw/ppc_oldworld.c
hw/ppc_prep.c
hw/rtl8139.c
hw/scsi-disk.c
hw/usb-hid.c
hw/vga.c
hw/vga_int.h
sdl.c
sysemu.h
vl.c
vnc.c

16 years agointroducing a DisplayAllocator interface
Ian Jackson [Tue, 10 Mar 2009 18:17:31 +0000 (18:17 +0000)]
introducing a DisplayAllocator interface

This patch introduces a new DisplayAllocator interface to allow
frontends to allocate the DisplaySurface for the graphic device to use.
At the moment it is used only by xenfbfront, to be able to page align
the displaysurface and also keep the same backing data across multiple
DisplaySurface resize.
Howeveri in the near future it is going to be a useful improvement for
SDL as well.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agofix xenfb frontend and backend
Ian Jackson [Tue, 10 Mar 2009 18:16:52 +0000 (18:16 +0000)]
fix xenfb frontend and backend

Due to the DisplayState changes the initialization order is changed
as well.

Now graphic devices are the first to be initialized and only after them
any display frontend is initialized.

Obviously this change has a direct consequence on the xenfb backend and
frontend and this patch takes care of adapting them to the new
initialization order.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoserial: open a null device if the CharDriverState argument is null
Ian Jackson [Tue, 10 Mar 2009 18:15:30 +0000 (18:15 +0000)]
serial: open a null device if the CharDriverState argument is null

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6366 c046a42c-6fe2-441c-8c8c-71466251a162

As adapted by Stefano to qemu-xen-unstable in his posting:
 [PATCH 11 of 13] serial: open a null device if the
   CharDriverState argument is null

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoadd an init function parameter to qemu_chr_open()
Ian Jackson [Tue, 10 Mar 2009 18:14:19 +0000 (18:14 +0000)]
add an init function parameter to qemu_chr_open()

And use it for the malta emulation. Fix segfault introduced in
revision 6352.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162

As adapted by Stefano to qemu-xen-unstable in his posting:
 [Xen-devel] [PATCH 10 of 13] add an init function parameter to qemu_chr_open()

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agofix screendump (Stefano Stabellini)
Ian Jackson [Tue, 10 Mar 2009 18:13:07 +0000 (18:13 +0000)]
fix screendump (Stefano Stabellini)

this patch fixes the screendump functionality that was recently broken;
it must be applied *after* PATCH 5, 6 and 7 of the original displaystate
change patch series.
In fact the other patches make much easier to solve the screendump
problem because they make the console switching mechanism more robust.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6345 c046a42c-6fe2-441c-8c8c-71466251a162

As adapted by Stefano to qemu-xen-unstable in his posting:
 [PATCH 9 of 13] fix screendump
which also contains several following fixes.

16 years agoCoalesce virtual console screen updates.
Ian Jackson [Tue, 10 Mar 2009 18:11:48 +0000 (18:11 +0000)]
Coalesce virtual console screen updates.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6374 c046a42c-6fe2-441c
-8c8c-71466251a162

As adapted by Stefano to qemu-xen-unstable in his posting:
 [PATCH 8 of 13] Coalesce virtual console screen updates.

16 years agofix console switch
Ian Jackson [Tue, 10 Mar 2009 18:10:20 +0000 (18:10 +0000)]
fix console switch

Import some console switch improvements and fixes from qemu mainstream.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This includes relevant parts of:

 af3a9031061251fbbee2c1f06b876c3732cfee71
 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3068 c046a42c-6fe2-441c-8c8c-71466251a162
 New features for QEMU text console, by Stefan Weil.

 a528b80cb09977806129249ea604aaef3830f3ec
 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3489 c046a42c-6fe2-441c-8c8c-71466251a162
 Miscellaneous VNC related fixes from Xen forwarded by Matthew Kent.

16 years agographical_console_init change (Stefano Stabellini)
Ian Jackson [Tue, 10 Mar 2009 18:06:11 +0000 (18:06 +0000)]
graphical_console_init change (Stefano Stabellini)

Patch 5/7

This patch changes the graphical_console_init function to return an
allocated DisplayState instead of a QEMUConsole.

This patch contains just the graphical_console_init change and few other
modifications mainly in console.c and vl.c.
It was necessary to move the display frontends (e.g. sdl and vnc)
initialization after machine->init in vl.c.

This patch does *not* include any required changes to any device, these
changes come with the following patches.

Patch 6/7

This patch changes the QEMUMachine init functions not to take a
DisplayState as an argument because is not needed any more;

In few places the graphic hardware initialization function was called
only if DisplayState was not NULL, now they are always called.
Apart from these cases, the rest are all mechanical substitutions.

Patch 7/7

This patch updates the graphic device code to use the new
graphical_console_init function.

As for the previous patch, in few places graphical_console_init was called
only if DisplayState was not NULL, now it is always called.
Apart from these cases, the rest are all mechanical substitutions.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
As adapted by Stefano to qemu-xen-unstable in his posting:
 [Xen-devel] [PATCH 6 of 13] graphical_console_init change
which also contains several following fixes.

16 years agoexploiting the new interface in vnc.c (Stefano Stabellini)
Ian Jackson [Tue, 10 Mar 2009 18:04:43 +0000 (18:04 +0000)]
exploiting the new interface in vnc.c (Stefano Stabellini)

This patch exploits the new DisplaySurface and PixelFormat structures in
vnc, making the code easier to read allowing further improvements.

Compared to the last version I fixed a bug that prevented the hextile
encoding from working properly.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
As adapted by Stefano to qemu-xen-unstable in his posting:
 [Xen-devel] [PATCH 5 of 13] exploiting the new interface in vnc.c

16 years agoDisplayState interface change (Stefano Stabellini)
Ian Jackson [Tue, 10 Mar 2009 18:02:58 +0000 (18:02 +0000)]
DisplayState interface change (Stefano Stabellini)

This patch changes the DisplayState interface adding support for
multiple frontends at the same time (sdl and vnc) and implements most
of the benefit of the shared_buf patch without the added complexity.

Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is
also responsible for allocating the data and setting the depth.
Vga.c (or another backend) will do any necessary conversion.

The idea is to change it so that is vga.c (or another backend) together
with console.c that fully manage the DisplayState interface allocating
data and setting the depth (either 16 or 32 bit, if the guest uses a
different resolution or is in text mode, vga.c (or another backend) is
in charge of doing the conversion seamlessly).

The other idea is that DisplayState supports *multiple* frontends
like sdl and vnc; each of them can register some callbacks to be called
when a display event occurs.

The interesting changes are:

- the new structures and related functions in console.h and console.c

in particular the following functions are very helpful to manage a
DisplaySurface:

qemu_create_displaysurface
qemu_resize_displaysurface
qemu_create_displaysurface_from
qemu_free_displaysurface

- console_select and qemu_console_resize in console.c
this two functions manage multiple consoles on a single host display

- moving code around in hw/vga.c
as for the shared_buf patch this is necessary to be able to handle a dynamic
DisplaySurface bpp

- changes to vga_draw_graphic in hw/vga.c
this is the place where the DisplaySurface buffer is shared with the
videoram, when possible;

Compared to the last version the only changes are:

- do not remove support to dpy_copy in cirrus_vga
- change the name of the displaysurface handling functions

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
As adapted by Stefano to qemu-xen-unstable in his posting:
 [Xen-devel] [PATCH 4 of 13] DisplayState interface change

16 years agoremove bgr (Stefano Stabellini)
Ian Jackson [Tue, 10 Mar 2009 17:59:47 +0000 (17:59 +0000)]
remove bgr (Stefano Stabellini)

Do not handle bgr host displays in the backends.

Right now a bgr flag exists so that sdl can set it, if the SDL_Surface
is bgr.
Afterwards the graphic device (e.g. vga.c) does the needed conversion.

With this patch series is sdl that is responsible for rendering the format
provided by the graphic device that must provide a DisplaySurface
(ds->surface) in 16 or 32 bpp, rgb.
Afterwards sdl creates a SDL_Surface from the given DisplaySurface and
blits it into the main SDL_Surface using SDL_BlitSurface.

Everything is handled by sdl transparently, because SDL_BlitSurface is
perfectly capable of handling bgr displays by itself.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Patch adapted for qemu-xen-unstable by Stefano Stabellini.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoIntroduce accessors for DisplayState (Stefano Stabellini)
Ian Jackson [Tue, 10 Mar 2009 17:58:08 +0000 (17:58 +0000)]
Introduce accessors for DisplayState (Stefano Stabellini)

Introducing some accessors:

ds_get_linesize
ds_get_bits_per_pixel
ds_get_width
ds_get_height
ds_get_data

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Patch adapted for qemu-xen-unstable by Stefano Stabellini.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Also additional fixes supplied by Stefano in his message
 [Xen-devel] [PATCH 2 of 13] Introduce accessors for DisplayState
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoImplement "info chardev" command. (Gerd Hoffmann)
Ian Jackson [Tue, 10 Mar 2009 17:56:42 +0000 (17:56 +0000)]
Implement "info chardev" command. (Gerd Hoffmann)

This patch makes qemu keep track of the character devices in use and
implements a "info chardev" monitor command to print a list.

qemu_chr_open() sticks the devices into a linked list now.  It got a new
argument (label), so there is a name for each device.  It also assigns a
filename to each character device.  By default it just copyes the
filename passed in.  Individual drivers can fill in something else
though.  qemu_chr_open_pty() sets the filename to name of the pseudo tty
allocated.

Output looks like this:

  (qemu) info chardev
  monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait
  serial0: filename=unix:/tmp/run.sh-26827/console,server
  serial1: filename=pty:/dev/pts/5
  parallel0: filename=vc:640x480

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Patch adapted for qemu-xen-unstable by Stefano Stabellini.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
16 years agoOverride default cache mode for disk images to write-back
Ian Jackson [Mon, 2 Mar 2009 11:21:51 +0000 (11:21 +0000)]
Override default cache mode for disk images to write-back

Upstream qemu changed the default cache mode to write-through (ie,
O_DSYNC) which is much slower.  We do not need this as we have
explicit control of cacheing with the IDE cache control commands.

Original patch by Yang Zhang modified by Ian Jackson.

Signed-off-by: Yang Zhang <yang.zhang@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agomake various functions in i386-dm/helper2.c static
Ian Jackson [Mon, 2 Mar 2009 11:16:16 +0000 (11:16 +0000)]
make various functions in i386-dm/helper2.c static

These functions don't seem to be used outside of i386-dm/helper2.c

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years agowake up PCI passthru device on boot
Ian Jackson [Mon, 2 Mar 2009 11:15:37 +0000 (11:15 +0000)]
wake up PCI passthru device on boot

Commit 8c771eb6294afc5b3754a9e3de51568d4e5986c2 enables a guest
OS to program D0-D3hot states, thus PCI passsthru devices transit
into D3hot state when the guest Windows shutdown.
That disables reboot from passthru devices because the device is
not active in the POST phase. Actually, the option ROM can't be read
from the guest bios.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
16 years agopassthrough: MSI-X mask bit acceleration
Ian Jackson [Mon, 2 Mar 2009 11:13:44 +0000 (11:13 +0000)]
passthrough: MSI-X mask bit acceleration

Read MSI-X mask bit directly from the device, since buffered version
may not be up-to-date when MSI-X mask bit interception is working.
Also rebind every MSI-X vector on guest PCI BAR rebalancing so that
MSI-X mask bit intercept handler can get the correct gpa

[ Also, fix declaration of pt_msix_update_remap in pt-msi.h, which
  was misspelled pt_msi_update_remap. -iwj ]

Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agohw/pass-through.c: fix a leak on error in pt_init()
Ian Jackson [Tue, 24 Feb 2009 12:32:01 +0000 (12:32 +0000)]
hw/pass-through.c: fix a leak on error in pt_init()

vslots needs to be freed on error

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: remove ACPI_PHP_SLOT_NUM
Ian Jackson [Mon, 23 Feb 2009 09:33:48 +0000 (09:33 +0000)]
[PATCH] ioemu: piix4acpi.c: remove ACPI_PHP_SLOT_NUM

ACPI_PHP_SLOT_NUM is equivalent to PHP_SLOT_LEN and both
are used inside piix4acpi.c. So for the sake of consistency
remove ACPI_PHP_SLOT_NUM.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: remove unnecessary assignment of pci_slots to local variables
Ian Jackson [Mon, 23 Feb 2009 09:33:00 +0000 (09:33 +0000)]
[PATCH] ioemu: piix4acpi.c: remove unnecessary assignment of pci_slots to local variables

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots
Ian Jackson [Mon, 23 Feb 2009 09:32:11 +0000 (09:32 +0000)]
[PATCH] ioemu: piix4acpi.c: Consistently dont cast opaque to PHPSlots

Some instances were cast and others were not.
This patch makes all instances not cast opaque into PHPSlots.

Also consistently use hotplug_slots as the variable to which
opaque is assigned.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PATCH] ioemu: piix4acpi.c: Simplfy PHPSlots structure
Ian Jackson [Mon, 23 Feb 2009 09:31:31 +0000 (09:31 +0000)]
[PATCH] ioemu: piix4acpi.c: Simplfy PHPSlots structure

The anonymouys structure inside PHPSlots only has one element,
so things can be simplified by moving the element into PHPSlots
and removing the anonymous structure.

Signed-off-by: Simon Horman <horms@verge.net.au>
16 years ago[PCI passthrough] Fix the segfault on assigning device without PM capability
Ian Jackson [Mon, 23 Feb 2009 16:29:49 +0000 (16:29 +0000)]
[PCI passthrough] Fix the segfault on assigning device without PM capability

This patch fixes the segmentation fault on assigning device without
Power Management Capability Structure.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoCleanup PCI passthrough code
Ian Jackson [Mon, 23 Feb 2009 11:33:56 +0000 (11:33 +0000)]
Cleanup PCI passthrough code

The patch cleanups the code of PCI passthrough.

- Use LIST_FOREACH(). Don't use lh_first, le_next directly.
- Use pci_{read, write}_block instead of "switch(len) case [124]
  pci_{read, write}_{byte, word, long}();".
- Eliminate duplicate codes using PT_MEARGE_VALUE macro.
- Define PCI_ERR_* macro in pass-through.h if libpci is old.
- Remove the unreasonable loop from pt_aer_reg_{save,restore}.
- Enable pt_aer_reg_{save,restore}, even if libpci is old.
- Fix ro_mask and remove unnecessary pt_xxx_reg_write functions.
- Add "Error:" or "Warning:" to messages.
- Remove verbose messages.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agohw/passthrough.[ch], pt-msi.[ch]: remove trailing whitespace
Ian Jackson [Mon, 23 Feb 2009 11:32:31 +0000 (11:32 +0000)]
hw/passthrough.[ch], pt-msi.[ch]: remove trailing whitespace

Trailing whitespace does not survive some people's mailers, with the
result that their patches do not apply.  Therefore in this commit I'm
removing it from the pass-through code, which is currently entirely in
the Xen tree.

This change is the result of this rune:
 perl -i~ -pe 's/[\t ]*$//' hw/pass-through.[ch] hw/pt-msi.[ch]

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agofix raw_aio_remove list walk bug (really)
Ian Jackson [Mon, 23 Feb 2009 11:29:14 +0000 (11:29 +0000)]
fix raw_aio_remove list walk bug (really)

Fix typo in my backport of Stefano's fix, which broke the build
in 8adde1cbba18de2704a30a76f20855f89c664a88.

16 years agofix raw_aio_remove list walk bug
Ian Jackson [Thu, 19 Feb 2009 17:55:54 +0000 (17:55 +0000)]
fix raw_aio_remove list walk bug

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cherry picked and cross-ported by Ian Jackson
from Stefano's submission to qemu-devel, 18 Feb 2009 16:56:16 GMT.

16 years agoblock-vbd: Fix vbd_aio_flush() no-op case
Ian Jackson [Thu, 19 Feb 2009 17:40:03 +0000 (17:40 +0000)]
block-vbd: Fix vbd_aio_flush() no-op case

Call the completion function if flush features are not supported in blkfront.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agofix memory/fd leak in pt_msix_init()
Ian Jackson [Mon, 9 Feb 2009 10:40:12 +0000 (10:40 +0000)]
fix memory/fd leak in pt_msix_init()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agofix error recovery in pass-through.c
Ian Jackson [Mon, 9 Feb 2009 10:34:50 +0000 (10:34 +0000)]
fix error recovery in pass-through.c

return NULL when error. fix error recovery path.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agohw/pass-through.c: workaround for old libpci
Ian Jackson [Fri, 6 Feb 2009 16:16:06 +0000 (16:16 +0000)]
hw/pass-through.c: workaround for old libpci

Old versions of libpci (including the ones on the automatic tests
which control Xen staging propagation) do not define
PCI_LIB_VERSION or the PCI_ERR_{UNCOR_MASK,...} constants.

This means that change 8c771eb6294afc5b3754a9e3de51568d4e5986c2 breaks
the build.  In this changeset I apply what is intended to be a
workaround for this problem but it may not be completely correct; this
is therefore perhaps an interim fix.

The potential problem is that the save/restore of some PCI passthrough
error handling registers (across suspend/resume) may not work properly
with old versions of libpci.  However non-passthrough and non-suspect
use cases should now be fine.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agoSlightly improve error check in xenstore_vm_write()
Ian Jackson [Thu, 5 Feb 2009 16:26:24 +0000 (16:26 +0000)]
Slightly improve error check in xenstore_vm_write()

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoEnable guest OS to program D0-D3hot states of an assigned device
Ian Jackson [Thu, 5 Feb 2009 15:54:13 +0000 (15:54 +0000)]
Enable guest OS to program D0-D3hot states of an assigned device

This patch enables guest OS to program D0-D3hot states of assigned
device.

This patch is revised version based on the review comments.

- Use LIST_FOREACH(). Don't use lh_first, le_next directly.
- Use pci_{read, write}_block instead of "switch(len) case [124]
  pci_{read, write}_{byte, word, long}():".

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoclean up piix3_reset() (no more need to set 0x61..0x63 in pci config)
Ian Jackson [Thu, 5 Feb 2009 14:50:07 +0000 (14:50 +0000)]
clean up piix3_reset() (no more need to set 0x61..0x63 in pci config)

Now #ifdef CONFIG_DM part become bogus because of
477afee37ca29e156e3309874d100de0bf4e6fd0.
So remove it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agofix PCI ROM handling problem in passthrough
Ian Jackson [Thu, 5 Feb 2009 14:48:50 +0000 (14:48 +0000)]
fix PCI ROM handling problem in passthrough

The ROM BAR doesn't get updated after writing '1' to the
/sys/bus/pci/devices/.../rom which causes ROM mapping problem.

This fix makes the ROM enabling revert to old mechanism (write
ROM BAR directly).

Kouya, thank you for testing the fix!

Reported-by: Kouya Shimura <kouya@jp.fujitsu.com>
Tested-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoMerge branch 'master' of ../qemu-iwj
Ian Jackson [Thu, 5 Feb 2009 14:48:10 +0000 (14:48 +0000)]
Merge branch 'master' of ../qemu-iwj

16 years agofix raw_aio_read/write error handling
Ian Jackson [Thu, 5 Feb 2009 14:45:25 +0000 (14:45 +0000)]
fix raw_aio_read/write error handling

Currently when qemu_paio_read or qemu_paio_write return an error we call
qemu_aio_release without removing the request from the list.
I know that in the current implementation qemu_paio_write/read don't return
any error, but still the behavior is wrong, especially considering
that the implementation of these two functions is likely to change in is
the future.
This patch fixes the problem adding a raw_aio_remove function that
removes the callback from the queue and also calls qemu_aio_release.
raw_aio_remove is called by raw_aio_read, raw_aio_write and
raw_aio_cancel.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Backported-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 years agotarget-ppc: add vrlogefp instruction
aurel32 [Thu, 5 Feb 2009 13:42:57 +0000 (13:42 +0000)]
target-ppc: add vrlogefp instruction

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6519 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agosoft-float: add float32_log2() and float64_log2()
aurel32 [Thu, 5 Feb 2009 13:42:47 +0000 (13:42 +0000)]
soft-float: add float32_log2() and float64_log2()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6518 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoProperly initialize len argument of sysctl and include stdio.h (perror)
malc [Wed, 4 Feb 2009 20:39:09 +0000 (20:39 +0000)]
Properly initialize len argument of sysctl and include stdio.h (perror)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6517 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: fix previous commit
aurel32 [Wed, 4 Feb 2009 14:08:08 +0000 (14:08 +0000)]
target-ppc: fix previous commit

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6516 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-ppc: use the new float constants
aurel32 [Wed, 4 Feb 2009 13:52:39 +0000 (13:52 +0000)]
target-ppc: use the new float constants

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6515 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agosoftfloat: add a 1.0 constant for float32 and float64
aurel32 [Wed, 4 Feb 2009 13:52:27 +0000 (13:52 +0000)]
softfloat: add a 1.0 constant for float32 and float64

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6514 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd vcf{u,s}x instructions
aurel32 [Wed, 4 Feb 2009 13:52:17 +0000 (13:52 +0000)]
Add vcf{u,s}x instructions

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6513 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd vrfi{m,n,p,z} instructions
aurel32 [Wed, 4 Feb 2009 13:52:03 +0000 (13:52 +0000)]
Add vrfi{m,n,p,z} instructions

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6512 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd various NaN-handling macros
aurel32 [Wed, 4 Feb 2009 09:05:53 +0000 (09:05 +0000)]
Add various NaN-handling macros

These simplify the implementation of the floating-point Altivec
instructions and reduce clutter.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6511 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoPartialy fix mmap at EOF for large pagesize targets in user-mode.
edgar_igl [Tue, 3 Feb 2009 23:06:34 +0000 (23:06 +0000)]
Partialy fix mmap at EOF for large pagesize targets in user-mode.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6510 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRemove accidental addition of local patch.
aliguori [Tue, 3 Feb 2009 22:45:00 +0000 (22:45 +0000)]
Remove accidental addition of local patch.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6509 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMake mtvscr use a helper
aurel32 [Tue, 3 Feb 2009 19:56:09 +0000 (19:56 +0000)]
Make mtvscr use a helper

Do this so we can set float statuses once per mtvscr, rather than once
per Altivec instruction.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6508 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd calls to initialize VSCR on appropriate machines
aurel32 [Tue, 3 Feb 2009 19:55:59 +0000 (19:55 +0000)]
Add calls to initialize VSCR on appropriate machines

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6507 c046a42c-6fe2-441c-8c8c-71466251a162