From 5c5295c807583e3cc29fafb3603a8b89dc83edac Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 28 Jun 2011 13:49:35 +0100 Subject: [PATCH] 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 --- hw/pt-graphics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ) -- 2.39.5