3 # Copyright (c) 2016 Open Platform for NFV Project, Inc. and its contributors
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 VIRTIO_OPTIONS="csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off"
18 VHOST_FORCE="vhostforce"
22 while [ $# -gt 0 ]; do
29 if [[ $1 =~ "vhost-user" ]]
31 args[i]=${1},${VHOST_FORCE}
41 if [[ $1 =~ "memory-backend-file" ]]
56 echo "qemu ${args[@]}" > /tmp/qemu.orig
57 if [ -e /usr/local/bin/qemu-system-x86_64 ]; then
58 exec /usr/local/bin/qemu-system-x86_64 "${args[@]}"
59 elif [ -e /usr/libexec/qemu-kvm.orig ]; then
60 exec /usr/libexec/qemu-kvm.orig "${args[@]}"