Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# qemu configure script (c) 2003 Fabrice Bellard
#
Expand Down Expand Up @@ -470,6 +470,8 @@ SunOS)
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
cpu="x86_64"
elif test -z "$cpu" && test "$(isainfo -k)" = "sparcv9"; then
cpu="sparc64"
fi
esac

Expand Down Expand Up @@ -663,6 +665,11 @@ SunOS)
solarisnetlibs="-lsocket -lnsl -lresolv"
LIBS="$solarisnetlibs $LIBS"
libs_qga="$solarisnetlibs $libs_qga"
if [ "$cpu" = "x86_64" ]; then
export PKG_CONFIG_LIBDIR=/usr/lib/x86_64/pkgconfig
elif [ "$cpu" = "sparc64" ]; then
export PKG_CONFIG_LIBDIR=/usr/lib/sparcv9/pkgconfig
fi
;;
AIX)
aix="yes"
Expand Down
12 changes: 6 additions & 6 deletions contrib/ivshmem-client/ivshmem-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ ivshmem_client_init(IvshmemClient *client, const char *unix_sock_path,
int
ivshmem_client_connect(IvshmemClient *client)
{
struct sockaddr_un sun;
struct sockaddr_un sa_un;
int fd, ret;
int64_t tmp;

Expand All @@ -193,16 +193,16 @@ ivshmem_client_connect(IvshmemClient *client)
return -1;
}

sun.sun_family = AF_UNIX;
ret = snprintf(sun.sun_path, sizeof(sun.sun_path), "%s",
sa_un.sun_family = AF_UNIX;
ret = snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s",
client->unix_sock_path);
if (ret < 0 || ret >= sizeof(sun.sun_path)) {
if (ret < 0 || ret >= sizeof(sa_un.sun_path)) {
IVSHMEM_CLIENT_DEBUG(client, "could not copy unix socket path\n");
goto err_close;
}

if (connect(client->sock_fd, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
IVSHMEM_CLIENT_DEBUG(client, "cannot connect to %s: %s\n", sun.sun_path,
if (connect(client->sock_fd, (struct sockaddr *)&sa_un, sizeof(sa_un)) < 0) {
IVSHMEM_CLIENT_DEBUG(client, "cannot connect to %s: %s\n", sa_un.sun_path,
strerror(errno));
goto err_close;
}
Expand Down
12 changes: 6 additions & 6 deletions contrib/ivshmem-server/ivshmem-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ ivshmem_server_init(IvshmemServer *server, const char *unix_sock_path,
int
ivshmem_server_start(IvshmemServer *server)
{
struct sockaddr_un sun;
struct sockaddr_un sa_un;
int shm_fd, sock_fd, ret;

/* open shm file */
Expand Down Expand Up @@ -328,15 +328,15 @@ ivshmem_server_start(IvshmemServer *server)
goto err_close_shm;
}

sun.sun_family = AF_UNIX;
ret = snprintf(sun.sun_path, sizeof(sun.sun_path), "%s",
sa_un.sun_family = AF_UNIX;
ret = snprintf(sa_un.sun_path, sizeof(sa_un.sun_path), "%s",
server->unix_sock_path);
if (ret < 0 || ret >= sizeof(sun.sun_path)) {
if (ret < 0 || ret >= sizeof(sa_un.sun_path)) {
IVSHMEM_SERVER_DEBUG(server, "could not copy unix socket path\n");
goto err_close_sock;
}
if (bind(sock_fd, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
IVSHMEM_SERVER_DEBUG(server, "cannot connect to %s: %s\n", sun.sun_path,
if (bind(sock_fd, (struct sockaddr *)&sa_un, sizeof(sa_un)) < 0) {
IVSHMEM_SERVER_DEBUG(server, "cannot connect to %s: %s\n", sa_un.sun_path,
strerror(errno));
goto err_close_sock;
}
Expand Down
1 change: 1 addition & 0 deletions hw/net/e1000x_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

#undef SEC /* conflicts with sys/time.h on SunOS */
#include "e1000_regs.h"

#define defreg(x) x = (E1000_##x >> 2)
Expand Down
22 changes: 11 additions & 11 deletions memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2469,10 +2469,10 @@ typedef struct MemoryRegionList MemoryRegionList;

struct MemoryRegionList {
const MemoryRegion *mr;
QTAILQ_ENTRY(MemoryRegionList) queue;
QTAILQ_ENTRY(MemoryRegionList) mqueue;
};

typedef QTAILQ_HEAD(queue, MemoryRegionList) MemoryRegionListHead;
typedef QTAILQ_HEAD(mqueue, MemoryRegionList) MemoryRegionListHead;

#define MR_SIZE(size) (int128_nz(size) ? (hwaddr)int128_get64( \
int128_sub((size), int128_one())) : 0)
Expand Down Expand Up @@ -2501,7 +2501,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
bool found = false;

/* check if the alias is already in the queue */
QTAILQ_FOREACH(ml, alias_print_queue, queue) {
QTAILQ_FOREACH(ml, alias_print_queue, mqueue) {
if (ml->mr == mr->alias) {
found = true;
}
Expand All @@ -2510,7 +2510,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
if (!found) {
ml = g_new(MemoryRegionList, 1);
ml->mr = mr->alias;
QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue);
QTAILQ_INSERT_TAIL(alias_print_queue, ml, mqueue);
}
mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx
" (prio %d, %s): alias %s @%s " TARGET_FMT_plx
Expand Down Expand Up @@ -2540,26 +2540,26 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
QTAILQ_FOREACH(submr, &mr->subregions, subregions_link) {
new_ml = g_new(MemoryRegionList, 1);
new_ml->mr = submr;
QTAILQ_FOREACH(ml, &submr_print_queue, queue) {
QTAILQ_FOREACH(ml, &submr_print_queue, mqueue) {
if (new_ml->mr->addr < ml->mr->addr ||
(new_ml->mr->addr == ml->mr->addr &&
new_ml->mr->priority > ml->mr->priority)) {
QTAILQ_INSERT_BEFORE(ml, new_ml, queue);
QTAILQ_INSERT_BEFORE(ml, new_ml, mqueue);
new_ml = NULL;
break;
}
}
if (new_ml) {
QTAILQ_INSERT_TAIL(&submr_print_queue, new_ml, queue);
QTAILQ_INSERT_TAIL(&submr_print_queue, new_ml, mqueue);
}
}

QTAILQ_FOREACH(ml, &submr_print_queue, queue) {
QTAILQ_FOREACH(ml, &submr_print_queue, mqueue) {
mtree_print_mr(mon_printf, f, ml->mr, level + 1, base + mr->addr,
alias_print_queue);
}

QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, queue, next_ml) {
QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, mqueue, next_ml) {
g_free(ml);
}
}
Expand Down Expand Up @@ -2618,13 +2618,13 @@ void mtree_info(fprintf_function mon_printf, void *f, bool flatview)
}

/* print aliased regions */
QTAILQ_FOREACH(ml, &ml_head, queue) {
QTAILQ_FOREACH(ml, &ml_head, mqueue) {
mon_printf(f, "memory-region: %s\n", memory_region_name(ml->mr));
mtree_print_mr(mon_printf, f, ml->mr, 1, 0, &ml_head);
mon_printf(f, "\n");
}

QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) {
QTAILQ_FOREACH_SAFE(ml, &ml_head, mqueue, ml2) {
g_free(ml);
}
}
Expand Down
2 changes: 2 additions & 0 deletions migration/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ typedef struct QEMU_PACKED RDMADestBlock {
uint32_t padding;
} RDMADestBlock;

#ifndef htonll
static uint64_t htonll(uint64_t v)
{
union { uint32_t lv[2]; uint64_t llv; } u;
Expand All @@ -262,6 +263,7 @@ static uint64_t ntohll(uint64_t v) {
u.llv = v;
return ((uint64_t)ntohl(u.lv[0]) << 32) | (uint64_t) ntohl(u.lv[1]);
}
#endif

static void dest_block_to_network(RDMADestBlock *db)
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,10 @@ tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF)
rmdir $(INITRD_WORK_DIR)

ifeq ($(CONFIG_POSIX),y)
ifneq ($(CONFIG_SOLARIS),y)
LIBS += -lutil
endif
endif

# QTest rules

Expand Down