qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] eeb6b1: xen-hvm: Add trace to ioreq


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] eeb6b1: xen-hvm: Add trace to ioreq
Date: Thu, 10 Sep 2015 12:30:03 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: eeb6b13a5a45d16a7b348891921d496bc5d6df2c
      
https://github.com/qemu/qemu/commit/eeb6b13a5a45d16a7b348891921d496bc5d6df2c
  Author: Don Slutz <address@hidden>
  Date:   2015-09-08 (Tue, 08 Sep 2015)

  Changed paths:
    M trace-events
    M xen-hvm.c

  Log Message:
  -----------
  xen-hvm: Add trace to ioreq

Signed-off-by: Stefano Stabellini <address@hidden>
Signed-off-by: Don Slutz <address@hidden>


  Commit: 7bb836e4a27b7e364f3c8c4ebe41172fc8c70f75
      
https://github.com/qemu/qemu/commit/7bb836e4a27b7e364f3c8c4ebe41172fc8c70f75
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2015-09-08 (Tue, 08 Sep 2015)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/pci-host/piix.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  i440fx: make types configurable at run-time

IGD passthrough wants to supply a different pci and
host devices, inheriting i440fx devices. Make types
configurable.

Signed-off-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 76d39ab49ec68608a3c0bafec7bed70f21302b0e
      
https://github.com/qemu/qemu/commit/76d39ab49ec68608a3c0bafec7bed70f21302b0e
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-08 (Tue, 08 Sep 2015)

  Changed paths:
    M hw/i386/pc_piix.c

  Log Message:
  -----------
  pc_init1: pass parameters just with types

Pass types to configure pc_init1().

Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>


  Commit: 595a4f07d6bd18ba11c78b95d6a78089fee26eca
      
https://github.com/qemu/qemu/commit/595a4f07d6bd18ba11c78b95d6a78089fee26eca
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/pci-host/piix.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  piix: create host bridge to passthrough

Implement a pci host bridge specific to passthrough. Actually
this just inherits the standard one. And we also just expose
a minimal real host bridge pci configuration subset.

[Replace pread with lseek and read to fix Windows build]

Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>


  Commit: bcd7461e7e84a65f1dfaa6af6e00aa498978d29d
      
https://github.com/qemu/qemu/commit/bcd7461e7e84a65f1dfaa6af6e00aa498978d29d
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/i386/Makefile.objs
    M hw/i386/kvm/pci-assign.c
    A hw/i386/pci-assign-load-rom.c
    A include/hw/pci/pci-assign.h

  Log Message:
  -----------
  hw/pci-assign: split pci-assign.c

We will try to reuse assign_dev_load_option_rom in xen side, and
especially its a good beginning to unify pci assign codes both on
kvm and xen in the future.

[Fix build for Windows]

Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>


  Commit: 798141799ccd5235a928b8fc0411d7d74e706489
      
https://github.com/qemu/qemu/commit/798141799ccd5235a928b8fc0411d7d74e706489
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/core/machine.c
    M hw/xen/Makefile.objs
    M hw/xen/xen-host-pci-device.c
    M hw/xen/xen-host-pci-device.h
    M hw/xen/xen_pt.c
    M hw/xen/xen_pt.h
    A hw/xen/xen_pt_graphics.c
    M include/hw/boards.h
    M qemu-options.hx
    M vl.c

  Log Message:
  -----------
  xen, gfx passthrough: basic graphics passthrough support

basic gfx passthrough support:
- add a vga type for gfx passthrough
- register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX

Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Yang Zhang <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 881213f1b9c5a8f4101405a5802d548cb62a4274
      
https://github.com/qemu/qemu/commit/881213f1b9c5a8f4101405a5802d548cb62a4274
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c
    M hw/xen/xen_pt.h
    M hw/xen/xen_pt_graphics.c

  Log Message:
  -----------
  xen, gfx passthrough: retrieve VGA BIOS to work

Now we retrieve VGA bios like kvm stuff in qemu but we need to
fix Device Identification in case if its not matched with the
real IGD device since Seabios is always trying to compare this
ID to work out VGA BIOS.

Signed-off-by: Tiejun Chen <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: bd8107d7301d3fa44f04aa435e06efb2226ca58c
      
https://github.com/qemu/qemu/commit/bd8107d7301d3fa44f04aa435e06efb2226ca58c
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/i386/pc_piix.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  igd gfx passthrough: create a isa bridge

Currently IGD drivers always need to access PCH by 1f.0. But we
don't want to poke that directly to get ID, and although in real
world different GPU should have different PCH. But actually the
different PCH DIDs likely map to different PCH SKUs. We do the
same thing for the GPU. For PCH, the different SKUs are going to
be all the same silicon design and implementation, just different
features turn on and off with fuses. The SW interfaces should be
consistent across all SKUs in a given family (eg LPT). But just
same features may not be supported.

Most of these different PCH features probably don't matter to the
Gfx driver, but obviously any difference in display port connections
will so it should be fine with any PCH in case of passthrough.

So currently use one PCH version, 0x8c4e, to cover all HSW(Haswell)
scenarios, 0x9cc3 for BDW(Broadwell).

Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>


  Commit: f37d630a69992822f2eb4a47a5a5fc6a54a6dd08
      
https://github.com/qemu/qemu/commit/f37d630a69992822f2eb4a47a5a5fc6a54a6dd08
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen, gfx passthrough: register a isa bridge

Currently we just register this isa bridge when we use IGD
passthrough in Xen side.

Signed-off-by: Tiejun Chen <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 998250e976613decf9e0da68b3922df330eac3f6
      
https://github.com/qemu/qemu/commit/998250e976613decf9e0da68b3922df330eac3f6
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/i386/pc_piix.c

  Log Message:
  -----------
  xen, gfx passthrough: register host bridge specific to passthrough

Just register that pci host bridge specific to passthrough.

Signed-off-by: Tiejun Chen <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 5cec8aa38cc3b7c8cf9ce66abdda28b3598e2d88
      
https://github.com/qemu/qemu/commit/5cec8aa38cc3b7c8cf9ce66abdda28b3598e2d88
  Author: Tiejun Chen <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.h
    M hw/xen/xen_pt_config_init.c
    M hw/xen/xen_pt_graphics.c

  Log Message:
  -----------
  xen, gfx passthrough: add opregion mapping

The OpRegion shouldn't be mapped 1:1 because the address in the host
can't be used in the guest directly.

This patch traps read and write access to the opregion of the Intel
GPU config space (offset 0xfc).

The original patch is from Jean Guyader <address@hidden>

Signed-off-by: Tiejun Chen <address@hidden>
Signed-off-by: Yang Zhang <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: e763addd19e59dbd1986d4b0faae63dcb9a0f6aa
      
https://github.com/qemu/qemu/commit/e763addd19e59dbd1986d4b0faae63dcb9a0f6aa
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M xen-hvm.c

  Log Message:
  -----------
  xen-hvm: When using xc_domain_add_to_physmap also include errno when reporting

.errors - as it will most likely have the proper error value.

Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: d8b441a3fbfd075c48ab2a519d779d926624ed79
      
https://github.com/qemu/qemu/commit/d8b441a3fbfd075c48ab2a519d779d926624ed79
  Author: Jan Beulich <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M configure
    M include/hw/xen/xen_common.h
    M xen-hvm.c

  Log Message:
  -----------
  xen/HVM: atomically access pointers in bufioreq handling

The number of slots per page being 511 (i.e. not a power of two) means
that the (32-bit) read and write indexes going beyond 2^32 will likely
disturb operation. The hypervisor side gets I/O req server creation
extended so we can indicate that we're using suitable atomic accesses
where needed, allowing it to atomically canonicalize both pointers when
both have gone through at least one cycle.

The Xen side counterpart (which is not a functional prereq to this
change, albeit a build one) went in already (commit b7007bc6f9).

Signed-off-by: Jan Beulich <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: d3b9facba71ed45c9c1c09ca28eb5568a194b4de
      
https://github.com/qemu/qemu/commit/d3b9facba71ed45c9c1c09ca28eb5568a194b4de
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen/pt: Update comments with proper function name.

It has changed but the comments still refer to the old names.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: cf8124f0078a7625fdf9836589210267817ae0ae
      
https://github.com/qemu/qemu/commit/cf8124f0078a7625fdf9836589210267817ae0ae
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.h
    M hw/xen/xen_pt_msi.c

  Log Message:
  -----------
  xen/pt: Make xen_pt_msi_set_enable static

As we do not use it outside our code.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 52c7265f602701751b55d437b347bd73debf9d91
      
https://github.com/qemu/qemu/commit/52c7265f602701751b55d437b347bd73debf9d91
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure

However the init routines assume that on errors the return
code is -1 (as the libxc API is) - while those xen_host_* routines follow
another paradigm - negative errno on return, 0 on success.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 20a544c7dc2428e8816ed4a87af732884e885f2d
      
https://github.com/qemu/qemu/commit/20a544c7dc2428e8816ed4a87af732884e885f2d
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M configure
    M include/hw/xen/xen_common.h
    M xen-hvm.c

  Log Message:
  -----------
  xen: use errno instead of rc for xc_domain_add_to_physmap

In Xen 4.6 commit cd2f100f0f61b3f333d52d1737dd73f02daee592
"libxc: Fix do_memory_op to return negative value on errors"
made the libxc API less odd-ball: On errors, return value is
-1 and error code is in errno. On success the return value
is either 0 or an positive value.

Since we could be running with an old toolstack in which the
Exx value is in rc or the newer, we add an wrapper around
the xc_domain_add_to_physmap (called xen_xc_domain_add_to_physmap)
which will always return the EXX.

Xen 4.6 did not change the libxc functions mentioned (same parameters)
so we piggyback on the fact that Xen 4.6 has a new function:
commit 504ed2053362381ac01b98db9313454488b7db40 "tools/libxc: Expose
new hypercall xc_reserved_device_memory_map" and check for that.

Reviewed-by: Stefano Stabellini <address@hidden>
Suggested-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: faf5f56bf9f45ffc24a41fc8fc5ab76677aef688
      
https://github.com/qemu/qemu/commit/faf5f56bf9f45ffc24a41fc8fc5ab76677aef688
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt/msi: Add the register value when printing logging and error messages

We would like to know what the MSI register value is to help
in troubleshooting in the field. As such modify the logging
logic to include such details in xen_pt_msgctrl_reg_write.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 54fd08136e4ac8b88b88b15c397010e3b0de379f
      
https://github.com/qemu/qemu/commit/54fd08136e4ac8b88b88b15c397010e3b0de379f
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt: Use XEN_PT_LOG properly to guard against compiler warnings.

If XEN_PT_LOGGING_ENABLED is enabled the XEN_PT_LOG macros start
using the first argument. Which means if within the function there
is only one user of the argument ('d') and XEN_PT_LOGGING_ENABLED
is not set, we get compiler warnings. This is not the case now
but with the "xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config"
we will hit - so this sync up the function to the rest of them.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 6aa07b1494d2725f24af097ca19c750ac25a7c11
      
https://github.com/qemu/qemu/commit/6aa07b1494d2725f24af097ca19c750ac25a7c11
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config

During init time we treat the dev.config area as a cache
of the host view. However during execution time we treat it
as guest view (by the generic PCI API). We need to sync Xen's
code to the generic PCI API view. This is the first step
by replacing all of the code that uses dev.config or
pci_get_[byte|word] to get host value to actually use the
xen_host_pci_get_[byte|word] functions.

Interestingly in 'xen_pt_ptr_reg_init' we also needed to swap
reg_field from uint32_t to uint8_t - since the access is only
for one byte not four bytes. We can split this as a seperate
patch however we would have to use a cast to thwart compiler
warnings in the meantime.

We also truncated 'flags' to 'flag' to make the code fit within
the 80 characters.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 2e87512eccf3c5e40f3142ff5a763f4f850839f4
      
https://github.com/qemu/qemu/commit/2e87512eccf3c5e40f3142ff5a763f4f850839f4
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt: Sync up the dev.config and data values.

For a passthrough device we maintain a state of emulated
registers value contained within d->config. We also consult
the host registers (and apply ro and write masks) whenever
the guest access the registers. This is done in xen_pt_pci_write_config
and xen_pt_pci_read_config.

Also in this picture we call pci_default_write_config which
updates the d->config and if the d->config[PCI_COMMAND] register
has PCI_COMMAND_MEMORY (or PCI_COMMAND_IO) acts on those changes.

On startup the d->config[PCI_COMMAND] are the host values, not
what the guest initial values should be, which is exactly what
we do _not_ want to do for 64-bit BARs when the guest just wants
to read the size of the BAR. Huh you say?

To get the size of 64-bit memory space BARs,  the guest has
to calculate ((BAR[x] & 0xFFFFFFF0) + ((BAR[x+1] & 0xFFFFFFFF) << 32))
which means it has to do two writes of ~0 to BARx and BARx+1.

prior to this patch and with XSA120-addendum patch (Linux kernel)
the PCI_COMMAND register is copied from the host it can have
PCI_COMMAND_MEMORY bit set which means that QEMU will try to
update the hypervisor's P2M with BARx+1 value to ~0 (0xffffffff)
(to sync the guest state to host) instead of just having
xen_pt_pci_write_config and xen_pt_bar_reg_write apply the
proper masks and return the size to the guest.

To thwart this, this patch syncs up the host values with the
guest values taking into account the emu_mask (bit set means
we emulate, PCI_COMMAND_MEMORY and PCI_COMMAND_IO are set).
That is we copy the host values - masking out any bits which
we will emulate. Then merge it with the initial emulation register
values. Lastly this value is then copied both in
dev.config _and_ XenPTReg->data field.

There is also reg->size accounting taken into consideration
that ends up being used in patch.
 xen/pt: Check if reg->init function sets the 'data' past the reg->size

This fixes errors such as these:

(XEN) memory_map:add: dom2 gfn=fffe0 mfn=fbce0 nr=20
(DEBUG) 189 pci dev 04:0 BAR16 wrote ~0.
(DEBUG) 200 pci dev 04:0 BAR16 read 0x0fffe0004.
(XEN) memory_map:remove: dom2 gfn=fffe0 mfn=fbce0 nr=20
(DEBUG) 204 pci dev 04:0 BAR16 wrote 0x0fffe0004.
(DEBUG) 217 pci dev 04:0 BAR16 read upper 0x000000000.
(XEN) memory_map:add: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20
(XEN) p2m.c:883:d0v0 p2m_set_entry failed! mfn=ffffffffffffffff rc:-22
(XEN) memory_map:fail: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20 ret:-22
(XEN) memory_map:remove: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20
(XEN) p2m.c:920:d0v0 gfn_to_mfn failed! gfn=ffffffff00000 type:4
(XEN) p2m.c:920:d0v0 gfn_to_mfn failed! gfn=ffffffff00001 type:4
..
(XEN) memory_map: error -22 removing dom2 access to [fbce0,fbcff]
(DEBUG) 222 pci dev 04:0 BAR16 read upper 0x0ffffffff.
(XEN) memory_map:remove: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20
(XEN) memory_map: error -22 removing dom2 access to [fbce0,fbcff]

[The DEBUG is to illustate what the hvmloader was doing]

Also we swap from xen_host_pci_long to using xen_host_pci_get_[byte,word,long].

Otherwise we get:

xen_pt_config_reg_init: Offset 0x0004 mismatch! Emulated=0x0000, 
host=0x2300017, syncing to 0x2300014.
xen_pt_config_reg_init: Error: Offset 0x0004:0x2300014 expands past register 
size(2)!

which is not surprising. We read the value as an 32-bit (from host),
then operate it as a 16-bit - and the remainder is left unchanged.

We end up writing the value as 16-bit (so 0014) to dev.config
(as we use proper xen_set_host_[byte,word,long] so we don't spill
to other registers) but in XenPTReg->data it is as 32-bit (0x2300014)!

It is harmless as the read/write functions end up using an size mask
and never modify the bits past 16-bit (reg->size is 2).

This patch fixes the warnings by reading the value using the
proper size.

Note that the check for size is still left in-case the developer
sets bits past the reg->size in the ->init routines. The author
tried to fiddle with QEMU_BUILD_BUG to make this work but failed.

Reviewed-by: Stefano Stabellini <address@hidden>
Reported-by: Sander Eikelenboom <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 5b4dd0f55ed3027557ed9a6fd89d5aa379122feb
      
https://github.com/qemu/qemu/commit/5b4dd0f55ed3027557ed9a6fd89d5aa379122feb
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt: Check if reg->init function sets the 'data' past the reg->size

It should never happen, but in case it does (an developer adds
a new register and the 'init_val' expands past the register
size) we want to report. The code will only write up to
reg->size so there is no runtime danger of the register spilling
across other ones - however to catch this sort of thing
we still return an error.

Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: e2779de053b64f023de382fd87b3596613d47d1e
      
https://github.com/qemu/qemu/commit/e2779de053b64f023de382fd87b3596613d47d1e
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.h
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt: Remove XenPTReg->data field.

We do not want to have two entries to cache the guest configuration
registers: XenPTReg->data and dev.config. Instead we want to use
only the dev.config.

To do without much complications we rip out the ->data field
and replace it with an pointer to the dev.config. This way we
have the type-checking (uint8_t, uint16_t, etc) and as well
and pre-computed location.

Alternatively we could compute the offset in dev.config by
using the XenPTRRegInfo and XenPTRegGroup every time but
this way we have the pre-computed values.

This change also exposes some mis-use:
 - In 'xen_pt_status_reg_init' we used u32 for the Capabilities Pointer
   register, but said register is an an u16.
 - In 'xen_pt_msgdata_reg_write' we used u32 but should have only use u16.

Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: ea6c50f99de4b36a2c3e90dedabac46aef7992ac
      
https://github.com/qemu/qemu/commit/ea6c50f99de4b36a2c3e90dedabac46aef7992ac
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt_config_init.c

  Log Message:
  -----------
  xen/pt: Log xen_host_pci_get in two init functions

To help with troubleshooting in the field.

Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: fe2da64c5ab882124aaf14c27d62409d02ff1786
      
https://github.com/qemu/qemu/commit/fe2da64c5ab882124aaf14c27d62409d02ff1786
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt_msi.c

  Log Message:
  -----------
  xen/pt: Log xen_host_pci_get/set errors in MSI code.

We seem to only use these functions when de-activating the
MSI - so just log errors.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: bce33948178e338eac2629284b199c0c1f05f8a3
      
https://github.com/qemu/qemu/commit/bce33948178e338eac2629284b199c0c1f05f8a3
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen-host-pci-device.c
    M hw/xen/xen-host-pci-device.h
    M hw/xen/xen_pt.c
    M hw/xen/xen_pt.h

  Log Message:
  -----------
  xen/pt: Make xen_pt_unregister_device idempotent

To deal with xen_host_pci_[set|get]_ functions returning error values
and clearing ourselves in the init function we should make the
.exit (xen_pt_unregister_device) function be idempotent in case
the generic code starts calling .exit (or for fun does it before
calling .init!).

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: df6aa45752bf8145adcba9b077c346e9b758ebd1
      
https://github.com/qemu/qemu/commit/df6aa45752bf8145adcba9b077c346e9b758ebd1
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen/pt: Move bulk of xen_pt_unregister_device in its own routine.

This way we can call it if we fail during init.

This code movement introduces no changes.

Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 3d3697f2576424a2c0830a7b2e7c94c79dea9b50
      
https://github.com/qemu/qemu/commit/3d3697f2576424a2c0830a7b2e7c94c79dea9b50
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen/pt: Check for return values for xen_host_pci_[get|set] in init

and if we have failures we call xen_pt_destroy introduced in
'xen/pt: Move bulk of xen_pt_unregister_device in its own routine.'
and free all of the allocated structures.

Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: cae99f1d779a6e2c8721ce2dd80bafdbf0abe7a0
      
https://github.com/qemu/qemu/commit/cae99f1d779a6e2c8721ce2dd80bafdbf0abe7a0
  Author: Konrad Rzeszutek Wilk <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M hw/xen/xen_pt.c

  Log Message:
  -----------
  xen/pt: Don't slurp wholesale the PCI configuration registers

Instead we have the emulation registers ->init functions which
consult the host values to see what the initial value should be
and they are responsible for populating the dev.config.

Reviewed-by: Stefano Stabellini <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>


  Commit: 7b9c09f7d486647784c605739d69b708a7249c9b
      
https://github.com/qemu/qemu/commit/7b9c09f7d486647784c605739d69b708a7249c9b
  Author: Peter Maydell <address@hidden>
  Date:   2015-09-10 (Thu, 10 Sep 2015)

  Changed paths:
    M configure
    M hw/core/machine.c
    M hw/i386/Makefile.objs
    M hw/i386/kvm/pci-assign.c
    M hw/i386/pc_piix.c
    A hw/i386/pci-assign-load-rom.c
    M hw/pci-host/piix.c
    M hw/xen/Makefile.objs
    M hw/xen/xen-host-pci-device.c
    M hw/xen/xen-host-pci-device.h
    M hw/xen/xen_pt.c
    M hw/xen/xen_pt.h
    M hw/xen/xen_pt_config_init.c
    A hw/xen/xen_pt_graphics.c
    M hw/xen/xen_pt_msi.c
    M include/hw/boards.h
    M include/hw/i386/pc.h
    A include/hw/pci/pci-assign.h
    M include/hw/xen/xen_common.h
    M qemu-options.hx
    M trace-events
    M vl.c
    M xen-hvm.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2015-09-10-tag' 
into staging

xen-2015-09-10

# gpg: Signature made Thu 10 Sep 2015 17:52:08 BST using RSA key ID 70E1AE90
# gpg: Good signature from "Stefano Stabellini <address@hidden>"

* remotes/sstabellini/tags/xen-2015-09-10-tag: (29 commits)
  xen/pt: Don't slurp wholesale the PCI configuration registers
  xen/pt: Check for return values for xen_host_pci_[get|set] in init
  xen/pt: Move bulk of xen_pt_unregister_device in its own routine.
  xen/pt: Make xen_pt_unregister_device idempotent
  xen/pt: Log xen_host_pci_get/set errors in MSI code.
  xen/pt: Log xen_host_pci_get in two init functions
  xen/pt: Remove XenPTReg->data field.
  xen/pt: Check if reg->init function sets the 'data' past the reg->size
  xen/pt: Sync up the dev.config and data values.
  xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config
  xen/pt: Use XEN_PT_LOG properly to guard against compiler warnings.
  xen/pt/msi: Add the register value when printing logging and error messages
  xen: use errno instead of rc for xc_domain_add_to_physmap
  xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure
  xen/pt: Make xen_pt_msi_set_enable static
  xen/pt: Update comments with proper function name.
  xen/HVM: atomically access pointers in bufioreq handling
  xen-hvm: When using xc_domain_add_to_physmap also include errno when reporting
  xen, gfx passthrough: add opregion mapping
  xen, gfx passthrough: register host bridge specific to passthrough
  ...

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


Compare: https://github.com/qemu/qemu/compare/fe556410cf09...7b9c09f7d486

reply via email to

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