mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tests/libqos: remove global_qtest from virtio endianness checks
This is needed to support migration tests with qgraph. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1ce66ecec0
commit
d5006a45f5
3 changed files with 17 additions and 7 deletions
|
@ -21,6 +21,7 @@ typedef struct QVirtioDevice {
|
|||
const QVirtioBus *bus;
|
||||
/* Device type */
|
||||
uint16_t device_type;
|
||||
bool big_endian;
|
||||
} QVirtioDevice;
|
||||
|
||||
typedef struct QVirtQueue {
|
||||
|
@ -90,12 +91,6 @@ struct QVirtioBus {
|
|||
void (*virtqueue_kick)(QVirtioDevice *d, QVirtQueue *vq);
|
||||
};
|
||||
|
||||
static inline bool qvirtio_is_big_endian(QVirtioDevice *d)
|
||||
{
|
||||
/* FIXME: virtio 1.0 is always little-endian */
|
||||
return qtest_big_endian(global_qtest);
|
||||
}
|
||||
|
||||
static inline uint32_t qvring_size(uint32_t num, uint32_t align)
|
||||
{
|
||||
return ((sizeof(struct vring_desc) * num + sizeof(uint16_t) * (3 + num)
|
||||
|
@ -109,6 +104,7 @@ uint32_t qvirtio_config_readl(QVirtioDevice *d, uint64_t addr);
|
|||
uint64_t qvirtio_config_readq(QVirtioDevice *d, uint64_t addr);
|
||||
uint32_t qvirtio_get_features(QVirtioDevice *d);
|
||||
void qvirtio_set_features(QVirtioDevice *d, uint32_t features);
|
||||
bool qvirtio_is_big_endian(QVirtioDevice *d);
|
||||
|
||||
void qvirtio_reset(QVirtioDevice *d);
|
||||
void qvirtio_set_acknowledge(QVirtioDevice *d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue