chardev & doc misc
-----BEGIN PGP SIGNATURE----- iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmFAnJ4cHG1hcmNhbmRy ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5Q0KEAC4aEdENMUyvxLYRXb5 dAVpMZqiO3/PfyxJM9ABBikTQFIg5HqzvQzg1hHrzW7DXstzr9Of5yniCSGBvoDN xPF1TBBwvV5KiMffztM1h7eNAcy4wGxnauR1QH/OaQnUVV71pgAzdHWDZjgM85iG +wo72gBmTiKpI3S7yDKlM8dQM3ufxv4AaBRMAYZVkdTSjJLzm/QYRyZWvBd5oMKE Acff1M5a1HknmjRrVhrRDjeIdwD5cTjYoX1jIPimKTo+R5+FtOzTZtZOEl+9xhch RZQTH6Jx8CFGARyn29nJco7bg4WCHB2WqgidvdhyryB6Q5E36kdVN8xdrbu9F52P EJavI3v373To4XFf23EfqH0RW2npe4TiBow1J+EYKMIf7qcVNCsjNyCjMnw2YBRD +zrvEvDCNPOaBJmPgu9fXhptTA67xSIjmhpzaKvAawQPNQfayC2LYYV3XuyCalaz nJKV63z19jWzSchXOVUDL7jBxgTsqxSnpWcVrE7Lk5UEOtwztg56DrtXTMgv89QU TWqUs2q3nyOlfiSbpyVv/qxnb1id8bKOeB8Kszf9F/m1tgG6akgBM8YCa/98nU4p CnRQB7nmxww6E48cY+OVC8fJEmX+Zs/N4RFW+cQiHEPzVxOQwu077cbmnCoE2vOT XzsIXclIUNRRxTYyRGjuGtzpdg== =g2Rv -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/marcandre/tags/misc-pull-request' into staging chardev & doc misc # gpg: Signature made Tue 14 Sep 2021 13:59:10 BST # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/marcandre/tags/misc-pull-request: chardev: add some comments about the class methods chardev: remove needless class method chardev: Propagate error from logfile opening meson.build: fix comment typo docs: add supported host CPU architectures section Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
831aaf2496
@ -386,10 +386,9 @@ void suspend_mux_open(void)
|
|||||||
static int chardev_options_parsed_cb(Object *child, void *opaque)
|
static int chardev_options_parsed_cb(Object *child, void *opaque)
|
||||||
{
|
{
|
||||||
Chardev *chr = (Chardev *)child;
|
Chardev *chr = (Chardev *)child;
|
||||||
ChardevClass *class = CHARDEV_GET_CLASS(chr);
|
|
||||||
|
|
||||||
if (!chr->be_open && class->chr_options_parsed) {
|
if (!chr->be_open && CHARDEV_IS_MUX(chr)) {
|
||||||
class->chr_options_parsed(chr);
|
open_muxes(chr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -412,7 +411,6 @@ static void char_mux_class_init(ObjectClass *oc, void *data)
|
|||||||
cc->chr_accept_input = mux_chr_accept_input;
|
cc->chr_accept_input = mux_chr_accept_input;
|
||||||
cc->chr_add_watch = mux_chr_add_watch;
|
cc->chr_add_watch = mux_chr_add_watch;
|
||||||
cc->chr_be_event = mux_chr_be_event;
|
cc->chr_be_event = mux_chr_be_event;
|
||||||
cc->chr_options_parsed = open_muxes;
|
|
||||||
cc->chr_update_read_handler = mux_chr_update_read_handlers;
|
cc->chr_update_read_handler = mux_chr_update_read_handlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,18 +241,15 @@ static void qemu_char_open(Chardev *chr, ChardevBackend *backend,
|
|||||||
ChardevCommon *common = backend ? backend->u.null.data : NULL;
|
ChardevCommon *common = backend ? backend->u.null.data : NULL;
|
||||||
|
|
||||||
if (common && common->has_logfile) {
|
if (common && common->has_logfile) {
|
||||||
int flags = O_WRONLY | O_CREAT;
|
int flags = O_WRONLY;
|
||||||
if (common->has_logappend &&
|
if (common->has_logappend &&
|
||||||
common->logappend) {
|
common->logappend) {
|
||||||
flags |= O_APPEND;
|
flags |= O_APPEND;
|
||||||
} else {
|
} else {
|
||||||
flags |= O_TRUNC;
|
flags |= O_TRUNC;
|
||||||
}
|
}
|
||||||
chr->logfd = qemu_open_old(common->logfile, flags, 0666);
|
chr->logfd = qemu_create(common->logfile, flags, 0666, errp);
|
||||||
if (chr->logfd < 0) {
|
if (chr->logfd < 0) {
|
||||||
error_setg_errno(errp, errno,
|
|
||||||
"Unable to open logfile %s",
|
|
||||||
common->logfile);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,39 @@ The `Repology`_ site is a useful resource to identify
|
|||||||
currently shipped versions of software in various operating systems,
|
currently shipped versions of software in various operating systems,
|
||||||
though it does not cover all distros listed below.
|
though it does not cover all distros listed below.
|
||||||
|
|
||||||
|
Supported host architectures
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Those hosts are officially supported, with various accelerators:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - CPU Architecture
|
||||||
|
- Accelerators
|
||||||
|
* - Arm
|
||||||
|
- kvm (64 bit only), tcg, xen
|
||||||
|
* - MIPS
|
||||||
|
- kvm, tcg
|
||||||
|
* - PPC
|
||||||
|
- kvm, tcg
|
||||||
|
* - RISC-V
|
||||||
|
- tcg
|
||||||
|
* - s390x
|
||||||
|
- kvm, tcg
|
||||||
|
* - SPARC
|
||||||
|
- tcg
|
||||||
|
* - x86
|
||||||
|
- hax, hvf (64 bit only), kvm, nvmm, tcg, whpx (64 bit only), xen
|
||||||
|
|
||||||
|
Other host architectures are not supported. It is possible to build QEMU on an
|
||||||
|
unsupported host architecture using the configure ``--enable-tcg-interpreter``
|
||||||
|
option to enable the experimental TCI support, but note that this is very slow
|
||||||
|
and is not recommended.
|
||||||
|
|
||||||
|
Non-supported architectures may be removed in the future following the
|
||||||
|
:ref:`deprecation process<Deprecated features>`.
|
||||||
|
|
||||||
Linux OS, macOS, FreeBSD, NetBSD, OpenBSD
|
Linux OS, macOS, FreeBSD, NetBSD, OpenBSD
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
.. _Deprecated features:
|
||||||
|
|
||||||
Deprecated features
|
Deprecated features
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
@ -254,26 +254,58 @@ struct ChardevClass {
|
|||||||
|
|
||||||
bool internal; /* TODO: eventually use TYPE_USER_CREATABLE */
|
bool internal; /* TODO: eventually use TYPE_USER_CREATABLE */
|
||||||
bool supports_yank;
|
bool supports_yank;
|
||||||
|
|
||||||
|
/* parse command line options and populate QAPI @backend */
|
||||||
void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp);
|
void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp);
|
||||||
|
|
||||||
|
/* called after construction, open/starts the backend */
|
||||||
void (*open)(Chardev *chr, ChardevBackend *backend,
|
void (*open)(Chardev *chr, ChardevBackend *backend,
|
||||||
bool *be_opened, Error **errp);
|
bool *be_opened, Error **errp);
|
||||||
|
|
||||||
|
/* write buf to the backend */
|
||||||
int (*chr_write)(Chardev *s, const uint8_t *buf, int len);
|
int (*chr_write)(Chardev *s, const uint8_t *buf, int len);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read from the backend (blocking). A typical front-end will instead rely
|
||||||
|
* on chr_can_read/chr_read being called when polling/looping.
|
||||||
|
*/
|
||||||
int (*chr_sync_read)(Chardev *s, const uint8_t *buf, int len);
|
int (*chr_sync_read)(Chardev *s, const uint8_t *buf, int len);
|
||||||
|
|
||||||
|
/* create a watch on the backend */
|
||||||
GSource *(*chr_add_watch)(Chardev *s, GIOCondition cond);
|
GSource *(*chr_add_watch)(Chardev *s, GIOCondition cond);
|
||||||
|
|
||||||
|
/* update the backend internal sources */
|
||||||
void (*chr_update_read_handler)(Chardev *s);
|
void (*chr_update_read_handler)(Chardev *s);
|
||||||
|
|
||||||
|
/* send an ioctl to the backend */
|
||||||
int (*chr_ioctl)(Chardev *s, int cmd, void *arg);
|
int (*chr_ioctl)(Chardev *s, int cmd, void *arg);
|
||||||
|
|
||||||
|
/* get ancillary-received fds during last read */
|
||||||
int (*get_msgfds)(Chardev *s, int* fds, int num);
|
int (*get_msgfds)(Chardev *s, int* fds, int num);
|
||||||
|
|
||||||
|
/* set ancillary fds to be sent with next write */
|
||||||
int (*set_msgfds)(Chardev *s, int *fds, int num);
|
int (*set_msgfds)(Chardev *s, int *fds, int num);
|
||||||
|
|
||||||
|
/* accept the given fd */
|
||||||
int (*chr_add_client)(Chardev *chr, int fd);
|
int (*chr_add_client)(Chardev *chr, int fd);
|
||||||
|
|
||||||
|
/* wait for a connection */
|
||||||
int (*chr_wait_connected)(Chardev *chr, Error **errp);
|
int (*chr_wait_connected)(Chardev *chr, Error **errp);
|
||||||
|
|
||||||
|
/* disconnect a connection */
|
||||||
void (*chr_disconnect)(Chardev *chr);
|
void (*chr_disconnect)(Chardev *chr);
|
||||||
|
|
||||||
|
/* called by frontend when it can read */
|
||||||
void (*chr_accept_input)(Chardev *chr);
|
void (*chr_accept_input)(Chardev *chr);
|
||||||
|
|
||||||
|
/* set terminal echo */
|
||||||
void (*chr_set_echo)(Chardev *chr, bool echo);
|
void (*chr_set_echo)(Chardev *chr, bool echo);
|
||||||
|
|
||||||
|
/* notify the backend of frontend open state */
|
||||||
void (*chr_set_fe_open)(Chardev *chr, int fe_open);
|
void (*chr_set_fe_open)(Chardev *chr, int fe_open);
|
||||||
|
|
||||||
|
/* handle various events */
|
||||||
void (*chr_be_event)(Chardev *s, QEMUChrEvent event);
|
void (*chr_be_event)(Chardev *s, QEMUChrEvent event);
|
||||||
void (*chr_options_parsed)(Chardev *chr);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Chardev *qemu_chardev_new(const char *id, const char *typename,
|
Chardev *qemu_chardev_new(const char *id, const char *typename,
|
||||||
|
@ -78,7 +78,7 @@ endif
|
|||||||
|
|
||||||
accelerator_targets = { 'CONFIG_KVM': kvm_targets }
|
accelerator_targets = { 'CONFIG_KVM': kvm_targets }
|
||||||
if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
|
if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
|
||||||
# i368 emulator provides xenpv machine type for multiple architectures
|
# i386 emulator provides xenpv machine type for multiple architectures
|
||||||
accelerator_targets += {
|
accelerator_targets += {
|
||||||
'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
|
'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user