diff options
author | Peter Maydell | 2015-10-22 13:41:44 +0200 |
---|---|---|
committer | Peter Maydell | 2015-10-22 13:41:44 +0200 |
commit | ca3e40e233e87f7b29442311736a82da01c0df7b (patch) | |
tree | dba688d01dceded9b998e5d5cfb8cb9264354604 /hw/pci-host/piix.c | |
parent | Merge remote-tracking branch 'remotes/xtensa/tags/20151021-xtensa' into staging (diff) | |
parent | hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT (diff) | |
download | qemu-ca3e40e233e87f7b29442311736a82da01c0df7b.tar.gz qemu-ca3e40e233e87f7b29442311736a82da01c0df7b.tar.xz qemu-ca3e40e233e87f7b29442311736a82da01c0df7b.zip |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
vhost, pc, virtio features, fixes, cleanups
New features:
VT-d support for devices behind a bridge
vhost-user migration support
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Thu 22 Oct 2015 12:39:19 BST using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
* remotes/mst/tags/for_upstream: (37 commits)
hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT
i386: keep cpu_model field in MachineState uptodate
vhost: set the correct queue index in case of migration with multiqueue
piix: fix resource leak reported by Coverity
seccomp: add memfd_create to whitelist
vhost-user-test: check ownership during migration
vhost-user-test: add live-migration test
vhost-user-test: learn to tweak various qemu arguments
vhost-user-test: wrap server in TestServer struct
vhost-user-test: remove useless static check
vhost-user-test: move wait_for_fds() out
vhost: add migration block if memfd failed
vhost-user: use an enum helper for features mask
vhost user: add rarp sending after live migration for legacy guest
vhost user: add support of live migration
net: add trace_vhost_user_event
vhost-user: document migration log
vhost: use a function for each call
vhost-user: add a migration blocker
vhost-user: send log shm fd along with log_base
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/pci-host/piix.c')
-rw-r--r-- | hw/pci-host/piix.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 1fb71c8081..7b2fbf9598 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -764,6 +764,7 @@ static int host_pci_config_read(int pos, int len, uint32_t val) /* Access real host bridge. */ int rc = snprintf(path, size, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/%s", 0, 0, 0, 0, "config"); + int ret = 0; if (rc >= size || rc < 0) { return -ENODEV; @@ -775,16 +776,18 @@ static int host_pci_config_read(int pos, int len, uint32_t val) } if (lseek(config_fd, pos, SEEK_SET) != pos) { - return -errno; + ret = -errno; + goto out; } do { rc = read(config_fd, (uint8_t *)&val, len); } while (rc < 0 && (errno == EINTR || errno == EAGAIN)); if (rc != len) { - return -errno; + ret = -errno; } - - return 0; +out: + close(config_fd); + return ret; } static int igd_pt_i440fx_initfn(struct PCIDevice *pci_dev) |