From: Ian Jackson Date: Tue, 28 Jun 2011 12:49:35 +0000 (+0100) Subject: passthrough: mask out upper bits in vendor id X-Git-Tag: xen-4.2.0-rc1~39 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5c5295c807583e3cc29fafb3603a8b89dc83edac;p=qemu-xen-4.3-testing.git passthrough: mask out upper bits in vendor id Making vendor_id u16 eliminates potential bogus upper bits that are not part of the actual 16-bit vendor ID. On some systems, upper bits shows up with 0xffff. Signed-off-by: Allen Kay --- diff --git a/hw/pt-graphics.c b/hw/pt-graphics.c index d44492101..889772d99 100644 --- a/hw/pt-graphics.c +++ b/hw/pt-graphics.c @@ -94,7 +94,8 @@ uint32_t igd_pci_read(PCIDevice *pci_dev, uint32_t config_addr, int len) */ int register_vga_regions(struct pt_dev *real_device) { - u32 vendor_id, igd_opregion; + u16 vendor_id; + int igd_opregion; int ret = 0; if ( !gfx_passthru || real_device->pci_dev->device_class != 0x0300 )