qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 1dd6af: xen-pvdevice: Introduce a simplistic


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 1dd6af: xen-pvdevice: Introduce a simplistic xen-pvdevice ...
Date: Thu, 24 May 2018 05:23:40 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1dd6af7395670f3dcd05ddb64ce6c374a81ae701
      
https://github.com/qemu/qemu/commit/1dd6af7395670f3dcd05ddb64ce6c374a81ae701
  Author: Igor Druzhinin <address@hidden>
  Date:   2018-05-18 (Fri, 18 May 2018)

  Changed paths:
    M hw/i386/xen/xen_pvdevice.c

  Log Message:
  -----------
  xen-pvdevice: Introduce a simplistic xen-pvdevice save state

This should help to avoid problems with accessing the device after
migration/resume without PV drivers by migrating its PCI configuration
space state. Without an explicitly defined state record it resets
every time a VM migrates which confuses the OS and makes every
access to xen-pvdevice MMIO region to fail. PV tools enable some
logic to save and restore PCI configuration state from within the VM
every time it migrates which basically hides the issue.

Older systems will acquire the new record when migrated which should
not change their state for worse.

Signed-off-by: Igor Druzhinin <address@hidden>
Reviewed-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 84201604c77808d6b2fa5139ded83d1e739a3f8c
      
https://github.com/qemu/qemu/commit/84201604c77808d6b2fa5139ded83d1e739a3f8c
  Author: Igor Druzhinin <address@hidden>
  Date:   2018-05-18 (Fri, 18 May 2018)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen/pt: use address_space_memory object for memory region hooks

Commit 99605175c (xen-pt: Fix PCI devices re-attach failed) introduced
a subtle bug. As soon as the guest switches off Bus Mastering on the
device it immediately causes all the BARs be unmapped due to the DMA
address space of the device being changed. This is undesired behavior
because the guest may try to communicate with the device after that
which triggers the following errors in the logs:

[00:05.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. 
@0x0000000000000200
[00:05.0] xen_pt_bar_write: Error: Should not write BAR through QEMU. 
@0x0000000000000200

The issue that the original patch tried to workaround (uneven number of
region_add/del calls on device attach/detach) was fixed in d25836cafd
(memory: do explicit cleanup when remove listeners).

Signed-off-by: Igor Druzhinin <address@hidden>
Reported-by: Ross Lagerwall <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 70c292afdffe9176a3255cc32d723ddd673dab52
      
https://github.com/qemu/qemu/commit/70c292afdffe9176a3255cc32d723ddd673dab52
  Author: Anthony PERARD <address@hidden>
  Date:   2018-05-18 (Fri, 18 May 2018)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Add explanation for --enable-xen-pci-passthrough

Signed-off-by: Anthony PERARD <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: dc9e46a29aad8ba5d2fb0871268baa9c7edc0f95
      
https://github.com/qemu/qemu/commit/dc9e46a29aad8ba5d2fb0871268baa9c7edc0f95
  Author: Ross Lagerwall <address@hidden>
  Date:   2018-05-18 (Fri, 18 May 2018)

  Changed paths:
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen_pt: Present the size of 64 bit BARs correctly

The full size of the BAR is stored in the lower PCIIORegion.size. The
upper PCIIORegion.size is 0.  Calculate the size of the upper half
correctly from the lower half otherwise the size read by the guest will
be incorrect.

Signed-off-by: Ross Lagerwall <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 71cec1ed2282a5c172ee09000ef11cf9460eff79
      
https://github.com/qemu/qemu/commit/71cec1ed2282a5c172ee09000ef11cf9460eff79
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-18 (Fri, 18 May 2018)

  Changed paths:
    M hw/i386/xen/xen-hvm.c

  Log Message:
  -----------
  xen-hvm: create separate function for ioreq server initialization

The code is sufficiently substantial that it improves code readability
to put it in a new function called by xen_hvm_init() rather than having
it inline.

Signed-off-by: Paul Durrant <address@hidden>
Reviewed-by: Anthony Perard <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 8d0f08e95b2d5f8ff6dea4027247bb0e8cc19cdf
      
https://github.com/qemu/qemu/commit/8d0f08e95b2d5f8ff6dea4027247bb0e8cc19cdf
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M scripts/checkpatch.pl

  Log Message:
  -----------
  checkpatch: generalize xen handle matching in the list of types

All the xen stable APIs define handle types of the form:

xen<subject of API>_handle

and some define additional handle types of the form:

xen<subject of API>_<purpose of handle>_handle

Examples of these are xenforeignmemory_handle and
xenforeignmemory_resource_handle.

Both of these types will be misparsed by checkpatch if they appear as the
first token in a line since, as types defined by an external library, they
do not conform to the QEMU CODING_STYLE, which suggests CamelCase.

A previous patch (5ac067a24a8) added xendevicemodel_handle to the list
of types. This patch changes that to xen\w+_handle such that it will
match all Xen stable API handles of the forms detailed above.

Signed-off-by: Paul Durrant <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 5c0d914a9ba9e0641554d127b62859ac0e954b9e
      
https://github.com/qemu/qemu/commit/5c0d914a9ba9e0641554d127b62859ac0e954b9e
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/block/xen_disk.c
    M include/hw/xen/xen_common.h

  Log Message:
  -----------
  xen: add a meaningful declaration of grant_copy_segment into xen_common.h

Currently the xen_disk source has to carry #ifdef exclusions to compile
against Xen older then 4.8. This is a bit messy so this patch lifts the
definition of struct xengnttab_grant_copy_segment and adds it into the
pre-4.8 compat area in xen_common.h, which allows xen_disk to be cleaned
up.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 9838824affced9e4db01a369dd28c14f694fa9b9
      
https://github.com/qemu/qemu/commit/9838824affced9e4db01a369dd28c14f694fa9b9
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/xen/xen_backend.c
    M include/hw/xen/xen_backend.h

  Log Message:
  -----------
  xen_backend: add grant table helpers

This patch adds grant table helper functions to the xen_backend code to
localize error reporting and use of xen_domid.

The patch also defers the call to xengnttab_open() until just before the
initialise method in XenDevOps is invoked. This method is responsible for
mapping the shared ring. No prior method requires access to the grant table.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 5ee1d999138f17ad54657f1dba6408f6aefc3cc2
      
https://github.com/qemu/qemu/commit/5ee1d999138f17ad54657f1dba6408f6aefc3cc2
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/block/xen_disk.c

  Log Message:
  -----------
  xen_disk: remove open-coded use of libxengnttab

Now that helpers are present in xen_backend, this patch removes open-coded
calls to libxengnttab from the xen_disk code.

This patch also fixes one whitspace error in the assignment of the
XenDevOps initialise method.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony Perard <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 58560f2ae71b99d3032432a4a8457bb2cb21bce1
      
https://github.com/qemu/qemu/commit/58560f2ae71b99d3032432a4a8457bb2cb21bce1
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/9pfs/xen-9p-backend.c
    M hw/char/xen_console.c
    M hw/net/xen_nic.c
    M hw/usb/xen-usb.c

  Log Message:
  -----------
  xen: remove other open-coded use of libxengnttab

Now that helpers are available in xen_backend, use them throughout all
Xen PV backends.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony Perard <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 3fe12b8403111021e6eaae3b44d01a34922c176a
      
https://github.com/qemu/qemu/commit/3fe12b8403111021e6eaae3b44d01a34922c176a
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/xen/xen_backend.c

  Log Message:
  -----------
  xen_backend: add an emulation of grant copy

Not all Xen environments support the xengnttab_grant_copy() operation.
E.g. where the OS is FreeBSD or Xen is older than 4.8.0.

This patch introduces an emulation of that operation using
xengnttab_map_domain_grant_refs() and memcpy() for those environments.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 06454c24adf54114a56524444b4e3e915e1879bc
      
https://github.com/qemu/qemu/commit/06454c24adf54114a56524444b4e3e915e1879bc
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/block/xen_disk.c

  Log Message:
  -----------
  xen_disk: remove use of grant map/unmap

Now that the (native or emulated) xen_be_copy_grant_refs() helper is
always available, the xen_disk code can be significantly simplified by
removing direct use of grant map and unmap operations.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony Perard <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: a68bf540f67feacbbd867196b3ce420e51d92a8c
      
https://github.com/qemu/qemu/commit/a68bf540f67feacbbd867196b3ce420e51d92a8c
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/xen/xen_backend.c
    M include/hw/xen/xen_backend.h

  Log Message:
  -----------
  xen_backend: make the xen_feature_grant_copy flag private

There is no longer any use of this flag outside of the xen_backend code.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony Perard <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 5ebf96265244e720d56367703a752f05010b7d55
      
https://github.com/qemu/qemu/commit/5ebf96265244e720d56367703a752f05010b7d55
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/block/xen_disk.c

  Log Message:
  -----------
  xen_disk: use a single entry iovec

Since xen_disk now always copies data to and from a guest there is no need
to maintain a vector entry corresponding to every page of a request.
This means there is less per-request state to maintain so the ioreq
structure can shrink significantly.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony Perard <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 443c3c9cf1a18afcc705745d18101a4ea4de5b26
      
https://github.com/qemu/qemu/commit/443c3c9cf1a18afcc705745d18101a4ea4de5b26
  Author: Paul Durrant <address@hidden>
  Date:   2018-05-22 (Tue, 22 May 2018)

  Changed paths:
    M hw/block/xen_disk.c

  Log Message:
  -----------
  xen_disk: be consistent with use of xendev and blkdev->xendev

Certain functions in xen_disk are called with a pointer to xendev
(struct XenDevice *). They then use container_of() to acces the surrounding
blkdev (struct XenBlkDev) but then in various places use &blkdev->xendev
when use of the original xendev pointer is shorter to express and clearly
equivalent.

This patch is a purely cosmetic patch which makes sure there is a xendev
pointer on stack for any function where the pointer is need on multiple
occasions modified those functions to use it consistently.

Signed-off-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 5ff2a4b97f6dd57e855b713aca9f8ebdb1965a8b
      
https://github.com/qemu/qemu/commit/5ff2a4b97f6dd57e855b713aca9f8ebdb1965a8b
  Author: Peter Maydell <address@hidden>
  Date:   2018-05-24 (Thu, 24 May 2018)

  Changed paths:
    M configure
    M hw/9pfs/xen-9p-backend.c
    M hw/block/xen_disk.c
    M hw/char/xen_console.c
    M hw/i386/xen/xen-hvm.c
    M hw/i386/xen/xen_pvdevice.c
    M hw/net/xen_nic.c
    M hw/usb/xen-usb.c
    M hw/xen/xen_backend.c
    M hw/xen/xen_pt.c
    M hw/xen/xen_pt_config_init.c
    M include/hw/xen/xen_backend.h
    M include/hw/xen/xen_common.h
    M scripts/checkpatch.pl

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/sstabellini-http/tags/xen-20180522-tag' 
into staging

Xen 2018/05/22

# gpg: Signature made Tue 22 May 2018 19:44:06 BST
# gpg:                using RSA key 894F8F4870E1AE90
# gpg: Good signature from "Stefano Stabellini <address@hidden>"
# gpg:                 aka "Stefano Stabellini <address@hidden>"
# Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90

* remotes/sstabellini-http/tags/xen-20180522-tag:
  xen_disk: be consistent with use of xendev and blkdev->xendev
  xen_disk: use a single entry iovec
  xen_backend: make the xen_feature_grant_copy flag private
  xen_disk: remove use of grant map/unmap
  xen_backend: add an emulation of grant copy
  xen: remove other open-coded use of libxengnttab
  xen_disk: remove open-coded use of libxengnttab
  xen_backend: add grant table helpers
  xen: add a meaningful declaration of grant_copy_segment into xen_common.h
  checkpatch: generalize xen handle matching in the list of types
  xen-hvm: create separate function for ioreq server initialization
  xen_pt: Present the size of 64 bit BARs correctly
  configure: Add explanation for --enable-xen-pci-passthrough
  xen/pt: use address_space_memory object for memory region hooks
  xen-pvdevice: Introduce a simplistic xen-pvdevice save state

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/9cac60db4513...5ff2a4b97f6d
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]