mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-06 05:31:50 +00:00
kvm, pci: Don't calculate offset twice
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
committed by
Will Deacon
parent
598419d58c
commit
18ae021a54
@@ -63,7 +63,7 @@ static bool pci_config_data_in(struct kvm *self, uint16_t port, void *data, int
|
||||
if (offset < sizeof(struct pci_device_header)) {
|
||||
void *p = &virtio_device;
|
||||
|
||||
memcpy(data, p + (pci_config_address.register_number << 2), size);
|
||||
memcpy(data, p + offset, size);
|
||||
} else
|
||||
memset(data, 0x00, size);
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user