aboutsummaryrefslogtreecommitdiff
path: root/hw/vmware_vga.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini1-1282/+0
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-18console: stop using DisplayState in gfx hardware emulationGerd Hoffmann1-51/+56
Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-01hw: include hw header files with full pathsPaolo Bonzini1-4/+4
Done with this script: cd hw for i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,' done | sed -i -f - `find . -type f` This is so that paths remain valid as files are moved. Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-02-21vga: fix byteswapping.Gerd Hoffmann1-1/+1
In case host and guest endianness differ the vga code first creates a shared surface (using qemu_create_displaysurface_from), then goes patch the surface format to indicate that the bytes must be swapped. The switch to pixman broke that hack as the format patching isn't propagated into the pixman image, so ui code using the pixman image directly (such as vnc) uses the wrong format. Fix that by adding a byteswap parameter to qemu_create_displaysurface_from, so we'll use the correct format when creating the surface (and the pixman image) and don't have to patch the format afterwards. [ v2: unbreak xen build ] Cc: qemu-stable@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Cc: agraf@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1361349432-23884-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-26vmware_vga: fix out of bounds and invalid rects updatingMichael Tokarev1-0/+18
This is a follow up for several attempts to fix this issue. Previous incarnations: 1. http://thread.gmane.org/gmane.linux.ubuntu.bugs.general/3156089 https://bugs.launchpad.net/bugs/918791 "qemu-kvm dies when using vmvga driver and unity in the guest" bug. Fix by Serge Hallyn: https://launchpadlibrarian.net/94916786/qemu-vmware.debdiff This fix is incomplete, since it does not check width and height for being negative. Serge weren't sure if that's the right place to fix it, maybe the fix should be up the stack somewhere. 2. http://thread.gmane.org/gmane.comp.emulators.qemu/166064 by Marek Vasut: "vmware_vga: Redraw only visible area" This one adds the (incomplete) check to vmsvga_update_rect_delayed(), the routine just queues the rect updating but does no interesting stuff. It is also incomplete in the same way as patch by Serge, but also does not touch width&height at all after adjusting x&y, which is wrong. As far as I can see, when processing guest requests, the device places them into a queue (vmsvga_update_rect_delayed()) and processes this queue in different place/time, namely, in vmsvga_update_rect(). Sometimes, vmsvga_update_rect() is called directly, without placing the request to the gueue. This is the place this patch changes, which is the last (deepest) in the stack. I'm not sure if this is the right place still, since it is possible we have some queue optimization (or may have in the future) which will be upset by negative/wrong values here, so maybe we should check for validity of input right when receiving request from the guest (and maybe even use unsigned types there). But I don't know the protocol and implementation enough to have a definitive answer. But since vmsvga_update_rect() has other sanity checks already, I'm adding the missing ones there as well. Cc'ing BALATON Zoltan and Andrzej Zaborowski who shows in `git blame' output and may know something in this area. If this patch is accepted, it should be applied to all active stable branches (at least since 1.1, maybe even before), with minor context change (ds_get_*(s->vga.ds) => s->*). I'm not Cc'ing -stable yet, will do it explicitly once the patch is accepted. BTW, these checks use fprintf(stderr) -- it should be converted to something more appropriate, since stderr will most likely disappear somewhere. Cc: Marek Vasut <marex@denx.de> CC: Serge Hallyn <serge.hallyn@ubuntu.com> Cc: BALATON Zoltan <balaton@eik.bme.hu> Cc: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-10Make all static TypeInfos constAndreas Färber1-1/+1
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19ui: move files to ui/ and include/ui/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-17pci: update all users to look in pci/Michael S. Tsirkin1-1/+1
update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-11-10vmware_vga: Add back some info in local state partially reverting aa32b38cBALATON Zoltan1-9/+21
Keep saving display surface parameters at init and using these cached values instead of getting them when needed. Not sure why this is needed (maybe due to the interaction with the vga device) but not doing this broke the Xorg vmware driver at least. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Tested-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-03vmware_vga: Allow simple drivers to work without using the fifoBALATON Zoltan1-13/+21
Postpone stopping the dirty log to the point where the command fifo is configured to allow drivers which don't use the fifo to work too. (Without this the picture rendered into the vram never got to the screen and the DIRECT_VRAM option meant to support this case was removed a year ago.) Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-03vmware_vga: Return a value for FB_SIZE before the device is enabledBALATON Zoltan1-10/+9
According to the documentation drivers using this device should read FB_SIZE before enabling the device to know what memory to map. This would not work if we return 0 before enabled. The docs also mention reading SVGA_REG_DEPTH but not writing it. (Only SVGA_REG_BITS_PER_PIXEL can be written but we don't really support that either.) Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-03vmware_vga: Remove duplicated info from local stateBALATON Zoltan1-94/+65
Removed info from vmsvga_state that is available from elsewhere and thus was duplicated here unnecessarily. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-03vmware_vga: Coding style cleanupBALATON Zoltan1-124/+150
Fix coding style as suggested by checkpatch.pl Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-11-01console: untangle gfx & txt updatesGerd Hoffmann1-2/+2
Stop abusing displaysurface fields for text mode displays. (bpp = 0, width = cols, height = lines). Add flags to displaystate indicating whenever text mode display (curses) or gfx mode displays (sdl, vnc, ...) are present. Add separate displaychangelistener callbacks for text / gfx mode resize & updates. This allows to enable gfx and txt diplays at the same time and also paves the way for more cleanups in the future. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: move set_mouse + cursor_define callbacksGerd Hoffmann1-5/+6
When adding DisplayChangeListeners the set_mouse and cursor_define callbacks have been left in DisplayState for some reason. Fix it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-10-23Rename target_phys_addr_t to hwaddrAvi Kivity1-2/+2
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-06vga: cleanup after isa_vga_init() and pci_vga_init() conversionAurelien Jarno1-1/+0
Now that all machines call isa_vga_init() or pci_vga_init(), some unused code can be removed. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-09-11VGA: Flush coalesced MMIO on related MMIO/PIO accessesJan Kiszka1-0/+1
In preparation of stopping to flush coalesced MMIO unconditionally on vmexits, mark VGA MMIO and PIO regions as synchronous /wrt coalesced MMIO and flush the buffer explicitly on PIO accesses that do not use generic memory regions yet. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-09-05vga: ppm_save(): add error handlingLuiz Capitulino1-1/+1
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-09-05console: vga_hw_screen_dump_ptr: take Error argumentLuiz Capitulino1-2/+3
All devices that register a screen dump callback via graphic_console_init() are updated. The new argument is not used in this commit. Error handling will be added to each device individually later. This change is a preparation to convert the screendump command to the QAPI. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-07-28Avoid returning voidBlue Swirl1-3/+6
It's silly and non-conforming to standards to return void, don't do it. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-22vga: raise default vgamem sizeGerd Hoffmann1-1/+1
Old size: 8 MB (traditional upstream qemu value). New size: 16 MB (traditional qemu-kvm value). Also adds compat properties so old machine types keep the old default values. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-22vga: make vram size configurableGerd Hoffmann1-3/+10
Zap the global VGA_RAM_SIZE #define, make the vga ram size configurable for standard vga and vmware vga. cirrus and qxl are left with a fixed size (and private VGA_RAM_SIZE #define) for now. qxl needs some non-trivial adjustments in the mode list handling deal with a runtime-configurable size, which calls for a separate qxl patch. cirrus emulates cards which have 2 MB (isa) and 4 MB (pci), so I guess it would make sense to use these sizes. That change would break migration though, so I left it fixed at 8 MB size. Making it configurabls is pretty pointless for cirrus as we have to match real hardware. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-24optimize screendump for the common non-switch caseGerd Hoffmann1-2/+2
switch console only if needed, also pass down whenever the console was switched or not because a displaysurface redraw is only needed in case the console was switched. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-15qom: Unify type registrationAndreas Färber1-2/+3
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori1-7/+9
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27pci: convert to QEMU Object ModelAnthony Liguori1-14/+20
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-04vmstate, memory: decouple vmstate from memory APIAvi Kivity1-1/+2
Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-11vga: Convert to isa_register_portio_listRichard Henderson1-3/+4
[jan: fix cut'n'paste errors] [avi: adjust pci variants not to use isa functions] Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-09-03Use new macro QEMU_PACKED for packed structuresStefan Weil1-1/+1
Most changes were made using these commands: git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/' Whitespace in linux-user/syscall_defs.h was fixed manually to avoid warnings from scripts/checkpatch.pl. Manual changes were also applied to hw/pc.c. I did not fix indentation with tabs in block/vvfat.c. The patch will show 4 errors with scripts/checkpatch.pl. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-22vmware-vga: Eliminate vga_dirty_log_restartJan Kiszka1-2/+0
After the conversion to the new Memory API, vga_dirty_log_restart became seriously pointless. Remove it from vmware-vga and and then finally drop the service. CC: Andrzej Zaborowski <balrogg@gmail.com> CC: Avi Kivity <avi@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Remove dead DIRECT_VRAM modeJan Kiszka1-142/+30
The code was disabled since day 1 of vmware-vga, and now it does not even build anymore. Time for a cleanup. CC: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Disable verbose modeJan Kiszka1-1/+1
Elimiates 'vmsvga_value_write: guest runs Linux.' messages from the console. CC: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vmware-vga: Register reset serviceJan Kiszka1-31/+35
Fixes cold reset in vmware graphic modes. We need to split up the reset function for this purpose, breaking out init-once bits. Cc: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-22vga: drop get_system_memory() from vga devices and derivativesAvi Kivity1-4/+5
Instead, use the bus accessors, or get the address space directly from the board constructor. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-3/+3
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-08pci: rename pci_register_bar_region() to pci_register_bar()Avi Kivity1-4/+4
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-08vga: convert vga and its derivatives to the memory APIAvi Kivity1-69/+74
Convert all vga memory to the memory API. Note we need to fall back to get_system_memory(), since the various buses don't pass the vga window as a memory region. We no longer need to sync the dirty bitmap of the cirrus mapped memory banks, since the memory API takes care of that for us. [jan: fix vga-pci logging] Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-08vmsvga: don't remember pci BAR address in callback any moreAvi Kivity1-6/+6
We're going to remove the callback, so we can't use it to save the address. Use the pci API instead. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-06-12vmware_vga.c: convert to PCIDeviceInfo to initialize idsIsaku Yamahata1-7/+6
use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-02-12vmware_vga: refactor device creationBlue Swirl1-5/+0
Turn vmsvga_init into an inline function. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-01-10vga: tag as not hotplugable.Gerd Hoffmann1-0/+1
This patch tags all vga cards as not hotpluggable. The qemu standard vga will never ever be hotpluggable. For cirrus + vmware it might be possible to get that work some day. Todays we can't handle that for a number of reasons though. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-12-11Add endianness as io mem parameterAlexander Graf1-1/+1
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-11-21vgabios update: handle compatibility with older qemu versionsGerd Hoffmann1-0/+5
As pointed out by avi the vgabios update is guest-visible and thus has migration implications. One change is that the vga has a valid pci rom bar now. We already have a pci bus property to enable/disable the rom bar and we'll load the bios via fw_cfg as fallback for the no-rom-bar case. So we just have to add compat properties to handle this case. A second change is that the magic bochs lfb @ 0xe0000000 is gone. When live-migrating a guest from a older qemu version it might be using the lfb though, so we have to keep it for the old machine types. The patch enables the bochs lfb in case we don't have the pci rom bar enabled (i.e. we are in 0.13+older compat mode). This patch depends on these patches which add (and use) the pc-0.13 machine type: http://patchwork.ozlabs.org/patch/70797/ http://patchwork.ozlabs.org/patch/70798/ Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: avi@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-11-16switch vmware_vga to pci vgabiosGerd Hoffmann1-6/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-09-10vmware_vga: Replace the few tab-indents with spaces (clean-up).Andrzej Zaborowski1-9/+9
Use 4 spaces instead of 2, too.
2010-09-10vmware_vga: Add checks to deal with non-atomic fifo writes.Andrzej Zaborowski1-8/+56
Janne Huttunen noticed that the FIFO end pointer is updated by the guest after writing each word to the FIFO, at least the X.org driver which is open does this. This means that there's no way for the host to know if the guest is in the middle a write operation. Qemu thus needs to read the beginning of the command up to when it's able to tell how many words are expected for the given command. It will abort reading and rewind the FIFO if there aren't enough words yet, this should be relatively rare but it is suspected to have been the cause of the occasional FIFO overrun that killed the display.
2010-07-11vmware_vga: fix reset value for command registerMichael S. Tsirkin1-3/+0
Make init value for this register match the spec. BAR address is 0 at init, so enabling it only works by chance. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-07-11pci: don't overwrite multi functio bit in pci header type.Isaku Yamahata1-1/+0
Don't overwrite pci header type. Otherwise, multi function bit which pci_init_header_type() sets appropriately is lost. Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zero which is already zero cleared. how to test: run qemu and issue info pci to see whether a device in question is normal device, not pci-to-pci bridge. This is handy because guest os isn't required. tested changes: The following files are covered by using following commands. sparc64-softmmu apb_pci.c, vga-pci.c, cmd646.c, ne2k_pci.c, sun4u.c ppc-softmmu grackle_pci.c, cmd646.c, ne2k_pci.c, vga-pci.c, macio.c ppc-softmmu -M mac99 unin_pci.c(uni-north, uni-north-agp) ppc64-softmmu pci-ohci, ne2k_pci, vga-pci, unin_pci.c(u3-agp) x86_64-softmmu acpi_piix4.c, ide/piix.c, piix_pci.c -vga vmware vmware_vga.c -watchdog i6300esb wdt_i6300esb.c -usb usb-uhci.c -sound ac97 ac97.c -nic model=rtl8139 rtl8139.c -nic model=pcnet pcnet.c -balloon virtio virtio-pci.c: untested changes: The following changes aren't tested. prep_pci.c: ppc-softmmu -M prep should cover, but core dumped. unin_pci.c(uni-north-pci): the caller is commented out. openpic.c: the caller is commented out in ppc_prep.c Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-06qemu_ram_alloc: Add DeviceState and name parametersAlex Williamson1-1/+1
These will be used to generate unique id strings for ramblocks. The name field is required, the device pointer is optional as most callers don't have a device. When there's no device or the device isn't a child of a bus implementing BusInfo.get_dev_path, the name should be unique for the platform. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>