mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* More SVM fixes (Lara) * Module annotation database (Gerd) * Memory leak fixes (myself) * Build fixes (myself) * --with-devices-* support (Alex) # gpg: Signature made Fri 09 Jul 2021 17:23:52 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (48 commits) meson: Use input/output for entitlements target configure: allow the selection of alternate config in the build configs: rename default-configs to configs and reorganise hw/arm: move CONFIG_V7M out of default-devices hw/arm: add dependency on OR_IRQ for XLNX_VERSAL meson: Introduce target-specific Kconfig meson: switch function tests from compilation to linking vl: fix leak of qdict_crumple return value target/i386: fix exceptions for MOV to DR target/i386: Added DR6 and DR7 consistency checks target/i386: Added MSRPM and IOPM size check monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically usb: build usb-host as module monitor/usb: register 'info usbhost' dynamically usb: drop usb_host_dev_is_scsi_storage hook monitor: allow register hmp commands accel: build tcg modular accel: add tcg module annotations accel: build qtest modular accel: add qtest module annotations ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@ -219,6 +219,7 @@ enum USBDeviceFlags {
|
||||
USB_DEV_FLAG_IS_HOST,
|
||||
USB_DEV_FLAG_MSOS_DESC_ENABLE,
|
||||
USB_DEV_FLAG_MSOS_DESC_IN_USE,
|
||||
USB_DEV_FLAG_IS_SCSI_STORAGE,
|
||||
};
|
||||
|
||||
/* definition of a USB device */
|
||||
@ -465,7 +466,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p);
|
||||
|
||||
/* usb-linux.c */
|
||||
void hmp_info_usbhost(Monitor *mon, const QDict *qdict);
|
||||
bool usb_host_dev_is_scsi_storage(USBDevice *usbdev);
|
||||
|
||||
/* usb ports of the VM */
|
||||
|
||||
@ -561,6 +561,11 @@ const char *usb_device_get_product_desc(USBDevice *dev);
|
||||
|
||||
const USBDesc *usb_device_get_usb_desc(USBDevice *dev);
|
||||
|
||||
static inline bool usb_device_is_scsi_storage(USBDevice *dev)
|
||||
{
|
||||
return dev->flags & (1 << USB_DEV_FLAG_IS_SCSI_STORAGE);
|
||||
}
|
||||
|
||||
/* quirks.c */
|
||||
|
||||
/* In bulk endpoints are streaming data sources (iow behave like isoc eps) */
|
||||
|
||||
@ -51,4 +51,7 @@ int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags);
|
||||
void monitor_fdset_dup_fd_remove(int dup_fd);
|
||||
int64_t monitor_fdset_dup_fd_find(int dup_fd);
|
||||
|
||||
void monitor_register_hmp(const char *name, bool info,
|
||||
void (*cmd)(Monitor *mon, const QDict *qdict));
|
||||
|
||||
#endif /* MONITOR_H */
|
||||
|
||||
@ -72,5 +72,84 @@ void module_call_init(module_init_type type);
|
||||
bool module_load_one(const char *prefix, const char *lib_name, bool mayfail);
|
||||
void module_load_qom_one(const char *type);
|
||||
void module_load_qom_all(void);
|
||||
void module_allow_arch(const char *arch);
|
||||
|
||||
/**
|
||||
* DOC: module info annotation macros
|
||||
*
|
||||
* `scripts/modinfo-collect.py` will collect module info,
|
||||
* using the preprocessor and -DQEMU_MODINFO.
|
||||
*
|
||||
* `scripts/modinfo-generate.py` will create a module meta-data database
|
||||
* from the collected information so qemu knows about module
|
||||
* dependencies and QOM objects implemented by modules.
|
||||
*
|
||||
* See `*.modinfo` and `modinfo.c` in the build directory to check the
|
||||
* script results.
|
||||
*/
|
||||
#ifdef QEMU_MODINFO
|
||||
# define modinfo(kind, value) \
|
||||
MODINFO_START kind value MODINFO_END
|
||||
#else
|
||||
# define modinfo(kind, value)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* module_obj
|
||||
*
|
||||
* @name: QOM type.
|
||||
*
|
||||
* This module implements QOM type @name.
|
||||
*/
|
||||
#define module_obj(name) modinfo(obj, name)
|
||||
|
||||
/**
|
||||
* module_dep
|
||||
*
|
||||
* @name: module name
|
||||
*
|
||||
* This module depends on module @name.
|
||||
*/
|
||||
#define module_dep(name) modinfo(dep, name)
|
||||
|
||||
/**
|
||||
* module_arch
|
||||
*
|
||||
* @name: target architecture
|
||||
*
|
||||
* This module is for target architecture @arch.
|
||||
*
|
||||
* Note that target-dependent modules are tagged automatically, so
|
||||
* this is only needed in case target-independent modules should be
|
||||
* restricted. Use case example: the ccw bus is implemented by s390x
|
||||
* only.
|
||||
*/
|
||||
#define module_arch(name) modinfo(arch, name)
|
||||
|
||||
/**
|
||||
* module_opts
|
||||
*
|
||||
* @name: QemuOpts name
|
||||
*
|
||||
* This module registers QemuOpts @name.
|
||||
*/
|
||||
#define module_opts(name) modinfo(opts, name)
|
||||
|
||||
/*
|
||||
* module info database
|
||||
*
|
||||
* scripts/modinfo-generate.c will build this using the data collected
|
||||
* by scripts/modinfo-collect.py
|
||||
*/
|
||||
typedef struct QemuModinfo QemuModinfo;
|
||||
struct QemuModinfo {
|
||||
const char *name;
|
||||
const char *arch;
|
||||
const char **objs;
|
||||
const char **deps;
|
||||
const char **opts;
|
||||
};
|
||||
extern const QemuModinfo qemu_modinfo[];
|
||||
void module_init_info(const QemuModinfo *info);
|
||||
|
||||
#endif
|
||||
|
||||
@ -256,7 +256,7 @@ extern "C" {
|
||||
/* Mac OSX has a <stdint.h> bug that incorrectly defines SIZE_MAX with
|
||||
* the wrong type. Our replacement isn't usable in preprocessor
|
||||
* expressions, but it is sufficient for our needs. */
|
||||
#if defined(HAVE_BROKEN_SIZE_MAX) && HAVE_BROKEN_SIZE_MAX
|
||||
#ifdef HAVE_BROKEN_SIZE_MAX
|
||||
#undef SIZE_MAX
|
||||
#define SIZE_MAX ((size_t)-1)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user