From: Alex Williamson <alex.williamson@redhat.com>
To: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Cc: izumi.taku@jp.fujitsu.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC v4 6/9] vfio: add 'x-aer' option to disable aer capability
Date: Mon, 09 Mar 2015 14:29:36 -0600 [thread overview]
Message-ID: <1425932976.4675.213.camel@redhat.com> (raw)
In-Reply-To: <22dfc3f7905e924561fd8729b2eae6846bef7a51.1425280224.git.chen.fan.fnst@cn.fujitsu.com>
On Mon, 2015-03-02 at 15:16 +0800, Chen Fan wrote:
> add 'x-aer' option to disable aer capability if user
> want.
I'm generally one to favor using the x- flag, but we need to figure out
if we need to make this be a supported option or not. We also need to
decide whether we should include your previous patch that toggled this
support based on machine type. We don't care about migration
compatibility, but users might depend on specific error behavior and we
don't want to break that for existing machine types. This would include
only the q35 machine types through QEMU 2.3, I believe.
My impression is that it should probably be supported. There may be
cases where the guest OS does not support AER and we want to be able to
invoke the old vm_stop() behavior.
> Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
> ---
> hw/vfio/pci.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index db4ba23..5471437 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -156,6 +156,8 @@ typedef struct VFIOPCIDevice {
> uint32_t features;
> #define VFIO_FEATURE_ENABLE_VGA_BIT 0
> #define VFIO_FEATURE_ENABLE_VGA (1 << VFIO_FEATURE_ENABLE_VGA_BIT)
> +#define VFIO_FEATURE_ENABLE_AER_BIT 1
> +#define VFIO_FEATURE_ENABLE_AER (1 << VFIO_FEATURE_ENABLE_AER_BIT)
Bit 1 is already taken by:
47cbe50 vfio-pci: Enable device request notification support
> int32_t bootindex;
> uint8_t pm_cap;
> bool has_vga;
> @@ -2728,6 +2730,10 @@ static int vfio_setup_aer(VFIOPCIDevice *vdev, uint8_t cap_ver,
> uint32_t severity;
> int ret;
>
> + if (!(vdev->features & VFIO_FEATURE_ENABLE_AER)) {
> + return 0;
> + }
> +
> pdev->exp.aer_log.log_max = PCIE_AER_LOG_MAX_DEFAULT;
> ret = pcie_aer_init(pdev, cap_ver, pos, size);
> if (ret) {
> @@ -3569,6 +3575,8 @@ static Property vfio_pci_dev_properties[] = {
> intx.mmap_timeout, 1100),
> DEFINE_PROP_BIT("x-vga", VFIOPCIDevice, features,
> VFIO_FEATURE_ENABLE_VGA_BIT, false),
> + DEFINE_PROP_BIT("x-aer", VFIOPCIDevice, features,
> + VFIO_FEATURE_ENABLE_AER_BIT, true),
> DEFINE_PROP_INT32("bootindex", VFIOPCIDevice, bootindex, -1),
> /*
> * TODO - support passed fds... is this necessary?
next prev parent reply other threads:[~2015-03-09 20:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 7:16 [Qemu-devel] [RFC v4 0/9] pass aer error to guest for vfio device Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 1/9] pcie_aer: fix typos in pcie_aer_inject_error comment Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 2/9] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 3/9] vfio: add pcie extanded capability support Chen Fan
2015-03-09 20:28 ` Alex Williamson
2015-03-11 2:42 ` Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 4/9] aer: impove pcie_aer_init to support vfio device Chen Fan
2015-03-09 20:29 ` Alex Williamson
2015-03-11 2:37 ` Chen Fan
2015-03-12 10:29 ` Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 5/9] vfio: add aer support for " Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 6/9] vfio: add 'x-aer' option to disable aer capability Chen Fan
2015-03-09 20:29 ` Alex Williamson [this message]
2015-03-11 3:42 ` Chen Fan
2015-03-11 15:44 ` Alex Williamson
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 7/9] pcie_aer: expose pcie_aer_msg() interface Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 8/9] vfio-pci: pass the aer error to guest Chen Fan
2015-03-09 20:29 ` Alex Williamson
2015-03-11 2:57 ` Chen Fan
2015-03-02 7:16 ` [Qemu-devel] [RFC v4 9/9] pcie: fix several trivial typos Chen Fan
2015-03-09 1:33 ` [Qemu-devel] [RFC v4 0/9] pass aer error to guest for vfio device Chen Fan
2015-03-09 20:34 ` Alex Williamson
2015-03-10 1:27 ` Chen Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425932976.4675.213.camel@redhat.com \
--to=alex.williamson@redhat.com \
--cc=chen.fan.fnst@cn.fujitsu.com \
--cc=izumi.taku@jp.fujitsu.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).