mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'pull-shadow-2023-10-06' of https://repo.or.cz/qemu/armbru into staging
-Wshadow=local patches patches for 2023-10-06 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmUf72kSHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTDU4P/3R9y5D5d3cj4uI+eaM22+Da0MFUL2gq # bFL192gYj1cmnNqxp+d6ur7FbSlP2AuERHb50Off7jJzdNee+tEeRUPekY+HhKfT # 5Aj6r9M2jV3/sNXqzns7x9Yj2B8xaJlclKPUAaVAxIuhVradWqJiPSkc26sKPB7l # eyqjVvr9+GTQYPSh+YVbYDAUYU9rEL6FiWLPkKm7Kt3/xqp5pTVbUSQbgKQczGWL # /JFILJc5pjISzYPyVxDPSNJY9q4k37JtcJmsO94G9O0GEe5vE72I85OQwI3Fl824 # 1fc2bfkGB6cg1QcJAluOgjuMUe8Wqaw6tnnHgipr1mwFOizrQ9wQW2xRI9RRJfYa # bZmVWIw22P691pgTnFIHWKV6/A2xyq+j00VojQhLyMX9CPPCbIm9hKCZXz6lPGDt # xPX2//q866anFCCyQmimMSeJ4E1GgBTnWgLZMYJ+S3DL/VkW2FGZjiQMyOsRplDm # O6+m6GOiF3wW51uqphaRHwF+PxxNE4Dv+61pYEeKdQELSCAmYrN574BDPehVTcfa # luvSLZEl+qvUbkbw4ysrtiCX2YzVI4COxSscjxCXbku3wRbGSkHBeDadb3p17kuQ # 7FZILaFJo1wXHAine4/f6aNeV/GZihMqJ1cok6SDJh2E1PycF9NTdiKMb/6Zvvf+ # KOVyBhY4NXlj # =uE1Y # -----END PGP SIGNATURE----- # gpg: Signature made Fri 06 Oct 2023 07:28:41 EDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-shadow-2023-10-06' of https://repo.or.cz/qemu/armbru: (32 commits) linux-user/syscall.c: clean up local variable shadowing in xattr syscalls linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm() linux-user/mmap.c: clean up local variable shadowing linux-user/flatload: clean up local variable shadowing hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow target/ppc: Clean up local variable shadowing in kvm_arch_*_registers() trace/control: Clean up global variable shadowing sysemu/tpm: Clean up global variable shadowing softmmu/vl: Clean up global variable shadowing semihosting/arm-compat: Clean up local variable shadowing util/guest-random: Clean up global variable shadowing util/cutils: Clean up global variable shadowing in get_relocated_path() ui/cocoa: Clean up global variable shadowing semihosting: Clean up global variable shadowing qom/object_interfaces: Clean up global variable shadowing qemu-io: Clean up global variable shadowing qemu-img: Clean up global variable shadowing plugins/loader: Clean up global variable shadowing os-posix: Clean up global variable shadowing ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
@@ -549,7 +549,6 @@ static int oss_init_out(HWVoiceOut *hw, struct audsettings *as,
|
||||
hw->size_emul);
|
||||
hw->buf_emul = NULL;
|
||||
} else {
|
||||
int err;
|
||||
int trig = 0;
|
||||
if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) {
|
||||
oss_logerr (errno, "SNDCTL_DSP_SETTRIGGER 0 failed\n");
|
||||
|
||||
+4
-4
@@ -1872,20 +1872,20 @@ static void dump_init(DumpState *s, int fd, bool has_format,
|
||||
if (vmci) {
|
||||
uint64_t addr, note_head_size, name_size, desc_size;
|
||||
uint32_t size;
|
||||
uint16_t format;
|
||||
uint16_t guest_format;
|
||||
|
||||
note_head_size = dump_is_64bit(s) ?
|
||||
sizeof(Elf64_Nhdr) : sizeof(Elf32_Nhdr);
|
||||
|
||||
format = le16_to_cpu(vmci->vmcoreinfo.guest_format);
|
||||
guest_format = le16_to_cpu(vmci->vmcoreinfo.guest_format);
|
||||
size = le32_to_cpu(vmci->vmcoreinfo.size);
|
||||
addr = le64_to_cpu(vmci->vmcoreinfo.paddr);
|
||||
if (!vmci->has_vmcoreinfo) {
|
||||
warn_report("guest note is not present");
|
||||
} else if (size < note_head_size || size > MAX_GUEST_NOTE_SIZE) {
|
||||
warn_report("guest note size is invalid: %" PRIu32, size);
|
||||
} else if (format != FW_CFG_VMCOREINFO_FORMAT_ELF) {
|
||||
warn_report("guest note format is unsupported: %" PRIu16, format);
|
||||
} else if (guest_format != FW_CFG_VMCOREINFO_FORMAT_ELF) {
|
||||
warn_report("guest note format is unsupported: %" PRIu16, guest_format);
|
||||
} else {
|
||||
s->guest_note = g_malloc(size + 1); /* +1 for adding \0 */
|
||||
cpu_physical_memory_read(addr, s->guest_note, size);
|
||||
|
||||
+3
-3
@@ -83,7 +83,7 @@ void show_valid_soundhw(void)
|
||||
static struct soundhw *selected = NULL;
|
||||
static const char *audiodev_id;
|
||||
|
||||
void select_soundhw(const char *optarg, const char *audiodev)
|
||||
void select_soundhw(const char *name, const char *audiodev)
|
||||
{
|
||||
struct soundhw *c;
|
||||
|
||||
@@ -92,7 +92,7 @@ void select_soundhw(const char *optarg, const char *audiodev)
|
||||
}
|
||||
|
||||
for (c = soundhw; c->name; ++c) {
|
||||
if (g_str_equal(c->name, optarg)) {
|
||||
if (g_str_equal(c->name, name)) {
|
||||
selected = c;
|
||||
audiodev_id = audiodev;
|
||||
break;
|
||||
@@ -100,7 +100,7 @@ void select_soundhw(const char *optarg, const char *audiodev)
|
||||
}
|
||||
|
||||
if (!c->name) {
|
||||
error_report("Unknown sound card name `%s'", optarg);
|
||||
error_report("Unknown sound card name `%s'", name);
|
||||
show_valid_soundhw();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -283,13 +283,13 @@ static void memdev_reg_init_common(CXLDeviceState *cxl_dstate) { }
|
||||
|
||||
void cxl_device_register_init_common(CXLDeviceState *cxl_dstate)
|
||||
{
|
||||
uint64_t *cap_hdrs = cxl_dstate->caps_reg_state64;
|
||||
uint64_t *cap_h = cxl_dstate->caps_reg_state64;
|
||||
const int cap_count = 3;
|
||||
|
||||
/* CXL Device Capabilities Array Register */
|
||||
ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_ID, 0);
|
||||
ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1);
|
||||
ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count);
|
||||
ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_ID, 0);
|
||||
ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1);
|
||||
ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count);
|
||||
|
||||
cxl_device_cap_init(cxl_dstate, DEVICE_STATUS, 1, 2);
|
||||
device_reg_init_common(cxl_dstate);
|
||||
|
||||
@@ -55,8 +55,8 @@ static void acpi_dsdt_add_virtio(Aml *scope,
|
||||
|
||||
bus = sysbus_get_default();
|
||||
QTAILQ_FOREACH(kid, &bus->children, sibling) {
|
||||
DeviceState *dev = kid->child;
|
||||
Object *obj = object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MMIO);
|
||||
Object *obj = object_dynamic_cast(OBJECT(kid->child),
|
||||
TYPE_VIRTIO_MMIO);
|
||||
|
||||
if (obj) {
|
||||
VirtIOMMIOProxy *mmio = VIRTIO_MMIO(obj);
|
||||
|
||||
@@ -1049,7 +1049,6 @@ void pc_memory_init(PCMachineState *pcms,
|
||||
|
||||
if (machine->device_memory) {
|
||||
uint64_t *val = g_malloc(sizeof(*val));
|
||||
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
|
||||
uint64_t res_mem_end = machine->device_memory->base;
|
||||
|
||||
if (!pcmc->broken_reserved_end) {
|
||||
|
||||
@@ -365,8 +365,6 @@ void x86_cpu_pre_plug(HotplugHandler *hotplug_dev,
|
||||
|
||||
cpu_slot = x86_find_cpu_slot(MACHINE(x86ms), cpu->apic_id, &idx);
|
||||
if (!cpu_slot) {
|
||||
MachineState *ms = MACHINE(x86ms);
|
||||
|
||||
x86_topo_ids_from_apicid(cpu->apic_id, &topo_info, &topo_ids);
|
||||
error_setg(errp,
|
||||
"Invalid CPU [socket: %u, die: %u, core: %u, thread: %u] with"
|
||||
|
||||
+1
-3
@@ -1622,9 +1622,7 @@ void ahci_uninit(AHCIState *s)
|
||||
AHCIDevice *ad = &s->dev[i];
|
||||
|
||||
for (j = 0; j < 2; j++) {
|
||||
IDEState *s = &ad->port.ifs[j];
|
||||
|
||||
ide_exit(s);
|
||||
ide_exit(&ad->port.ifs[j]);
|
||||
}
|
||||
object_unparent(OBJECT(&ad->port));
|
||||
}
|
||||
|
||||
+1
-1
@@ -662,7 +662,7 @@ static void loongarch_irq_init(LoongArchMachineState *lams)
|
||||
sysbus_mmio_get_region(d, 2));
|
||||
|
||||
/* Connect pch_pic irqs to extioi */
|
||||
for (int i = 0; i < num; i++) {
|
||||
for (i = 0; i < num; i++) {
|
||||
qdev_connect_gpio_out(DEVICE(d), i, qdev_get_gpio_in(extioi, i));
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -313,8 +313,8 @@ fail:
|
||||
/* Queue might not be ready for start */
|
||||
continue;
|
||||
}
|
||||
int r = vhost_net_set_backend(&net->dev, &file);
|
||||
assert(r >= 0);
|
||||
int ret = vhost_net_set_backend(&net->dev, &file);
|
||||
assert(ret >= 0);
|
||||
}
|
||||
}
|
||||
if (net->nc->info->poll) {
|
||||
@@ -629,8 +629,8 @@ err_start:
|
||||
if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) {
|
||||
file.fd = VHOST_FILE_UNBIND;
|
||||
file.index = idx;
|
||||
int r = vhost_net_set_backend(&net->dev, &file);
|
||||
assert(r >= 0);
|
||||
int ret = vhost_net_set_backend(&net->dev, &file);
|
||||
assert(ret >= 0);
|
||||
}
|
||||
|
||||
vhost_dev_stop(&net->dev, vdev, false);
|
||||
|
||||
+1
-1
@@ -227,7 +227,7 @@ int usb_desc_endpoint(const USBDescEndpoint *ep, int flags,
|
||||
}
|
||||
|
||||
if (superlen) {
|
||||
USBDescriptor *d = (void *)(dest + bLength);
|
||||
d = (void *)(dest + bLength);
|
||||
|
||||
d->bLength = 0x06;
|
||||
d->bDescriptorType = USB_DT_ENDPOINT_COMPANION;
|
||||
|
||||
+4
-4
@@ -402,7 +402,7 @@ static void usb_hub_handle_control(USBDevice *dev, USBPacket *p,
|
||||
{
|
||||
unsigned int n = index - 1;
|
||||
USBHubPort *port;
|
||||
USBDevice *dev;
|
||||
USBDevice *pdev;
|
||||
|
||||
trace_usb_hub_set_port_feature(s->dev.addr, index,
|
||||
feature_name(value));
|
||||
@@ -411,7 +411,7 @@ static void usb_hub_handle_control(USBDevice *dev, USBPacket *p,
|
||||
goto fail;
|
||||
}
|
||||
port = &s->ports[n];
|
||||
dev = port->port.dev;
|
||||
pdev = port->port.dev;
|
||||
switch(value) {
|
||||
case PORT_SUSPEND:
|
||||
port->wPortStatus |= PORT_STAT_SUSPEND;
|
||||
@@ -419,8 +419,8 @@ static void usb_hub_handle_control(USBDevice *dev, USBPacket *p,
|
||||
case PORT_RESET:
|
||||
usb_hub_port_set(port, PORT_STAT_RESET);
|
||||
usb_hub_port_clear(port, PORT_STAT_RESET);
|
||||
if (dev && dev->attached) {
|
||||
usb_device_reset(dev);
|
||||
if (pdev && pdev->attached) {
|
||||
usb_device_reset(pdev);
|
||||
usb_hub_port_set(port, PORT_STAT_ENABLE);
|
||||
}
|
||||
usb_wakeup(s->intr, 0);
|
||||
|
||||
@@ -403,7 +403,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
|
||||
struct usb_msd_cbw cbw;
|
||||
uint8_t devep = p->ep->nr;
|
||||
SCSIDevice *scsi_dev;
|
||||
uint32_t len;
|
||||
int len;
|
||||
|
||||
if (s->needs_reset) {
|
||||
p->status = USB_RET_STALL;
|
||||
@@ -465,7 +465,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
|
||||
usb_msd_copy_data(s, p);
|
||||
}
|
||||
if (le32_to_cpu(s->csw.residue)) {
|
||||
int len = p->iov.size - p->actual_length;
|
||||
len = p->iov.size - p->actual_length;
|
||||
if (len) {
|
||||
usb_packet_skip(p, len);
|
||||
if (len > s->data_len) {
|
||||
@@ -526,7 +526,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p)
|
||||
usb_msd_copy_data(s, p);
|
||||
}
|
||||
if (le32_to_cpu(s->csw.residue)) {
|
||||
int len = p->iov.size - p->actual_length;
|
||||
len = p->iov.size - p->actual_length;
|
||||
if (len) {
|
||||
usb_packet_skip(p, len);
|
||||
if (len > s->data_len) {
|
||||
|
||||
+5
-5
@@ -217,10 +217,10 @@ enum {
|
||||
(((data) >> field##_SHIFT) & field##_MASK)
|
||||
|
||||
#define set_field(data, newval, field) do { \
|
||||
uint32_t val = *data; \
|
||||
val &= ~(field##_MASK << field##_SHIFT); \
|
||||
val |= ((newval) & field##_MASK) << field##_SHIFT; \
|
||||
*data = val; \
|
||||
uint32_t val_ = *data; \
|
||||
val_ &= ~(field##_MASK << field##_SHIFT); \
|
||||
val_ |= ((newval) & field##_MASK) << field##_SHIFT; \
|
||||
*data = val_; \
|
||||
} while (0)
|
||||
|
||||
typedef enum EPType {
|
||||
@@ -1894,7 +1894,7 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid)
|
||||
}
|
||||
|
||||
if (epctx->retry) {
|
||||
XHCITransfer *xfer = epctx->retry;
|
||||
xfer = epctx->retry;
|
||||
|
||||
trace_usb_xhci_xfer_retry(xfer);
|
||||
assert(xfer->running_retry);
|
||||
|
||||
@@ -1010,7 +1010,7 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd)
|
||||
* Speeds are defined in linux/usb/ch9.h, file not included
|
||||
* due to name conflicts.
|
||||
*/
|
||||
int rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL);
|
||||
rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL);
|
||||
switch (rc) {
|
||||
case 1: /* low */
|
||||
libusb_speed = LIBUSB_SPEED_LOW;
|
||||
|
||||
+4
-4
@@ -66,12 +66,12 @@ static void vhost_dev_sync_region(struct vhost_dev *dev,
|
||||
uint64_t mfirst, uint64_t mlast,
|
||||
uint64_t rfirst, uint64_t rlast)
|
||||
{
|
||||
vhost_log_chunk_t *log = dev->log->log;
|
||||
vhost_log_chunk_t *dev_log = dev->log->log;
|
||||
|
||||
uint64_t start = MAX(mfirst, rfirst);
|
||||
uint64_t end = MIN(mlast, rlast);
|
||||
vhost_log_chunk_t *from = log + start / VHOST_LOG_CHUNK;
|
||||
vhost_log_chunk_t *to = log + end / VHOST_LOG_CHUNK + 1;
|
||||
vhost_log_chunk_t *from = dev_log + start / VHOST_LOG_CHUNK;
|
||||
vhost_log_chunk_t *to = dev_log + end / VHOST_LOG_CHUNK + 1;
|
||||
uint64_t addr = QEMU_ALIGN_DOWN(start, VHOST_LOG_CHUNK);
|
||||
|
||||
if (end < start) {
|
||||
@@ -549,7 +549,7 @@ static void vhost_commit(MemoryListener *listener)
|
||||
changed = true;
|
||||
} else {
|
||||
/* Same size, lets check the contents */
|
||||
for (int i = 0; i < n_old_sections; i++) {
|
||||
for (i = 0; i < n_old_sections; i++) {
|
||||
if (!MemoryRegionSection_eq(&old_sections[i],
|
||||
&dev->mem_sections[i])) {
|
||||
changed = true;
|
||||
|
||||
+10
-10
@@ -780,15 +780,15 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
|
||||
pci_cfg_data),
|
||||
sizeof cfg->pci_cfg_data)) {
|
||||
uint32_t off;
|
||||
uint32_t len;
|
||||
uint32_t caplen;
|
||||
|
||||
cfg = (void *)(proxy->pci_dev.config + proxy->config_cap);
|
||||
off = le32_to_cpu(cfg->cap.offset);
|
||||
len = le32_to_cpu(cfg->cap.length);
|
||||
caplen = le32_to_cpu(cfg->cap.length);
|
||||
|
||||
if (len == 1 || len == 2 || len == 4) {
|
||||
assert(len <= sizeof cfg->pci_cfg_data);
|
||||
virtio_address_space_write(proxy, off, cfg->pci_cfg_data, len);
|
||||
if (caplen == 1 || caplen == 2 || caplen == 4) {
|
||||
assert(caplen <= sizeof cfg->pci_cfg_data);
|
||||
virtio_address_space_write(proxy, off, cfg->pci_cfg_data, caplen);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -804,15 +804,15 @@ static uint32_t virtio_read_config(PCIDevice *pci_dev,
|
||||
pci_cfg_data),
|
||||
sizeof cfg->pci_cfg_data)) {
|
||||
uint32_t off;
|
||||
uint32_t len;
|
||||
uint32_t caplen;
|
||||
|
||||
cfg = (void *)(proxy->pci_dev.config + proxy->config_cap);
|
||||
off = le32_to_cpu(cfg->cap.offset);
|
||||
len = le32_to_cpu(cfg->cap.length);
|
||||
caplen = le32_to_cpu(cfg->cap.length);
|
||||
|
||||
if (len == 1 || len == 2 || len == 4) {
|
||||
assert(len <= sizeof cfg->pci_cfg_data);
|
||||
virtio_address_space_read(proxy, off, cfg->pci_cfg_data, len);
|
||||
if (caplen == 1 || caplen == 2 || caplen == 4) {
|
||||
assert(caplen <= sizeof cfg->pci_cfg_data);
|
||||
virtio_address_space_read(proxy, off, cfg->pci_cfg_data, caplen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@ void deprecated_register_soundhw(const char *name, const char *descr,
|
||||
|
||||
void soundhw_init(void);
|
||||
void show_valid_soundhw(void);
|
||||
void select_soundhw(const char *optarg, const char *audiodev);
|
||||
void select_soundhw(const char *name, const char *audiodev);
|
||||
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -247,9 +247,9 @@ extern const char *host_net_devices[];
|
||||
|
||||
/* from net.c */
|
||||
extern NetClientStateList net_clients;
|
||||
bool netdev_is_modern(const char *optarg);
|
||||
void netdev_parse_modern(const char *optarg);
|
||||
void net_client_parse(QemuOptsList *opts_list, const char *str);
|
||||
bool netdev_is_modern(const char *optstr);
|
||||
void netdev_parse_modern(const char *optstr);
|
||||
void net_client_parse(QemuOptsList *opts_list, const char *optstr);
|
||||
void show_netdevs(void);
|
||||
void net_init_clients(void);
|
||||
void net_check_clients(void);
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
#define QEMU_GUEST_RANDOM_H
|
||||
|
||||
/**
|
||||
* qemu_guest_random_seed_main(const char *optarg, Error **errp)
|
||||
* @optarg: a non-NULL pointer to a C string
|
||||
* qemu_guest_random_seed_main(const char *seedstr, Error **errp)
|
||||
* @seedstr: a non-NULL pointer to a C string
|
||||
* @errp: an error indicator
|
||||
*
|
||||
* The @optarg value is that which accompanies the -seed argument.
|
||||
* The @seedstr value is that which accompanies the -seed argument.
|
||||
* This forces qemu_guest_getrandom into deterministic mode.
|
||||
*
|
||||
* Returns 0 on success, < 0 on failure while setting *errp.
|
||||
*/
|
||||
int qemu_guest_random_seed_main(const char *optarg, Error **errp);
|
||||
int qemu_guest_random_seed_main(const char *seedstr, Error **errp);
|
||||
|
||||
/**
|
||||
* qemu_guest_random_seed_thread_part1(void)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user