mirror of https://github.com/xemu-project/xemu.git
* Make keyutils independent from keyring in meson.build
* Simplify the NIC init code of the jazz machine a little bit * Minor qtest and avocado fixes -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmURS8gRHHRodXRoQHJl ZGhhdC5jb20ACgkQLtnXdP5wLbVn4A/+NQKFZcN7gVn5JXkK7kf6i01LNmAoqjj9 QeQL+WCoNC68OApw7DxIEnpBYT0G42NTHHx4SYeOvzJUzCpeWcxYzQUz58ObZML7 +OKsiOsaHu3/qOuihBCn43et6moLdDCWbee5Zr6JQv/Fjn3q3nEQZnJDWdw8vm1v csYQJZOD6HelLVMmbLfl1szzrykDTT53NhPncH/SjPz6we17sKqHqmT6LBUIsXcV u2LaowppKmT7Ooexu6SmsCagLhtWuYo1iGGcRqoojtRWo7eZtWLrAy2DJpyFkPBW AIYBfntRISZv4eBGCxcVfvODD/Q4OXHuYTfGzD3m+ELJ6hUk/+d4/aHJ2hm+KEm+ AD0IpDtimaEmyQTPlaWHhhEur/82JZ+zYlxUMPf3+hglB/rbr6fhA0SMAV6nwR0r N8jnB8UCml9oDxJVvDZyrcPMGFs1xlr5FVSHHEoL338SvSfjG3NOEtcNao9n6A8d rO2CfPzI7peQhKWAzJL+qpnmenyIniH23tFnf2mpOZ0g45ZWtJeT0CXL3aQO3XAZ m56pkM0d/etAHHRoLQ5D/iKZpwiTRLjdzsJ0gMAQsIuRlG/j5h+zou0vUMgm6F8F igRHLxytlywZBTCABm2XIlKmaJp8hQlVQMpKsv/BwzTvzzk0GGS5d1qzzFt5WWR7 4rSalTn5Xuw= =FioB -----END PGP SIGNATURE----- Merge tag 'pull-request-2023-09-25' of https://gitlab.com/thuth/qemu into staging * Make keyutils independent from keyring in meson.build * Simplify the NIC init code of the jazz machine a little bit * Minor qtest and avocado fixes # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmURS8gRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbVn4A/+NQKFZcN7gVn5JXkK7kf6i01LNmAoqjj9 # QeQL+WCoNC68OApw7DxIEnpBYT0G42NTHHx4SYeOvzJUzCpeWcxYzQUz58ObZML7 # +OKsiOsaHu3/qOuihBCn43et6moLdDCWbee5Zr6JQv/Fjn3q3nEQZnJDWdw8vm1v # csYQJZOD6HelLVMmbLfl1szzrykDTT53NhPncH/SjPz6we17sKqHqmT6LBUIsXcV # u2LaowppKmT7Ooexu6SmsCagLhtWuYo1iGGcRqoojtRWo7eZtWLrAy2DJpyFkPBW # AIYBfntRISZv4eBGCxcVfvODD/Q4OXHuYTfGzD3m+ELJ6hUk/+d4/aHJ2hm+KEm+ # AD0IpDtimaEmyQTPlaWHhhEur/82JZ+zYlxUMPf3+hglB/rbr6fhA0SMAV6nwR0r # N8jnB8UCml9oDxJVvDZyrcPMGFs1xlr5FVSHHEoL338SvSfjG3NOEtcNao9n6A8d # rO2CfPzI7peQhKWAzJL+qpnmenyIniH23tFnf2mpOZ0g45ZWtJeT0CXL3aQO3XAZ # m56pkM0d/etAHHRoLQ5D/iKZpwiTRLjdzsJ0gMAQsIuRlG/j5h+zou0vUMgm6F8F # igRHLxytlywZBTCABm2XIlKmaJp8hQlVQMpKsv/BwzTvzzk0GGS5d1qzzFt5WWR7 # 4rSalTn5Xuw= # =FioB # -----END PGP SIGNATURE----- # gpg: Signature made Mon 25 Sep 2023 04:58:48 EDT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2023-09-25' of https://gitlab.com/thuth/qemu: tests/avocado: fix waiting for vm shutdown in replay_linux hw/mips/jazz: Simplify the NIC setup code hw/mips/jazz: Move the NIC init code into a separate function tests/qtest/netdev-socket: Do not test multicast on Darwin tests/qtest/m48t59-test: Silence compiler warning with -Wshadow tests/qtest/netdev-socket: Raise connection timeout to 120 seconds meson.build: Make keyutils independent from keyring Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
494a6a2cf7
|
@ -114,6 +114,40 @@ static const MemoryRegionOps dma_dummy_ops = {
|
|||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
};
|
||||
|
||||
static void mips_jazz_init_net(NICInfo *nd, IOMMUMemoryRegion *rc4030_dma_mr,
|
||||
DeviceState *rc4030, MemoryRegion *dp8393x_prom)
|
||||
{
|
||||
DeviceState *dev;
|
||||
SysBusDevice *sysbus;
|
||||
int checksum, i;
|
||||
uint8_t *prom;
|
||||
|
||||
qemu_check_nic_model(nd, "dp83932");
|
||||
|
||||
dev = qdev_new("dp8393x");
|
||||
qdev_set_nic_properties(dev, nd);
|
||||
qdev_prop_set_uint8(dev, "it_shift", 2);
|
||||
qdev_prop_set_bit(dev, "big_endian", TARGET_BIG_ENDIAN);
|
||||
object_property_set_link(OBJECT(dev), "dma_mr",
|
||||
OBJECT(rc4030_dma_mr), &error_abort);
|
||||
sysbus = SYS_BUS_DEVICE(dev);
|
||||
sysbus_realize_and_unref(sysbus, &error_fatal);
|
||||
sysbus_mmio_map(sysbus, 0, 0x80001000);
|
||||
sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 4));
|
||||
|
||||
/* Add MAC address with valid checksum to PROM */
|
||||
prom = memory_region_get_ram_ptr(dp8393x_prom);
|
||||
checksum = 0;
|
||||
for (i = 0; i < 6; i++) {
|
||||
prom[i] = nd->macaddr.a[i];
|
||||
checksum += prom[i];
|
||||
if (checksum > 0xff) {
|
||||
checksum = (checksum + 1) & 0xff;
|
||||
}
|
||||
}
|
||||
prom[7] = 0xff - checksum;
|
||||
}
|
||||
|
||||
#define MAGNUM_BIOS_SIZE_MAX 0x7e000
|
||||
#define MAGNUM_BIOS_SIZE \
|
||||
(BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
|
||||
|
@ -138,7 +172,6 @@ static void mips_jazz_init(MachineState *machine,
|
|||
MemoryRegion *rtc = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *dma_dummy = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *dp8393x_prom = g_new(MemoryRegion, 1);
|
||||
NICInfo *nd;
|
||||
DeviceState *dev, *rc4030;
|
||||
MMIOKBDState *i8042;
|
||||
SysBusDevice *sysbus;
|
||||
|
@ -281,47 +314,11 @@ static void mips_jazz_init(MachineState *machine,
|
|||
}
|
||||
|
||||
/* Network controller */
|
||||
for (n = 0; n < nb_nics; n++) {
|
||||
nd = &nd_table[n];
|
||||
if (!nd->model) {
|
||||
nd->model = g_strdup("dp83932");
|
||||
}
|
||||
if (strcmp(nd->model, "dp83932") == 0) {
|
||||
int checksum, i;
|
||||
uint8_t *prom;
|
||||
|
||||
qemu_check_nic_model(nd, "dp83932");
|
||||
|
||||
dev = qdev_new("dp8393x");
|
||||
qdev_set_nic_properties(dev, nd);
|
||||
qdev_prop_set_uint8(dev, "it_shift", 2);
|
||||
qdev_prop_set_bit(dev, "big_endian", TARGET_BIG_ENDIAN);
|
||||
object_property_set_link(OBJECT(dev), "dma_mr",
|
||||
OBJECT(rc4030_dma_mr), &error_abort);
|
||||
sysbus = SYS_BUS_DEVICE(dev);
|
||||
sysbus_realize_and_unref(sysbus, &error_fatal);
|
||||
sysbus_mmio_map(sysbus, 0, 0x80001000);
|
||||
sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 4));
|
||||
|
||||
/* Add MAC address with valid checksum to PROM */
|
||||
prom = memory_region_get_ram_ptr(dp8393x_prom);
|
||||
checksum = 0;
|
||||
for (i = 0; i < 6; i++) {
|
||||
prom[i] = nd->macaddr.a[i];
|
||||
checksum += prom[i];
|
||||
if (checksum > 0xff) {
|
||||
checksum = (checksum + 1) & 0xff;
|
||||
}
|
||||
}
|
||||
prom[7] = 0xff - checksum;
|
||||
break;
|
||||
} else if (is_help_option(nd->model)) {
|
||||
error_report("Supported NICs: dp83932");
|
||||
exit(1);
|
||||
} else {
|
||||
error_report("Unsupported NIC: %s", nd->model);
|
||||
exit(1);
|
||||
}
|
||||
if (nb_nics == 1) {
|
||||
mips_jazz_init_net(&nd_table[0], rc4030_dma_mr, rc4030, dp8393x_prom);
|
||||
} else if (nb_nics > 1) {
|
||||
error_report("This machine only supports one NIC");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* SCSI adapter */
|
||||
|
|
|
@ -1763,8 +1763,9 @@ if gnutls.found()
|
|||
method: 'pkg-config')
|
||||
endif
|
||||
keyutils = not_found
|
||||
if get_option('keyring').enabled()
|
||||
keyutils = dependency('libkeyutils', required: false, method: 'pkg-config')
|
||||
if not get_option('libkeyutils').auto() or have_block
|
||||
keyutils = dependency('libkeyutils', required: get_option('libkeyutils'),
|
||||
method: 'pkg-config')
|
||||
endif
|
||||
|
||||
has_gettid = cc.has_function('gettid')
|
||||
|
@ -4229,6 +4230,7 @@ endif
|
|||
summary_info += {'AF_ALG support': have_afalg}
|
||||
summary_info += {'rng-none': get_option('rng_none')}
|
||||
summary_info += {'Linux keyring': have_keyring}
|
||||
summary_info += {'Linux keyutils': keyutils}
|
||||
summary(summary_info, bool_yn: true, section: 'Crypto')
|
||||
|
||||
# UI
|
||||
|
|
|
@ -121,6 +121,8 @@ option('avx512bw', type: 'feature', value: 'auto',
|
|||
description: 'AVX512BW optimizations')
|
||||
option('keyring', type: 'feature', value: 'auto',
|
||||
description: 'Linux keyring support')
|
||||
option('libkeyutils', type: 'feature', value: 'auto',
|
||||
description: 'Linux keyutils support')
|
||||
|
||||
option('af_xdp', type : 'feature', value : 'auto',
|
||||
description: 'AF_XDP network backend support')
|
||||
|
|
|
@ -122,6 +122,7 @@ meson_options_help() {
|
|||
printf "%s\n" ' libdaxctl libdaxctl support'
|
||||
printf "%s\n" ' libdw debuginfo support'
|
||||
printf "%s\n" ' libiscsi libiscsi userspace initiator'
|
||||
printf "%s\n" ' libkeyutils Linux keyutils support'
|
||||
printf "%s\n" ' libnfs libnfs block device driver'
|
||||
printf "%s\n" ' libpmem libpmem support'
|
||||
printf "%s\n" ' libssh ssh block device support'
|
||||
|
@ -345,6 +346,8 @@ _meson_option_parse() {
|
|||
--libexecdir=*) quote_sh "-Dlibexecdir=$2" ;;
|
||||
--enable-libiscsi) printf "%s" -Dlibiscsi=enabled ;;
|
||||
--disable-libiscsi) printf "%s" -Dlibiscsi=disabled ;;
|
||||
--enable-libkeyutils) printf "%s" -Dlibkeyutils=enabled ;;
|
||||
--disable-libkeyutils) printf "%s" -Dlibkeyutils=disabled ;;
|
||||
--enable-libnfs) printf "%s" -Dlibnfs=enabled ;;
|
||||
--disable-libnfs) printf "%s" -Dlibnfs=disabled ;;
|
||||
--enable-libpmem) printf "%s" -Dlibpmem=enabled ;;
|
||||
|
|
|
@ -93,7 +93,7 @@ class ReplayLinux(LinuxTest):
|
|||
% os.path.getsize(replay_path))
|
||||
else:
|
||||
vm.event_wait('SHUTDOWN', self.timeout)
|
||||
vm.shutdown(True)
|
||||
vm.wait()
|
||||
logger.info('successfully fihished the replay')
|
||||
elapsed = time.time() - start_time
|
||||
logger.info('elapsed time %.2f sec' % elapsed)
|
||||
|
|
|
@ -155,7 +155,7 @@ static void bcd_check_time(void)
|
|||
struct tm *datep;
|
||||
time_t ts;
|
||||
const int wiggle = 2;
|
||||
QTestState *s = m48t59_qtest_start();
|
||||
QTestState *qts = m48t59_qtest_start();
|
||||
|
||||
/*
|
||||
* This check assumes a few things. First, we cannot guarantee that we get
|
||||
|
@ -173,10 +173,10 @@ static void bcd_check_time(void)
|
|||
ts = time(NULL);
|
||||
gmtime_r(&ts, &start);
|
||||
|
||||
cmos_get_date_time(s, &date[0]);
|
||||
cmos_get_date_time(s, &date[1]);
|
||||
cmos_get_date_time(s, &date[2]);
|
||||
cmos_get_date_time(s, &date[3]);
|
||||
cmos_get_date_time(qts, &date[0]);
|
||||
cmos_get_date_time(qts, &date[1]);
|
||||
cmos_get_date_time(qts, &date[2]);
|
||||
cmos_get_date_time(qts, &date[3]);
|
||||
|
||||
ts = time(NULL);
|
||||
gmtime_r(&ts, &end);
|
||||
|
@ -207,7 +207,7 @@ static void bcd_check_time(void)
|
|||
g_assert_cmpint(ABS(t - s), <=, wiggle);
|
||||
}
|
||||
|
||||
qtest_quit(s);
|
||||
qtest_quit(qts);
|
||||
}
|
||||
|
||||
/* success if no crash or abort */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "qapi/qobject-input-visitor.h"
|
||||
#include "qapi/qapi-visit-sockets.h"
|
||||
|
||||
#define CONNECTION_TIMEOUT 60
|
||||
#define CONNECTION_TIMEOUT 120
|
||||
|
||||
#define EXPECT_STATE(q, e, t) \
|
||||
do { \
|
||||
|
@ -401,7 +401,7 @@ static void test_dgram_inet(void)
|
|||
qtest_quit(qts0);
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(CONFIG_DARWIN)
|
||||
static void test_dgram_mcast(void)
|
||||
{
|
||||
QTestState *qts;
|
||||
|
@ -414,7 +414,9 @@ static void test_dgram_mcast(void)
|
|||
|
||||
qtest_quit(qts);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
static void test_dgram_unix(void)
|
||||
{
|
||||
QTestState *qts0, *qts1;
|
||||
|
@ -511,7 +513,7 @@ int main(int argc, char **argv)
|
|||
if (has_ipv4) {
|
||||
qtest_add_func("/netdev/stream/inet/ipv4", test_stream_inet_ipv4);
|
||||
qtest_add_func("/netdev/dgram/inet", test_dgram_inet);
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(CONFIG_DARWIN)
|
||||
qtest_add_func("/netdev/dgram/mcast", test_dgram_mcast);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue