2 * QTest testcase for e1000e device generated by fuzzer
4 * Copyright (c) 2021 Red Hat, Inc.
6 * SPDX-License-Identifier: GPL-2.0-or-later
9 #include "qemu/osdep.h"
14 * https://bugs.launchpad.net/qemu/+bug/1879531
16 static void test_lp1879531_eth_get_rss_ex_dst_addr(void)
20 s
= qtest_init("-nographic -monitor none -serial none -M pc-q35-5.0");
22 qtest_outl(s
, 0xcf8, 0x80001010);
23 qtest_outl(s
, 0xcfc, 0xe1020000);
24 qtest_outl(s
, 0xcf8, 0x80001004);
25 qtest_outw(s
, 0xcfc, 0x7);
26 qtest_writeb(s
, 0x25, 0x86);
27 qtest_writeb(s
, 0x26, 0xdd);
28 qtest_writeb(s
, 0x4f, 0x2b);
30 qtest_writel(s
, 0xe1020030, 0x190002e1);
31 qtest_writew(s
, 0xe102003a, 0x0807);
32 qtest_writel(s
, 0xe1020048, 0x12077cdd);
33 qtest_writel(s
, 0xe1020400, 0xba077cdd);
34 qtest_writel(s
, 0xe1020420, 0x190002e1);
35 qtest_writel(s
, 0xe1020428, 0x3509d807);
36 qtest_writeb(s
, 0xe1020438, 0xe2);
37 qtest_writeb(s
, 0x4f, 0x2b);
41 int main(int argc
, char **argv
)
43 const char *arch
= qtest_get_arch();
45 g_test_init(&argc
, &argv
, NULL
);
47 if (strcmp(arch
, "i386") == 0 || strcmp(arch
, "x86_64") == 0) {
48 qtest_add_func("fuzz/test_lp1879531_eth_get_rss_ex_dst_addr",
49 test_lp1879531_eth_get_rss_ex_dst_addr
);