Revision cd461c8445392d02c268d79f7ed68387b440c4b3 authored by lyx634449800 on 08 April 2024, 02:00:03 UTC, committed by Michael Tokarev on 09 April 2024, 17:42:59 UTC
The set_config callback function vhost_vdpa_device_get_config in
vdpa-dev does not fetch the current device status from the hardware
device, causing the guest os to not receive the latest device status
information.

The hardware updates the config status of the vdpa device and then
notifies the os. The guest os receives an interrupt notification,
triggering a get_config access in the kernel, which then enters qemu
internally. Ultimately, the vhost_vdpa_device_get_config function of
vdpa-dev is called

One scenario encountered is when the device needs to bring down the
vdpa net device. After modifying the status field of virtio_net_config
in the hardware, it sends an interrupt notification. However, the guest
os always receives the STATUS field as VIRTIO_NET_S_LINK_UP.

Signed-off-by: Yuxue Liu <yuxue.liu@jaguarmicro.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20240408020003.1979-1-yuxue.liu@jaguarmicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 6ae72f609a21cfc56bf655cd4bcded5d07691ce7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
1 parent b57b102
Raw File
.patchew.yml
---
# Note: this file is still unused.  It serves as a documentation for the
# Patchew configuration in case patchew.org disappears or has to be
# reinstalled.
#
# Patchew configuration is available to project administrators at
# https://patchew.org/api/v1/projects/1/config/ and can be configured
# to YAML using the following Python script:
#
#     import json
#     import sys
#     import ruamel.yaml
#
#     json_str = sys.stdin.read()
#     yaml = ruamel.yaml.YAML()
#     yaml.explicit_start = True
#     data = json.loads(json_str, object_pairs_hook=ruamel.yaml.comments.CommentedMap)
#     ruamel.yaml.scalarstring.walk_tree(data)
#     yaml.dump(data, sys.stdout)

email:
  notifications:
    timeouts:
      event: TestingReport
      enabled: true
      to_user: false
      reply_subject: true
      set_reply_to: true
      in_reply_to: true
      reply_to_all: false
      subject_template: none
      to: fam@euphon.net
      cc: ''
      body_template: |
        {% if not is_timeout %} {{ cancel }} {% endif %}

        Test '{{ test }}' timeout, log:

        {{ log }}
    ENOSPC:
      event: TestingReport
      enabled: true
      to_user: false
      reply_subject: false
      set_reply_to: false
      in_reply_to: true
      reply_to_all: false
      subject_template: Out of space error
      to: fam@euphon.net
      cc: ''
      body_template: |
        {% if passed %}
          {{ cancel }}
        {% endif %}

        {% if 'No space left on device' in log %}
        Tester {{ tester }} out of space when running {{ test }}

          {{ log }}
        {% else %}
          {{ cancel }}
        {% endif %}
    FailureShort:
      event: TestingReport
      enabled: true
      to_user: false
      reply_subject: true
      set_reply_to: true
      in_reply_to: true
      reply_to_all: true
      subject_template: Testing failed
      to: ''
      cc: ''
      body_template: |
        {% if passed or not obj.message_id or is_timeout %}
          {{ cancel }}
        {% endif %}
        {% if 'No space left on device' in log %}
          {{ cancel }}
        {% endif %}
        Patchew URL: https://patchew.org/QEMU/{{ obj.message_id }}/

        {% ansi2text log as logtext %}
        {% if test == "checkpatch" %}
        Hi,

        This series seems to have some coding style problems. See output below for
        more information:

        {{ logtext }}
        {% elif test == "docker-mingw@fedora" or test == "docker-quick@centos8" or test == "asan" %}
        Hi,

        This series failed the {{ test }} build test. Please find the testing commands and
        their output below. If you have Docker installed, you can probably reproduce it
        locally.

        {% lines_between logtext start="^=== TEST SCRIPT BEGIN ===$" stop="^=== TEST SCRIPT END ===$" %}
        {% lines_between logtext start="^=== OUTPUT BEGIN ===$" stop="=== OUTPUT END ===$" as output %}
        {% grep_C output regex="\b(FAIL|XPASS|ERROR|WARN|error:|warning:)" n=3 %}
        {% elif test == "s390x" or test == "FreeBSD" or test == "ppcle" or test == "ppcbe" %}
        Hi,

        This series failed build test on {{test}} host. Please find the details below.

        {% lines_between logtext start="^=== TEST SCRIPT BEGIN ===$" stop="^=== TEST SCRIPT END ===$" %}
        {% lines_between logtext start="^=== OUTPUT BEGIN ===$" stop="=== OUTPUT END ===$" as output %}
        {% grep_C output regex="\b(FAIL|XPASS|ERROR|WARN|error:|warning:)" n=3 %}
        {% else %}
        {{ cancel }}
        {% endif %}

        The full log is available at
        {{ log_url }}.
        ---
        Email generated automatically by Patchew [https://patchew.org/].
        Please send your feedback to patchew-devel@redhat.com
testing:
  tests:
    asan:
      enabled: true
      requirements: docker
      timeout: 3600
      script: |
        #!/bin/bash
        time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
    docker-quick@centos8:
      enabled: false
      requirements: docker,x86_64
      timeout: 3600
      script: |
        #!/bin/bash
        time make docker-test-quick@centos8 SHOW_ENV=1 J=14 NETWORK=1
    checkpatch:
      enabled: true
      requirements: ''
      timeout: 600
      script: |
        #!/bin/bash
        git rev-parse base > /dev/null || exit 0
        ./scripts/checkpatch.pl --mailback base..
    docker-mingw@fedora:
      enabled: true
      requirements: docker,x86_64
      timeout: 3600
      script: |
        #! /bin/bash
        test "$(uname -m)" = "x86_64"
    ppcle:
      enabled: false
      requirements: ppcle
      timeout: 3600
      script: |
        #!/bin/bash
        # Testing script will be invoked under the git checkout with
        # HEAD pointing to a commit that has the patches applied on top of "base"
        # branch
        set -e
        CC=$HOME/bin/cc
        INSTALL=$PWD/install
        BUILD=$PWD/build
        mkdir -p $BUILD $INSTALL
        SRC=$PWD
        cd $BUILD
        $SRC/configure --cc=$CC --prefix=$INSTALL
        make -j4
        # XXX: we need reliable clean up
        # make check -j4 V=1
        make install

        echo
        echo "=== ENV ==="
        env

        echo
        echo "=== PACKAGES ==="
        rpm -qa
    ppcbe:
      enabled: false
      requirements: ppcbe
      timeout: 3600
      script: |
        #!/bin/bash
        # Testing script will be invoked under the git checkout with
        # HEAD pointing to a commit that has the patches applied on top of "base"
        # branch
        set -e
        CC=$HOME/bin/cc
        INSTALL=$PWD/install
        BUILD=$PWD/build
        mkdir -p $BUILD $INSTALL
        SRC=$PWD
        cd $BUILD
        $SRC/configure --cc=$CC --prefix=$INSTALL
        make -j4
        # XXX: we need reliable clean up
        # make check -j4 V=1
        make install

        echo
        echo "=== ENV ==="
        env

        echo
        echo "=== PACKAGES ==="
        rpm -qa
    FreeBSD:
      enabled: true
      requirements: qemu-x86,x86_64,git
      timeout: 3600
      script: |
        #!/bin/bash
        # Testing script will be invoked under the git checkout with
        # HEAD pointing to a commit that has the patches applied on top of "base"
        # branch
        if qemu-system-x86_64 --help >/dev/null 2>&1; then
          QEMU=qemu-system-x86_64
        elif /usr/libexec/qemu-kvm --help >/dev/null 2>&1; then
          QEMU=/usr/libexec/qemu-kvm
        else
          exit 1
        fi
        make vm-build-freebsd J=21 QEMU=$QEMU
        exit 0
    docker-clang@ubuntu:
      enabled: true
      requirements: docker,x86_64
      timeout: 3600
      script: |
        #!/bin/bash
        time make docker-test-clang@ubuntu SHOW_ENV=1 J=14 NETWORK=1
    s390x:
      enabled: true
      requirements: s390x
      timeout: 3600
      script: |
        #!/bin/bash
        # Testing script will be invoked under the git checkout with
        # HEAD pointing to a commit that has the patches applied on top of "base"
        # branch
        set -e
        CC=$HOME/bin/cc
        INSTALL=$PWD/install
        BUILD=$PWD/build
        mkdir -p $BUILD $INSTALL
        SRC=$PWD
        cd $BUILD
        $SRC/configure --cc=$CC --prefix=$INSTALL
        make -j4
        # XXX: we need reliable clean up
        # make check -j4 V=1
        make install

        echo
        echo "=== ENV ==="
        env

        echo
        echo "=== PACKAGES ==="
        rpm -qa
  requirements:
    x86_64:
      script: |
        #! /bin/bash
        test "$(uname -m)" = "x86_64"
    qemu-x86:
      script: |
        #!/bin/bash
        if qemu-system-x86_64 --help >/dev/null 2>&1; then
          :
        elif /usr/libexec/qemu-kvm --help >/dev/null 2>&1; then
          :
        else
          exit 1
        fi
    ppcle:
      script: |
        #!/bin/bash
        test "$(uname -m)" = "ppc64le"
    ppcbe:
      script: |
        #!/bin/bash
        test "$(uname -m)" = "ppc64"
    git:
      script: |
        #! /bin/bash
        git config user.name > /dev/null 2>&1
    docker:
      script: |
        #!/bin/bash
        docker ps || sudo -n docker ps
    s390x:
      script: |
        #!/bin/bash
        test "$(uname -m)" = "s390x"
git:
  push_to: git@github.com:patchew-project/qemu
  public_repo: https://github.com/patchew-project/qemu
  url_template: https://github.com/patchew-project/qemu/tree/%t
back to top