mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-03 00:13:59 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea35a5082a | ||
|
|
d62f4b6d0d | ||
|
|
9a51650419 | ||
|
|
5afb837e3c | ||
|
|
dffec2ddd0 | ||
|
|
aead95c7fa | ||
|
|
4b1b34c1e7 | ||
|
|
616814cd00 | ||
|
|
d47f418ea1 | ||
|
|
fe21d932f2 | ||
|
|
18b0d72fdd | ||
|
|
34febb2831 | ||
|
|
37ff07ea12 | ||
|
|
d7b8b07197 | ||
|
|
237831f9ad |
No files matched your search
@@ -52,7 +52,7 @@ x64-freebsd-14-build:
|
||||
NAME: freebsd-14
|
||||
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
|
||||
CIRRUS_VM_IMAGE_SELECTOR: image_family
|
||||
CIRRUS_VM_IMAGE_NAME: freebsd-14-1
|
||||
CIRRUS_VM_IMAGE_NAME: freebsd-14-2
|
||||
CIRRUS_VM_CPUS: 8
|
||||
CIRRUS_VM_RAM: 8G
|
||||
UPDATE_COMMAND: pkg update; pkg upgrade -y
|
||||
|
||||
@@ -2134,10 +2134,10 @@ static void send_qmp_error_event(BlockBackend *blk,
|
||||
{
|
||||
IoOperationType optype;
|
||||
BlockDriverState *bs = blk_bs(blk);
|
||||
g_autofree char *path = blk_get_attached_dev_path(blk);
|
||||
|
||||
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
|
||||
qapi_event_send_block_io_error(blk_name(blk),
|
||||
blk_get_attached_dev_path(blk),
|
||||
qapi_event_send_block_io_error(path, blk_name(blk),
|
||||
bs ? bdrv_get_node_name(bs) : NULL, optype,
|
||||
action, blk_iostatus_is_enabled(blk),
|
||||
error == ENOSPC, strerror(error));
|
||||
|
||||
@@ -182,6 +182,15 @@ static void smc91c111_pop_rx_fifo(smc91c111_state *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (s->rx_fifo_len == 0) {
|
||||
/*
|
||||
* The datasheet doesn't document what the behaviour is if the
|
||||
* guest tries to pop an empty RX FIFO, and there's no obvious
|
||||
* error status register to report it. Just ignore the attempt.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
s->rx_fifo_len--;
|
||||
if (s->rx_fifo_len) {
|
||||
for (i = 0; i < s->rx_fifo_len; i++)
|
||||
|
||||
+3
-2
@@ -515,8 +515,8 @@ static bool iommufd_cdev_attach(const char *name, VFIODevice *vbasedev,
|
||||
} else {
|
||||
ret = iommufd_cdev_ram_block_discard_disable(true);
|
||||
if (ret) {
|
||||
error_setg(errp,
|
||||
"Cannot set discarding of RAM broken (%d)", ret);
|
||||
error_setg_errno(errp, -ret,
|
||||
"Cannot set discarding of RAM broken");
|
||||
goto err_discard_disable;
|
||||
}
|
||||
goto found_container;
|
||||
@@ -544,6 +544,7 @@ static bool iommufd_cdev_attach(const char *name, VFIODevice *vbasedev,
|
||||
|
||||
ret = iommufd_cdev_ram_block_discard_disable(true);
|
||||
if (ret) {
|
||||
error_setg_errno(errp, -ret, "Cannot set discarding of RAM broken");
|
||||
goto err_discard_disable;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,12 @@ static const qmp_virtio_feature_map_t vhost_user_protocol_map[] = {
|
||||
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_STATUS, \
|
||||
"VHOST_USER_PROTOCOL_F_STATUS: Querying and notifying back-end "
|
||||
"device status supported"),
|
||||
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_SHARED_OBJECT, \
|
||||
"VHOST_USER_PROTOCOL_F_SHARED_OBJECT: Backend shared object "
|
||||
"supported"),
|
||||
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_DEVICE_STATE, \
|
||||
"VHOST_USER_PROTOCOL_F_DEVICE_STATE: Backend device state transfer "
|
||||
"supported"),
|
||||
{ -1, "" }
|
||||
};
|
||||
|
||||
|
||||
@@ -3349,8 +3349,8 @@ static void load_elf_image(const char *image_name, const ImageSource *src,
|
||||
|
||||
if (align_size != reserve_size) {
|
||||
abi_ulong align_addr = ROUND_UP(load_addr, align);
|
||||
abi_ulong align_end = align_addr + reserve_size;
|
||||
abi_ulong load_end = load_addr + align_size;
|
||||
abi_ulong align_end = TARGET_PAGE_ALIGN(align_addr + reserve_size);
|
||||
abi_ulong load_end = TARGET_PAGE_ALIGN(load_addr + align_size);
|
||||
|
||||
if (align_addr != load_addr) {
|
||||
target_munmap(load_addr, align_addr - load_addr);
|
||||
|
||||
@@ -358,7 +358,8 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len,
|
||||
#define __NR_sys_sched_setaffinity __NR_sched_setaffinity
|
||||
_syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len,
|
||||
unsigned long *, user_mask_ptr);
|
||||
/* sched_attr is not defined in glibc */
|
||||
/* sched_attr is not defined in glibc < 2.41 */
|
||||
#ifndef SCHED_ATTR_SIZE_VER0
|
||||
struct sched_attr {
|
||||
uint32_t size;
|
||||
uint32_t sched_policy;
|
||||
@@ -371,6 +372,7 @@ struct sched_attr {
|
||||
uint32_t sched_util_min;
|
||||
uint32_t sched_util_max;
|
||||
};
|
||||
#endif
|
||||
#define __NR_sys_sched_getattr __NR_sched_getattr
|
||||
_syscall4(int, sys_sched_getattr, pid_t, pid, struct sched_attr *, attr,
|
||||
unsigned int, size, unsigned int, flags);
|
||||
|
||||
@@ -4050,6 +4050,9 @@ if have_rust
|
||||
bindgen_args += ['--formatter', 'none']
|
||||
endif
|
||||
endif
|
||||
if bindgen.version().version_compare('>=0.66.0')
|
||||
bindgen_args += ['--rust-target', '1.59']
|
||||
endif
|
||||
if bindgen.version().version_compare('<0.61.0')
|
||||
# default in 0.61+
|
||||
bindgen_args += ['--size_t-is-usize']
|
||||
|
||||
+17
-8
@@ -247,7 +247,14 @@ static void net_slirp_timer_mod(void *timer, int64_t expire_timer,
|
||||
timer_mod(&t->timer, expire_timer);
|
||||
}
|
||||
|
||||
static void net_slirp_register_poll_fd(int fd, void *opaque)
|
||||
#if !SLIRP_CHECK_VERSION(4, 9, 0)
|
||||
# define slirp_os_socket int
|
||||
# define slirp_pollfds_fill_socket slirp_pollfds_fill
|
||||
# define register_poll_socket register_poll_fd
|
||||
# define unregister_poll_socket unregister_poll_fd
|
||||
#endif
|
||||
|
||||
static void net_slirp_register_poll_sock(slirp_os_socket fd, void *opaque)
|
||||
{
|
||||
#ifdef WIN32
|
||||
AioContext *ctxt = qemu_get_aio_context();
|
||||
@@ -260,7 +267,7 @@ static void net_slirp_register_poll_fd(int fd, void *opaque)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void net_slirp_unregister_poll_fd(int fd, void *opaque)
|
||||
static void net_slirp_unregister_poll_sock(slirp_os_socket fd, void *opaque)
|
||||
{
|
||||
#ifdef WIN32
|
||||
if (WSAEventSelect(fd, NULL, 0) != 0) {
|
||||
@@ -286,8 +293,8 @@ static const SlirpCb slirp_cb = {
|
||||
#endif
|
||||
.timer_free = net_slirp_timer_free,
|
||||
.timer_mod = net_slirp_timer_mod,
|
||||
.register_poll_fd = net_slirp_register_poll_fd,
|
||||
.unregister_poll_fd = net_slirp_unregister_poll_fd,
|
||||
.register_poll_socket = net_slirp_register_poll_sock,
|
||||
.unregister_poll_socket = net_slirp_unregister_poll_sock,
|
||||
.notify = net_slirp_notify,
|
||||
};
|
||||
|
||||
@@ -314,7 +321,7 @@ static int slirp_poll_to_gio(int events)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int net_slirp_add_poll(int fd, int events, void *opaque)
|
||||
static int net_slirp_add_poll(slirp_os_socket fd, int events, void *opaque)
|
||||
{
|
||||
GArray *pollfds = opaque;
|
||||
GPollFD pfd = {
|
||||
@@ -363,8 +370,8 @@ static void net_slirp_poll_notify(Notifier *notifier, void *data)
|
||||
|
||||
switch (poll->state) {
|
||||
case MAIN_LOOP_POLL_FILL:
|
||||
slirp_pollfds_fill(s->slirp, &poll->timeout,
|
||||
net_slirp_add_poll, poll->pollfds);
|
||||
slirp_pollfds_fill_socket(s->slirp, &poll->timeout,
|
||||
net_slirp_add_poll, poll->pollfds);
|
||||
break;
|
||||
case MAIN_LOOP_POLL_OK:
|
||||
case MAIN_LOOP_POLL_ERR:
|
||||
@@ -629,7 +636,9 @@ static int net_slirp_init(NetClientState *peer, const char *model,
|
||||
|
||||
s = DO_UPCAST(SlirpState, nc, nc);
|
||||
|
||||
cfg.version = SLIRP_CHECK_VERSION(4,7,0) ? 4 : 1;
|
||||
cfg.version =
|
||||
SLIRP_CHECK_VERSION(4, 9, 0) ? 6 :
|
||||
SLIRP_CHECK_VERSION(4, 7, 0) ? 4 : 1;
|
||||
cfg.restricted = restricted;
|
||||
cfg.in_enabled = ipv4;
|
||||
cfg.vnetwork = net;
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
function subproject_dir() {
|
||||
if test ! -f "subprojects/$1.wrap"; then
|
||||
error "scripts/archive-source.sh should only process wrap subprojects"
|
||||
if test ! -f "$src/subprojects/$1.wrap"; then
|
||||
echo "scripts/archive-source.sh should only process wrap subprojects"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Print the directory key of the wrap file, defaulting to the
|
||||
@@ -26,7 +27,7 @@ function subproject_dir() {
|
||||
-e 's///p' \
|
||||
-e 'q' \
|
||||
-e '}' \
|
||||
"subprojects/$1.wrap")
|
||||
"$src/subprojects/$1.wrap")
|
||||
|
||||
echo "${dir:-$1}"
|
||||
}
|
||||
@@ -76,7 +77,7 @@ popd
|
||||
exclude=(--exclude=.git)
|
||||
# include the tarballs in subprojects/packagecache but not their expansion
|
||||
for sp in $SUBPROJECTS; do
|
||||
if grep -xqF "[wrap-file]" subprojects/$sp.wrap; then
|
||||
if grep -xqF "[wrap-file]" $src/subprojects/$sp.wrap; then
|
||||
exclude+=(--exclude=subprojects/"$(subproject_dir $sp)")
|
||||
fi
|
||||
done
|
||||
|
||||
+14
-4
@@ -79,8 +79,13 @@ int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
|
||||
}
|
||||
}
|
||||
if (n < 80) {
|
||||
/* f32-f62 (double width, even numbers only) */
|
||||
return gdb_get_reg64(mem_buf, env->fpr[(n - 32) / 2].ll);
|
||||
/* f32-f62 (16 double width registers, even register numbers only)
|
||||
* n == 64: f32 : env->fpr[16]
|
||||
* n == 65: f34 : env->fpr[17]
|
||||
* etc...
|
||||
* n == 79: f62 : env->fpr[31]
|
||||
*/
|
||||
return gdb_get_reg64(mem_buf, env->fpr[(n - 64) + 16].ll);
|
||||
}
|
||||
switch (n) {
|
||||
case 80:
|
||||
@@ -173,8 +178,13 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
||||
}
|
||||
return 4;
|
||||
} else if (n < 80) {
|
||||
/* f32-f62 (double width, even numbers only) */
|
||||
env->fpr[(n - 32) / 2].ll = tmp;
|
||||
/* f32-f62 (16 double width registers, even register numbers only)
|
||||
* n == 64: f32 : env->fpr[16]
|
||||
* n == 65: f34 : env->fpr[17]
|
||||
* etc...
|
||||
* n == 79: f62 : env->fpr[31]
|
||||
*/
|
||||
env->fpr[(n - 64) + 16].ll = tmp;
|
||||
} else {
|
||||
switch (n) {
|
||||
case 80:
|
||||
|
||||
@@ -321,12 +321,12 @@ FdMULq 10 ..... 110100 ..... 0 0110 1110 ..... @q_d_d
|
||||
FNHADDs 10 ..... 110100 ..... 0 0111 0001 ..... @r_r_r
|
||||
FNHADDd 10 ..... 110100 ..... 0 0111 0010 ..... @d_d_d
|
||||
FNsMULd 10 ..... 110100 ..... 0 0111 1001 ..... @d_r_r
|
||||
FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @r_r2
|
||||
FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @r_d2
|
||||
FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @r_q2
|
||||
FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_r2
|
||||
FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_r2
|
||||
FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_r2
|
||||
FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @d_r2
|
||||
FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @d_d2
|
||||
FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @d_q2
|
||||
FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_d2
|
||||
FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_d2
|
||||
FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_d2
|
||||
FiTOs 10 ..... 110100 00000 0 1100 0100 ..... @r_r2
|
||||
FdTOs 10 ..... 110100 00000 0 1100 0110 ..... @r_d2
|
||||
FqTOs 10 ..... 110100 00000 0 1100 0111 ..... @r_q2
|
||||
|
||||
@@ -120,10 +120,6 @@ if gtk.found()
|
||||
endif
|
||||
|
||||
if sdl.found()
|
||||
if host_os == 'windows'
|
||||
system_ss.add(files('win32-kbd-hook.c'))
|
||||
endif
|
||||
|
||||
sdl_ss = ss.source_set()
|
||||
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
|
||||
'sdl2-2d.c',
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "sysemu/runstate.h"
|
||||
#include "sysemu/runstate-action.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "ui/win32-kbd-hook.h"
|
||||
#include "qemu/log.h"
|
||||
|
||||
static int sdl2_num_outputs;
|
||||
@@ -262,7 +261,6 @@ static void sdl_grab_start(struct sdl2_console *scon)
|
||||
}
|
||||
SDL_SetWindowGrab(scon->real_window, SDL_TRUE);
|
||||
gui_grab = 1;
|
||||
win32_kbd_set_grab(true);
|
||||
sdl_update_caption(scon);
|
||||
}
|
||||
|
||||
@@ -270,7 +268,6 @@ static void sdl_grab_end(struct sdl2_console *scon)
|
||||
{
|
||||
SDL_SetWindowGrab(scon->real_window, SDL_FALSE);
|
||||
gui_grab = 0;
|
||||
win32_kbd_set_grab(false);
|
||||
sdl_show_cursor(scon);
|
||||
sdl_update_caption(scon);
|
||||
}
|
||||
@@ -371,19 +368,6 @@ static int get_mod_state(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void *sdl2_win32_get_hwnd(struct sdl2_console *scon)
|
||||
{
|
||||
#ifdef CONFIG_WIN32
|
||||
SDL_SysWMinfo info;
|
||||
|
||||
SDL_VERSION(&info.version);
|
||||
if (SDL_GetWindowWMInfo(scon->real_window, &info)) {
|
||||
return info.info.win.window;
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void handle_keydown(SDL_Event *ev)
|
||||
{
|
||||
int win;
|
||||
@@ -608,10 +592,6 @@ static void handle_windowevent(SDL_Event *ev)
|
||||
sdl2_redraw(scon);
|
||||
break;
|
||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
win32_kbd_set_grab(gui_grab);
|
||||
if (qemu_console_is_graphic(scon->dcl.con)) {
|
||||
win32_kbd_set_window(sdl2_win32_get_hwnd(scon));
|
||||
}
|
||||
/* fall through */
|
||||
case SDL_WINDOWEVENT_ENTER:
|
||||
if (!gui_grab && (qemu_input_is_absolute(scon->dcl.con) || absolute_enabled)) {
|
||||
@@ -627,9 +607,6 @@ static void handle_windowevent(SDL_Event *ev)
|
||||
scon->ignore_hotkeys = get_mod_state();
|
||||
break;
|
||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
if (qemu_console_is_graphic(scon->dcl.con)) {
|
||||
win32_kbd_set_window(NULL);
|
||||
}
|
||||
if (gui_grab && !gui_fullscreen) {
|
||||
sdl_grab_end(scon);
|
||||
}
|
||||
@@ -869,10 +846,7 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
|
||||
#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* only available since SDL 2.0.8 */
|
||||
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
|
||||
#endif
|
||||
#ifndef CONFIG_WIN32
|
||||
/* QEMU uses its own low level keyboard hook procedure on Windows */
|
||||
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
|
||||
#endif
|
||||
#ifdef SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED
|
||||
SDL_SetHint(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, "0");
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user